This may result in images being inaccessible to older browsers. Apologies for the inconvenience.
For more information please see BurnAllGIFs.org
Eric Raymond has made an excellent tool web2png available from www.tuxedo.org/~esr/gif2png. web2png is written in Python and requires version 1.6. The included C program gif2png (requires libpng) converts individual files and includes a "web" option to check for transparency and animations, which are not currently (1999) supported by browsers in PNG.
Other image conversion tools, such as "convert" from ImageMagick, may also be used.
I have written a couple of Perl scripts to assist in website conversion -
pngbcol and
web2png.pl.
pngbcol sets the transparent colour in a PNG image to the background
colour ("bgcolor" parameter in the "body" tag) in an HTML page. This may be acceptable
for current browsers and a page with a solid background. pngbcol requires
GD version 1.22 ,
gd version 1.7, and Perl 5.004.
It could probably be rewritten in a few lines of C by a competent C person.
web2png.pl is a Perl rehash of web2png which uses pngbcol and
handles a couple of features found on my server - lots of junk GIFs which don't appear
online and should be deleted, and local absolute URLs (required in pages which have come
through server-side imagemap). Otherwise, web2png is probably better.
GIF images may also appear in external style-sheet documents and scripts, which may have a .css or .js extension. web2png now handles these.
Occasionally server-side imagemaps may refer to GIFs directly. Old servers may use imagemap.conf which links to individual map files; later servers probably use server-parsed imagemap with .map files in the document tree.
Scripts using old versions of e.g gnuplot or convert to generate GIFs may be updated. Later versions of gnuplot can generate PNG directly. Older versions used XBM images, which are compatible with old browsers but are monochrome.
Recent Netscape sends an "accept" header like "HTTP_ACCEPT=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*" along with "HTTP_ACCEPT_ENCODING=gzip". It would be possible to check for JPEG and PNG here, and send an appropriate version. One could fall back to an XBM image, an old monochrome format I believe supported by all graphic browsers. Ideally one should return a text page where a link is followed (anchor), and an image where an embedded image is expected (img). Here is a demo missing_handler.pl which tries to redirect GIF requests to a file with a PNG suffix.
Andrew Daviel