Hi
If you have a svg file with a with a element that uses a gradient, and it has a rotate transform, then the offset of the gradient.
Minimal test case: http://pastebin.com/XmqP7U7N
ImageMagick: http://imagebin.org/136587
Firefox: http://imagebin.org/136586
My use case is this file: http://en.wikipedia.org/wiki/File:Rowin ... mplate.svg, and the many files based on it. Sometimes they are rendered correctly, e.g.: http://en.wikipedia.org/wiki/File:Josep ... _Blade.svg, but if I download them, and run convert manually on my computer, then they are allways wrong. So I think that was not a bug in some version of imagemagick in the past, and they are showing a cached version.
Gary
svg: Gradient offset wrong when using transform="rotate...
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: svg: Gradient offset wrong when using transform="rotate.
Gradients have always been a problem in the builtin SVG handler.
However if you install RSVG (you may need to rebuild IM with a --with-rsvg option)
then it will use the RSVG library to render SVG to a raster image.
Or you can use RSVG directly without using IM.
You must remember IM is primarily a Raster Image Processor. It really has minimal understanding of Vector images.
See, A word about Vector Image formats
http://www.imagemagick.org/Usage/formats/#vector
However if you install RSVG (you may need to rebuild IM with a --with-rsvg option)
then it will use the RSVG library to render SVG to a raster image.
Or you can use RSVG directly without using IM.
You must remember IM is primarily a Raster Image Processor. It really has minimal understanding of Vector images.
See, A word about Vector Image formats
http://www.imagemagick.org/Usage/formats/#vector
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: svg: Gradient offset wrong when using transform="rotate.
Thanks for the info.
I tried with rsvg-convert, and it had the same bug, so I've opened https://bugzilla.gnome.org/show_bug.cgi?id=641823.
I discovered that WIkipedia uses rsvg to rastorize svg anyway, and not imagemagick as I thought...
I tried with rsvg-convert, and it had the same bug, so I've opened https://bugzilla.gnome.org/show_bug.cgi?id=641823.
I discovered that WIkipedia uses rsvg to rastorize svg anyway, and not imagemagick as I thought...