Skip to main content

check_source_color_authority

Function check_source_color_authority 

Source
pub fn check_source_color_authority(
    format: ImageFormat,
    sc: &SourceColor,
) -> Conformance
Expand description

A decoded SourceColor names the authority its format’s spec assigns.

The unit form of the check — run it on the source_color a decoder produced for a known input. The expected authority comes from expected_color_authority applied to the fields the decoder read back (so a decoder that reads no CICP is not expected to name it). Passes when the format has no recorded rule.

This is the “shared test helper” the issue #11 audit asked for: the authority-mismatch class of bug (HEIC naming Icc for an nclx-only file, so the CICP was dropped by SourceColor::to_color_context() and the pixels fell back to sRGB) is invisible to a pixel round trip and only shows up downstream in the CMS.