Closed gcandal closed 3 years ago
Woof, Woof!
Thank you for submitting the ""lossless" image format is not lossless" issue 😎.
Please do not forget to review our internal guidelines:
Description
section, but considered adding other sectionsEngaging in the development process in the best possible way helps it being efficient and fast.
Your friend, Tobias (Platforme's mascot)
Let's not be strict here "Lossless == Almost lossless" 😆 Now seriously nice catch
Let's make default webp options lossless and measure the impact in image size, then discuss on this one
After a deeper investigation I've come to realize that this could not be fixed by increasing the quality = 100
(currently at 95) implemented here - the quality degradation from changing 95 -> 100 looked visually imperceptible to my eyes.
The buggy "blur" effect, mostly evident on the initials "MARTA" is being caused by the python imaging library most specifically the PIL.WebPImagePlugin
which we use when saving the image composition at image.save for webp format. This WebPImagePlugin has lossless at false by default and that was the cause of this blur effect.
Below are the image compositions
- | - |
---|---|
current webp at 90% quality = 247.27 kb | |
lossless webp at 95% quality = 913.13 kb | |
lossless webp at 100% quality = 913.6 kb | |
png = 1.27 MB |
I'm creating a PR for the 2nd option lossless webp at 95% quality = 913.13 kb
Description
When using
lossless
as an image format, it's expected to be served images which are lossless, but that's not the case forwebp
with the default options.lossless
towebp
when possible: https://github.com/ripe-tech/ripe-sdk/blob/b0b5300451df6a89725ffc0e30eeaac80a947593/src/js/base/ripe.js#L695webp
: https://github.com/ripe-tech/ripe-compose/blob/0ffa265a375e39dceaa2ab853e25e19cf59546f0/src/ripe_compose/util/configurator.py#L84Example: