Skip to main content

apply_gain_map_oriented

Function apply_gain_map_oriented 

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

Reconstruct a PixelBuf and its resulting pending Orientation from a zero-copy DualLayerHdrView according to config.orientation, with optional cooperative cancellation and progress via pulse (pass None when not needed):

  • GainMapOrientation::Bake (default): reconstructs in stored coordinates, then physically applies dual.orientation(), returning (display_buf, Orientation::Identity) with display_buf.orientation() == Orientation::Identity.
  • GainMapOrientation::Passthrough: reconstructs in stored coordinates with zero transpose cost, returning (stored_buf, dual.orientation()) with stored_buf.orientation() == dual.orientation() for EXIF passthrough or GPU UV rotation.
  • GainMapOrientation::RequireIdentity: returns Err(ConvertError::UnsupportedRoute) if dual.orientation() != Orientation::Identity.