Conversion and Display of an SVG File

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
elisegev
Posts: 50
Joined: 2005-09-28T07:47:13-07:00
Contact:

Conversion and Display of an SVG File

Post by elisegev »

This is a pretty simple validated SVG file:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg SYSTEM "svg10.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0" y="0" width="75" height="139">
<defs>
<linearGradient id="MASTERGRADIENT_0_" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox">
<stop offset="0%" stop-color="#FF0000"/>
<stop offset="20%" stop-color="#FF7F00"/>
<stop offset="40%" stop-color="#FFBF00"/>
<stop offset="59%" stop-color="#73F80F"/>
<stop offset="81%" stop-color="#00A0C6"/>
<stop offset="100%" stop-color="#4210D2"/>
</linearGradient>
</defs>
<g>
<linearGradient id="GRADIENT_LINK_0_" xlink:href="#MASTERGRADIENT_0_" gradientUnits="userSpaceOnUse" x1="0.500" y1="69.166" x2="73.834" y2="69.166">
</linearGradient>
<path style="fill:url(#GRADIENT_LINK_0_);stroke:#000000;" d=" M73.83,137.83 C73.83,137.83 0.50,137.83 0.50,137.83 C0.50,137.83 0.50,0.50 0.50,0.50 C0.50,0.50 73.83,0.50 73.83,0.50 C73.83,0.50 73.83,137.83 73.83,137.83"/>
</g>
</svg>

This file can be rendered correctly on Firefox, but not with imdisplay. Imdisplay just shows a white rectangle. It does not issue any error or warning. The same results happen when I try to convert it to JPG, or PNG. I am using IM 6.3.4.

Why is it happening?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Conversion and Display of an SVG File

Post by magick »

ImageMagick supports a subset of the SVG language. Gradients are not fully implemented yet.
Post Reply