Page 1 of 1

Convert SVG to PNG and then fit to square ?

Posted: 2013-10-05T09:22:37-07:00
by joris
Hi,

I search to do the following :
- convert a .svg to a .png
- fit the png to square dimension without deforming the image

is it possible ?

I can convert like this :

Code: Select all

convert -density 500 -background white file.svg file.png
Now I want result png to fit square dimensions.

Thanks in advance for your help !

PS: I'm sorry for my english, I'm french ;)

Re: Convert SVG to PNG and then fit to square ?

Posted: 2013-10-05T09:44:05-07:00
by snibgo
I don't know what you mean by "fit the png to square dimension without deforming the image".

This ...

Code: Select all

convert -density 500 -background white file.svg -resize 600x600 file.png
... will ensure that the image will fit within a 600x600 square. The maximum dimension of the result will be 600 pixels.