Avoid rewriting identical bKGD chunk
Advanced PNG optimization program
Status: Beta
Brought to you by:
cosmin
Testing OptiPNG v0.7.7 (27-Dec-2017):
- bKGD
chunk is re-written, even if the chunk is the same as the original file.
- This may cause the chunk to change position relative to other metadata (which can be problematic for very niche use cases).
Suggestion: Check if the bKGD
chunk to be written has the same values as the original. Do not re-write if the data is the same.
Example test file: https://github.com/libjxl/testdata/blob/07d667afd68bb1ce3aff6132c8bc71d49b27ea3e/jxl/grayscale_patches.png