|
|
|
|
|
by discreditable
1477 days ago
|
|
I use optipng and advdef from advancecomp. # Linux People
find -iname *.png | xargs optipng -o7
find -iname *.png | xargs advdef -z4i50
# PowerShell People
gci -include *.png | % { optipng -o7 $_ ; advdef -z4i50 $_ }
advdef uses the zopfli or 7-zip compressor for png's deflate compression. If you want to be fancy you can use gnu parallel on linux to parallelize the compression and make the script a one-liner. (I know xargs can do it but I stopped using xargs after adopting gnu parallel). If you're powershell 7+ you add -parallel after %.If you want to do quantization you can use imagemagick's -colors to reduce to as many as you need. It doesn't even have to be <= 256. You can do say 300, 500, or even 1000 colors. This doesn't allow you to use a palette but fewer colors in a png often make things easier for the compressor to compress well. This is not lossless compression but can work well for simple artwork. |
|