gnome-screenshot adds unnecessary transparent padding around window screenshots

Bug #1864539 reported by peterzay
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gnome-screenshot (Ubuntu)
Triaged
Low
Unassigned

Bug Description

When taking a window screenshot with gnome-screenshot in 19.10 and 20.04, a 20 to 25 pixel wide area of transparent padding (alpha) is added around the screenshot.

See attached screenshots, possibly with an external image viewer that displays transparency as e.g. a checkered pattern, if your browser doesn't.

The expected behavior is that of 18.04:

* If a border effect is selected, the smallest necessary amount of transparent padding is added to accommodate the effect.

* If no border effect is selected, no transparent padding is added (is there even a need for an alpha channel in this case?).

ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: gnome-screenshot 3.33.90-1ubuntu1
ProcVersionSignature: Ubuntu 5.3.0-40.32-generic 5.3.18
Uname: Linux 5.3.0-40-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu8.4
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Mon Feb 24 14:45:28 2020
ExecutablePath: /usr/bin/gnome-screenshot
InstallationDate: Installed on 2019-10-20 (127 days ago)
InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191014)
ProcEnviron:
 SHELL=/bin/bash
 XDG_RUNTIME_DIR=<set>
 PATH=(custom, no user)
 LANG=en_US.UTF-8
SourcePackage: gnome-screenshot
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
peterzay (peterzay) wrote :
Revision history for this message
peterzay (peterzay) wrote :

Best viewed in Image Viewer 3.34.1

Naël (nathanael-naeri)
summary: - screenshot tool inserts corrupt border area
+ gnome-screenshot adds unnecessary transparent padding around window
+ screenshots
Naël (nathanael-naeri)
description: updated
tags: added: focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-screenshot (Ubuntu):
status: New → Confirmed
Revision history for this message
Naël (nathanael-naeri) wrote :

I can confirm this bug. I have updated the bug report with more precise information, and I'm adding additional screenshots to demonstrate the issue.

Additionally, I've noted that:

* There is no difference between --include-border and --remove-border: the window border is included in the screenshot in any case. It may be an unrelated bug though.

* The documentation (man and --help) doesn't state which of --include-border or --remove-border is the default.

Revision history for this message
Naël (nathanael-naeri) wrote :
Revision history for this message
Naël (nathanael-naeri) wrote :
Revision history for this message
Naël (nathanael-naeri) wrote :
Revision history for this message
Naël (nathanael-naeri) wrote :

It appears to be an upstream issue, as the only Ubuntu patches in gnome-screenshot 3.36.0 are related to:

* Unity support
* Disabling the possibility of taking a screenshot of a window or an area by right-clicking on gnome-screenshot's desktop icon, because this feature doesn't work in Wayland (bug 1720262)

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, upstream removed now the option to include the border in git since the effect is hanlded by the shell itself, see https://gitlab.gnome.org/GNOME/gnome-screenshot/-/issues/76

Changed in gnome-screenshot (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
Revision history for this message
Naël (nathanael-naeri) wrote :

Indeed! Thank you for pointing that out. I also found https://gitlab.gnome.org/GNOME/gnome-screenshot/-/issues/82 and linked issues and merge requests, for additional context.

So the option to include/remove-border is removed from the upstream GUI and so are the border effects. The CLI isn't updated yet though. Window screenshots now always include a faint shadow on all four sides of the window, and that's why there's transparent padding added all around. That's the new expected behavior.

Would it make sense, and would it be possible, for the recently released 3.37.1 version of gnome-screenshot to be SRU'd into Ubuntu 19.10 and 20.04 then? With the current 3.36.0 version, it looks like border inclusion/removal and the border shadow/none effect are broken, or at least really don't work as the GUI states.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Yes, it might make sense to do a SRU of those changes to 20.04, we are not likely to change 19.10 at this point though since it's neither the current stable nor a LTS

tags: added: desktop-lts-wishlist
Revision history for this message
corrado venturini (corradoventu) wrote :

help for gnome-screenshot 3.38.0-1ubuntu1
says
-b, --include-border Include the window border with the screenshot. This option is deprecated and window border is always included
  -B, --remove-border Remove the window border from the screenshot. This option is deprecated and window border is always included

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.