#[non_exhaustive]pub struct RawDecodeConfig {
pub demosaic: DemosaicMethod,
pub max_pixels: u64,
pub output: OutputMode,
pub target: OutputPrimaries,
pub exposure_ev: f32,
pub apply_crop: bool,
pub apply_orientation: bool,
pub wb_override: Option<[f32; 3]>,
}Expand description
Configuration for RAW/DNG decoding.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.demosaic: DemosaicMethodDemosaicing algorithm to use.
max_pixels: u64Maximum pixel count (width × height) before rejecting.
output: OutputModeOutput rendering mode.
target: OutputPrimariesTarget output color primaries.
Controls the RGB primaries of the output buffer. Only affects
Develop and Linear
modes; CameraRaw ignores this.
Default: Srgb.
exposure_ev: f32Exposure compensation in EV (stops).
Applied as a linear multiplier (2^exposure_ev) after WB + color matrix,
before tone mapping and gamma. Positive values brighten; negative darken.
Only affects Develop and Linear.
Default: 0.0 (no adjustment).
apply_crop: boolWhether to apply the crop specified in the RAW metadata.
apply_orientation: boolWhether to apply EXIF orientation (rotation/flip) to the output.
When true (default), the decoded image is rotated/flipped to match
display orientation, and RawInfo::orientation is set to 1.
When false, the raw sensor orientation is preserved.
wb_override: Option<[f32; 3]>Override white balance coefficients (RGB multipliers).
When set, these multipliers replace the camera’s as-shot WB
during the color pipeline. Only has effect in Develop
and Linear modes.
Values are relative multipliers (e.g., [1.0, 1.0, 1.0] = no WB,
[2.0, 1.0, 1.5] = boost red, slight blue).
Implementations§
Source§impl RawDecodeConfig
impl RawDecodeConfig
Sourcepub fn with_demosaic(self, method: DemosaicMethod) -> Self
pub fn with_demosaic(self, method: DemosaicMethod) -> Self
Set the demosaicing method.
Sourcepub fn with_max_pixels(self, max: u64) -> Self
pub fn with_max_pixels(self, max: u64) -> Self
Set maximum allowed pixel count.
Sourcepub fn with_output(self, mode: OutputMode) -> Self
pub fn with_output(self, mode: OutputMode) -> Self
Sourcepub fn with_target(self, primaries: OutputPrimaries) -> Self
pub fn with_target(self, primaries: OutputPrimaries) -> Self
Sourcepub fn with_exposure_ev(self, ev: f32) -> Self
pub fn with_exposure_ev(self, ev: f32) -> Self
Set exposure compensation in EV (stops).
Applied as 2^ev multiplier after WB + color matrix.
Positive brightens, negative darkens.
Sourcepub fn with_crop(self, apply: bool) -> Self
pub fn with_crop(self, apply: bool) -> Self
Set whether to apply the crop from RAW metadata (default: true).
Sourcepub fn with_orientation(self, apply: bool) -> Self
pub fn with_orientation(self, apply: bool) -> Self
Set whether to apply EXIF orientation transform (default: true).
When enabled, the output image matches display orientation and width/height reflect the rotated dimensions.
Trait Implementations§
Source§impl Clone for RawDecodeConfig
impl Clone for RawDecodeConfig
Source§fn clone(&self) -> RawDecodeConfig
fn clone(&self) -> RawDecodeConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RawDecodeConfig
impl Debug for RawDecodeConfig
Auto Trait Implementations§
impl Freeze for RawDecodeConfig
impl RefUnwindSafe for RawDecodeConfig
impl Send for RawDecodeConfig
impl Sync for RawDecodeConfig
impl Unpin for RawDecodeConfig
impl UnsafeUnpin for RawDecodeConfig
impl UnwindSafe for RawDecodeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more