Page 1 of 1

Stretch the canvas

Posted: 2011-08-18T07:22:29-07:00
by xpt
Hi,

What's the easiest way to stretch an existing image's canvas to a bigger size?

I meant to stretch the *canvas*, the image remains the same size. E.g,
stretching a 300x300 image to 600x400, but the image stays intact, still
300x300 (and better in the middle of the image), but the canvas is
stretched. So "identify" will returns 600x400, but the images looks the same.

Thanks

Re: Stretch the canvas

Posted: 2011-08-18T09:46:15-07:00
by fmw42
convert image -gravity center -background somecolor -extent 640x480 resultimage

see
http://www.imagemagick.org/Usage/crop/#extent

Re: Stretch the canvas

Posted: 2011-08-18T19:40:56-07:00
by xpt
PERFECT!
Thanks!