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

diff PNG is missing IEND chunk/invalid CRC checksum #109

Open
jochen-testingbot opened this issue Sep 9, 2024 · 0 comments
Open

diff PNG is missing IEND chunk/invalid CRC checksum #109

jochen-testingbot opened this issue Sep 9, 2024 · 0 comments

Comments

@jochen-testingbot
Copy link

Hi,

When using odiff 3.1.1 or lower, a PNG file is correctly generated showcasing the diff between two images:

./node_modules/.bin/odiff one.png two.png --diff-mask diff.png

However, the diff.png seems to be slightly corrupted. When I try to convert it to for example jpg, ImageMagick will complain:

convert diff.png diff.jpg

convert: Expected 8 bytes; found 0 bytes `diff.png' @ warning/png.c/MagickPNGWarningHandler/1526.
convert: Read Exception `diff.png' @ error/png.c/MagickPNGErrorHandler/1492.
convert: no images defined `diff.jpg' @ error/deprecate.c/ConvertImageCommand/3368.

The PNG shows up fine in my Chrome browser or on macOS.
When I try to inspect/repair through https://compress-or-die.com/repair it will repair the image and I can use it with ImageMagick.
The output from this is:

Added missing IEND chunk. Probably the image file was truncated and the IDAT chunk could also be incomplete.
--
Combined all IDAT chunks.
Fixed CRC checksum for chunk "IDAT".
Fixed CRC checksum for chunk "IEND".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant