Hey guys,
is it possible in ImageMagick to place images in another image in specific grids? Please see the attached image, so the explanation makes more sense. So lets say I have 4 images and want to place each of them in one of the squares in the grid. I would want to fill each square with the given images.
Is that somehow possible? The version of ImageMagick does not matter. I would be using `Python`.
Place image on a grid
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Place image on a grid
Yes it is possible. You have several choices in command line mode:
1) use montage (http://www.imagemagick.org/Usage/montage/)
2) use a combination of convert ... -resize -compose over -composite ... (http://www.imagemagick.org/Usage/layers/#convert)
See Python at http://www.imagemagick.org/script/api.php for choices of API
1) use montage (http://www.imagemagick.org/Usage/montage/)
2) use a combination of convert ... -resize -compose over -composite ... (http://www.imagemagick.org/Usage/layers/#convert)
See Python at http://www.imagemagick.org/script/api.php for choices of API
Re: Place image on a grid
Great! Montage looks exactly what I was looking for. ImageMagick is so huge, sometimes its hard to fine the correct function. Thanks again, I'll look into montage!
Re: Place image on a grid
I generally use convert with the "draw image" option, which I find easier to understand. It's just
where x and y are the location and w and h are the dimensions of the image being placed. You can have multiple instances of "-draw {options]" on the commandline.
Code: Select all
-draw "image x,y w,h file.png"
Re: Place image on a grid
Great, I might have to look into since the montage option is not available for the Python APIs as far as I've seen.
Code: Select all
-draw [options]