imagemin / imagemin-pngquant

Imagemin plugin for `pngquant`
MIT License
316 stars 81 forks source link

Add `strip` option #44

Closed DKurilo closed 6 years ago

DKurilo commented 6 years ago

This is from pngquant --help: pngquant, 2.10.1 (July 2017), by Kornel Lesinski, Greg Roelofs. Color profiles are supported via Little CMS. Using libpng 1.6.29.

usage: pngquant [options] [ncolors] -- pngfile [pngfile ...] pngquant [options] [ncolors] - >stdout <stdin

options: --force overwrite existing output files (synonym: -f) --skip-if-larger only save converted files if they're smaller than original --output file destination file path to use instead of --ext (synonym: -o) --ext new.png set custom suffix/extension for output filenames --quality min-max don't save below min, use fewer colors below max (0-100) --speed N speed/quality trade-off. 1=slow, 3=default, 11=fast & rough --nofs disable Floyd-Steinberg dithering --posterize N output lower-precision color (e.g. for ARGB4444 output) --strip remove optional metadata (default on Mac) --verbose print status messages (synonym: -v)

I created pull request to update windows version of pngquant in pngquant-bin and it wuld be greate to add this option in imagemin-pngquant.

geonanorch commented 6 years ago

Yes! Just wasted 1h trying to understand why some PNGs were not getting compressed, it was because of huge metadata.

One issue with this : currently pngquant-bin's binaries for windows are very dated (v2.4.0 instead of v2.11) and do not support the --strip option. I can see that @DKurilo opened PR#70 for this, just clarifying / warning other interested parties...