e803 - a story
One day I had my website open for a really long time. When I looked at the page, I noticed one GIF stopped animating. This puzzled me. Was this a bug in the browser? That would be weird, because the others were working fine.
I opened the hex editor and inspected the GIF. It didn't make me much smarter; I only noticed NETSCAPE2.0
and some file paths to GIF files of which I both thought was strange.
Then I started researching the GIF format. Apparently, the NETSCAPE2.0
is in virtually every animated GIF. It's an unofficial header for the GIF format; GIF89a could animate, but it could do so only once. That header contains two bytes that make up a number that makes up the amount of times it should loop. A value of 0 means loop forever.
The original GIF looped in hexadecimal E803
- or 59395
in decimal. I hex-edited the block to 0000
(loop infinite). But then as I gathered more GIFs I noticed that more of these GIFs stopped at the same time; they also had the value E803. Usually they also contain a weird header called GIFCONnb
containing filenames and zeros, and sometimes a comment:
This GIF file was assembled with GIF Construction Set from: Alchemy Mindworks Inc. P.O. Box 500 Beeton, Ontario L0G 1A0 CANADA. This comment block will not appear in files created with a registered version of GIF Construction Set
So many gifs contain this. I think the GIF editing program or whatever it is just set that header to E803
. It's so strange. Why would a program specialized in GIFs do this? Didn't the programmers notice?
Somewhere in all this I started to work on a program to make animated GIFs loop indefinitely again. Then I also made a comment remover, and unknown header remover, and a plain text extension block remover. This has impact on file archeology, but it shaves off some bytes.
Apparently you can still buy the weird software. If you hover over the images you get to see a funny message. This must have been the page around that time. or maybe even this. What a different time.
trivia
- The GIF format is older than the first C standard; C89 was finished in 1989 and the first version of GIF - 87a - was released 1987-06-15.
- There's a lot of debate how GIF should be pronounced; The promotion GIF for version 89a contained a Plain Text Extension Block(I've never seen anything that supported this extension block) with the following contents: "
Oh, incidentally, it'spronounced "JIF"
" - but who cares. - That promotion GIF is the only GIF I've found that contains a so-called "plain text extension block". I've never seen any software supporting it.