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 141557 - Svg backgrounds not scaled correctly
Svg backgrounds not scaled correctly
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
git master
Other All
: Normal minor
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-05-01 12:56 UTC by James Birkett
Modified: 2009-04-16 09:22 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Render SVG backgrounds set to SCALE, ZOOM or FILL at maximum resolution (1.34 KB, patch)
2009-04-03 05:50 UTC, Robert Ancell
none Details | Review
Updated patch that checks if a resolution has been provided (1.39 KB, patch)
2009-04-09 00:34 UTC, Robert Ancell
none Details | Review

Description James Birkett 2004-05-01 12:56:15 UTC
Set the background to be an svg image who's natural size is smaller than the
screen, and ensure it is set to scale up not displayed centred or tiled.
It then appears to render the image at it's natural size and scale the pixelised
version up, causing blockyness. It should render the svg at the size of the
desktop instead.
Comment 1 Rodney Dawes 2004-05-01 21:03:17 UTC
What actual version of control center is this in? The problem was fixed in
control -center 2.6.1.
Comment 2 James Birkett 2004-05-02 13:30:36 UTC
I am using version 2.6.1 (the debian package version number is 2.6.1-1 if that
makes any difference), but the problem still occurs.
Comment 3 Rodney Dawes 2004-05-16 18:31:58 UTC
What version of librsvg is this, also?
Comment 4 James Birkett 2004-05-17 21:44:48 UTC
I have version 2.6.4 installed, which is the newest debian package.
Comment 5 Richard Hoelscher 2004-08-30 17:36:27 UTC
Running Fedora Core 2 here (control-center-2.6.1 with a librsvg install from
source), doesn't seem to be working here either. Using a small SVG (example:
http://rahga.com/svg/flag.svg gnomine flag default at 160x160 pixels), it's
obvious to see the pixbuf scaling. If it is working anywhere, though, I'd love
to hear it...
Comment 6 Richard Hoelscher 2004-08-30 18:26:29 UTC
Actually, it does work on FC2 when I disable Nautilus.... I'd imagine James
would see the same thing on Debian.
Comment 7 James Birkett 2004-08-30 18:48:37 UTC
I just tried disabling nautilus, and yup, it does indeed sort the scaling
problem out. Not the most convinient work around though...
Comment 8 Rodney Dawes 2004-08-30 19:14:47 UTC
Moving to Nautilus. I can reproduce the problem with 2.7 also.
Comment 9 Corey Burger 2005-06-22 21:44:50 UTC
Confirmed on Nautilus 2.11.2 on Ubuntu Breezy
Comment 10 Christian Neumair 2006-02-26 08:32:09 UTC
Updating version to 2.13.
Comment 11 Sergej Kotliar 2006-04-03 13:00:17 UTC
Still there on 2.14
Comment 12 Alex Ruddick 2008-08-16 20:29:58 UTC
Still there in 2.23.6
Comment 13 Robert Ancell 2009-04-03 05:50:48 UTC
Created attachment 131971 [details] [review]
Render SVG backgrounds set to SCALE, ZOOM or FILL at maximum resolution

As proposed for Ubuntu bug https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/9722
Comment 14 Robert Ancell 2009-04-03 05:52:24 UTC
Moving to gnome-desktop as this is where the rendering is done.
Comment 15 Alexander Larsson 2009-04-08 12:51:27 UTC
I'm not sure about this patch, in several cases we could reach get_pixbuf() with last_pixmap_width/height not yet set. I'm not sure of a good solution though, maybe just check that they are set?
Comment 16 Robert Ancell 2009-04-09 00:34:27 UTC
Created attachment 132375 [details] [review]
Updated patch that checks if a resolution has been provided

I've updated the patch to check if a resolution has been requested.  If no resolution is requested it falls back to the current behaviour of rendering the SVG at its native resolution.  I think this is logical behaviour because either:
a) The API user renders at a specified resolution - in this case they would expect the image to make best use of this resolution
b) The API user doesn't specify a resolution.  Gnome BG just renders at a native resolution.
Comment 17 Alexander Larsson 2009-04-16 09:22:49 UTC
2009-04-16  Alexander Larsson  <alexl@redhat.com>

	Bug 141557 – Svg backgrounds not scaled correctly

	* gnome-bg.c:
	(get_as_pixbuf):
	When loading an svg, load at the requested zoom level
	instead of resizing after rendering.
	Patch from Robert Ancell