Page 1 of 1

Resize and fill the rest

Posted: 2011-12-24T03:06:19-07:00
by Mahroun
I couldn't figure it out, sorry

I have a frame that is 188 x 123, but those dimensions are dynamic and frame size can change..
I need to downscale the image to look best and centered in the frame, so I make calculations in my script (Ahk script) and resize one of the sides (depend on the image dimensions), now I need to fill the rest with white.

I'm using IrfanView to do the resizing but would like to use ImageMagic to do both resizing and filling.

Any idea?
Thanks

Re: Resize and fill the rest

Posted: 2011-12-24T04:26:00-07:00
by Bonzo
Try something this:

Code: Select all

convert input -resize 500x500 -background white -gravity center -extent 500x500 output

Re: Resize and fill the rest

Posted: 2011-12-25T00:23:54-07:00
by anthony
There is a lot of examples of this type of thing in
IM examples, Thumbnails
http://www.imagemagick.org/Usage/thumbnails/