fast removal of meta-data from PNG

last modified on 9 July 2019, by Cédric Louvrier

you could optimize PNG losslessly to remove those chunks. however, you could just remove some non-critical chunks from PNG, without processing the image data. pingo could do this in a very fast way recursively using the following command:

pingo -fast target

removes non-critical chunks

this should remove all non-critical chunks but: acTL, fcTL, fdAT, npTc and iCCP chunk if bigger than 600 bytes. you could have to combine this with -strip=N flag for more controls

pingo -strip=N
option what it does
-strip=1 keep ICC profile (whatever the size)
-strip=2 (or default) keep ICC profile (only if < 600 bytes)
-strip=3 do not keep ICC profile

fast removal of meta-data from 3000 PNG

removal of non-critical chunks in 3000 small PNG
tool options time
OptiPNG -nz -strip all 6.474s
pingo -fast 1.667s

big chunks

some image editors add big chunks which are not related to how the image is rendered. sometimes those chunks are larger than the image data itself. if you plan to use the image for web, you could just remove them — if you did a pingo optimization process, this should be done so there is no need to process the image again

original file: bear-yellow-itxt.png (98.34 KB): remove non-critical chunks without image data processing
original pingo -fast
bear yellow - original bear yellow - pingo
98.34 KB 22.48 KB (0.01s)