Say I want to have a montage which size is 160x600. I have several images and I want to be able to put them there (resize if necessary) so that the resulting montage is 160x600.
Is there any way to specify the size of the montage? Or you can just specify the size of the tiles?
Thanks!
Montage with a fix size resulting image
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Montage with a fix size resulting image
How about montaging them, and resizing at the end?
snibgo's IM pages: im.snibgo.com
Re: Montage with a fix size resulting image
Let me clarify what I want and what I have:
I have:
- Set of N images with unknown width/height - I just know that width*height > 1200px
I need:
- A montage of 160x600 with the images of the above set on it (they can be repeated). So, if for example, the set of images height is small, the montage will have more rows.
I have thought on doing the following:
- Since we can set the size of the tile (for example, we can say that each tile is 40x100) we could do some maths and have:
Number of rows = 600/100 = 6 rows (we would need to take into account the margin between rows...)
Number of columns = 160/40 = 4 columns
However, if for example the images have a really short height, the rezing to 40x100 will mantain the aspect ratio, and therefore I would need more rows in order to fill up to 600px.
Any thoughts on how to do this?
I have:
- Set of N images with unknown width/height - I just know that width*height > 1200px
I need:
- A montage of 160x600 with the images of the above set on it (they can be repeated). So, if for example, the set of images height is small, the montage will have more rows.
I have thought on doing the following:
- Since we can set the size of the tile (for example, we can say that each tile is 40x100) we could do some maths and have:
Number of rows = 600/100 = 6 rows (we would need to take into account the margin between rows...)
Number of columns = 160/40 = 4 columns
However, if for example the images have a really short height, the rezing to 40x100 will mantain the aspect ratio, and therefore I would need more rows in order to fill up to 600px.
Any thoughts on how to do this?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Montage with a fix size resulting image
The -tile argument sets the number of tiles horizontally and vertically.
see http://www.imagemagick.org/Usage/montage/#settings
see linke above
see http://www.imagemagick.org/Usage/montage/#settings
You can use the -geometry argument to resize the images (and spacing).-tile {cols}x{rows}
The number of images across and down used to fill a single montage image. If more images were read in or created than fits in a single montage image, then multiple images will be created. (See Tile Controls above)
see linke above
But in the end, you may have to resize the output to get the size you want.-geometry {W}x{H}+{X}+{Y}
Resize images after they have all been read in before montage overlays them onto its canvas. It also defines the size and the spacing between the tiles into which the images are drawn. If no size is specified the images will not be resized.