Page 1 of 1

Re: location of composited image

Posted: 2009-04-26T00:43:43-07:00
by Bonzo
An example of what you are already using would help :)

You can position items with -gravity center etc. and -geometry +0+0

Re: location of composited image

Posted: 2009-04-26T15:28:45-07:00
by fmw42

Re: location of composited image

Posted: 2009-04-26T18:22:35-07:00
by anthony
Thier are two ways of positionig images you want to overlay within ImageMagick.

using direct alpha composition you would use a -geometry offset and -gravity to sepecify to what corner or edge (or center) that offset is from. This is used by the "composite" command and the -composite operator in "convert"

The other method is to set the position of images in terms of 'layer' offsets also known as -page offsets (due to historical reasons) or virtual canvas offsets (a descriptive terminology). These are NOT graivity effected, but positions the images top left corner relative to a 'virtual origin'. The 'layer' images are then -flatten -mosiac or -layer merged together (the difference between these operators is in the size (and layer offset) of the final image.

For a discussion of the two methods see
Composite Geometry vs Layer Offsets
http://www.imagemagick.org/Usage/compose/#geometry

Examples of all the methods of multiple image handling is in IM examples section
Layering Multiple Images
http://www.imagemagick.org/Usage/layers/

which method is best generally depend on how the images are being generated. If just read in 'alpha composition' is best. if images are being distorted or aligned, or there are many images involved then 'Image layering' is usually best.