Page 1 of 1

SVG scaling

Posted: 2014-02-26T18:48:10-07:00
by spongemonkey
I want to be able to create a Magick::Image instance from an SVG file, rendered to a certain size. I can render SVGs to different sizes from the command line using something like

Code: Select all

convert -density x infile.svg outfile.png
and tinkering with x until I get the desired size, but I can't seem to be able to do this in code. I can rasterize to the svg's "native" size, but not to a desired size. Note that I want to get the best achievable quality so doing any resizing after rasterization is out of the question. Does anyone know how this is done?