Back to Eric's Home Page Up to Site Map 28 Apr 2002

The gif2png home page

The gif2png program converts files from the obsolescent Graphic Interchange Format to Portable Network Graphics. The conversion preserves all graphic information, including transparency, perfectly. The gif2png program can even recover data from corrupted GIFs.

The distribution also includes a Python script, web2png, that will convert entire web hierarchies (images and HTML or PHP pages). The script requires Python 1.5.2 or later.

The current version is 2.4.4. The program has actually been functional and stable since 1996. See the NEWS file for more.

You can download a source tarball, a source ZIP archive, an Intel binary RPM, or a source RPM here.

The sources can be built under any Unix, or under MS-DOS or Windows using djgpp, or using Borland C. I don't know when the djgpp or Borland builds were last tested, but the Unix version is as stable as a rock.

Binaries of a Win32 port are available.

Note: Some ImageMagick 4.2.x versions have a bug displaying grayscale PNGs that makes it look like gif2png is broken. It's not. The bug has been fixed, at least as of 5.2.2.

History

This program was written by a German university student named Alexander Lehmann in 1994-1995. He evolved it to a beta version 0.6 and then dropped off the face of the net. In Fall 1999, after the program had been stable and in production use for four years, Greg Roelofs <newt@pobox.com> added some minor features and released an 0.7 patch.

A short time later, with Greg's consent, I took over maintaining gif2png in order to give it a proper manual page and release packaging. Alexander Lehmann is OK with this and has even approved a change in the license terms to use the libpng/zlib license.

Patent issues

The GIF format is encumbered by a Unisys patent for the Lempel-Ziv-Welch compression algorithm. Use of any GIF image generator not licensed by Unisys can make you liable to lawsuit. Unisys apparently refuses to issue licenses for use of LZW in open-source programs, and in 1999 stated that its policy is to require a $5000 fee from websites that carry GIF images made by unlicensed software -- even nonprofit websites created and displayed with free software.

The patent probably does not cover LZW decompressors such as the one gif2png uses; legal opinions are divided on this, there has been no court test, and Unisys refuses to commit itself. It is possible that you may be liable if you distribute gif2png in a commercial program, or distribute gif2png on a for-profit basis.

For a history of the GIF patent controversy, see http://lpf.ai.mit.edu/Patents/Gif/Gif.html. To avoid legal problems, it would be a good idea to convert all GIFs on your websites and elsewhere to PNGs without delay. See the Burn All GIFs Day site for discussion.

Compatibility

Non-transparent PNGs are displayed correctly in Netscape 4.04 and later, and in Internet Explorer 4.0b1 and later. Few current browsers support transparent PNGs well, or even at all; in deference to this fact, web2png does not convert GIFs that contain a transparency index unless you specify the -a (all) option.


Back to Eric's Home Page Up to Site Map 28 Apr 2002

Eric S. Raymond <esr@thyrsus.com>