opt-png(1) opt-png(1)
NAME
opt-png - losslessly optimize PNG image files
SYNOPSIS
opt-png [-g(ray)] [-h(elp)] [-q(uiet)] [-r(es) DPI] [-t(ouch)] file...
DESCRIPTION
opt-png losslessly optimizes PNG images by removing unused palette entries and/or optimizing the filtering algorithm. This is accom- plished using a combination of the filesize, pngcrush, pngrecolor, pngstrip, and tempname utilities.
OPTIONS
-g Force output to grayscale. -h Print help and quit. -q Quiet output. No output commentary will be printed. -r DPI Write the specified resolution into the pHYs chunk of the output file. Units are in pixels-per-inch. To convert from pixels- per-meter, multiply by 0.0254 (or divide by 39.37). Note that this does not change the number of pixels in the image. It only changes the assumed size of the pixels. -t Preserve timestamp on modified files.
EXAMPLES
Optimize a couple of image files: opt-png image001.png image002.png Optimize all PNG images in an entire directory tree: find . -name "*.png" -exec opt-png {} \; Or alternatively, optimize all PNG images this way: find . -name "*.png" -print0 | xargs -0 opt-png Fully utilize a quad-core system while optimizing all PNG images: find . -name "*.png" -print0 | xargs -0 -n 1 -P 4 opt-png find . -name "*.png" | parallel opt-png
NOTES
If at all possible, make sure that pngcrush version 1.6.x or later is running on your computer. It performs substantially better than pngcrush 1.5.10 (and earlier) on black-and-white (and other low-color) images due to use of the Z_RLE zlib strategy.
SEE ALSO
filesize(1), pngcrush(1), pngrecolor(1), pngstrip(1), tempname(1)
COPYRIGHT
Copyright (C) 2004-2020 by Brian Lindholm. This program is free soft- ware; you can use it, redistribute it, and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. littleutils 2020 Oct 19 opt-png(1)
littleutils 1.2.3 - Generated Thu Dec 3 07:41:27 CST 2020