Paddy wrote:
Worth noting, that the 4 bytes (starting at position 7, 2 for each) defining the width & height, are individually reversed. Example - today's FOTD starts (in Hex): 47 49 46 38 39 61 80 02 E0 01 ; GIF89aEUR.à. G I F 8 9 a
80 02 gets reversed ie 0280 - in decimal - 640 E0 01 gets reversed ie 01E0 - in decimal - 480
Whether they are "reversed" or not is a matter of religion. :-) The GIF specification states that byte order shall be little endian (least significant byte first). Those particular data items are only two bytes long, so the bytes are "swapped" from the way they are written in English. (But not Arabic :-). On a PC, all binary numeric data is written this way, it's not specific to GIF. At the time the GIF spec was written, PCs were Little Endian and just about everything else (Unix, and later Mac) were big endian. The point was that if GIF was to be independent of platform, byte order would have to be specified, so they specified little endian. With Intel hardware taking over almost all computing, little endian is now almost a standard. Your humble Fractint team had a big impact on the GIF spec, not that it was a democratic process, far from it. The members of the graphics developers forum opined and discussed and the GIF spec author lurked without every commenting. Then he just put out the Spec. Those of us in the graphics developers forum probably saw it first and gave plenty of feedback, but I don't recall any indication that the authjor paid attention. For GIF87a, fractint just appended fractal data after the GIF terminator, and when users uploaded files to CompuServe, their software stripped it and everyone howled. So GIF89a has an "extension block" scheme that provided a mechanism to place binary data safely inside the GIF file. The day the GIF89a spec came out, a new version of Fractint came out supporting it. My memory might not be correct, by I think I joined the Compuserve before Bert Tyler precisely to add GIF support to Bert's program. I didn't know Bert, but I admired his program, and I invited him to also join so we could both have access the the graphics developers forum. Bert's first versions of what became fractint could neither read nore write GIF. My first contribution was to add GIF support. This seems like a really, really long time ago. My first Fractint development computer was an intel 286 chip machine. The GIF spec can be found at this unofficial link, and probably many others: http://www.martinreddy.net/gfx/2d/GIF89a.txt Tim