-
Notifications
You must be signed in to change notification settings - Fork 15
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
Support for MozJPEG #7
Comments
Existing crate https://github.com/ImageOptim/mozjpeg-rust don't have support for |
Hi, thanks for the suggestion! :) I will look into this in a few days and will get back to you. |
I verified that
One way to make it easier to use MozJPEG instead of TurboJPEG would be to vendor MozJPEG into the But I see that |
I'll take that. It seems that environment variables can be easily set in
I heard that file encoded by MozJPEG have better quality? Anyway I'm just finding a replacement for |
I think so, if
As far as I understand, MozJPEG trades small increase in compression ratio for a large increase in compression time. If you are concerned about speed, then maybe TurboJPEG will work better? |
This is completley worth it. I would really like the flexibility where you can get the best of two worlds. |
Thank you for your interest in this library, @uwejan! :) The problem with MozJPEG is that it has opposite goals than libjpeg-turbo: libjpeg-turbo aims to be very fast, and MozJPEG aims to provide high-quality compression and is therefore much slower. This means that we cannot use a Cargo feature to switch from TurboJPEG to MozJPEG: if two crates in the same project depended on Another problem is that mozjpeg extensions are exposed via the original libjpeg API, but this crate uses the TurboJPEG API. This means that the ideal scenario is as follows:
To do this, we will need to resolve these technical questions:
The second question is the harder problem: I have zero experience with the libjpeg API (that's why I use the TurboJPEG API in the first place!), so I will welcome any advice on how to solve this :) |
@honzasp Thank you for sharing. Here is my 1 cent. |
Hi, I heard that
MozJPEG
is a immediate replacement(actually a fork) ofturbojpeg
. Would you consider making it an option?The text was updated successfully, but these errors were encountered: