Jump to content

File talk:Quilt design as 46x46 uncompressed GIF.gif

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Parsing the file

[edit]

[material moved here from File page] -- Elphion (talk) 21:04, 3 August 2011 (UTC)[reply]

Permit me to do some Rubber duck debugging here, but this helps me and hopefully anyone else learning to decode an image. Decoding the encoded image above, the hex values of the first 6 bytes form the signature: GIF89a. The next two hex values form the width, and two hex values after that are height. Both are 46 in unsigned little endian format (The second byte: 00 is counted before 2E, making it 46). The brightly colored byte F6 is the compound bitfield for four flags. Hex F6 = Dec 246 = Bin 11110110, separated into fields as 1|111|0|110. Global Color Table flag: 1; Color Resolution: 111 (7 + 1 = 8 bits per primary); Sort flag: 0; Global Color Table Size: 110 = 2^(6+1) = 128. The next two bytes are Background Color Index: 0; and Pixel Aspect Ratio: 0. The next 384 (128 x 3) hex values are RGB color triplets composing the global color table, ending at the string of FFs. It should be noted that of 128 colors declared, 102 are used; so if you can't find some colors, there's your explanation. I'm out of time now, but I will be back.--72.80.1.236 (talk) 20:15, 3 August 2011 (UTC)[reply]

[some rewriting and correction applied to the above] -- Elphion (talk) 21:04, 3 August 2011 (UTC)[reply]