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
achieving equal size logos in montage
Re: achieving equal size logos in montage
That is strange try this instead:
Code: Select all
convert newfile.gif newfile1.gif newfile2.gif newfile3.gif +append montage_filename.gif
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: achieving equal size logos in montage
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.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: achieving equal size logos in montage
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
But adding -geometry gives proper results:
montage logo_tmp1.png rose_tmp1.png -tile 2x1 -background none -geometry +5+5 logo_rose_montage.gif
"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
But adding -geometry gives proper results:
montage logo_tmp1.png rose_tmp1.png -tile 2x1 -background none -geometry +5+5 logo_rose_montage.gif
Last edited by fmw42 on 2011-06-14T10:51:39-07:00, edited 2 times in total.
Re: achieving equal size logos in montage
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...
I found a bug? Wow...I'm honored! ...looks like your example works though...
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: achieving equal size logos in montage
Look again. I just edited my post. It is not a bug. It is an issue that you need to specify a -geometry.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...
Re: achieving equal size logos in montage
Cool...thanks Fred! Will try that out (this forum is terrific!) --rick