in reply to Output a GIF file with Perl, set width, height and color
in thread On-demand single-pixel GIFs

But see also the other node this code was posted at. :)

Makeshifts last the longest.