Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

prichunkpng does not adhere to chunk ordering #90

Open
drj11 opened this issue Feb 10, 2019 · 0 comments
Open

prichunkpng does not adhere to chunk ordering #90

drj11 opened this issue Feb 10, 2019 · 0 comments

Comments

@drj11
Copy link
Owner

drj11 commented Feb 10, 2019

Consider the PNG chunk ordering: https://www.w3.org/TR/2003/REC-PNG-20031110/#5ChunkOrdering

When there is a PLTE chunk, some chunks (iCCP, sRGB, sBIT, gAMA, cHRM) must precede PLTE, some chunks (tRNS, hIST, bKGD) mus follow PLTE.

So when adding chunks to a PNG file some ordering constraints must be enforced.

Example: Adding PLTE to a PNG file with a bKGD chunk should put the PLTE chunk before the bKGD chunk. Currently the tools puts it after.

Example: Adding PLTE to a PNG file that has both sBIT and bKGD chunks should possibly re-order sBIT and bKGD so that sBIT precedes bKGD and PLTE ends up between them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant