Bug 409721 - Showfoto export WebP images without colour space
Summary: Showfoto export WebP images without colour space
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-DImg-Magick (show other bugs)
Version: 5.9.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-11 15:09 UTC by Lapineige
Modified: 2021-05-07 13:54 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.2.0


Attachments
iccProfile.patch (1.38 KB, patch)
2019-07-11 21:17 UTC, Maik Qualmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lapineige 2019-07-11 15:09:31 UTC
SUMMARY

Showfoto export WebP images without color space information.


STEPS TO REPRODUCE
1. Open a (sRGB) jpeg or with Showfoto
2. Export a WebP
3. Import the WebP. A pop-up (if activated in the parameters) tells that there is no colour space in this image.
4. Assign a colour space (for instance, sRGB)
5. Save the image
6. Open it again in Showfoto. Then step 3 is reproduced.

OBSERVED RESULT
Opening the file in Showfoto, Firefox or Gwenview shows wrong colours, as no colour space information is available.

EXPECTED RESULT
WebP image should have correct colours because it should contain colors space information.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 5.0.0-20-generic
(available in About System)
KDE Plasma Version: 5.16.3
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.2

ADDITIONAL INFORMATION

Showfoto 5.9.0
Comment 1 Maik Qualmann 2019-07-11 21:17:47 UTC
Created attachment 121477 [details]
iccProfile.patch

In digiKam-6.2.0, the ImageMagick loader takes care of loading and saving WebP images. This is a first patch to save and load ICC profiles. ImageMagick has a problem if there are XMP metadata in the image when loading, then we fall back to the QImage loader, which can not load ICC profiles. For this we have to find a solution. Also WebP images of Gimp with XMP are rejected by the ImageMagick loader, it is not an Exiv2 problem.

Maik
Comment 2 Lapineige 2019-07-11 21:30:44 UTC
So I need to report this issue (bug ?) to ImageMagick ?
Comment 3 Maik Qualmann 2019-07-12 05:51:24 UTC
No, I'll take a closer look this evening. ImageMagick's CLI tool issues the same warning but does not stop. We treat the warning as an exception.

Maik
Comment 4 Maik Qualmann 2019-07-12 06:31:27 UTC
Ok, the new ImageMagick loader in digiKam-6.2.0 works now fine if a warning occurs. We need to catch warnings of the Magick::Image::read() function. I'm applying the patch tonight.

Maik
Comment 5 Lapineige 2019-07-12 06:50:29 UTC
Oh, that's great !

Thanks :)



I guess this will also solve the issue with Gwenview ? (same problem)
Comment 6 Maik Qualmann 2019-07-12 10:34:57 UTC
Git commit f74751a58427223f2568ac3d884be7d875c0e9c6 by Maik Qualmann.
Committed on 12/07/2019 at 10:33.
Pushed by mqualmann into branch 'master'.

add read/write ICC Profile to the ImageMagick loader
and catch warnings from the Image::read() function
FIXED-IN: 6.2.0

M  +2    -1    NEWS
M  +38   -6    core/libs/dimg/loaders/magickloader.cpp

https://invent.kde.org/kde/digikam/commit/f74751a58427223f2568ac3d884be7d875c0e9c6
Comment 7 Maik Qualmann 2019-07-12 10:55:25 UTC
Gwenview is another project. This fix is only for Showfoto and digiKam. I suspect that Gwenview for WebP uses the QImage loader. Qt has no support for color profiles so far.

Maik
Comment 8 Lapineige 2019-07-12 18:13:31 UTC
Ok, I was thinking that perhaps they were using the same library.
I'll report it to them too.

Thanks a lot :)