Adds WebP Quality Config
Like #3285, this PR aims at introducing a quality config into Flameshot, allowing users to customize the quality of the WebP image emitted by Flameshot.
However during the testing of this PR, I've noticed a few problems with the output emitted from the Qt5 ImageFormat plugin.
- The resulting files produced by Flameshot are inferior compared to ones emitted by
cwebpwith the exact same quality value. - The Qt5 ImageFormat plugin doesn't allow saving as lossless WebP, which is a far superior lossless image format than PNG, allowing on average 27% size reduction.
- Said plugin also doesn't allow customizing effort value used to optimize the resulting image.
So perhaps, for the easier route, there should be a config option, allowing Flameshot to automatically execute a command to optimize the final image from PNG. Or maybe integrate libwebp or libvips directly?
@PoneyClairDeLune Thanks for the PR.
@jack9603301 & @FelixJochems What is your opinion about this question?
It looks like Qt6 might support lossless webp: https://doc.qt.io/qt-6/qtimageformats-attribution-libwebp.html I wonder how that compares to something like libwebp
If Qt6 fixes the issue, I would be inclined to merge this as is, and then when we update to Qt6 we get an additional benefit.
Since we are on Qt6 now, it would be good to see if this is still needed.