Portable Network Graphics (PNG)

PNG is a raster-graphics file format that supports lossless data compression. - wikipedia

PNG supports palette-based images, and full-color non-palette-based RGB or RGBA images.

Optimizing tools

Before zopflipng was available, a good way in practice to perform a png optimization is to use a combination of 2 tools in sequence for optimal compression: one which optimizes filters (and removes ancillary chunks), and one which optimizes DEFLATE. Although pngout offers both, only one type of filter can be specified in a single run, therefore it can be used with a wrapper tool or in combination with optipng or pngcrush, acting as a re-deflater, like advdef.

  • OptiPNG - overwrite file in place
optipng file1 [file2 ...]
pngcrush -brute -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem alla -rem text  input.png out.png

libPNG

see also

Written on November 9, 2020, Last update on August 8, 2024
png image image-lib