-fast and -strip=N

cédric (dev) said on 09/29/2017

pingo 0.91f was released with a new management of JPG files (also, with -fast & -strip= options). let's do a simple comparison with older pingo and other tools


pingo 0.91f
samples.zip — FX-4100 @ 3.6 Ghz - 8 Go RAM - Windows 7 64-bit
tool version binary options time saved
ECT df17d6e 64-bit (SSE4) -1 -s 0.64s 6.31 KB
-progressive -s 4.91s 210.47 KB
Leanify 3460f4f 64-bit (default) -f 0.87s 6.31 KB
5.19s 210.47 KB
pingo 0.91 64-bit (default) -s0 0.27s 6.40 KB
-s3 1.92s 210.47 KB
pingo 0.91f 64-bit (default) -fast 0.02s 166.05 KB
-s0 0.28s 166.05 KB
-s3 1.97s 210.47 KB

extra data

to understand what happens here, take a look into these files

dscn0010.jpg bike.jpg nature.jpg
JFIF (16)
EXIF (11844)
XMP  (4031)

JFIF (16)
EXIF (13684)
ICC  (576)
XMP  (2879)

JFIF (16)
EXIF (4719)
IPTC (6368)
XMP  (9318)
ICC  (576)

the precedent implementation checks output size, and writes only (or do backup) if it is smaller. but if output is bigger than original, it just does anything

tool / file version option dscn0010.jpg bike.jpg nature.jpg
pingo 0.91 -s0 50.91 KB in 0.02s 16.76 KB in 0.04s 00.00 KB in 0.06s
pingo 0.91f -s0 50.91 KB in 0.02s 16.19 KB in 0.04s 19.93 KB in 0.07s
  • dscn0010.jpg could be optimized. since the output is smaller for each version, it does the same job: it removes all unuseful data and optimize huffman tables
  • bike.jpg is a good example of what does 0.91f: unlike 0.91, it keeps ICC profiles (576 bytes) which have an impact on colors — differences: original | pingo 0.91 | pingo 0.91f
  • nature.jpg: pingo 0.91 produces a bigger output with -s0 so it does not write anything. 0.91f produces the same result but it removes unuseful segments anyway

what is -fast

this option will disable any PNG/JPG optimization. however, since it removes some JPG segments/PNG chunks in files, it could reduce filesize significantly. note that this removal is enable by default in all pingo's profiles

:: default
pingo -fast <targets>

what is -strip=N

edit 08/24/2018 (0.98.1)

this option could be combined with any options (not only -fast).

option JPG PNG
0 no strip no strip
1 keep ICC keep iCCP
2 (default) keep ICC (only if < 600 bytes) keep iCCP (only if < 600 bytes)
3 keep only critical keep only critical

comment this