[SOLVED] SVG convert troubles - where's the problem?
Posted: 2015-09-28T01:21:31-07:00
Hi all,
I have a handmade SVG that displays just fine in Firefox and Gimp, but convert just doesn't grok it. Am I doing something wrong in my SVG, or did I hit an ImageMagick limitation or bug?
Full details:
penrose-triangle.svg source:
The stripped-to-triviality "convert" command line that reproduces the problem:
Result:
Version information (this is what you get on 15.04):
I have a handmade SVG that displays just fine in Firefox and Gimp, but convert just doesn't grok it. Am I doing something wrong in my SVG, or did I hit an ImageMagick limitation or bug?
Full details:
penrose-triangle.svg source:
Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.0"
width="163.00"
height="141.31">
<!-- width := maxX - minX + strokewidth -->
<!-- height like width -->
<defs>
<!-- The Penrose triangle consists of three copies of a "hook" shape, -->
<!-- rotated by 120 and 240 degrees. -->
<!-- Define the "bottom" shape here, assuming that it "wraps itself -->
<!-- around the origin": -->
<path id="hook"
d="M -70.00,+51.96 L +70.00,+51.96 L +80.00,+34.64 L -40.00,+34.64 L +00.00,-34.64 L -10.00,-51.96 z"
style="stroke:#000000;stroke-width:3;stroke-linejoin:round"
/>
</defs>
<!-- translateX = -minX + strokewidth/2 -->
<!-- translateY like translateX -->
<g transform="translate(81.50,87.85)">
<use xlink:href="#hook" style="fill:#333333" />
<use xlink:href="#hook" style="fill:#cccccc" transform="rotate(+120)" />
<use xlink:href="#hook" style="fill:#ffffff" transform="rotate(-120)" />
</g>
</svg>
Code: Select all
convert penrose-triangle.svg penrose-triangle.png
Version information (this is what you get on 15.04):
Code: Select all
$ convert --version
Version: ImageMagick 6.8.9-9 Q16 x86_64 2015-01-06 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib