Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color space chunk precedence is repeated in a lot of places #443

Closed
fintelia opened this issue Apr 1, 2024 · 1 comment · Fixed by #444
Closed

Color space chunk precedence is repeated in a lot of places #443

fintelia opened this issue Apr 1, 2024 · 1 comment · Fixed by #444
Assignees
Milestone

Comments

@fintelia
Copy link

fintelia commented Apr 1, 2024

Now that #439 added a table explaining the precedence of color space chunks, it would make sense to have the individual chunk descriptions link to it. Looking at the individual descriptions, none of them seem to be wrong, but the wording varies and it feels unnecessary to have this info repeated so many times.

All of this could be replaced with a line saying something like, "This chunk is ignored unless it is the highest-precedence color chunk [link] understood by the decoder."


cHRM:

An sRGB, iCCP or cICP chunk, when present and recognized, overrides the cHRM chunk.

gAMA:

An sRGB, iCCP or cICP chunk, when present and recognized, overrides the gAMA chunk.

iCCP:

When the iCCP chunk is present, PNG decoders that recognize it and are capable of color management shall ignore the gAMA and cHRM chunks and use the iCCP chunk instead and interpret it according to [[ICC]]. PNG decoders that are used in an environment that is incapable of full-fledged color management should use the gAMA and cHRM chunks if present.

sRGB:

When the sRGB chunk is present, it is recommended that decoders that recognize it and are capable of color management ignore the gAMA and cHRM chunks and use the sRGB chunk instead. Decoders that recognize the sRGB chunk but are not capable of color management are recommended to ignore the gAMA and cHRM chunks, and use the values given above as if they had appeared in gAMA and cHRM chunks.

cICP:

When the cICP chunk is present, decoders that recognize it SHALL ignore the following chunks: iCCP, gAMA, cHRM, and sRGB

@ProgramMax ProgramMax added this to the 3rd edition milestone Apr 1, 2024
@ProgramMax
Copy link
Collaborator

Marking as '3rd edition' but I do not want this to block Third Edition. This is really just cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment