I have a SVG file that has a defined size of 16x16. When I use ImageMagick's convert program to convert it into a PNG, then I get a 16x16 pixel PNG which is way too small:
convert test.svg test.png
I need to specify the pixel size of the output PNG. -size
parameter seems to be ignored, -scale
parameter scales the PNG after it has been converted to PNG. The best result up to now I got by using the -density
parameter:
convert -density 1200 test.svg test.png
But I'm not satisfied, because I want to specify the output size in pixels without doing math to calculate the density value. So I want to do something like this:
convert -setTheOutputSizeOfThePng 1024x1024 test.svg test.png
So what is the magic parameter I have to use here?
-size 1024x1024
is working fine, what is your imagemagick version? – Dejan Marjanović-resize
just stretches the converted image, with poor quality results. – Elistconvert -size 1024x1024 test.svg test.png
works fine with ImageMagick 7.0.7-0 Q16 (current version in Chocolatey repo for Windows). Just make sure that-size
appears before the input filename, else a 16x16 picture will be upscaled to give a blurry result. – Futal