After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 793473 - color shift when taking window screenshots
color shift when taking window screenshots
Status: RESOLVED DUPLICATE of bug 779234
Product: mutter
Classification: Core
Component: general
3.26.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2018-02-14 22:02 UTC by Chris Murphy
Modified: 2018-03-24 00:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gnome-screenshot -d 5 (466.66 KB, image/png)
2018-02-14 22:03 UTC, Chris Murphy
Details
gnome-screenshot -w -d 5 (402.71 KB, image/png)
2018-02-14 22:03 UTC, Chris Murphy
Details

Description Chris Murphy 2018-02-14 22:02:17 UTC
gnome-screenshot-3.26.0-1.fc27.x86_64 on Fedora 27 Workstation

Using 'gnome-screenshot -w', the resulting PNG has torqued colors. Looks like the red and blue primaries are reversed: greens stay about the same, blues become red, reds become blue.

When I use 'prt sc' key the problem doesn't happen. If I omit the -w switch, the problem doesn't happen.

The RGB values in the PNG are really different according to GIMP, so it appears the screenshot encoding process itself is causing the torquing, not some kind of previewing or embedded profile problem.
Comment 1 Chris Murphy 2018-02-14 22:03:09 UTC
Created attachment 368360 [details]
gnome-screenshot -d 5

The colors in this png are correct.
Comment 2 Chris Murphy 2018-02-14 22:03:31 UTC
Created attachment 368361 [details]
gnome-screenshot -w -d 5

The colors in this screenshot are wrong.
Comment 3 Chris Murphy 2018-02-14 22:10:10 UTC
OK interesting. I can't reproduce this with Firefox. So is a combo bug that depends on both -w switch and the application being screenshot.

I can reproduce this with eog (Image Viewer).

And not reproducible with GIMP.
Comment 4 Chris Murphy 2018-02-14 22:12:39 UTC
Is reproducible with GNOME Terminal.
Comment 5 James Henstridge 2018-02-21 14:06:15 UTC
I found the following Ubuntu bug that seems to be the same issue:

https://bugs.launchpad.net/gnome-screenshot/+bug/1672716

One commenter noted that the red and blue channels have been reversed, and provided the following ImageMagick command to repair a file:

  convert a.png -separate -swap 0,2 -combine b.png

Given that gnome-screenshot defaults to asking the shell to take the screenshot, the confusion over channel ordering could occur there though.
Comment 6 Stephen 2018-03-23 15:11:03 UTC
Looks like it's Wayland-specific.

I can confirm the prev. comment command successfully corrects the image.
Comment 7 Stephen 2018-03-23 15:19:42 UTC
Er, *almost* corrects it - for some reason e.g. Firefox displays a washed out version of the converted PNG (don't know why - doesn't seem to be an opacity/colour profile issue). Opening the converted image in GIMP then re-exporting fixes that second problem though.
Comment 8 Piotr Drąg 2018-03-23 20:08:07 UTC
I’m pretty sure Mutter is responsible for this.
Comment 9 Florian Müllner 2018-03-24 00:04:11 UTC
Yup.

Thanks for taking the time to report this.
This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 779234 ***