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 329411 - SVG Render Dialog Ignores Resolution
SVG Render Dialog Ignores Resolution
Status: RESOLVED OBSOLETE
Product: librsvg
Classification: Core
Component: general
2.16.x
Other All
: Normal major
: ---
Assigned To: librsvg maintainers
librsvg maintainers
Depends on:
Blocks:
 
 
Reported: 2006-02-01 02:06 UTC by Chris Spencer
Modified: 2017-12-13 17:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample svg file. (3.69 KB, image/svg+xml)
2006-02-01 13:12 UTC, Chris Spencer
Details
Result of star.svg being rasterized at 400ppi. (6.69 KB, image/jpeg)
2006-02-01 13:13 UTC, Chris Spencer
Details
Result of star.svg being rasterized at 72ppi. (6.69 KB, image/jpeg)
2006-02-01 13:14 UTC, Chris Spencer
Details

Description Chris Spencer 2006-02-01 02:06:47 UTC
Please describe the problem:
If you import an SVG file, GIMP doesn't seem to rasterize using the correct
resolution specified. No matter what resolution you specify, the layer will be
generated with the proper dimensions, but the SVG image remains a fixed size
regardless of the specified resolution.

For instance, say you import an image at 90 ppi and it gets rasterized as
744x1052. Now if you import the image again into the same file, but this time
specify 300 ppi, it gets rasterized at 2480x3507, but the actual image in the
new layer is the same size as the previous import. Only the layer sizes are
different. 

Steps to reproduce:
1. Open an SVG file several times.
2. Specify a different resolution for each import.
3. Notice the rasterized images are all identical in dimension despite the
different resolutions.


Actual results:


Expected results:


Does this happen every time?
Yes.

Other information:
Comment 1 Sven Neumann 2006-02-01 09:14:46 UTC
Please make available an example SVG file (if possible attach a small one to this bug report). And please let us know what version of librsvg you are using since the error is most likely in librsvg. And please specify the operating system. Or did you check that this happens on "All" operating systems?
Comment 2 Michael Schumacher 2006-02-01 10:24:51 UTC
Hm, both pixels size and resolution are correctly transferred to the resulting image on my system. Neither of them influences the other setting, maybe there is some misunderstanding here?
Comment 3 Chris Spencer 2006-02-01 13:12:54 UTC
Created attachment 58515 [details]
Sample svg file.
Comment 4 Chris Spencer 2006-02-01 13:13:45 UTC
Created attachment 58516 [details]
Result of star.svg being rasterized at 400ppi.
Comment 5 Chris Spencer 2006-02-01 13:14:16 UTC
Created attachment 58517 [details]
Result of star.svg being rasterized at 72ppi.
Comment 6 Chris Spencer 2006-02-01 13:24:10 UTC
The problem doesn't seem specific to any particular svg file, although I've attached the sample star.svg. I then created a new 400ppi canvas in the GIMP. Star-400.jpg is the result of importing star.svg onto this canvas at 400ppi. Star-72.jpg is the similar result at 72ppi. Notice the images are basically identical, when the 400ppi should be noticably larger.

My OS is Fedora Core 4. I'm using librsvg2 2.9.5-2.

If width/height and resolution do not effect each other, then what should the effect of resolution be? No matter what resolution I specify, the result is the same.
Comment 7 Michael Schumacher 2006-02-01 13:44:24 UTC
Well, both influence the result. Let's think about some examples (assuming square images to keep it simple):

- image size: 300 px
- resolution: 300 ppi
=> 300 px image with a physical (e.g. printed) size of one inch

- image size: 300 px
- resolution: 600 ppi
=> 300 px image with a physical size of half an inch

- image size: 2 inch
- resolution: 300 ppi
=> 600 px image with a physical size of 2 inch
Comment 8 Sven Neumann 2006-02-01 18:43:13 UTC
If the SVG specifies a pixel size, changing the resolution does of course not have any effect. For that reason the dialog offers the possibility to scale the SVG. If the SVG specifies its size in physical dimensions, then the resolution is what determines the resulting image size.

This definitely used to work correctly but it appears to be broken now. Since we didn't change the SVG plug-in, the problem appears to be in librsvg. Someone will have to find an old version that works and reassign this bug-report to librsvg.
Comment 9 weskaggs 2006-08-29 19:48:33 UTC
confirming on the basis of comment #8.
Comment 10 Sven Neumann 2007-05-02 14:12:55 UTC
I have added some debug output to the SVG plug-in and I can definitely tell that the problem is somewhere in librsvg. The plug-in uses rsvg_handle_set_size_callback() to determine the size of the SVG. This used to work, but with 2.16.1 (and perhaps earlier versions), the callback is never called. Without the callback being called, the plug-in can't do its job properly.
Comment 11 GNOME Infrastructure Team 2017-12-13 17:26:42 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/librsvg/issues/4.