diff --git a/crates/raw/src/arw.rs b/crates/raw/src/arw.rs index 639fc00327..ed2ecdf6a6 100644 --- a/crates/raw/src/arw.rs +++ b/crates/raw/src/arw.rs @@ -830,7 +830,12 @@ pub(crate) fn decode(bytes: &[u8], mode: Mode, limits: &Limits) -> Result ColorData { baseline_sharpness: get(t::BASELINE_SHARPNESS).and_then(|v| v.first().copied()).filter(|v| v.is_finite() && *v > 0.0 && *v <= 16.0), profile: profile_look(ifd0, raw, order), kelvin_presets: None, + balanced_with: None, } } diff --git a/crates/raw/src/lib.rs b/crates/raw/src/lib.rs index dbcf6f9531..c69172e145 100644 --- a/crates/raw/src/lib.rs +++ b/crates/raw/src/lib.rs @@ -995,6 +995,12 @@ pub struct ColorData { /// matrices a Kelvin scale ([`kelvin`]). Not a DNG tag: the DNG writer does not write it. #[serde(default)] pub kelvin_presets: Option, + /// The as-shot multipliers (green = 1) the samples were already balanced with. Sony's downsized lossless (M / S) + /// ARWs store white-balanced linear YCbCr, so their `wb_multipliers` are unit and the data renders as delivered; + /// a white balance scale reads As Shot from these instead (storytold/lightcraft#4078). Not a DNG tag: the DNG + /// writer does not write it. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub balanced_with: Option<[f32; 3]>, } /// A decoded raw image.