Page 1 of 1

SVG rendering does not understand fill="none"

Posted: 2014-06-21T09:20:17-07:00
by yecril71pl
The following image should display a blue line on a white sheet:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="160mm" height="90mm" viewBox="0 0 16000 9000" version="1.1" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" >
 <path fill="none" stroke="rgb(179,179,179)" d="M 8064,8399 L 770,8399 770,855 15359,855 15359,8399 8064,8399 Z"/>
 <path fill="none" stroke="rgb(0,69,134)" stroke-width="80" d="M 2854,5380 L 13274,2363"/>
</svg>
A black rectangle is rendered instead.

Re: SVG rendering does not understand fill="none"

Posted: 2014-06-21T10:00:53-07:00
by snibgo
Please state your platform (Windows, Unix, whatever) and version of ImageMagick, and the command you used.

On Windows 8.1, IM 6.8.9-0, using Inkscape, the command ...

Code: Select all

convert -verbose blueline.svg h.png
... gave a blue line on white background.

Re: SVG rendering does not understand fill="none"

Posted: 2014-06-21T12:09:37-07:00
by yecril71pl
Name : ImageMagick
Version : 6.8.6.9
Release : 2.12.1
Architecture: x86_64
Install Date: sob, 22 mar 2014, 11:39:50
Group : Productivity/Graphics/Other
Size : 387969
License : SUSE-ImageMagick
Signature : RSA/SHA256, pią, 21 mar 2014, 10:30:06, Key ID b88b2fd43dbdc284
Source RPM : ImageMagick-6.8.6.9-2.12.1.src.rpm
Build Date : pią, 14 mar 2014, 09:21:05
Build Host : cloud125
Relocations : (not relocatable)
Packager : http://bugs.opensuse.org
Vendor : openSUSE
URL : http://www.imagemagick.org
Summary : Viewer and Converter for Images

Code: Select all

 { display badgraph.svg; } 

Re: SVG rendering does not understand fill="none"

Posted: 2014-06-21T12:56:48-07:00
by snibgo
Try converting it first, eg:

Code: Select all

convert -verbose blueline.svg h.png
display h.png

Re: SVG rendering does not understand fill="none"

Posted: 2014-06-21T13:20:02-07:00
by yecril71pl
displays a black rectangle in badgraph.png

Re: SVG rendering does not understand fill="none"

Posted: 2014-06-21T14:07:49-07:00
by fmw42
What are you using the render the SVG file -- IM internal MSVG (XML), RSVG or Inkscape? Look at

convert -list format

and see what you have for SVG. Perhaps you need to install RSVG or Inkscape or upgrade those delegates.

Re: SVG rendering does not understand fill="none"

Posted: 2014-06-22T11:04:21-07:00
by yecril71pl
SVG SVG rw+ Scalable Vector Graphics (XML 2.9.1)

Re: SVG rendering does not understand fill="none"

Posted: 2014-06-22T11:11:01-07:00
by fmw42
yecril71pl wrote:SVG SVG rw+ Scalable Vector Graphics (XML 2.9.1)

That is the IM internal MSVG renderer, which is the least capable of the 3. Try installing either RSVG or Inkscape for IM to use.

Re: SVG rendering does not understand fill="none"

Posted: 2014-06-22T12:17:25-07:00
by yecril71pl
I have RSVG installed, used by GIMP.

Re: SVG rendering does not understand fill="none"

Posted: 2014-06-22T12:51:24-07:00
by fmw42
If you still get

SVG SVG rw+ Scalable Vector Graphics (XML 2.9.1)

then IM does not know about it. You need to configure (and re-install) IM to use RSVG so that the above shows RSVG and not XML

Re: SVG rendering does not understand fill="none"

Posted: 2014-06-23T02:36:59-07:00
by yecril71pl
Is it because RSVG is GPL that you still have to provide this broken SVG component?
(I was unable to find any documentation concerning individual modules; even the function OpenModules is incompletely documented in Doxygen.)

Re: SVG rendering does not understand fill="none"

Posted: 2014-06-23T02:42:16-07:00
by dlemstra

Re: SVG rendering does not understand fill="none"

Posted: 2014-06-23T03:14:30-07:00
by yecril71pl
Bug 732088 has been added to the database.