-grayscale

cédric (dev) said on 04/23/2018

added in 0.96f, the -grayscale switch allow the user to transform image data to gray levels. you can combine most of things in pingo with it:

PNG

-sN

:: convert to grayscale *without additional lossy*
pingo -s0 -grayscale <targets>
pingo -s0 -grayscale
original -s0 -grayscale
173 185 bytes 104 432 bytes

-auto

:: convert to grayscale *with additional lossy*
pingo -grayscale <targets>
pingo -auto -grayscale <targets> // same command
pingo -grayscale
original -grayscale
173 185 bytes 79 390 bytes

-pngpalette

:: convert to grayscale *with additional lossy*
pingo -pngpalette -grayscale <targets> 
pingo -pngpalette -grayscale
original -pngpalette -grayscale
173 185 bytes 57 060 bytes

JPG

:: convert to grayscale *with/without additional lossy*
pingo -grayscale <targets>
pingo -grayscale
original -grayscale
30 618 bytes 18 481 bytes

-jpgquality

:: convert to grayscale *with additional lossy*
pingo -grayscale -jpgquality=75 <targets>
pingo -jpgquality=75 -grayscale
original -jpgquality=75 -grayscale
30 618 bytes 12 402 bytes

-auto

in 0.97, there is something more. if the JPG is grayscale as input — or if you use -grayscale — pingo will try to guess if the image could be better as PNG

if the image is not grayscale

:: convert to grayscale *with/without additional lossy*
pingo -grayscale <targets>
pingo -grayscale
original (JPG) -grayscale (PNG)
120 565 bytes 24 346 bytes

if image is grayscale already

:: convert to grayscale *with/without additional lossy*
pingo <targets>
pingo
original (JPG) (PNG)
43 245 bytes 14 302 bytes
:: convert to grayscale *with additional lossy*
pingo -auto=5 <targets>
pingo -auto=5
original (JPG) (PNG)
43 245 bytes 10 101 bytes

since this is done automatically, it could not perform as well as -pngconvert. it makes sense to use it instead if you want to target specific compression for each files

comment this