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

allow_lossy improvements? #71

Closed
bdarfler opened this issue Dec 10, 2014 · 3 comments
Closed

allow_lossy improvements? #71

bdarfler opened this issue Dec 10, 2014 · 3 comments

Comments

@bdarfler
Copy link

Hi @toy. In #65 (comment) you mentioned using :allow_lossy in pngquant and jpegoptim but it looks like it has only been implemented for jpeg-recompress. Is this an oversight or are the defaults for pngquant and jpegoptim lossless? I'd be happy to make a PR to either add in support for :allow_lossy or maybe to document this better in the README.

@toy
Copy link
Owner

toy commented Dec 11, 2014

Hi Benjamin. I just did not get to implementing this in other workers. A bunch of thoughts further :)

By default image_optim is lossless and my idea was to block workers (as it is done for jpeg-recompress) or options (max_quality for jpegoptim, quality for pngquant) if :allow_lossy is not true.
In lossless mode option values making worker lossy can be intercepted in init class method or option block and either fail or show warning and return default value.
Not sure about different default value in lossy mode.
Also max_quality option of jpegoptim is partially redundant as jpeg-recompress should do much better job of lossy reduction of jpeg.

@toy toy closed this as completed in e01e562 Dec 15, 2014
@toy
Copy link
Owner

toy commented Dec 16, 2014

@bdarfler Yesterday I've added ignoring of lossy options and released new version.

@bdarfler
Copy link
Author

Cool! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants