GNOME Bugzilla – Bug 760262
2.40.11 regression: CLI parameter for zoom just increases image frame but not the image
Last modified: 2016-06-05 10:22:00 UTC
Between 2.40.10 and 2.40.10 an API call marked as deprecated has been removed. This breaks any CLI call of rsvg-convert requesting resizing of SVG during rendering. While the frame of the generated PNG grows the image isn't scaled. Example call: rsvg-convert test.svg -f png -z 10 -o test-10-ref.png The manual says to use some Cairo API as replacement of deprecated API: https://developer.gnome.org/rsvg/stable/RsvgHandle.html#rsvg-handle-set-size-callback
Created attachment 318410 [details] [review] Quick solution use Cairo API scale Important: It works fine, but I havn't tested if it has flaws. The major issue I'm unsure about is worsening aliasing arte-facts with e.g. exact 1px thick lines to be placed exactly to the raster.
Between 2.40.10 and 2.40.11
*** Bug 757484 has been marked as a duplicate of this bug. ***
*** Bug 756340 has been marked as a duplicate of this bug. ***
I think this patch should be applied and a new bug opened for investigation of possible side effects.
@upstream, do you think the patch is ok to be applied? :/
Federico: Any chance / time to take a look at this?
Any updates on this? (for at least knowing if it's safe to apply the suggested patch downstream) Thanks
Created attachment 325219 [details] [review] Fix bug 760262 2.40.11 regression: CLI parameter for zoom This patch fixes bug 760262 2.40.11 regression: CLI parameter for zoom just increases image frame but not the image. Reason for this issue is an API call marked as deprecated that has been removed in release 2.40.11. As an alternate implementation with a call to cairo_scale() has been added. Additionally a special script has been added that provides measures to automate CLI testing.
Good catch - sorry for breaking rsvg-convert like that. I've pushed your fix with some stylistic fixes as commit 7db196eae60cc0dbbe3a262429bfecac3936c5b9; it should appear in 2.40.16. I haven't pushed the script for automated tests as *they* are what need to happen when you run "make check". Our testing infrastructure is built upon that, and the script as it is 1. generates some tests and reference images 2. runs "make check" on its own I think it's possible to put a tweaked version of your script as part of the "make test_programs" target in the tests/ directory. Menner, would you have a little time to play with that?
@Federico: I've already tried to implement cleaner solutions. Till now I've faild due to limited knowledge about autotools. I haven't found any real Forum to ask questions about this. Testing is difficult to figure out. Where can I ask an expert about autotools? Yet I think most of the rsvg_convert_XXXX variables are overdone. Maybe the simple approach from test/Makefile.am is enough. So I can compile a rsvg-convert for testing. https://git.gnome.org/browse/librsvg/tree/Makefile.am https://git.gnome.org/browse/librsvg/tree/tests/Makefile.am Comming weekend I have some time left for more trail and error ;)
Created attachment 325573 [details] [review] Provide measures for CLI testing Additionally a special script has been added that provides measures to automate CLI testing. It is called during "make check" and test a bunch of CLI parameter. For this purpose it also builds "rsvg-convert". With this changes also INCLUDES has been replaced by CFLAGS in Makefile.am
Created attachment 329110 [details] [review] Patch providing measures for CLI testing and more
Created attachment 329149 [details] [review] Provide measures for CLI testing and more Provide measures for CLI testing and more A special script has been added that provides measures to automate CLI testing. It is called during "make check" and tests a bunch of CLI parameters. To simplify updating false positive "make check" results the script "refresh_reftests.sh" has been created. With this changes also INCLUDES has been replaced by CFLAGS in Makefile.am