LinuxCommandLibrary

combine

composite images with blend modes

TLDR

Combine two images using the default compose operator

$ combine [image1.png] [image2.png] [output.png]
copy
Combine using a specific compose method
$ combine -compose [multiply] [image1.png] [image2.png] [output.png]
copy
Combine images with a displacement map
$ combine -compose [displace] [image.png] [map.png] [output.png]
copy
Combine RGB channels from separate images
$ combine -channel [RGB] -combine [red.png] [green.png] [blue.png] [output.png]
copy
Use difference blending to highlight changes
$ combine -compose [difference] [original.png] [modified.png] [diff.png]
copy
Combine with screen blend mode
$ combine -compose [screen] [base.png] [overlay.png] [output.png]
copy

SYNOPSIS

combine [options] image1 image2 output

DESCRIPTION

combine is an ImageMagick command for compositing two images together using various blending modes. It provides Photoshop-like layer compositing operations from the command line.
The tool supports numerous composition methods including standard blend modes (multiply, screen, overlay, soft-light), mathematical operations (add, subtract, difference), and specialized methods for masking and channel manipulation.
When combining images, the first image serves as the base or destination, and the second image is composited over it according to the specified method. Gravity and geometry options control positioning when images differ in size.

PARAMETERS

-compose METHOD

Specify the compositing method (over, multiply, screen, difference, etc.).
-channel TYPE
Apply operation to specific channels (R, G, B, A, RGB, RGBA).
-gravity TYPE
Position for overlay image (center, north, south, east, west, etc.).
-geometry GEOMETRY
Size and offset for positioning the overlay.
-alpha TYPE
Control alpha channel handling (on, off, set, etc.).
-blend GEOMETRY
Blend percentages for source and destination images.
-dissolve PERCENT
Dissolve source image into destination.
-watermark BRIGHTNESS
Apply as a watermark with specified brightness.

CAVEATS

The combine command is a legacy alias in ImageMagick. Modern usage recommends magick composite or convert with -composite for more flexibility. Image dimensions and color spaces should typically match for predictable results.

HISTORY

combine is part of ImageMagick, first released in 1990 by John Cristy. It evolved alongside digital image editing software, implementing composition algorithms similar to those in Adobe Photoshop. The command provides scriptable access to these professional compositing techniques.

SEE ALSO

composite(1), convert(1), montage(1), magick(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community