gm composite

NAME

| composite - composite images together.

Contents

Synopsis
Description
Examples
Options

Synopsis

| gm composite [ options ... ] change-image base-image [ mask-image ] output-image

Description

composite composites (combines) images to create new images.

base-image is the base image and change-image contains the changes. ouput-image is the result, and normally has the same dimensions as base-image.

The optional mask-image can be used to provide opacity information for change-image when it has none or if you want a different mask. A mask image is typically grayscale and the same size as base-image. If mask-image is not grayscale, it is converted to grayscale and the resulting intensities are used as opacity information.

Examples

To composite an image of a cockatoo with a perch, use:

        gm composite cockatoo.miff perch.ras composite.miff

To compute the difference between images in a series, use:

        gm composite -compose difference series.2 series.1 difference.miff

To composite an image of a cockatoo with a perch starting at location (100,150), use:

        gm composite -geometry +100+150 cockatoo.miff perch.ras composite.miff

To tile a logo across your image of a cockatoo, use

        gm convert +shade 30x60 cockatoo.miff mask.miff
        gm composite -compose bumpmap -tile logo.png
                  cockatoo.miff mask.miff composite.miff

To composite a red, green, and blue color plane into a single composite image, try

        gm composite -compose CopyGreen green.png red.png red-green.png
        gm composite -compose CopyBlue blue.png red-green.png composite.png

Back to Contents

Options

Options are processed in command line order. Any option you specify on the command line remains in effect only for the image that follows. All options are reset to their default values after each image is read.

For a more detailed description of each option, see Options, above. GraphicsMagick(1).

| -authenticate <string>

| decrypt image with this password

| -background <color>

| the background color

| -blue-primary <x>,<y>

| blue chromaticity primary point

| -colors <value>

| preferred number of colors in the image

| -colorspace <value>

| the type of colorspace

| -comment <string>

| annotate an image with a comment

| -compose <operator>

| the type of image composition

| -compress <type>

| the type of image compression

| -debug <events>

| enable debug printout

| -define <key>{=<value>},...

| add coder/decoder specific options

| -density <width>x<height>

| horizontal and vertical resolution in pixels of the image

| -depth <value>

| depth of the image

| -displace <horizontal scale>x<vertical scale>

| shift image pixels as defined by a displacement map

| -display <host:display[.screen]>

| specifies the X server to contact

| -dispose <method>

| GIF disposal method

| -dissolve <percent>

| dissolve an image into another by the given percent

| -dither

| apply Floyd/Steinberg error diffusion to the image

| -encoding <type>

| specify the text encoding

| -endian <type>

| specify endianness (MSB, LSB, or Native) of image

| -filter <type>

| use this type of filter when resizing an image

| -font <name>

| use this font when annotating the image with text

| -geometry <width>x<height>{+-}<x>{+-}<y>{%}{@}{!}{^}{<}{>}

| Specify dimension, offset, and resize options.

| -gravity <type>

| direction primitive gravitates to when annotating the image.

| -green-primary <x>,<y>

| green chromaticity primary point

| -help

| print usage instructions

| -interlace <type>

| the type of interlacing scheme

| -label <name>

| assign a label to an image

| -limit <type> <value>

| Disk, File, Map, Memory, Pixels, Width, Height, Read, Threads, or Write resource limit

| -log <string>

| Specify format for debug log

| -matte

| store matte channel if the image has one

| -monitor

| show progress indication

| -monochrome

| transform the image to black and white

| -negate

| replace every pixel with its complementary color

| -page <width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}

| size and location of an image canvas

| -profile <filename>

| add ICM, IPTC, or generic profile to image

| -quality <value>

| JPEG/MIFF/PNG/TIFF compression level

| -recolor <matrix>

| apply a color translation matrix to image channels

| -red-primary <x>,<y>

| red chromaticity primary point

| -render

| render vector operations

| -repage <width>x<height>+xoff+yoff[!]

| Adjust image page offsets

| -resize <width>x<height>{%}{@}{!}{<}{>}

| resize an image

| -rotate <degrees>{<}{>}

| rotate the image

| -sampling-factor <horizontal_factor>x<vertical_factor>

| chroma subsampling factors

| -scene <value>

| set scene number

| -set <attribute> <value>

| set an image attribute

| +set <attribute>

| unset an image attribute

| -sharpen <radius>{x<sigma>}

| sharpen the image

| -size <width>x<height>{+offset}

| width and height of the image

| -stegano <offset>

| hide watermark within an image

| -stereo

| composite two images to create a stereo anaglyph

| -strip

| remove all profiles and text attributes from the image

| -thumbnail <width>x<height>{%}{@}{!}{<}{>}

| resize an image (quickly)

| -treedepth <value>

| tree depth for the color reduction algorithm

| -trim

| trim an image

| -type <type>

| the image type

| -units <type>

| the units of image resolution

| -unsharp <radius>{x<sigma>}{+<amount>}{+<threshold>}

| sharpen the image with an unsharp mask operator

| -verbose

| print detailed information about the image

| -version

| print detailed GraphicsMagick version/build information

| -version

| print compact GNU-style GraphicsMagick version information

| -watermark <brightness>x<saturation>

| percent brightness and saturation of a watermark

| -white-point <x>,<y>

| chromaticity white point

| -write <filename>

| write an intermediate image [convert, composite]

For a more detailed description of each option, see Options, above. GraphicsMagick(1).

Back to Contents