Page 1 of 1

Resize canvas to one side

Posted: 2012-11-04T10:27:30-07:00
by opalepatrick
I tried this

Code: Select all

mogrify -path /canvassed/ -background black -gravity East -extent 602x400 -density 72x72 -quality 85  *.jpg
in the hope that I would take an image that was 291x400, change the canvas size to 602x400 and, have the original image positioned extreme right of the result.

What happened was that the original image just resized to the extent.

Have to be doing something wrong but after searching can't work it out. Appreciate any help.

Re: Resize canvas to one side

Posted: 2012-11-04T11:50:55-07:00
by fmw42
It works fine for me under IM 6.8.0.4 Q16 Mac OSX Snow Leopard

create two empty directories, rosetest and rosetest2

cd rosetest
convert rose: rose1.jpg
convert rose: rose2.jpg
convert rose: rose2.jpg

mogrify -path /Users/fred/images/rosetest2 -format jpg -background black -gravity east -extent 200x200 -density 72x72 -quality 85 *.jpg

Produces 3 images of the same name with black canvas of size 200x200 with the small rose image placed at the center of the right side of the canvas.

Re: Resize canvas to one side

Posted: 2012-11-05T02:09:39-07:00
by opalepatrick
Thanks fmw42,

for some reason or other, after starting up (Linux Ubuntu) again this morning. It worked first time. Very bizarre. But thanks for confirming otherwise I could have been scrabbling around for hours :-)