Hello,
i'm new to IM and now that i can mount two or more images together on a new, resulting image, which is pretty cool for me . But for now i use the -size operator to set the resulting image's size (as read from the examples).
Is it possible to place two or three images onto a "background image" without knowing it's size, so that the resulting image has the same dimension as the background image? And how to tell IM which image is the background image?
How IM determine output size of image?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How IM determine output size of image?
The -layers merge will size the background image to fit the layer images it is accomidating.
However you will still need to position the images at least relative to each other.
See IM examples Laying, merge.
http://www.imagemagick.org/Usage/layers/#merge
And also the later examples of programmed positions.
http://www.imagemagick.org/Usage/layers/#layer_prog
However you will still need to position the images at least relative to each other.
See IM examples Laying, merge.
http://www.imagemagick.org/Usage/layers/#merge
And also the later examples of programmed positions.
http://www.imagemagick.org/Usage/layers/#layer_prog
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: How IM determine output size of image?
Thanks a lot. Inbetween i found an example using "-flatten". Is this just another way to do it?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How IM determine output size of image?
-flatten is a shorthand for -layers flattenpictogram wrote:Thanks a lot. Inbetween i found an example using "-flatten". Is this just another way to do it?
see http://www.imagemagick.org/Usage/layers/#flatten, but I believe the first image's virtual canvas (page dimensions) determines the final size and any image outside the bounds will be truncated
If you want the canvas (background) to expand to hold all images, see -mosiac (-layers mosaic) http://www.imagemagick.org/Usage/layers/#mosaic
Also see -layers merge http://www.imagemagick.org/Usage/layers/#merge
Also see all methods at http://www.imagemagick.org/script/comma ... sl4#layers