Quantcast
Channel: Legacy ImageMagick Discussions Archive
Viewing all articles
Browse latest Browse all 8

Bugs • ImageMagick SVG reading doesn't like styles in CDATA markup

$
0
0
According to the SVG specs at https://www.w3.org/TR/SVG11/styling.html#StylingWithCSS,"it is highly recommended that internal style sheets be placed inside CDATA blocks.". But when I do this, the styles are then ignored by ImageMagick when converting to e.g. PNG. For example, here's a basic file:

Code:

<svg baseProfile="full" height="200" version="1.1" width="200" xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs>  <style type="text/css">   <![CDATA[   .edge {fill: none}   ]]>   </style>  </defs> <path class="edge" d="M 20 20 V 100 H 100" /></svg>
This display with no diagonal fill in most SVG renderers, but not when I do "convert tmp.svg tmp.png". If I remove the "<![CDATA[" string and its closing "]]>", then ImageMagick does the right thing.

Statistics: Posted by hyanwong — 2020-11-09T07:01:12-07:00



Viewing all articles
Browse latest Browse all 8

Latest Images

Trending Articles





Latest Images