Scaling an 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
mcguinnessdr
Posts: 6
Joined: 2013-08-26T15:07:41-07:00
Authentication code: 6789

Scaling an SVG

Post by mcguinnessdr »

Hello, I need to scale an SVG file so that when I convert it to a PNG it is the best quality. I've tried "resize", "size", and "scale", but all they do is change the size of the image, while leaving the curves at the same size. If I try converting from this the actual lines will be tiny in the top-left corner. Is there a way I can scale the points along with the image size? Thanks for any help!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Scaling an SVG

Post by fmw42 »

Use -density on vector files to scale them from 72 dpi. If you use 288 that will be 4x scaling

convert -density 288 image.svg image.png

If you want to keep the size the same but get better quality then do

convert -density 288 image.svg -resize 25% image.png
mcguinnessdr
Posts: 6
Joined: 2013-08-26T15:07:41-07:00
Authentication code: 6789

Re: Scaling an SVG

Post by mcguinnessdr »

Thanks, just what I was looking for!
Post Reply