GNOME Bugzilla – Bug 141557
Svg backgrounds not scaled correctly
Last modified: 2009-04-16 09:22:49 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.
What actual version of control center is this in? The problem was fixed in control -center 2.6.1.
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.
What version of librsvg is this, also?
I have version 2.6.4 installed, which is the newest debian package.
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...
Actually, it does work on FC2 when I disable Nautilus.... I'd imagine James would see the same thing on Debian.
I just tried disabling nautilus, and yup, it does indeed sort the scaling problem out. Not the most convinient work around though...
Moving to Nautilus. I can reproduce the problem with 2.7 also.
Confirmed on Nautilus 2.11.2 on Ubuntu Breezy
Updating version to 2.13.
Still there on 2.14
Still there in 2.23.6
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
Moving to gnome-desktop as this is where the rendering is done.
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?
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.
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