Import of raw RGB image data fails since 1.3.27
Swiss army knife of image processing
Brought to you by:
bfriesen
I have some external image source which provides the raw RGB data for the image using plane interlacing. Creating an image from this source worked up to version 1.3.26, but fails from 1.3.27 onwards. I have created a command line test case which demonstrates the error.
I have attached a 32x32 PNG image, which is used as the base of the test
# Convert the PNG to raw RGB planes in a single file
gm convert test32.png +profile '*' -format RGB -interlace Plane -depth 8 intermediate.rgb
# the file has the correct size (32x32x3 = 3072)
$ ls -la intermediate.rgb
-rw-r--r-- 1 volker staff 3072 30 Dez 16:10 intermediate.rgb
# Convert the RGB planes back to a PNG
gm convert -size '32x32' -format RGB -interlace Plane -depth 8 intermediate.rgb result.png
This works up to 1.3.24, but from 1.3.27 onwards it fails with this error message:
gm convert: Unexpected end-of-file (intermediate.rgb).
This problem is fixed by Mercurial changeset 16435:19d52281bfdb. Test suite coverage has been added so it will not happen again. Thank you very much for reporting this issue!