SVG rendering does not understand fill="none"

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
yecril71pl
Posts: 81
Joined: 2011-02-08T11:06:09-07:00
Authentication code: 8675308
Location: Warsaw, Poland
Contact:

SVG rendering does not understand fill="none"

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

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

Post 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.
snibgo's IM pages: im.snibgo.com
User avatar
yecril71pl
Posts: 81
Joined: 2011-02-08T11:06:09-07:00
Authentication code: 8675308
Location: Warsaw, Poland
Contact:

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

Post 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; } 
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

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

Post by snibgo »

Try converting it first, eg:

Code: Select all

convert -verbose blueline.svg h.png
display h.png
snibgo's IM pages: im.snibgo.com
User avatar
yecril71pl
Posts: 81
Joined: 2011-02-08T11:06:09-07:00
Authentication code: 8675308
Location: Warsaw, Poland
Contact:

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

Post by yecril71pl »

displays a black rectangle in badgraph.png
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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.
User avatar
yecril71pl
Posts: 81
Joined: 2011-02-08T11:06:09-07:00
Authentication code: 8675308
Location: Warsaw, Poland
Contact:

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

Post by yecril71pl »

SVG SVG rw+ Scalable Vector Graphics (XML 2.9.1)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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.
User avatar
yecril71pl
Posts: 81
Joined: 2011-02-08T11:06:09-07:00
Authentication code: 8675308
Location: Warsaw, Poland
Contact:

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

Post by yecril71pl »

I have RSVG installed, used by GIMP.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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
User avatar
yecril71pl
Posts: 81
Joined: 2011-02-08T11:06:09-07:00
Authentication code: 8675308
Location: Warsaw, Poland
Contact:

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

Post 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.)
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

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

Post by dlemstra »

.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
User avatar
yecril71pl
Posts: 81
Joined: 2011-02-08T11:06:09-07:00
Authentication code: 8675308
Location: Warsaw, Poland
Contact:

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

Post by yecril71pl »

Bug 732088 has been added to the database.
Post Reply