GNOME Bugzilla – Bug 793473
color shift when taking window screenshots
Last modified: 2018-03-24 00:04:11 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.
Created attachment 368360 [details] gnome-screenshot -d 5 The colors in this png are correct.
Created attachment 368361 [details] gnome-screenshot -w -d 5 The colors in this screenshot are wrong.
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.
Is reproducible with GNOME Terminal.
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.
Looks like it's Wayland-specific. I can confirm the prev. comment command successfully corrects the image.
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.
I’m pretty sure Mutter is responsible for this.
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 ***