Page 1 of 1

Error of rendering while converting svg file to png

Posted: 2016-08-25T05:11:23-07:00
by Kharkovlanok
Hi,

I'm trying to use ImageMagick to convert a svg file created with the nvd3 javascript lib to png, but the result differs, I don't really get why.
Did someone already had this problem?
Here my svg data : http://pastebin.com/Rpjum2HT
Here the original svg image: https://drive.google.com/open?id=0B6WmP ... 2pTSjJIVE0
Here the result after converting to png with ImageMagick: https://drive.google.com/open?id=0B6WmP ... nNyaUtraGc

Thank you for your time,

Re: Error of rendering while converting svg file to png

Posted: 2016-08-25T09:19:57-07:00
by snibgo
You should say what version of IM you are using, and what SVG software is rasterizing the PNG.

However, the same mostly black result comes from running Inkscape 0.91 directly on your SVG. The problem isn't ImageMagick.

Re: Error of rendering while converting svg file to png

Posted: 2016-09-13T06:56:07-07:00
by kylejvrsa
Hi,

I also have a issue rendering SVG files correctly when trying to convert them to PNG, although I don't think it is related to me trying to convert them to PNG. The SVG is just not rendering correctly, but when I view the same SVG in chrome/Firefox it looks fine.

Debian: Jessie
imagemagick: 6.8.9.9
librsvg2: 2.40.5

Folder to where the SVG is and the converted PNG
https://drive.google.com/open?id=0B_niT ... UYzamRXeEE

Any help would be much appreciated.

Thank you,

Re: Error of rendering while converting svg file to png

Posted: 2016-09-13T09:45:40-07:00
by fmw42
My RSVG RSVG 2.40.16 rendering looks fine except that the object is solid and no white/clear edges.

Code: Select all

convert -background none chair1.svg chair1.png

Re: Error of rendering while converting svg file to png

Posted: 2016-09-13T21:24:24-07:00
by snibgo
The SVG file has problems. When that happens, different SVG viewers will display different images.

Re: Error of rendering while converting svg file to png

Posted: 2016-09-29T04:05:35-07:00
by kylejvrsa
@fmw42 On librsvg2.40.16 I get a solid image as well, but it needs to have the white /clear edgese as well.

@snibgo My Problem is that all these svgs I have render perfectly fine in Firefox and chromium. If you say there is something wrong with the svg, would you mind elaborating?

Any help would be appreciated even if you can just point me at some docs to go read, I don't know where to start.

Re: Error of rendering while converting svg file to png

Posted: 2016-09-29T06:04:30-07:00
by snibgo
Sorry, I don't have the time it would take to analyse your complex SVG file.

The first path has no style, fill or stroke. It doesn't draw anything. It should have no effect on the result. (But some renderers might give it a "default" style, so it does draw something.)

Strokes and fills are #fff, white. When these are drawn on a white background, they are not visible.