Re: [EXTERNAL] Re: Conformance files in PQ, HLG, SDR-BT.709?

On 2023-12-12 12:12, Simon Thompson - NM wrote:

> One item we may need to address is that it seems to me to be possible 
> using that program to create a PNG file with sRGB, cHRM, iCCP and cICP 
> chunks, all with different primary chromaticities.

It is possible, with that and other programs, yes.

We do have some (outdated) guidance in 13.14 Decoder colour handling
https://w3c.github.io/PNG-spec/#13Decoder-colour-handling

and 12.2 Encoder colour handling
https://w3c.github.io/PNG-spec/#12Encoder-colour-handling

Neither of these sections mentions cICP at all.

In the definition of cICP we have:
https://w3c.github.io/PNG-spec/#cICP-chunk

 >  When the cICP chunk is present, decoders that recognize it /SHALL/ 
ignore the following chunks:

  * iCCP <https://w3c.github.io/PNG-spec/#11iCCP>
  * gAMA <https://w3c.github.io/PNG-spec/#11gAMA>
  * cHRM <https://w3c.github.io/PNG-spec/#11cHRM>
  * sRGB <https://w3c.github.io/PNG-spec/#11sRGB>

Some of which is easily testable in a red-bad green-good way (iCCP 
profile or cHRM that swaps red and green, for example; wildly wrong gAMA 
chunk) and perhaps, testing that sRGB is ignored could be done with a 
cICP BT.2020 image and a suitable reference image which would at least 
be visibly different.

In the definition of iCCP we have
https://w3c.github.io/PNG-spec/#11iCCP

 > When the iCCP chunk is present, PNG decoders that recognize it and 
are capable of colour management shall ignore the gAMA 
<https://w3c.github.io/PNG-spec/#11gAMA> and cHRM 
<https://w3c.github.io/PNG-spec/#11cHRM> chunks and use the iCCP chunk 
instead and interpret it according to [ICC 
<https://w3c.github.io/PNG-spec/#bib-icc>].

which is similarly testable.

And lastly in the definition of cHRM
https://w3c.github.io/PNG-spec/#11cHRM

 > An sRGB <https://w3c.github.io/PNG-spec/#11sRGB>, iCCP 
<https://w3c.github.io/PNG-spec/#11iCCP> or cICP 
<https://w3c.github.io/PNG-spec/#cICP-chunk> chunk, when present and 
recognized, overrides the cHRM chunk.

-- 
Chris Lilley
@svgeesus
Technical Director @ W3C
W3C Strategy Team, Core Web Design
W3C Architecture & Technology Team, Core Web & Media

Received on Tuesday, 12 December 2023 18:57:55 UTC