Page 1 of 1

First timer, montage geometry & composite questions

Posted: 2011-01-28T09:43:28-07:00
by phxadam
This is my first time trying to make something with ImageMagick. The machine im using has PHP/Apache/Linux. I am trying to make a montage with a canvas size of 728x90 This is what im working with now, but I know it is incorrect:

Code: Select all

montage -tile x1 $name -resize 728x90 -geometry *x90>+2+2 output.jpg
after I figure that out im going to use composite to overlay a transparent PNG in the center of the image. The code i am trying to use does not work:

Code: Select all

composite -gravity center title.png output.jpg banner.jpg
Any help is appreciated.

Re: First timer, montage geometry & composite questions

Posted: 2011-01-28T14:25:47-07:00
by fmw42
More information is needed. All are your images the same size? if so what size. you cannot control the size of the montage except by spacing between the images. so to get the final result, you need to resize, but that may still be off some unless you are willing to distort the image so as not to preserver aspect ratio.

try

montage $name -tile x1 -geometry +2+2 -resize 728x90 output.jpg

if you want exactly 728x90 and are willing to distort some, use !

montage $name -tile x1 -geometry +2+2 -resize "728x90!" output.jpg


For composite try

composite foreground background -gravity center -compose over result

or

convert background foreground -gravity center -compose over result

see http://www.imagemagick.org/Usage/compose/#compose