Bug 412326 - Respect the ICC profile when we can depend on Qt 5.14
Summary: Respect the ICC profile when we can depend on Qt 5.14
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Image & Slideshow wallpaper plugins (show other bugs)
Version: 5.15.5
Platform: Fedora RPMs Linux
: NOR task
Target Milestone: 1.0
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-25 14:57 UTC by Syam
Modified: 2023-04-10 01:32 UTC (History)
4 users (show)

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


Attachments
screenshot of the wallpaper and image opened in gwenview (2.49 MB, image/png)
2019-09-25 14:57 UTC, Syam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Syam 2019-09-25 14:57:23 UTC
Created attachment 122864 [details]
screenshot of the wallpaper and image opened in gwenview

I have set an image as desktop wallpaper. The same image is opened in Gwenview. The colours appear more vibrant in gwenview and duller in the wallpaper.

Versions:
Plasma: 5.15.5
Gwenview: 18.12.2
KDE frameworks: 5.59.0
Qt: 5.12.4

Desktop settings:
Layout: Folderview
Wallpaper type: Slideshow
Positioning: scaled and cropped


PS: I am not sure if the wallpaper is correct or gwenview is :-|
Comment 1 Syam 2019-09-25 14:58:49 UTC
This is the image I used as wallpaper.

https://pasteboard.co/Iz3B9KX.jpg
Comment 2 Syam 2019-09-25 15:01:16 UTC
I just realised that Firefox also renders the image with similar colour saturation as plasma wallpaper. So, I guess Gwenview is the culprit and not plasma.

If someone can concur with this inference, we will move the report against gwenview.
Comment 3 Christoph Feck 2019-09-25 19:55:51 UTC
Gwenview does support ICC color correction, Plasma does not. Work on ICC color profile support for QImage will only be added to Qt 5.14, which is not released yet.

Until then, I think it doesn't make sense to add color correction into each KDE application or desktop shell separately.

Regarding Firefox, I am quite sure it also has support for ICC profiles. Note that Gwenview can be configured for various rendering intents, and it is possible that you selected an option resulting a different image than Firefox, or the color correction in Firefox is disabled.

I suggest to keep this open to remind us that Plasma eventually needs to add some QImage property to respect the ICC profile when we can depend on Qt 5.14, which might be for Plasma 5.19 earliest, likely later.
Comment 4 Nate Graham 2019-10-07 02:59:05 UTC
Yep, a sane plan.
Comment 5 David Edmundson 2019-10-08 22:16:23 UTC
What do we have to do once we have 5.14? 

I can see an API to set a QColorTransform on an image, but not to read a profile from the image.
Comment 6 Christoph Feck 2019-10-08 22:24:45 UTC
An ICC profile is a stream of bytes part of the image metadata (Exiv2?). Then use https://doc-snapshots.qt.io/qt5-5.14/qcolorspace.html#fromIccProfile and https://doc-snapshots.qt.io/qt5-5.14/qimage.html#setColorSpace
Comment 7 Nate Graham 2020-07-10 18:26:44 UTC
Plasma in git master now depends on Qt 5.14, so whatever we need to do here, we can do it now.
Comment 8 David Redondo 2020-07-14 11:57:02 UTC
Sounds like something that should be done in qt image plugins? Otherwise we would have to do that in every place where we show images?
Comment 9 Christoph Feck 2020-07-14 14:29:21 UTC
Well, you will have to tell Qt at least which color profile you want to convert to, so it cannot be automatically done.
Comment 10 David Redondo 2020-07-14 15:10:30 UTC
You said it's in the image metadata and the plugin is reading the image so I thought why not just apply it there but I am not that deep into that area.