atdepott
atdepott

Reputation: 129

ImageMagick path fill

I am trying to convert an SVG image to a PNG using the latest version of ImageMagick (6.8.7 Q16) but I am running into difficulties with rendering a path element. Here is the command I am using:

convert svgtest2.svg svgtest2.png

and here is the content of my SVG file:

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="640" height="480">
  <path transform="matrix(1,0,0,1,0,0)" fill="none" stroke="#E01B5D" d="M110,129 L180,342 L250,252 L390,67" stroke-width="2"></path>
</svg>

The resulting png should be pink lines with no fill, but I actually see a filled black triangle with no border.

What am I missing? Has anyone found a workaround for this?

Upvotes: 1

Views: 1127

Answers (1)

atdepott
atdepott

Reputation: 129

I was able to get this question answered in a forum post at ImageMagick: http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=24263

I was able to solve my problem by specifying the opacities for the fill and stroke:

fill-opacity="0" stroke-opacity="1"

Upvotes: 1

Related Questions