![.](loader.gif)
Name | pngrewrite |
Version | 1.4.0 |
Category | graphics |
Description | Utility to reduce unnecessarily large palettes and bit depths in PNG image files |
Maintainer | al.bobylev@gmail.com |
License | zlib/libpng |
Website | entropymine.com/jason/pngrewrite |
Sizes | |
Depends on | ![]() |
Download package |
|
Show receipt | |
Show files list | |
Show cooking log | |
Install package Remove package |
Description
Pngrewrite is command-line utility that reduces the unnecessarily large palettes that some programs write into PNG files. It also optimizes transparency data, and reduces the bits-per-pixel if possible. Handy for post-processing PNG files before putting them on a web site. Pngrewrite will:
Under no circumstances does pngrewrite change the actual pixel colors, or background color, or transparency of the image. If it ever does, that's a bug. --WARNING-- pngrewrite removes most extra (ancillary) information from the PNG file, such as text comments. Although this does make the file size smaller, the removed information may sometimes be important. The only ancillary chunks that are NOT removed are:
If the original image was interlaced, the new one will also be interlaced. Pngrewrite will not work at all on images that have more than 256 colors. Colors with the same RGB values but a different level of transparency count as different colors. The background color counts as an extra color if it does not occur in the image. It will also not work at all on images that have a color depth of 16 bits, since they cannot have a palette. This is a very inefficient program. It is (relatively) slow, and may use a lot of memory. To be specific, it uses about 5 bytes per pixel, no matter what the bit depth of the image is. This program is (hopefully) reasonably portable, and should compile without too much effort on most C compilers. It requires the libpng and zlib libraries. The pngrewrite code is structured as a library that could be used in other applications, but I have not documented the interface. How to use: From a command-line, run
To read from standard-input, or write to standard-output, use "-" for the filename. |