A composite operation combines pixels from a different image with your target image. You can control composition by choosing which image to combine, where the combining occurs (the offset from the target image), and how the pixels are combined (composite operation).

Select your composite image, press Browse to browse and select your image file or enter the URL of your image. Use clipboard: as the filename to import a previously saved image from the ImageMagick Studio clipboard.

The offset geometry specifies the (x,y) offset from your target image to combine the composite image. The x and y offset are conveniently specified as one value. For example, to offset the target image by 30 pixels in the horizontal direction and 40 pixels in the vertical use:

 
    +30+40 

For convenience, you can select a gravity instead of an offset geometry. For example, Center centers the image. The location geometry has precedence over any gravity.

Finally, you need to specify how the pixels are combined. By default, each of the composite image pixels are replaced by the corresponding image tile pixel. You can choose an alternate composite operation. How each operator behaves is described below.

over
The result will be the union of the two image shapes, with composite image obscuring image in the region of overlap.

in
The result is simply composite image cut by the shape of image. None of the image data of image will be in the result.

out
The resulting image is composite image with the shape of image cut out.

atop
The result is the same shape as image image, with composite image obscuring image where the image shapes overlap. Note this differs from over because the portion of composite image outside image's shape does not appear in the result.

xor
The result is the image data from both composite image and image that is outside the overlap region. The overlap region will be blank.

plus
The result is just the sum of the image data. Output values are cropped to 255 (no overflow). This operation is independent of the matte channels.

minus
The result of composite image - image, with underflow cropped to zero. The matte channel is ignored (set to 255, full coverage).

add
The result of composite image + image, with overflow wrapping around (mod 256).

subtract
The result of composite image - image, with underflow wrapping around (mod 256). The add and subtract operators can be used to perform reversible transformations.

difference
The result of abs(composite image - image). This is useful for comparing two very similar images.

multiply
The result of composite image * image. This is useful for the creation of drop-shadows.

bumpmap
The result of image shaded by image.

replace
The resulting image is image replaced with composite image. Here the matte information is ignored.

The image compositor requires a matte, or alpha channel in the image for some operations. This extra channel usually defines a mask which represents a sort of a cookie-cutter for the image. This is the case when matte is 255 (full coverage) for pixels inside the shape, zero outside, and between zero and 255 on the boundary. For certain operations, if image does not have an matte channel, it is initialized with 0 for any pixel matching in color to pixel location (0,0), otherwise 255. properly borderwidth must be 0).


[comment]