Bug 438792

Summary: Support for lossless WebP
Product: [Applications] kolourpaint Reporter: Thomas Fischer <fischer>
Component: generalAssignee: kolourpaint-support
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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