-
Notifications
You must be signed in to change notification settings - Fork 209
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
question:How to make an image compressed to a certain value #2492
Comments
Some images are easier to compress than others. That's why, for a similar quality (which is the encoding parameter in libavif), you can have AVIF images of different sizes, though they have the same bmp size (bmp sizes are only dependent on the image dimensions so I guess your input images have the same dimensions). What you will have to do is try different encoding qualities (through binary search to be faster) so that you get equivalent sizes in the end. The visual qualities will be different though. |
Thanks for your reply |
No, for given encoding parameters, the quality should be roughly the same for normal photos: the quality you set in Line 1473 in dc2fe07
Then again, it depends on your data: even with a low quality parameter, a purely white image will be encoded with a good (maybe perfect) PSNR. What you describe is possible but for highly biased data, not random photos from the web. |
In my project, I want to compress images in bmp format, however, under the same encoder parameters the compression result of different photos varies a lot, is there any way to make the size of different images after encoding the same or the gap is small that is, the compression rate is fixed to a specific value
The text was updated successfully, but these errors were encountered: