Ultra-brute PNG meta-optimizer
PlanckPNG is a .png
meta-optimizer.
A meta-optimizer? PlanckPNG is not an optimizer by itself, it just calls multiple existing optimizers (Deflopt, Defluff, OptiPNG, PngOptimizer, PNGOUT, TruePNG, ZopfliPNG) in a specific order described by (not mine) analysis here: reddit.com/r/webdev/wiki.
PlanckPNG is a lossless PNG optimizer (except removing exif and alpha channel color info).
PlanckPNG is distributed as a docker image. This ensures consistent runtime environment with no configuration on your side (few of the included optimizers require wine to run on non Windows OS, which is already setup in the image).
- ✨ Best in class optimization
- 📂 Optimize single file or whole directory
# optimize all pngs in current directory (recursively)
docker run -v "$PWD:/img" matejkosiarcik/planckpng
# optimize a single png
docker run -v "$PWD/image.png:/img" matejkosiarcik/planckpng
# optimize all PNGs in current directory (recursively)
docker run -v "%cd%:/img" matejkosiarcik/planckpng
# optimize a single PNG
docker run -v "%cd%/image.png:/img" matejkosiarcik/planckpng
For maximum optimization, I recommend
- call Pngquant before PlanckPNG (beware Pngquant is lossy)
- use
--level ultra-brute
in PlanckPNG (beware this takes a really long time for any sizible PNG)
Example:
pngquant --strip --speed 1 --skip-if-larger --quality 0-95 --force 'image.png' --output 'image.png'
docker run -v "$PWD/image.png:/img" matejkosiarcik/planckpng --level ultra-brute
$ docker run matejkosiarcik/planckpng --help
usage: planckpng [-h] [-V] [-l {fast,default,brute,ultra-brute}] [-n] [-j JOBS]
[-v | -q]
optional arguments:
-h, --help show this help message and exit
-V, --version show program's version number and exit
-l {fast,default,brute,ultra-brute}, --level {fast,default,brute,ultra-brute}
Optimization level
-n, --dry-run Do not actually modify images
-j JOBS, --jobs JOBS Number of parallel jobs/threads to run (default is 0 -
automatically determine according to current cpu)
-v, --verbose Additional logging output
-q, --quiet Suppress default logging output
The project is licensed under LGPLv3. See LICENSE.txt for full details.