Page 1 of 1

Resizing to Fill a Given Space

Posted: 2007-09-20T08:59:27-07:00
by kbsolutions
Hi!

Hope someone can help me with that...
I would like to resize a pic to fill a given space with a certain background image. Its working fine with a color, but how can I do this with a background image (gif)?

With color it works fine:
convert myimage.gif -resize 300x300 -size 300x300 xc:#fff +swap -gravity center -composite mynewimage.gif

but if you would like to have a background image... can someone help me with that please?

Re: Resizing to Fill a Given Space

Posted: 2007-09-24T20:14:02-07:00
by anthony
IM Examples, Thumbnails...

Re: Resizing to Fill a Given Space

Posted: 2007-09-25T09:34:44-07:00
by kbsolutions
hmm, I did already searching for an example... but I did not find one! that's the reason, why I am posting here.
Can you give me a hint?

Regards

Re: Resizing to Fill a Given Space

Posted: 2007-09-25T17:44:44-07:00
by anthony
The example used gradient: for the background image...
Last example in 'padding out an image'
http://www.imagemagick.org/Usage/thumbnails/#pad

Just replace gradient: with the background GIF image