Open URenko opened 6 months ago
The problem in this case is that the ICC profile is invalid. lcms2 rejects it with:
Too many tags (4451)
libpng also refuses to write the profile to a PNG file:
convert: profile 'icc': C48h: length does not match profile
or with djpegli:
libpng warning: profile '1': C48h: length does not match profile
and discards it.
JPEG XL (reversibly) mangles the embedded ICC file in a way that makes it more compressible, but it appears something is getting very confused along the way by the invalid ICC profile. It's not clear what it should do, but what it definitely shouldn't do is report a success when the JXL file produced is not valid. (It doesn't decode with either libjxl, jxl-oxide, or jxlatte, for context.)
Describe the bug Failed to losslessly recompress and reconstruct some JPEG files.
To Reproduce JPEG file sample: 181.zip
Afer v0.9.0
Before v0.9.0
The behavior after v0.9.0 is particularly dangerous, as one might think that files successfully processed by cjxl can always be reconstructed by djxl, thereby deleting the original JPEG file and losing it forever.
Environment