\title{ImageMagick - Composite an Image}
\toctitle{ImageMagick - Composite an Image}
\titlerunning{ImageMagick - Composite an Image}
\maketitle\label{ImageMagick - Composite an Image}

\section{NAME}
composite - composite images together.


\section{Synopsis}

{\bf composite} {\bf [} {\it options\/} {\bf ... ]} {\it image composite\/}
{\bf [} {\it mask\/} {\bf ]} {\it composited\/}


\section{Description}

{\bf composite} composite images to create new images.
{\it composite\/} is the base image and {\it image\/} contains the changes.
{\it composited\/} is the result, and normally has the same dimensions
as {\it composite\/}.


The optional {\it mask\/} can be used to provide matte information for
{\it composite\/}
when it has none or if you want a different mask. A mask image is typically
grayscale and the same size as {\bf composite}. If {\it mask\/} is
not grayscale,
it is converted to grayscale and the resulting intensities are used as
matte information.

\section{Examples}

To composite an image of a cockatoo with a perch, use:
\begin{verbatim}
    composite cockatoo.miff perch.ras composite.miff
\end{verbatim}

To compute the difference between images in a series, use:
\begin{verbatim}
    composite -compose difference series.2 series.1
              difference.miff
\end{verbatim}

To composite an image of a cockatoo with a perch starting at location (100,150),
use:
\begin{verbatim}
    composite -geometry +100+150 cockatoo.miff
              perch.ras composite.miff
\end{verbatim}

To tile a logo across your image of a cockatoo, use
\begin{verbatim}
    convert +shade 30x60 cockatoo.miff mask.miff
    composite -compose bumpmap -tile logo.png
              cockatoo.miff mask.miff composite.miff
\end{verbatim}

To composite a red, green, and blue color plane into a single composite image,
try
\begin{verbatim}
    composite -compose CopyGreen green.png red.png
              red-green.png
    composite -compose CopyBlue blue.png red-green.png 
              composite.png
\end{verbatim}


\section{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
{\it ImageMagick(1)\/}.


\subsubsection{-authenticate $<$string$>$}
decrypt image with this password
\subsubsection{-background $<$color$>$}
the background color
\subsubsection{-blue-primary $<$x$>$,$<$y$>$}
blue chromaticity primary point
\subsubsection{-channel $<$type$>$}
Red, Green, Blue, Opacity, Index, Cyan, Yellow, Magenta, Black, or All.

Use this option to apply an image-processing option to a particular
{\it channel\/} from the image.
\subsubsection{-colors $<$value$>$}
preferred number of colors in the image
\subsubsection{-colorspace $<$value$>$}
the type of colorspace
\subsubsection{-comment $<$string$>$}
annotate an image with a comment
\subsubsection{-compose $<$operator$>$}
the type of image composition
\subsubsection{-compress $<$type$>$}
the type of image compression
\subsubsection{-debug $<$events$>$}
enable debug printout
\subsubsection{-density $<$width$>$x$<$height$>$}
vertical and horizontal resolution in pixels of the image
\subsubsection{-depth $<$value$>$}
depth of the image
\subsubsection{-displace $<$horizontal scale$>$x$<$vertical scale$>$}
shift image pixels as defined by a displacement map
\subsubsection{-display $<$host:display[.screen]$>$}
specifies the X server to contact
\subsubsection{-dispose $<$method$>$}
GIF disposal method
\subsubsection{-dissolve $<$percent$>$}
dissolve an image into another by the given percent
\subsubsection{-dither}
apply Floyd/Steinberg error diffusion to the image
\subsubsection{-encoding $<$type$>$}
specify the text encoding
\subsubsection{-endian $<$type$>$}
specify endianness (MSB or LSB) of output image
\subsubsection{-extract $<$width$>$x$<$height$>$\{+-\}$<$x$>$\{+-\}$<$y$>$\{\%\}\{@\} \{{!}\}\{$<$\}\{$>$\}}
extract an area from the image while decoding
\subsubsection{-filter $<$type$>$}
use this type of filter when resizing an image
\subsubsection{-font $<$name$>$}
use this font when annotating the image with text
\subsubsection{-geometry $<$width$>$x$<$height$>$\{+-\}$<$x$>$\{+-\}$<$y$>$\{\%\}\{@\} \{{!}\}\{$<$\}\{$>$\}}
preferred size and location of the Image window.
\subsubsection{-gravity $<$type$>$}
direction primitive  gravitates to when annotating the image.
\subsubsection{-green-primary $<$x$>$,$<$y$>$}
green chromaticity primary point
\subsubsection{-help}
print usage instructions
\subsubsection{-interlace $<$type$>$}
the type of interlacing scheme
\subsubsection{-label $<$name$>$}
assign a label to an image
\subsubsection{-limit $<$type$>$ $<$value$>$}
Disk, File, Map, or Memory resource limit
\subsubsection{-log $<$string$>$}
\subsubsection{-matte}
store matte channel if the image has one
\subsubsection{-monochrome}
transform the image to black and white
\subsubsection{-negate}
replace every pixel with its complementary color
\subsubsection{-page $<$width$>$x$<$height$>$\{+-\}$<$x$>$\{+-\}$<$y$>$\{\%\}\{{!}\}\{$<$\}\{$>$\}}
size and location of an image canvas
\subsubsection{-profile $<$filename$>$}
add ICM, IPTC, or generic profile  to image
\subsubsection{-quality $<$value$>$}
JPEG/MIFF/PNG compression level
\subsubsection{-red-primary $<$x$>$,$<$y$>$}
red chromaticity primary point
\subsubsection{-render}
render vector operations
\subsubsection{-resize $<$width$>$x$<$height$>$\{\%\}\{@\}\{{!}\}\{$<$\}\{$>$\}}
resize an image
\subsubsection{-rotate $<$degrees$>$\{$<$\}\{$>$\}}
apply Paeth image rotation to the image
\subsubsection{-sampling-factor $<$horizontal\_factor$>$x$<$vertical\_factor$>$}
sampling factors used by JPEG or MPEG-2 encoder and YUV decoder/encoder.
\subsubsection{-scene $<$value$>$}
set scene number
\subsubsection{-sharpen $<$radius$>$\{x$<$sigma$>$\}}
sharpen the image
\subsubsection{-size $<$width$>$x$<$height$>$\{+offset\}}
width and height of the image
\subsubsection{-stegano $<$offset$>$}
hide watermark within an image
\subsubsection{-stereo}
composite two images to create a stereo anaglyph
\subsubsection{-treedepth $<$value$>$}
tree depth for the color reduction algorithm
\subsubsection{-trim}
trim an image
\subsubsection{-type $<$type$>$}
the image type
\subsubsection{-units $<$type$>$}
the type of image resolution
\subsubsection{-unsharp $<$radius$>$\{x$<$sigma$>$\}\{+$<$amount$>$\}\{+$<$threshold$>$\}}
sharpen the image with an unsharp mask operator
\subsubsection{-verbose}
print detailed information about the image
\subsubsection{-version}
print ImageMagick version string
\subsubsection{-watermark $<$brightness$>$x$<$saturation$>$}
percent brightness and saturation of a watermark
\subsubsection{-white-point $<$x$>$,$<$y$>$}
chromaticity white point
\subsubsection{-write $<$filename$>$}
write  an image sequence [{\it convert, composite\/}]

For a more detailed description of each option, see
{\it ImageMagick(1)\/}.



\section{Environment}
\subsubsection{DISPLAY}
To get the default host, display number, and screen.



\section{Authors}

{\it 
John Cristy, ImageMagick Studio LLC,\newline{}
Glenn Randers-Pehrson, ImageMagick Studio LLC.
\/}



