repak shawahb
your little sister's cesspool tea party

^

   

rsw@jfet.org


blogroll

       
Thu, 27 Jan 2005

in case you were wondering

The smallest valid GIF image can be generated with the following command:

/usr/bin/printf
    "GIF87a\x1\x0\x1\x0\x80\x0\x0\xff\xff\xff\xff\xff\xff\x2c\x0\x0\x0\x0\x1\x0\x1\x0\x0\x2\x2\x44\x1\x0\x3b"
Correction:

Jim correctly points out that you don't actually need a color table. Moreover, only one byte of image data is actually necessary. Thus,

/usr/bin/printf "GIF87a\x1\x0\x1\x0\x0\x0\x0\x2c\x0\x0\x0\x0\x1\x0\x1\x0\x0\x1\x1\x0\x0\x3b"


[ permalink | 2 comments ]

writebacks

jim wrote


You are wrong. Both the global and local color maps are not technically required; the GIF87a spec says that a hardware-specific "default" color map would be used in that case.

repak wrote

I stand corrected.
How's this?
/usr/bin/printf "GIF87a\x1\x0\x1\x0\x0\x0\x0\x2c\x0\x0\x0\x0\x1\x0\x1\x0\x0\x1\x1\x0\x0\x3b"




post a comment:

Save name/email/&c
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key:
(Required)