-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Set quality slider by specifying a target file size. #1422
Comments
Hi there, I'm interested in taking on this task—this would be my first one! However, I'm new to Squoosh and want to make sure I've understood the task correctly. From what I gather, you would like to select a format, such as "Browser JPEG," and then automatically adjust the quality slider so that the percentage in the light blue corner meets a specified target level. Alternatively, the slider should be adjusted to ensure the file size is below a certain target size. Is that correct? Thank you for your help! :) |
I dont know why I didnt see this before. (just revisited sqoosh repo again for something else) What I mean is would a 'slider' for the 'filesize target'. It could be a 'absolute' target like 100kb, or just a relative to input. Eg set to 50% of input image file size. And they the app would try to find the 'quality' setting that gives that file size. The resultant quality level would be different with every encoder. In your example, would 'set' that want 75% file size reduction, and it would figure out that need to set quality to 0.48 :) (ie rather than setting quality, and find out how bit the file is. Instead set the file size, and find out what quality setting is needed) I think this would give better comparison between encoders. Eg could target say 75% file size reduction, and see how low quality each encoder has to go! Better encoders would keep the quality higher. |
Super interesting! Anyway, I noticed that on github they don't highlight notification, this is a bit weird, only emails keep me updated on this platform ahahah. |
Is your feature request related to a problem? Please describe.
The 'quality' slider isn't comparable between different formats. So hard to compare how well each format performs for comparable file sizes.
Describe the solution you'd like
Would be really nice to set a target size percentage, like 30% of the original filesize. (and/or a target file size like 100kb)
And it will find the right 'quality' setting for the given format. I imagine it as some sort of binary search, testing different quality settings, until reach the target.
So can see what sort of quality each type of format gives, for a given file size.
Additional context
Can be done manually, but the 'trial and error' process of setting the slider could be automated. Probably just focus on the quality slider.
Would be really cool if could see it 'animate' setting the quality slider as it hunts, but not required. Ie see the slider jump around, and quality of the image jump around.
Of course if even setting the slider to either extreme can't reach the target, should say so :)
The text was updated successfully, but these errors were encountered: