Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compression lossy or not? #42

Open
jancborchardt opened this issue May 30, 2018 · 2 comments
Open

Compression lossy or not? #42

jancborchardt opened this issue May 30, 2018 · 2 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@jancborchardt
Copy link
Collaborator

It seems that the compression is lossy? This is a PNG logo I compressed the other day.

Original:
image-shrinker original

Shrunk file, note the staircase effect:
image-shrinker shrunk hard edge

(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?

@jancborchardt jancborchardt added the question Further information is requested label May 30, 2018
@jancborchardt
Copy link
Collaborator Author

jancborchardt commented May 31, 2018

Ok, so according to the projects:

  • 👍 mozjpeg is lossless
  • 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.)

@stefansl
Copy link
Owner

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

@stefansl stefansl added the enhancement New feature or request label May 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants