Skip to content

(Feature request) Writing of cICP/mDCV/cLLI chunks #626

@sboukortt

Description

@sboukortt

Currently, those chunks can be read:

image-png/src/common.rs

Lines 688 to 693 in ef61e7e

/// The coding-independent code points for video signal type identification of the image.
pub coding_independent_code_points: Option<CodingIndependentCodePoints>,
/// The mastering display color volume for the image.
pub mastering_display_color_volume: Option<MasteringDisplayColorVolume>,
/// The content light information for the image.
pub content_light_level: Option<ContentLightLevelInfo>,

but not written:

image-png/src/encoder.rs

Lines 593 to 616 in ef61e7e

// If specified, the sRGB information overrides the source gamma and chromaticities.
if let Some(srgb) = &info.srgb {
srgb.encode(&mut self.w)?;
// gAMA and cHRM are optional, for backwards compatibility
let srgb_gamma = crate::srgb::substitute_gamma();
if Some(srgb_gamma) == info.source_gamma {
srgb_gamma.encode_gama(&mut self.w)?
}
let srgb_chromaticities = crate::srgb::substitute_chromaticities();
if Some(srgb_chromaticities) == info.source_chromaticities {
srgb_chromaticities.encode(&mut self.w)?;
}
} else {
if let Some(gma) = info.source_gamma {
gma.encode_gama(&mut self.w)?
}
if let Some(chrms) = info.source_chromaticities {
chrms.encode(&mut self.w)?;
}
if let Some(iccp) = &info.icc_profile {
self.write_iccp_chunk("_", iccp)?
}
}

It would be nice to have.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions