diff --git a/crates/raw/src/arw.rs b/crates/raw/src/arw.rs index 6ac30f37e1..cac2d8b4fc 100644 --- a/crates/raw/src/arw.rs +++ b/crates/raw/src/arw.rs @@ -848,7 +848,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 e12fe78baf..19c6318986 100644 --- a/crates/raw/src/lib.rs +++ b/crates/raw/src/lib.rs @@ -1017,6 +1017,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]>, } /// Bounded diagnostics for decisions actually made by a raw decoder. An absent optional tag