Output SVG

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
hivens
Posts: 8
Joined: 2017-02-24T03:49:36-07:00
Authentication code: 1151

Output SVG

Post by hivens »

HI,

I've seen lots of imagemagick examples which output to JPG, PNG or even convert an SVG to PNG. However I haven't been able to find any examples of imagemagick generating SVG files. Is this something that can be done in imagemagick?

Thank you.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Output SVG

Post by magick »

ImageMagick is primarily a pixel processor. It can read many vector formats but destroys the vectors and replaces them with pixels. Although it can write SVG, it is creating virtual pixels which is likely want you want. If you want to generate SVG, try inkscape.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Output SVG

Post by snibgo »

As magick says.

Creating an SVG file is easy, for example:

Code: Select all

convert rose: x.svg
At one time, this created an SVG containing one circle per pixel. These days (v6.9.5-3) it creates an SVG with embedded raster image. Neither is particularly useful.

Inkscape has a process for vectorizing raster images. Programs Potrace and AutoTrace do a similar job. I recently published "Lines, points and curves" about a related problem, vectorizing lines.
snibgo's IM pages: im.snibgo.com
Post Reply