Help To Create Montage, I'm Having Trouble

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
bermnz
Posts: 1
Joined: 2016-12-16T12:15:03-07:00
Authentication code: 1151

Help To Create Montage, I'm Having Trouble

Post 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.
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

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

Post 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.
Post Reply