Bug 438792 - Support for lossless WebP
Summary: Support for lossless WebP
Status: RESOLVED FIXED
Alias: None
Product: kolourpaint
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kolourpaint-support
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-17 08:30 UTC by Thomas Fischer
Modified: 2021-06-22 10:05 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Fischer 2021-06-17 08:30:57 UTC
The WebP image format support both lossy compression (like JPEG) and lossless compression (like PNG). Both types of images can be opened in Kolourpaint without problems, but when saving an image as WebP, always the lossy compression is used.

The lossless version has it benefits as it (obviously) does not damage the image and on average results in smaller files compared to PNG.

Thus, when saving an image, the user should be given choice to save the image either lossless or lossy. Both variants make use of the .webp extension, which makes a potential implementation of this feature more tricky.
Maybe a heuristic can be used: if the original image used either an index color palette or was a lossless compressed file (PNG, lossless WebP, …), then the lossless mode should be used. If the image was already lossy (JPEG, AVIF, or lossy WebP), then use the lossy mode for saving.
Comment 1 Martin Koller 2021-06-22 10:05:18 UTC
Git commit 046201e122be129894478391d4310b6819bb92f8 by Martin Koller.
Committed on 22/06/2021 at 10:03.
Pushed by mkoller into branch 'master'.

fix webp allowing to select quality; simplify code

No need to read mimetype properties from config file

M  +13   -104  document/kpDocumentSaveOptions.cpp
M  +0    -6    kpDefs.h

https://invent.kde.org/graphics/kolourpaint/commit/046201e122be129894478391d4310b6819bb92f8