Closed Lucuz91 closed 2 years ago
Under the hood AVIF takes minimum and maximum quantizer values, ranging from 0 to 63. You can pass those directly, but I allowed passing a JPEG-like 0-100 quality
parameter that maps to quantizer values. The code that transforms the setting is here:
I borrowed this logic from colorist (link). It's not perfect, but it's a reasonable approximation. I have docs for the save options in my PR to Pillow, you can find those here.
Thanks for the reply, I tried to search around the internet but actually I couldn't find any better way to manage quality with 1-100 scale. In case I find a better solution I will write it here ;)
Thanks again for your work
First of all, thanks for this plugin :)
I was testing it to see the potential of the AVIF format, but I noticed a strange behavior of the quality parameter, in the range 26-60 there is no variation on the file size, as if the parameter is set to the same value internally. Here is a simple code that demonstrates this behavior:
Here instead the source image:
I also tried other images, but the behavior is always similar, there is a range of quality (I would say considerable) in which the image does not change, am I doing something wrong?