Page 1 of 1

achieving equal size logos in montage

Posted: 2011-06-14T09:22:48-07:00
by rcasey
Greetings,

This is a basic question for the gurus, but I'm kind of stumped, after trying several things, and searching this excellent forum; but here's my question...

I'm trying to get 5 different logos to the same height size, then put them into a montage, which gets used on my client's homepage. I know to use the "convert filename.png -resize 'x200' newfile.gif" to get them all the same size. I use 'identify' to verify that the 5 files are indeed all the same height...yet when I montage them all together into a 5x1 tile:

montage -tile 5x1 -background none file1 file2 ... montage_filename.gif

They still come out looking different heights? The result can be seen here: http://www.thisairsealedhome.com/index.html, where the five logos are seen along the bottom of the screen.

Any suggestions as the cause of my (newbie) error?

(BTW, ImageMagick is an amazing resource...just discovered it a month or so ago...)
Thanks! --rick

Re: achieving equal size logos in montage

Posted: 2011-06-14T10:02:41-07:00
by Bonzo
That is strange try this instead:

Code: Select all

convert newfile.gif newfile1.gif newfile2.gif newfile3.gif +append montage_filename.gif

Re: achieving equal size logos in montage

Posted: 2011-06-14T10:24:25-07:00
by fmw42
what IM version and platform are you using? can you post links to the five input images? It is possible that your png files have virtual canvas sizes different from the input image. So when resizing you might add +repage after the input image and see if that helps. Also in your montage command try putting the input image first before the other arguments.

Re: achieving equal size logos in montage

Posted: 2011-06-14T10:37:18-07:00
by fmw42
The issue is explained in the montage docs (http://www.imagemagick.org/Usage/montage/) where it says:

"The default "-geometry" setting is '120x120>+4+3' which means to fit any image given into a box 120x120 pixel in size. If the image is larger shrink it, but don't resize smaller images (as per the Only Shrink Larger ('>') Flag. The 'tile' size is then set to the largest dimentions of all the resized images, and the size actually specified. That means you will never get a tile size that is smaller than the specified "-geometry" size."

So to avoid any resizing you must specify a -geometry with just offsets. For example:


convert logo: -resize x200 logo_tmp1.png
convert rose: -resize x200 rose_tmp1.png

This gives results like you are getting:
montage logo_tmp1.png rose_tmp1.png -tile 2x1 -background none logo_rose_montage.gif
Image

But adding -geometry gives proper results:
montage logo_tmp1.png rose_tmp1.png -tile 2x1 -background none -geometry +5+5 logo_rose_montage.gif
Image

Re: achieving equal size logos in montage

Posted: 2011-06-14T10:47:59-07:00
by rcasey
Thanks for the quick replies. Will try out these suggestions, and post result.

I found a bug? Wow...I'm honored! :? ...looks like your example works though...

Re: achieving equal size logos in montage

Posted: 2011-06-14T10:52:40-07:00
by fmw42
rcasey wrote:Thanks for the quick replies. Will try out these suggestions, and post result.

I found a bug? Wow...I'm honored! :? ...looks like your example works though...
Look again. I just edited my post. It is not a bug. It is an issue that you need to specify a -geometry.

Re: achieving equal size logos in montage

Posted: 2011-06-14T10:58:54-07:00
by rcasey
Cool...thanks Fred! Will try that out (this forum is terrific!) --rick