Page 1 of 1

Help To Create Montage, I'm Having Trouble

Posted: 2016-12-16T12:22:18-07:00
by bermnz
Hi, please help me make a simple montage, I need the perl code to put in a script, not command line code.

I need a 600 width x 400 height white canvas.
I have a portrait image that is 267 width x 400 height.
I want to put the portrait sized image in the middle of this canvas, and have white space on each side of the image.

Can somebody please help me with that.

Re: Help To Create Montage, I'm Having Trouble

Posted: 2016-12-16T13:35:48-07:00
by GeeMack
bermnz wrote:Hi, please help me make a simple montage, I need the perl code to put in a script, not command line code.

I need a 600 width x 400 height white canvas.
I have a portrait image that is 267 width x 400 height.
I want to put the portrait sized image in the middle of this canvas, and have white space on each side of the image.
To get the best answers it's always more helpful if you provide your OS or platform, and the version of ImageMagick you're using. With most recent versions of IM from most shells you can do something like this...

Code: Select all

path-to-IM/convert.exe input.jpg -background white -gravity center -extent 600x400 output.jpg
Then do an exec from perl with that command.