Bug 427850 - spectacle assumes my screen's gamut is sRGB, leading to incorrect colors
Summary: spectacle assumes my screen's gamut is sRGB, leading to incorrect colors
Status: CONFIRMED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 20.08.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-17 06:16 UTC by Adam Fontenot
Modified: 2021-12-13 21:40 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Fontenot 2020-10-17 06:16:32 UTC
SUMMARY

When you use colord to correct your screen's colors, then the colors shown by color managed applications are re-mapped into your screen's actual color space. Spectacle takes screenshots of the resulting buffer, but implicitly treats it as having the sRGB space, which is incorrect.

STEPS TO REPRODUCE
1. Enable a color profile for your screen in colord, on a non-sRGB screen.
2. Take a screenshot with Spectacle.

OBSERVED RESULT

The colors are wrong, when displayed in any color managed image viewer. (In my case, any screenshot taken with Spectacle is desaturated, because my screen's gamut is wider than sRGB.)

EXPECTED RESULT

The colors are right.

SOFTWARE/OS VERSIONS
Linux: Arch Linux 5.9.0-arch1-1
KDE Plasma Version: 5.20.0 (X)
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1

ADDITIONAL INFORMATION

There are two possible solutions to this problem (that I know of).

1. Spectacle could detect the profile being used by colord, and tag the resulting image with it. This would be a lossless operation, but could greatly increase the size of the image for large profiles.

2. Spectacle could detect the profile being used by colord, and *convert* the resulting image from the screen's profile to sRGB (or better still, provide other choices like DCI-P3). This would be a lossy operation, but would usually result in smaller images and the results (if sRGB) would be safer for the web.

I think the best solution is to allow *both* as options. This is what GIMP does with its built in screenshot tool. This is particularly important because tagging the image with the user's profile without notifying them would be a privacy violation, as the image could contain unexpected personal material.

Let me know if you need any more information or screenshots to clarify this issue.