web2png man page
web2png — convert a web tree from using GIFs to using PNGs
web2png [-adnrtv] [directory...]
Web2png is a front end for gif2png(1) that automatically converts entire web page hierarchies from using GIFs to using PNGs. It does image conversion and patches IMG SRC references in web pages.
The arguments to web2png must be directories; if none are given, the current directory is assumed.
In each directory, web2png tries to convert every GIF to a PNG. It leaves alone GIFs that have multiple images, because these will not display properly in all current browsers. It also does not reconvert GIFs that already have corresponding PNGs (e.g. the same name except for the .gif file extension). The original GIFs are left in place.
The following options change the behavior of the program:
Convert all GIF files, including those with multiple images.
Delete originals. Removes all GIFs with corresponding PNGs, and all .bak files.
Make no changes. With this option, web2png reports on what needs to be done (and on GIFs that have multiple images), but neither converts GIFs nor touches web pages.
Reverse. Restore all HTML/SHTML/PHP pages from the .bak files created by a previous run (or, if the files were under version control, revert them). Remove PNGs with corresponding GIFs.
Verbose. Utter more trace information about the conversion process. Web2png can be run on a directory that has already been partly converted by previous runs; it will do the minimum necessary amount of work. The changes it makes will be fully reversible with -r until you run it in -d mode. Web2png is written in Python. Python 1.5.2 or better must be installed and accessible on your system in order for web2png to run.
Sometimes it's possible to convert transparent GIFs without altering the appearance of the page, by knowing from context that they will always place within an area of fixed and solid color. Web2png can't deduce when this will be, so it doesn't try; but it may be useful to apply gif2png with the -b option by hand.
The algorithm for fixing HTTP URLs is not foolproof. It could be confused into incorrectly patching an HTTP URL reference to a GIF into an invalid reference to a PNG if the GIF matches a local target GIF by both basename and binary content, but actually lives on another host.
This program does not automatically convert CGIs; you'll have to do that by hand. Other dynamic-content methods (such as server-side inclusions) may also require hand-hacking.
The program cannot tell converted from preexisting PNGs; if you have PNGs with the same stem name as corresponding GIFs but carrying different information, the -r mode will clobber them.
Eric S. Raymond <email@example.com>, October 1999.
Slightly modified for Debian by Aaron Isotton <firstname.lastname@example.org>.