The PNG Guide is an eBook based on Greg Roelofs' book, originally published by O'Reilly. |
Home Applications Applications: Image Converters gif2png | |
gif2pngThe simplest usage of gif2png is to give it the name of a GIF image: gif2png foo.gif The program will convert the image to a noninterlaced PNG, preserving any transparency, comments, and ``graphic control'' or ``application extension'' information. It will also add its own text chunk with the Software keyword, and it will automatically change the file extension from .gif to .png. There is one important caveat, however: the current version, gif2png 0.6, does not check for an existing file of the same name and will overwrite any such file without warning. Because gif2png renames the files it converts without user input, it can be used to convert a whole directory of GIF files in a single command. Under Unix, where the shell expands wildcard filenames (``globbing''), this is as simple as: gif2png *.gif On other operating systems, the filenames must be specified explicitly: gif2png a.gif b.gif c.gif d.gif e.gif foo.gif foo2.gif To prevent gif2png from adding a Software text chunk to the output image(s), use the -s option: gif2png -s foo.gif To do the same conversion but to an interlaced PNG, include the -i option: gif2png -s -i foo.gif gif2png -si foo.gif Despite all this, the program is quite stable and useful. It even converts
GIF comments from IBM codepage 437 to PNG's Latin-1 format, and it will
convert animated GIFs into multiple single-image PNGs. A planned option
that would have automatically deleted the GIF input images after conversion
was never implemented, nor was the capability of converting GIF Plain Text
Extensions into PNG gIFt chunks. But these are minor issues; in fact, the
gIFt chunk was officially declared Bad (that is, deprecated) in October 1998,
so its lack of support in gif2png turned out to be prescient. Indeed, the
only major problem with the program is the fact that it reads GIFs in the
first place. It is therefore (according to Unisys) subject to the LZW
The gif2png source code and ready-to-go binaries for Linux
can be found at http://www.tuxedo.org/~esr/gif2png/. (Older binaries for
DOS, OS/2, Amiga, and Macintosh may still exist elsewhere on the Web.)
A graphical port written by Nigel Stewart for 32-bit Windows, called The
Exorcist, supports drag and drop and is available from its own home page:
http://www.nigels.com/exorcist/Exorcist.html.
Version 1.1 is the latest release.
|
|
Home Applications Applications: Image Converters gif2png |