So this works:
Code: Select all
identify image.png
Code: Select all
image.png PNG 1024x1024 1024x1024+0+0 8-bit sRGB 492KB 0.000u 0:00.000
Code: Select all
identify -verbose image.png
Code: Select all
identify -format "%A" image.png
Code: Select all
identify: Expected 8192 bytes; found 8067 bytes `image.png' @ warning/png.c/MagickPNGWarningHandler/1683.
identify: Read Exception `image.png' @ error/png.c/MagickPNGErrorHandler/1650.
identify: corrupt image `image.png' @ error/png.c/ReadPNGImage/4029.
So behaviour here is a bit inconsistent, and many other vendors choose to "deal" with such files by partially rendering it.
To help developers to use tool, it would be good to be able to identify corruption of file in all cases and print consistent info that file is corrupted so developers can make their app logic to react accordingly.