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 to do a lossless jpeg to jpeg optimization using mozjpeg only #43

Open
flozz opened this issue Sep 22, 2022 · 2 comments
Open

Allow to do a lossless jpeg to jpeg optimization using mozjpeg only #43

flozz opened this issue Sep 22, 2022 · 2 comments

Comments

@flozz
Copy link
Member

flozz commented Sep 22, 2022

Add choices for JPEG optimization:

  • Guetzli + MozJPEG

    • Always reencode JPEGs using Guetzli and then use additional MozJPEG (lossless) optimization
  • MozJPEG

    • Always reencode JPEGs using libjpeg and then optimize losslessly with MozJPEG
  • MozJPEG lossless

    • If the input image is already a JPEG: only perform a lossless optimization using MozJPEG (ignore the quality parameter)
    • If the input image is not a JPEG: encode the image using libjpeg (Pillow) and then optimize it with MozJPEG (lossless)

Related issue: flozz/yoga-image-optimizer#15

@nekohayo
Copy link

nekohayo commented Feb 17, 2023

Reiterating my +1000 enthusiasm for this: "perfect encoding" sounds like a very different usecase from "good-enough, but fast" encoding (i.e. "I have hundreds of images to encode, I don't have all day, I need them uploaded to the web or attached to my email ASAP"), so there really ought to be an encoder choice to be able to say "MozJPEG only" in some way.

To put things in perspective, today I tried encoding 4 simple photos, whose original resolution were 3840x2160, and asked Yoga to encode them as 1920x1080 JPEGs... and it took a solid 10-15 minutes to do so. There was a 4 minutes time difference between the 1st image being transcoded and the 4th image being transcoded. In comparison, the same process with pure MozJPEG would have taken a grand total of about 10 seconds or less, but the visual difference would be imperceptible to 99% of humans.

@flozz
Copy link
Member Author

flozz commented Feb 17, 2023

Hello,

Sadly I don't have time to work on this right now... But it is the next feature on my TODO list for YOGA :)

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