<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 01 Oct 2012 11:12:14 -0500
From   : jules.richardson99@... (Jules Richardson)
Subject: Manual GIF creation

On 09/30/2012 10:38 PM, J.G.Harston wrote:
> Can anybody help. What is wrong with China.gif that makes it not a GIF?

There seems to be a missing code size byte with value 07h at offset 197h, 
(see notes for the 'quilt' image that Ed mentioned), and the data blocks 
(e.g. "030h, 80h, ...") should follow this.

The LZW stream isn't right, either; you seem to have 128 lines of image 
data in there (1743 data blocks of 47 bytes each, less one byte for the 
stop code), rather than 512.

Adding the missing code size byte and duplicating the data blocks four 
times (making sure there's just a single stop byte at the end before the 
file terminator, of course) gives me a working image - albeit one which is 
staggered, but that's due to the order in which GIF decoders spit out line 
data and the way that 640 doesn't divide nicely by 47 :-)

cheers

Jules
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>