xtopng is a general-purpose image translator based on SDL, SDL_image, libpng, and png-saving code written by Philip D. Bober. It can read many different image formats and convert them to png. Supported input file types are anything your installation of SDL_image supports. Commandline syntax is simple:
xtopng [-flag] [-flag] file1 [file2] [...]
Currently supported flags:
- -[0-9]: Compression level. -0 disables compression, -9 uses maximum compression, in-between is in-between. If this flag is not specified, it uses zlib's default compression level.
- -r: Remove input files after conversion. This dangerous flag is obviously OFF by default. I've tried to be paranoid - it will not remove files it has not converted, and it will not remove read-only files - but I might have missed something, so play safe.
This code, mine and Philip's, is under the zlib license.