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 143300 - wrong bounding box when importing SVG
wrong bounding box when importing SVG
Status: RESOLVED FIXED
Product: librsvg
Classification: Core
Component: general
2.4.x
Other Linux
: Normal normal
: ---
Assigned To: librsvg maintainers
librsvg maintainers
: 153463 345056 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-05-27 16:13 UTC by Jakub Steiner
Modified: 2010-04-16 23:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
SVG icon (10.23 KB, image/svg+xml)
2004-05-27 16:14 UTC, Jakub Steiner
Details
PNG generated by rsvg utility (6.10 KB, image/png)
2004-05-27 16:15 UTC, Jakub Steiner
Details
GIMP rendering of the SVG (120.97 KB, image/jpeg)
2004-05-27 16:17 UTC, Jakub Steiner
Details

Description Jakub Steiner 2004-05-27 16:13:33 UTC
The attached SVG doesn't gets chopped off when imported to GIMP. the rsvg
utility doesn't seem to have problems with it.
Comment 1 Jakub Steiner 2004-05-27 16:14:36 UTC
Created attachment 28092 [details]
SVG icon
Comment 2 Jakub Steiner 2004-05-27 16:15:05 UTC
Created attachment 28093 [details]
PNG generated by rsvg utility
Comment 3 Jakub Steiner 2004-05-27 16:17:01 UTC
Created attachment 28094 [details]
GIMP rendering of the SVG
Comment 4 Jakub Steiner 2004-05-27 16:24:04 UTC
s/doesn't gets/gets/ of course
Comment 5 Sven Neumann 2004-05-28 12:44:45 UTC
I hate to look at that code again but it looks as if it indeed somehow wrong.
Comment 6 Sven Neumann 2004-05-28 13:04:29 UTC
Had a look at our code and I think that librsvg is to blame. Since the SVG
specifies the unit in points (72pt x 72pt) it should be scaled accordingly to
the choosen resolution. But whatever resolution is used the graphics always ends
up the same size. The best result is achieved when rendered with 96dpi. IIRC
that's the default resolution used by librsvg and this is why the icon looks
good when rendered with the rsvg utility.

I might be interpreting this wrongly but I will nevertheless reassign this
report to librsvg in the hope that someone from the rsvg developers can point
out if and what the GIMP plug-in is doing wrong here.
Comment 7 Sven Neumann 2004-05-28 13:05:37 UTC
I am using librsvg-2.6.4, btw.

( You might want to add some newer versions to the librsvg bugzilla module.
  The newest version to choose from is 2.5.x. )
Comment 8 Dominic Lachowicz 2004-06-16 18:18:14 UTC
RSVG has a call that you might be interested in:

http://librsvg.sourceforge.net/docs/html/rsvg-core-api.html#RSVG-HANDLE-SET-DPI

Inside of the Gimp plugin, you may wish to query the Gimp's DPI, and then tell
RSVG to use that instead of its default resolution, which is 90.

Reassigning to the Gimp, CC'ing myself.
Comment 9 Sven Neumann 2004-06-17 08:01:39 UTC
We are using this function. What exactly are you suggesting that we change?
Comment 10 Sven Neumann 2004-09-16 18:15:52 UTC
Reassigning to librsvg since I don't seem to be able to find what is wrong in
the GIMP plug-in. Perhaps Dom can enlighten me.
Comment 11 Dominic Lachowicz 2004-09-16 18:31:49 UTC
I'll take a look at this. Question - what is the GIMP's DPI in this case? I'll
compare that to rsvg's output using the command-line tool @ that DPI. Thanks.
Comment 12 Sven Neumann 2004-09-16 18:51:28 UTC
The plug-in uses the DPI setting entered by the user. On first use, the dialog
is initialized with a default resolution of 72.0 dpi.
Comment 13 Dominic Lachowicz 2004-09-18 16:14:03 UTC
accept bug
Comment 14 Nathan Summers 2004-09-22 19:47:23 UTC
*** Bug 153463 has been marked as a duplicate of this bug. ***
Comment 15 Dominic Lachowicz 2006-02-05 16:50:21 UTC
Pinging for an update on this bug. Does it happen with the CVS (2.13.x) version of librsvg too?
Comment 16 Dominic Lachowicz 2006-06-19 15:13:21 UTC
*** Bug 345056 has been marked as a duplicate of this bug. ***
Comment 17 Hadmut Danisch 2006-06-19 17:08:47 UTC
Bug still exists in 2.14.4 

Will it ever be fixed?
Comment 18 Dominic Lachowicz 2006-06-19 17:47:53 UTC
It'll be fixed when it gets fixed.
Comment 19 Hiroyuki Ikezoe 2010-04-12 11:40:55 UTC
attachment 28092 [details] works well librsvg-2.26.0.
Comment 20 Jakub Steiner 2010-04-16 23:05:03 UTC
Indeed, this doesn't seem to be an issue anymore.