First timer, montage geometry & composite questions

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
phxadam
Posts: 1
Joined: 2011-01-28T09:02:38-07:00
Authentication code: 8675308

First timer, montage geometry & composite questions

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: First timer, montage geometry & composite questions

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