GoogleChromeLabs / squoosh

Make images smaller using best-in-class codecs, right in the browser.
https://squoosh.app
Apache License 2.0
22.05k stars 1.56k forks source link

Calculate the quality according to the specified size of the compression #1296

Closed charliecen closed 2 years ago

charliecen commented 2 years ago

For example, I want to compress the image from 1.7M to 200KB. How to calculate the quality of compression is 8 when the preset is unchanged ???

charliecen commented 2 years ago

I have compared the compressed file size by dichotomy and can solve it