Date : Mon, 01 Oct 2012 10:29:12 +0100
From : percy.p.person@... (Ed Spittles)
Subject: Manual GIF creation
>
> Can anybody help. What is wrong with China.gif that makes it not a GIF?
>
I built a tweaked ImageMagick and got this:
$ identify China.gif
data_size: 48, MaximumLZWBits: 12
China.gif GIF 640x512 640x512+0+0 8-bit PseudoClass 128c 85.8KB 0.000u
0:00.000
identify: CorruptImag4 `China.gif' @ error/gif.c/PingGIFImage/936.
My modification:
./coders/gif.c:934: printf("\ndata_size: %d, MaximumLZWBits:
%d\n",data_size,MaximumLZWBits);
./coders/gif.c-935- if (data_size > MaximumLZWBits)
./coders/gif.c-936-
ThrowBinaryException(CorruptImageError,"CorruptImag4",image->filename);
The current code is available to view at
http://trac.imagemagick.org/browser/ImageMagick/trunk/coders/gif.c#L934
(Slightly different version to the source I built from.)
There's an uncompressed GIF on this page
http://en.wikipedia.org/wiki/File:Quilt_design_as_46x46_uncompressed_GIF.gif
which ImageMagick is happy to 'identify' and 'display' - so it's capable of
dealing with such a thing. In this case, 'data_size' is reported as '7'
Hope this helps
Ed