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 757484 - librsvg 2.40.11 breaks resizing in rsvg-convert
librsvg 2.40.11 breaks resizing in rsvg-convert
Status: RESOLVED DUPLICATE of bug 760262
Product: librsvg
Classification: Core
Component: general
unspecified
Other Mac OS
: Normal major
: ---
Assigned To: librsvg maintainers
librsvg maintainers
Depends on:
Blocks:
 
 
Reported: 2015-11-02 15:02 UTC by Eugene / Dae
Modified: 2016-01-12 21:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Shows how the background is made bigger, but not the image (74.50 KB, application/x-tar)
2015-12-03 01:23 UTC, me
Details

Description Eugene / Dae 2015-11-02 15:02:25 UTC
rsvg-convert does not properly convert images to PNG since rsvglib update 2.40.11, probably due to wrong SVG dimensions calculation.

Easy way to confirm the problem from command-line without even looking at the image:

$ wget -O test.svg https://upload.wikimedia.org/wikipedia/en/8/80/Wikipedia-logo-v2.svg
$ rsvg-convert test.svg -a -w 1000 > test.png
$ du -hs test.png
24K    test.png

Now repeat the first two commands with earlier versions, e.g. librsvg 2.40.10, and check the file size:
$ du -hs test.png
376K    test.png

Possibly related:
https://bugzilla.gnome.org/show_bug.cgi?id=756340
Comment 1 me 2015-12-03 01:23:01 UTC
Created attachment 316685 [details]
Shows how the background is made bigger, but not the image

This shows what the bug looks like (input, expected, actual) given a small SVG file and a command-line invocation of `rsvg-convert --keep-aspect-ratio --width=720 --background-color=\#2d2d2d input.svg -o actual.png`.
Comment 2 Benjamin Otte (Company) 2015-12-03 21:18:10 UTC
bisecting blames

commit fecfcce44a959daff80a4e0f9ced83d7cdcb5903
Author: Federico Mena Quintero <federico@gnome.org>
Date:   Mon Aug 10 04:04:01 2015 -0500

    bgo#520654 - Support --export-id in rsvg-convert(1)
    
    This option lets you pass an SVG object ID to render, instead of the default, which
    is to render everything in the SVG.
    
    The --export-id and -i options intentionally have the same name as in Inkscape.
    
    In addition, this get rid of a deprecated call to rsvg_handle_set_size_callback()
Comment 3 Benjamin Otte (Company) 2015-12-03 21:20:55 UTC
I do think however that the new behavior is correct(er). Firefox doesn't scale the Wikipedia logo either when you grow the window.

That said, I'd expect scaling to be possible using the zoom arguments, and currently it isn't.
Comment 4 me 2015-12-06 06:29:35 UTC
The Wikipedia logo does scale if you press Ctrl-= and Ctrl--. That's the sort of scaling I expect.
Comment 5 Caleb Evans 2015-12-16 21:10:47 UTC
I am also experiencing this issue, which I consider to be critical because it breaks a major feature of the utility. Even if this behavior is "correct(er)" (and I don't think it is), leaving backward compatibility broken without bumping the major version number is rather crooked.

I use rsvg-convert for creating scaled PNG versions of my SVG files, using the --width and --height options. The only way around this bug (AFAIK) is to explicitly set the width/height attributes on the SVG element in the file itself, but this is certainly not ideal.

I have decidedly rolled back to 2.40.10 on my machine until this issue is fixed. Please do consider prioritizing this issue, as I would prefer to use the latest version (especially since that --export-id feature sounds great).

Thanks,
Caleb
Comment 6 mik@gmx.org 2016-01-12 21:06:46 UTC

*** This bug has been marked as a duplicate of bug 760262 ***