image-shrinker
image-shrinker copied to clipboard
Compression lossy or not?
It seems that the compression is lossy? This is a PNG logo I compressed the other day.
Original:
Shrunk file, note the staircase effect:
(In Nextcloud for example we use Trimage for compression of JPG/PNG and scour for compression of SVG, which are both lossless and have not had issues. Lossy compression like SVGO and others have always led to issues, so we avoid them.)
Especially for SVG it needs to be not lossy since they are often the source files. If some of the methods used in Image Shrinker are lossy and others not, maybe a switch to "Compress even more! (smaller files but lossy compression)" or the like is best?
Ok, so according to the projects:
- :+1: mozjpeg is lossless
- :x: pngquant is lossy (they specifically say on their website, also see example above)
- 🤔 svgo seems lossless if used with the right attributes, cause it also seems to have lossy ones. (As said we had bad experience using it in Nextcloud.)
Good point, I love mozjpeg - for me it's the best, jpg compressor - it's quite fast and the results are great. But I will check out scour and optipng, pngcrush, advpng. Those png compressors are used by Trimage