Skip to main content

apply_gain_map_with

Function apply_gain_map_with 

Source
pub fn apply_gain_map_with(
    dual: &DualLayerHdrView<'_>,
    config: &GainMapApplyConfig,
    pulse: Option<&dyn Pulse>,
) -> Result<PixelBuf, At<ConvertError>>
Expand description

Reconstruct a PixelBuf from a zero-copy DualLayerHdrView with full control over target headroom/rendition (GainMapApplyConfig::from_headroom_stops or GainMapApplyConfig::from_display_boost_linear), resampling kernel, orientation policy, conversion policy, optional target PixelFormat, and optional cooperative Pulse cancellation/progress (pass None when not needed).

Refuses GainMapOrientation::Passthrough when dual.orientation() != Orientation::Identity so a pending rotation is never silently discarded (use apply_gain_map_oriented when you want the stored-coordinate buffer paired with its pending Orientation).