wok-current diff pngrewrite/description.txt @ rev 22044

updated tmux (2.0 -> 2.9)
author Hans-G?nter Theisgen
date Tue Oct 22 13:52:50 2019 +0100 (2019-10-22)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/pngrewrite/description.txt	Tue Oct 22 13:52:50 2019 +0100
     1.3 @@ -0,0 +1,68 @@
     1.4 +Pngrewrite is command-line utility that reduces the unnecessarily large
     1.5 +palettes that some programs write into PNG files. It also optimizes
     1.6 +transparency data, and reduces the bits-per-pixel if possible. Handy for
     1.7 +post-processing PNG files before putting them on a web site.
     1.8 +
     1.9 +Pngrewrite will:
    1.10 +
    1.11 + * Remove any unused palette entries, and write a palette that is only as large
    1.12 +   as needed.
    1.13 + * Remove (collapse) any duplicate palette entries.
    1.14 + * Convert non-palette image to palette images, provided they contain no more
    1.15 +   than 256 different colors.
    1.16 + * Move any colors with transparency to the beginning of the palette, and write
    1.17 +   a tRNS chunk that is a small as possible.
    1.18 + * Reduce the bit-depth (bits per pixel) as much as possible.
    1.19 + * Write images as grayscale when possible, if that is compatible with the goal
    1.20 +   of using the minimum possible bit depth.
    1.21 +
    1.22 +Under no circumstances does pngrewrite change the actual pixel colors, or
    1.23 +background color, or transparency of the image. If it ever does, that's a bug.
    1.24 +
    1.25 +--WARNING--
    1.26 +
    1.27 +pngrewrite removes most extra (ancillary) information from the PNG file, such
    1.28 +as text comments. Although this does make the file size smaller, the removed
    1.29 +information may sometimes be important.
    1.30 +
    1.31 +The only ancillary chunks that are NOT removed are:
    1.32 +
    1.33 +  * gAMA - Image gamma setting
    1.34 +  * sRGB - srgb color space indicator
    1.35 +  * tIME - creation time
    1.36 +  * pHYs - physical pixel size
    1.37 +  * bKGD and tRNS - Background color and transparency are maintained. The
    1.38 +    actual chunk may be modified according to the new color structure.
    1.39 +
    1.40 +If the original image was interlaced, the new one will also be interlaced.
    1.41 +
    1.42 +Pngrewrite will not work at all on images that have more than 256 colors.
    1.43 +Colors with the same RGB values but a different level of transparency count as
    1.44 +different colors. The background color counts as an extra color if it does not
    1.45 +occur in the image.
    1.46 +
    1.47 +It will also not work at all on images that have a color depth of 16 bits,
    1.48 +since they cannot have a palette.
    1.49 +
    1.50 +-----------------
    1.51 +
    1.52 +This is a very inefficient program. It is (relatively) slow, and may use a lot
    1.53 +of memory. To be specific, it uses about 5 bytes per pixel, no matter what the
    1.54 +bit depth of the image is.
    1.55 +
    1.56 +This program is (hopefully) reasonably portable, and should compile without too
    1.57 +much effort on most C compilers. It requires the libpng and zlib libraries.
    1.58 +
    1.59 +The pngrewrite code is structured as a library that could be used in other
    1.60 +applications, but I have not documented the interface.
    1.61 +
    1.62 +-----------------
    1.63 +
    1.64 +How to use:
    1.65 +
    1.66 +From a command-line, run
    1.67 +
    1.68 +    pngrewrite.exe <input-file.png> <output-file.png>
    1.69 +
    1.70 +To read from standard-input, or write to standard-output, use "-" for the
    1.71 +filename.