[magick-users] Suggestion: PerlMagick's Read method to accept an SVG string

Gabe Schaffer gabe at gabe.com
Mon Nov 26 22:06:29 PST 2007


On 11/26/07, Ron Savage <ron at savage.net.au> wrote:

> I will soon be generating a lot of SVG images as text strings, and I'd
> like to feed these in to ImageMagick, in Perl, like this:
>
> my($s) = '<?xml...> <svg ...> <g ...> <path ... /> </g> </svg>';
> my($i) = Image::Magick -> new();
> my($r) = $i -> Read("svg:$s");

You're telling it to read a file named "<xml...". What you want to do
is read it in as a blob. Note that being able to read a blob is
dependent on the library. This may work with SVG but not other
formats.

GNS


More information about the Magick-users mailing list