>K Q ImageMagick: ImageMagick - Image Processing and Display PackageJ R < W<8 
B

 
  &
>NAME+
>



FImageMagick - commandline utilities to create, edit, or convert images
 


  &
>Contents+
>



Synopsis

Description

Options

&Files and Formats

Authors

Copyright


  &
>Synopsis+
>



vanimate [ options ... ] file [ [Loptions ... ] file ... ]
 


ncomposite [ options ... ] image compositeG[ mask ] composited
 


cconjure [ options ] script.msl_[ [ options ] script.msl ]
 


oconvert [ [ options ... ] [ input_file ...\] ... [ output_file ] ]
 


edisplay [ options ... ] file ..._[ [options ... ]file ... ]
 


_identify file [ file ... ]
 


`import [ options ... ] file
 


emogrify [ options ... ] file ...
 


vmontage [ options ... ] file [ [aoptions ... ] file ... ] output_file
 


  &
>Description+
>



TImageMagick provides a suite of commandline utilities for creating,+converting, editing, and displaying images:

3Display%is a machine architecture independentPimage processing and display program. It can display an image on any workstation%display running an X server.

1Import&reads an image from any visible windowHon an X server and outputs it as an image file. You can captureMa single window, the entire screen, or any rectangular portion of the screen.

3Montage(creates a composite by combining severalJseparate images. The images are tiled on the composite image with the nameAof the image optionally appearing just below the individual tile.

3Convert&converts an input file using one image7format to an output file with a differing image format.

3Mogrify$transforms an image or a sequence ofaimages. These transforms include image scaling, image rotation, color8reduction, and others. The transmogrified imageoverwrites theoriginal image.

5Identify(describes the format and characteristicsIof one or more image files. It will also report if an image is incomplete or corrupt.

7Composite'composites images to create new images.

3Conjure"interprets and executes scripts in$the Magick Scripting Language (MSL).

QThe ImageMagick utilities recognize the following image formats:
 
2

l

thtmsf}Dy€UB€XEb€A}ymz€xDx‚xxD‚9fszjsf?|9jzOjsqzGzGsqlii[i}D}D{w{={=lkn~SRQngnz€Cnnutvqrzlnvmƒccpyrmshhhhy{oztjy@ktuqomiX‚W8pxukmizGoircqsstbhclvqrquqzkpby<werzui22E67=
 

Name ModeDescription
*8BIM
*rw-Photoshop resource format
*AFM
*r--TrueType font
*APP1
*rw-Photoshop resource format
*ART
*r--PF1: 1st Publisher
*AVI
*r--Audio/Visual Interleaved
*AVS
*rw+AVS X image
*BIE
*rw-Joint Bi-level Image experts Group
interchange format
*BMP
*rw+Microsoft Windows bitmap image
*CAPTION
*r+ Caption (requires separate size info)
*CMYK
*rw-Raw cyan, magenta, yellow, and black
samples (8 or 16 bits, depending on
the image depth)
*CMYKA
*rw-Raw cyan, magenta, yellow, black, and
matte samples (8 or 16 bits, depending
on the image depth)
*CUT
*r--DR Halo
*DCM
*r--Digital Imaging and Communications in
Medicine image
*DCX
*rw+ZSoft IBM PC multi-page Paintbrush
*DIB
*rw+Microsoft Windows bitmap image
*DPS
*r--Display PostScript
*DPX
*r--Digital Moving Picture Exchange
*EPDF
*rw-Encapsulated Portable Document Format
*EPI
*rw-Adobe Encapsulated PostScript
Interchange format
*EPS
*rw-Adobe Encapsulated PostScript
*EPS2
*-w-Adobe Level II Encapsulated PostScript
*EPS3
*-w-Adobe Level III Encapsulated PostScript
*EPSF
*rw-Adobe Encapsulated PostScript
*EPSI
*rw-Adobe Encapsulated PostScript
Interchange format
*EPT
*rw-Adobe Encapsulated PostScript with TIFF
preview
*FAX
*rw+Group 3 FAX
*FILE
*r--Uniform Resource Locator
*FITS
*rw-Flexible Image Transport System
*FPX
*rw-FlashPix Format
*FTP
*r--Uniform Resource Locator
*G3
*rw-Group 3 FAX
*GIF
*rw+CompuServe graphics interchange format
*GIF87
*rw-CompuServe graphics interchange format
(version 87a)
*GRADIENT
*r--Gradual passing from one shade to
another
*GRANITE
*r--Granite texture
*GRAY
*rw+Raw gray samples (8 or 16 bits,
depending on the image depth)
*H
*rw-Internal format
*HDF
-rw+Hierarchical Data Format
*HISTOGRAM
*-w-Histogram of the image
*HTM
*-w-Hypertext Markup Language and a
client-side image map
*HTML
*-w-Hypertext Markup Language and a
client-side image map
*HTTP
*r--Uniform Resource Locator
*ICB
*rw+Truevision Targa image
*ICM
*rw-ICC Color Profile
*ICO
*r--Microsoft icon
*ICON
*r--Microsoft icon
*IMPLICIT
*---
*IPTC
*rw-IPTC Newsphoto
*JBG
*rw+Joint Bi-level Image experts Group
interchange format
*JBIG
*rw+Joint Bi-level Image experts Group
interchange format
*JP2
*rw-JPEG-2000 JP2 File Format Syntax
*JPC
*rw-JPEG-2000 Code Stream Syntax
*JPEG
*rw-Joint Photographic Experts Group
JFIF format
*JPG
*rw-Joint Photographic Experts Group
JFIF format
*LABEL
*r--Text image format
*LOGO
*rw-ImageMagick Logo
*M2V
*rw+MPEG-2 Video Stream
*MAP
*rw-Colormap intensities (8 or 16 bits,
depending on the image depth) and
indices (8 or 16 bits, depending
on whether colors exceeds 256).
*MAT
*-w+MATLAB image format
*MATTE
*-w+MATTE format
*MIFF
*rw+Magick image format
*MNG
*rw+Multiple-image Network Graphics
*MONO
*rw-Bi-level bitmap in least-significant-
-byte-first order
*MPC
-rw-Magick Persistent Cache image format
*MPEG
*rw+MPEG-1 Video Stream
*MPG
*rw+MPEG-1 Video Stream
*MPR
*r--Magick Persistent Registry
*MSL
*r--Magick Scripting Language
*MTV
*rw+MTV Raytracing image format
*MVG
*rw-Magick Vector Graphics
*NETSCAPE
*r--Netscape 216 color cube
*NULL
*r--Constant image of uniform color
*OTB
*rw-On-the-air bitmap
*P7
*rw+Xv thumbnail format
*PAL
*rw-16bit/pixel interleaved YUV
*PALM
*rw-Palm Pixmap format
*PBM
*rw+Portable bitmap format (black and white)
*PCD
*rw-Photo CD
*PCDS
*rw-Photo CD
*PCL
*-w-Page Control Language
*PCT
*rw-Apple Macintosh QuickDraw/PICT
*PCX
*rw-ZSoft IBM PC Paintbrush
*PDB
*r--Pilot Image Format
*PDF
*rw+Portable Document Format
*PFA
*r--TrueType font
*PFB
*r--TrueType font
*PFM
*r--TrueType font
*PGM
*rw+Portable graymap format (gray scale)
*PICON
*rw-Personal Icon
*PICT
*rw-Apple Macintosh QuickDraw/PICT
*PIX
*r--Alias/Wavefront RLE image format
*PLASMA
*r--Plasma fractal image
*PM
*rw-X Windows system pixmap (color)
*PNG
*rw-Portable Network Graphics
*PNM
*rw+Portable anymap
*PPM
*rw+Portable pixmap format (color)
*PREVIEW
*-w-Show a preview an image enhancement,
effect, or f/x
*PS
*rw+Adobe PostScript
*PS2
*-w+Adobe Level II PostScript
*PS3
*-w+Adobe Level III PostScript
*PSD
*rw-Adobe Photoshop bitmap
*PTIF
*rw-Pyramid encoded TIFF
*PWP
*r--Seattle Film Works
*RAS
*rw+SUN Rasterfile
*RGB
*rw+Raw red, green, and blue samples (8 or
16 bits, depending on the image depth)
*RGBA
*rw+Raw red, green, blue, and matte samples
(8 or 16 bits, depending on the image
depth)
*RLA
*r--Alias/Wavefront image
*RLE
*r--Utah Run length encoded image
*ROSE
*rw-70x46 Truecolor test image
*SCT
*r--Scitex HandShake
*SFW
*r--Seattle Film Works
*SGI
*rw+Irix RGB image
*SHTML
*-w-Hypertext Markup Language and a
client-side image map
*STEGANO
*r--Steganographic image
*SUN
*rw+SUN Rasterfile
*SVG
*rw+Scalable Vector Gaphics
*TEXT
*rw+Raw text
*TGA
*rw+Truevision Targa image
*TIF
*rw+Tagged Image File Format
*TIFF
*rw+Tagged Image File Format
*TILE
*r--Tile image with a texture
*TIM
*r--PSX TIM
*TTF
*r--TrueType font
*TXT
*rw+Raw text
*UIL
*-w-X-Motif UIL table
*UYVY
*rw-16bit/pixel interleaved YUV
*VDA
*rw+Truevision Targa image
*VICAR
*rw-VICAR rasterfile format
*VID
*rw+Visual Image Directory
*VIFF
*rw+Khoros Visualization image
*VST
*rw+Truevision Targa image
*WBMP
*rw-Wireless Bitmap (level 0) image
*WMF
*r--Windows Metafile
*WPG
*r--Word Perfect Graphics
*X
*rw-X Image
*XBM
*rw-X Windows system bitmap (black
and white)
*XC
*r--Constant image uniform color
*XCF
*r--GIMP image
*XML
*r--Scalable Vector Gaphics
*XPM
*rw-X Windows system pixmap (color)
*XV
*rw+Khoros Visualization image
*XWD
*rw-X Windows system window dump (color)
*YUV
*rw-CCIR 601 4:1:1
Modes:
* Native blob support
r Read
w Write
+ Multi-image


OSupport for some of these formats require additional programs or libraries.!README'tells where to find this software.

ENote, a format delineated with + means that if more than oneHimage is specified, it is composited into a single multi-image file. Use+adjoin3if you want a single image produced for each frame.

KYour installation might not support all of the formats in the list. To getAan up-to-date listing of the formats supported by your particular3configuration, run "convert -list format".

VRaw images are expected to have one byte per pixel unless ImageMagickLis compiled in the default 16-bit mode or in 32-bit mode. Here, the raw datais expected to be stored9two bytes per pixel in most-significant-byte-first order.RYou can tell if ImageMagick was compiled in 16-bit mode by typingJ"convert" without any options, and looking for "Q:16" in the first line ofoutput.



+Back to Contents  

  &
>Options+
>



FOptions are processed in command line order. Any option you specify onFthe command line remains in effect for the set of images that follows,Vuntil the set is terminated by the appearance of any option or -noop.MSome options only affect the decoding of images and others only the encoding.<The latter can appear after the final group of input images.

JThis is a combined list of the commandline options used by the ImageMagick>utilities (animate, composite, convert, display, identify,+import, mogrify and montage).
 


IIn this document, angle brackets ("<>") enclose variables and curly9brackets ("{}") enclose optional parameters. For example,B"-fuzz <distance>{%}" means you can use theoption "-fuzz 10"or "-fuzz 2%".
 
 !

.( -adjoin+
ĩ

join images into a single multi-image file
‡

BBy default, all images of an image sequence are stored in the sameJfile. However, some formats (e.g. JPEG) do not support more than one imageKand are saved to separate files. Use +adjoin to force this behavior.
 !

.> -affine <matrix>+
Ģ

drawing transform matrix
‡

HThis option provides a transform matrix {sx,rx,ry,sy,tx,ty} forPuse by subsequent -draw or -transform options.
 !

.. -antialias+
 

remove pixel aliasing
‡

MBy default antialiasing algorithms are used when drawing objects (e.g. lines)Hor rendering vector formats (e.g. WMF and Postscript). Use +antialias toGdisable use of antialiasing algorithms. Reasons to disable antialiasing
Ninclude avoiding increasing colors in the image, or improving rendering speed. !

.( -append+
Ą

append a set of images
‡

GThis option creates a single image where the images in the original set>are stacked top-to-bottom. If they are not of the same width,Eany narrow images will be expanded to fit using the background color.NUse +append to stack images left-to-right. The set of images.is terminated by the appearance of any option.If the -appendFoption appears after all of the input images, all images are appended.
 !

.J -authenticate <string>+
Ŧ

decrypt image with this password
‡

BUse this option to supply a password for decrypting an image or anKimage sequence, if it is being read from a format such as PDF that supportsWencryption. Encrypting images being written is not supported.
 !

.* -average+
Ē

average a set of images
‡

The set of images.is terminated by the appearance of any option. If the -average_option appears after all of the input images, all images are averaged.
 !

.A -backdrop <color>+
ī

display the image centered on a backdrop.
‡

KThis backdrop covers the entire workstation screen and is useful for hidingJother X window activity while viewing the image. The color of the backdrop%is specified as the background color.FThe color is specified using the format described in the "Color Names"section of X(1).Refer toX Resources for details.
 !

.E -background <color>+
Ÿ

the background color
‡

FThe color is specified using the format described in the "Color Names"2section of X(1).
 !

.O -blue-primary <x>,<y>+
Š

blue chromaticity primary point
 !

.H -blur <radius>x<sigma>+
ē

blur the image with a Gaussian operator
‡

Blur with the given radius andstandard deviation (sigma).
 !

.L -border <width>x<height>+
ī

surround the image with a border of color
‡

*See -geometry for details!about the geometry specification.
 !

.G -bordercolor <color>+
›

the border color
‡

FThe color is specified using the format described in the "Color Names"2section of X(1).
 !

.( -borderwidth <geometry>+
›

the border width
 !

.7 -box <color>+
·

set the color of the annotation bounding box
‡

FThe color is specified using the format described in the "Color Names"2section of X(1).
‡

&See -draw for furtherdetails.
 !

.? -cache <threshold>+
ŧ

megabytes of memory available to the pixel cache
‡

WThis option is deprecated. It has been replaced by the -limit option.
 !

.> -channel <type>+
ž

the type of channel
‡

kChoose from: Red, Green, Blue, Opacity,dCyan, Magenta, Yellow, or Black.
‡

HUse this option to extract a particular channel from the image.Matte,Gfor example, is useful for extracting the opacity values from an image.
 !

.# -charcoal <factor>+
Ķ

simulate a charcoal drawing
 !

. -chop <width>x<height>{+-}<x>{+-}<y>{%}+
ķ

remove pixels from the interior of an image
‡

QWidth and height give the number of columns and rows to remove,Gand x and y are offsets that give the location of the*leftmost column and topmost row to remove.
‡

GThe x offset normally specifies the leftmost column to remove.QIf the -gravity option is present with NorthEast, East,or SouthEast;gravity, it gives the distance leftward from the right edgeQof the image to the rightmost column to remove. Similarly, the y offset4normally specifies the topmost row to remove, but ifOthe -gravity option is present with SouthWest, South,or SouthEastEgravity, it specifies the distance upward from the bottom edge of the;image to the bottom row to remove.
‡

BThe -chop option removes entire rows and columns,Land moves the remaining corner blocks leftward and upward to close the gaps.
 !

.$ -clip+
ĩ

apply the clipping path, if one is present
‡

dIf a clipping path is present, it will be applied to subsequent operations.
‡

HFor example, if you type the following command:


3     convert -clip -negate cockatoo.tif negated.tif
‡

Nonly the pixels within the clipping path are negated.
‡

PThe -clip feature requires the XML library. If the XML library?is not present, the option is ignored.
 !

., -coalesce+
Ĩ

merge a sequence of images
‡

EEach image N in the sequence after Image 0 is replaced with the imageBcreated by flattening images 0 through N.
‡

The set of images.is terminated by the appearance of any option.!If the -coalesce`option appears after all of the input images, all images are coalesced.
 !

.A -colorize <value>+
°

colorize the image with the pen color
‡

JSpecify the amount of colorization as a percentage. You can apply separateJcolorization values to the red, green, and blue channels of the image with@a colorization value list delineated with slashes (e.g. 0/0/50).
 !

.@ -colormap <type>+
Ģ

define the colormap type
‡

CChoose between shared or private.
‡

QThis option only applies when the default X server visual is PseudoColorVor GRAYScale. Refer to -visual for more details. By default,Ma shared colormap is allocated. The image shares colors with other X clients.FSome image colors could be approximated, therefore your image may lookRvery different than intended. Choose Private and the image colors>appear exactly as they are defined. However, other clients mayVgo technicolor when the image colormap is installed.
 !

.= -colors <value>+
ē

preferred number of colors in the image
‡

GThe actual number of colors in the image may be less than your request,Hbut never more. Note, this is a color reduction option. Images with lessHunique colors than specified with this option will have any duplicate orHunused colors removed. Refer to quantize for more details.
‡

eNote, options -dither, -colorspace, and -treedepth%affect the color reduction algorithm.
 !

.E -colorspace <value>+
Ą

the type of colorspace
‡

PChoices are: GRAY, OHTA, RGB,Transparent,XYZ,EYCbCr, YIQ, YPbPr,/YUV, or CMYK.
‡

JColor reduction, by default, takes place in the RGB color space. EmpiricalNevidence suggests that distances in color spaces such as YUV or YIQ correspondLto perceptual color differences more closely than do distances in RGB space.HThese color spaces may give better results when color reducing an image.?Refer to quantize for more details.
‡

RThe Transparent color space behaves uniquely in that it preserves,the matte channel of the image if it exists.
‡

XThe -colors or -monochrome option is required for thisoption to take effect.
 !

.@ -comment <string>+
Ŧ

annotate an image with a comment
‡

NUse this option to assign a specific comment to the image. You can include theJimage filename, type, width, height, or other image attribute by embeddingspecial format characters:

     %b   file size     %c   comment     %d   directory     %e   filename extension     %f   filename     %h   height     %i   input filename!     %k   number of unique colors     %l   label     %m   magick     %n   number of scenes     %o   output filename     %p   page number     %q   quantum depth     %s   scene number     %t   top of filename#     %u   unique temporary filename     %w   width     %x   x resolution     %y   y resolution     %#   signature     \n   newline     \r   carriage return
‡

For example,

     -comment "%m:%f %wx%h"
‡

Qproduces an image comment of MIFF:bird.miff 512x480 for an imageKtitled bird.miff and whose width is 512 and height is 480.
‡

JIf the first character of string is @, the image commentEis read from a file titled by the remaining characters in the string.
 !

.B -compose <operator>+
Ļ

the type of image composition
‡

R[This option is not used by convert or mogrify but this sectionFis included because it describes the composite operators that are used&by the -draw option.]
 !

.@ -compress <type>+
Ļ

the type of image compression
‡

8Choices are: None, BZip, Fax,Group4,!JPEG, Lossless,+LZW, RLE or Zip.
‡

WSpecify +compress to store the binary image in an uncompressed format.@The default is the compression type of the specified image file.
‡

RIf LZW compression is specified but LZW compression has not been enabled,the image data will be writtenEin an uncompressed LZW format that can be read by LZW decoders. ThisFmay result in larger-than-expected GIF files.
‡

G"Lossless" refers to lossless JPEG, which is only available ifIthe JPEG library has been patched to support it.
‡

SUse the -quality option to set the compression level to be used byNJPEG, PNG, MIFF, and MPEG encoders. Use the -sampling-factorLoption to set the sampling factor to be used by JPEG, MPEG, and YUV encoders>for downsampling the chroma channels.
 !

., -contrast+
Ŋ

enhance or reduce the image contrast
‡

FThis option enhances the intensity differences between the lighter andGdarker elements of the image. Use -contrast to enhance the image;or +contrast to reduce the image contrast.
 !

. -crop <width>x<height>{+-}<x>{+-}<y>{%}+
ŧ

preferred size and location of the cropped image
‡

*See -geometry for details!about the geometry specification.
‡

LThe width and height give the size of the image that remains after cropping,Pand x and y are offsets that give the location of the top leftcorner of the croppedFimage with respect to the original image. To specify the amount to be-removed, use -shave instead.
‡

ETo specify a percentage width or height to be removed instead, append%. For exampleJto crop the image by ten percent (five percent on each side of the image),use -crop 10%.
‡

GIf the x and y offsets are present, a single image is=generated, consisting of the pixels from the cropping region.<The offsets specify the location of the upper left corner ofGthe cropping region measured downward and rightward with respect to theupper left corner of the image.QIf the -gravity option is present with NorthEast, East,or SouthEast;gravity, it gives the distance leftward from the right edgeEof the image to the right edge of the cropping region. Similarly, ifOthe -gravity option is present with SouthWest, South,or SouthEast;gravity, the distance is measured upward between the bottomedges.
‡

KIf the x and y offsets are omitted, a set of tiles of theGspecified geometry, covering the entire input image, is generated. The7rightmost tiles and the bottom tiles are smaller if theDspecified geometry extends beyond the dimensions of the input image.
 !

.< -cycle <amount>+
Ž

displace image colormap by amount
‡

FAmount defines the number of positions each colormap entry isshifted.
 !

. -debug <events>+
 

enable debug printout
‡

JThe events parameter specifies which events are to be logged. ItDcan be either None, All, or a comma-separated listFconsisting of one or more of the following domains: Annotate,BBlob, Cache, Coder, Configure,ALocale, Render, X11, or User.GFor example, to log cache and blob events, use

.    convert -debug "Cache,Blob" rose: rose.png
‡

IThe "User" domain is normally empty, but developers can log "User" events>in their private copy of ImageMagick.
‡

MUse +debug to turn off all logging.
 !

.2 -deconstruct+
ū

break down an image sequence into constituent parts
‡

?This option compares each image with the next in a sequence andJreturns the maximum bounding region of any pixel differences it discovers.9This method can undo a coalesced sequence returned by theS-coalesce option, and is useful for removing redundant information5from a GIF or MNG animation.
‡

The sequence of images.is terminated by the appearance of any option.$If the -deconstructdoption appears after all of the input images, all images are deconstructed.
 !

.J -delay <1/100ths of a second>+
Ŋ

display the next image after pausing
‡

EThis option is useful for regulating the animation of image sequences9Delay/100 seconds must expire before the displayFof the next image. The default is no delay between each showing of the+image sequence. The maximum delay is 65535.
‡

JYou can specify a delay range (e.g. -delay 10-500) which sets theminimum and maximum delay.
 !

.N -density <width>x<height>+
Ä

vertical and horizontal resolution in pixels of the image
‡

JThis option specifies an image density when decoding a PostScriptLor Portable Document page. The default is 72 dots per inch in the horizontalSand vertical direction. This option is used in concert with -page.
 !

.; -depth <value>+


depth of the image
‡

EThis is the number of bits in a color sample within a pixel. The onlyGacceptable values are 8 or 16. Use this option to specify the depth ofJraw images whose depth is unknown such as GRAY, RGB, or CMYK, or to change.the depth of any image after it has been read.
 !

. -descend+
ķ

obtain image by descending window hierarchy
 !

. -despeckle+
Ū

reduce the speckles within an image
 !

.c -displace <horizontal scale>x<vertical scale>+
ū

shift image pixels as defined by a displacement map
‡

QWith this option, composite image is used as a displacement map. Black,Lwithin the displacement map, is a maximum positive displacement. White is aKmaximum negative displacement and middle gray is neutral. The displacementMis scaled to determine the pixel shift. By default, the displacement appliesHin both the horizontal and vertical directions. However, if you specifyLmask, composite image is the horizontal X displacement and*mask the vertical Y displacement.
 !

.O -display <host:display[.screen]>+
Ž

specifies the X server to contact
‡

$This option is used with convert for?obtaining image or font from this X server. See X(1).
 !

.@ -dispose <method>+
ž

GIF disposal method
‡

@The Disposal Method indicates the way in which the graphic is to:be treated after being displayed.
‡

Here are the valid methods:

&Undefined       No disposal specified..None            Do not dispose between frames.>Background      Overwrite the image area with background color<Previous        Overwrite the image area with what was there-                prior to rendering the image.
 !

.C -dissolve <percent>+
ū

dissolve an image into another by the given percent
‡

FThe opacity of the composite image is multiplied by the given percent,Cthen it is composited over the main image.
 !

.( -dither+

apply Floyd/Steinberg error diffusion to the image
‡

LThe basic strategy of dithering is to trade intensity resolution for spatialFresolution by averaging the intensities of several neighboring pixels.FImages which suffer from severe contouring when reducing colors can beimproved with this option.
‡

_The -colors or -monochrome option is required for this optionto take effect.
‡

SUse +dither to turn off dithering and to render PostScript withouttext or graphic aliasing.
 !

.: -draw <string>+
Ā

annotate an image with one or more graphic primitives
‡

IUse this option to annotate an image with one or more graphic primitives.5The primitives include shapes, text, transformations,/and pixel operations. The shape primitives are

     point           x,y      line            x0,y0 x1,y1      rectangle       x0,y0 x1,y1&     roundRectangle  x0,y0 x1,y1 wc,hc&     arc             x0,y0 x1,y1 a0,a1&     ellipse         x0,y0 rx,ry a0,a1      circle          x0,y0 x1,y1&     polyline        x0,y0  ...  xn,yn&     polygon         x0,y0  ...  xn,yn&     Bezier          x0,y0  ...  xn,yn'     path            path specification0     image           operator x0,y0 w,h filename
‡

The text primitive is

!     text            x0,y0 string
‡

!The transformation primitives are

     rotate          degrees     translate       dx,dy     scale           sx,sy     skewX           degrees     skewY           degrees
‡

"The pixel operation primitives are

!     color           x0,y0 method!     matte           x0,y0 method
‡

FThe shape primitives are drawn in the color specified in the preceding`-stroke option. Except for the line and pointEprimitives, they are filled with the color specified in the precedingf-fill option. For unfilled shapes, use -fill none

MPoint requires a single coordinate.
‡

SLine requires a start and end coordinate.
‡

RectangleJexpects an upper left and lower right coordinate.
‡

NRoundRectangle has the upper left and lower right coordinatesAand the width and height of the corners.
‡

DCircle has a center coordinate and a coordinate for(the outer edge.
‡

6Use Arc to circumscribe an arc withinFa rectangle. Arcs require a start and end point as well as the degreeAof rotation (e.g. 130,30 200,100 45,90).
‡

6Use Ellipse to draw a partial ellipse=centered at the given point with the x-axis and y-axis radiusZand start and end of arc in degrees (e.g. 100,100 100,150 0,360).
‡

GFinally, polyline and polygon require3three or more coordinates to define its boundaries.FCoordinates are integers separated by an optional comma. For example,&to define a circle centered at 100,100that extends to 150,150 use:

#     -draw 'circle 100,100 150,150'
‡

Paths=(See Paths)>represent an outline of an object which is defined in terms of@moveto (set a new current point), lineto (draw a straight line),?curveto (draw a curve using a cubic Bezier), arc (elliptical orFcircular arc) and closepath (close the current shape by drawing a line?to the last moveto) elements. Compound paths (i.e., a path withDsubpaths, each consisting of a single moveto followed by one or more?line or curve operations) are possible to allow effects such as"donut holes" in objects.
‡

OUse image to composite an image with another image. Follow theFimage keyword with the composite operator, image location, image size, and filename:

1     -draw 'image Over 100,100 225,225 image.jpg'
‡

AYou can use 0,0 for the image size, which means to use the actual8dimensions found in the image header. Otherwise, it will"be scaled to the given dimensions.KSee -compose for a description of the composite operators.
‡

UUse text to annotate an image with text. Follow the text coordinatesFwith a string. If the string has embedded spaces, enclose it in doubleKquotes. Optionally you can include the image filename, type, width, height,?or other image attribute by embedding special format character.*See -comment for details.
‡

For example,

'     -draw 'text 100,100 "%m:%f %wx%h"'
‡

Lannotates the image with MIFF:bird.miff 512x480 for an image titledbird.miff)and whose width is 512 and height is 480.
‡

NIf the first character of string is @, the text is read from8a file titled by the remaining characters in the string.
‡

URotate rotates subsequent shape primitives and text primitives aboutQthe origen of the main image. If the -region option precedes theO-draw option, the origen for transformations is the upper left.corner of the region.
‡

DTranslate translates them.
‡

<Scale scales them.
‡

YSkewX and SkewY skew them with respect to the origen of6the main image or the region.
‡

JThe transformations modify the current affine matrix, which is initializedNfrom the initial affine matrix defined by the -affine option.HTransformations are cumulative within the -draw option.MThe initial affine matrix is not affected; that matrix is only changed by theYappearance of another -affine option. If another -draw?option appears, the current affine matrix is reinitialized fromthe initial affine matrix.
‡

PUse color to change the color of a pixel to the fill color (see4-fill). Follow the pixel coordinatewith a method:


     point     replace     floodfill     filltoborder
     reset
‡

CConsider the target pixel as that specified by your coordinate. ThepointRmethod recolors the target pixel. The replace method recolors any1pixel that matches the color of the target pixel.#Floodfill recolorsGany pixel that matches the color of the target pixel and is a neighbor,Qwhereas filltoborder recolors any neighbor pixel that is not theBborder color. Finally, reset recolors all pixels.
‡

UUse matte to the change the pixel matte value to transparent. FollowPthe pixel coordinate with a method (see the color primitive forTa description of methods). The point method changes the matte valuePof the target pixel. The replace method changes the matte valueSof any pixel that matches the color of the target pixel. FloodfillIchanges the matte value of any pixel that matches the color of the target pixel and is a neighbor, whereas/filltoborder changes the matteYvalue of any neighbor pixel that is not the border color (-bordercolor).EFinally reset changes the matte value of all pixels.
‡

<You can set the primitive color, font, and font bounding box color with_-fill, -font, and -box respectively. Options;are processed in command line order so be sure to use these:options before the -draw option.
 !

. -edge <radius>+
§

detect edges within an image
 !

. -emboss+
š

emboss an image
 !

.@ -encoding <type>+
Ī

specify the text encoding
‡

DChoose from AdobeCustom, AdobeExpert, AdobeStandard, AppleRoman,EBIG5, GB2312, Latin 2, None, SJIScode, Symbol, Unicode, Wansung.
 !

.< -endian <type>+
š

specify endianness (MSB or LSB) of output image
‡

AUse +endian to revert to unspecified endianness.
 !

. -enhance+
š

apply a digital filter to enhance a noisy image
 !

. -equalize+
ķ

perform histogram equalization to the image
 !

.9 -fill <color>+
ļ

color to use when filling a graphic primitive
‡

FThe color is specified using the format described in the "Color Names"2section of X(1).
‡

&See -draw for furtherdetails.
 !

.< -filter <type>+
đ

use this type of filter when resizing an image
‡

AUse this option to affect the resizing operation of an image (see-geometry).Choose from these filters:


     Point     Box
     Triangle     Hermite     Hanning     Hamming
     Blackman
     Gaussian     Quadratic
     Cubic     Catrom
     Mitchell     Lanczos     Bessel	     Sinc
‡

.The default filter is Lanczos
 !

.* -flatten+
§

flatten a sequence of images
‡

NThe sequence of images is replaced by a single image created by composing eachDimage after the first over the first image.
‡

The sequence of images.is terminated by the appearance of any option. If the -flatten`option appears after all of the input images, all images are flattened.
 !

.$ -flip+
Ē

create a "mirror image"
‡

0reflect the scanlines in the vertical direction.
 !

.$ -flop+
Ē

create a "mirror image"
‡

2reflect the scanlines in the horizontal direction.
 !

.8 -font <name>+
ž

use this font when annotating the image with text
‡

NYou can tag a font to specify whether it is a PostScript, TrueType, or OPTION1Pfont. For example, Arial.ttf is a TrueType font, ps:helvetica/is PostScript, and x:fixed is OPTION1.
 !

.E -foreground <color>+
Ķ

define the foreground color
‡

FThe color is specified using the format described in the "Color Names"2section of X(1).
 !

.< -format <type>+
 

the image format type
‡

CThis option will convert any image to the image format you specify.ISee ImageMagick(1) for a list of image format types supported byImageMagick.
‡

EBy default the file is written to its original name. However, if theHfilename extension matches a supported format, the extension is replacedQwith the image format type specified with -format. For example,Cif you specify tiff as the format type and the input imageAfilename is image.gif, the output image filename becomesimage.tiff.
 !

.> -format <string>+
ą

output formatted image characteristics
‡

HUse this option to print information about the image in a format of yourCchoosing. You can include the image filename, type, width, height,Zor other image attributes by embedding special format characters:

     %b   file size     %c   comment     %d   directory     %e   filename extension     %f   filename     %h   height     %i   input filename!     %k   number of unique colors     %l   label     %m   magick     %n   number of scenes     %o   output filename     %p   page number     %q   quantum depth     %s   scene number     %t   top of filename#     %u   unique temporary filename     %w   width     %x   x resolution     %y   y resolution     %#   signature     \n   newline     \r   carriage return
‡

%For example,

     -format "%m:%f %wx%h"
‡

=displays MIFF:bird.miff 512x480 for an imagedtitled bird.miff and whose width is 512 and height is 480.
‡

KIf the first character of string is @, the format^is read from a file titled by the remaining characters in the string.
 !

.~ -frame <width>x<height>+<outer bevel width>+<inner bevel width>+
·

surround the image with an ornamental border
‡

*See -geometry for details!about the geometry specification.[The -frame option is not affected by the -gravity option.
‡

-The color of the border is specified with the$-mattecolor command line option.
 !

. -frame+
ŧ

include the X window frame in the imported image
 !

.M -fuzz <distance>{%}+
ŧ

colors within this distance are considered equal
‡

FA number of algorithms search for a target color. By default the colorKmust be exact. Use this option to match colors that are close to the targetFcolor in RGB space. For example, if you want to automatically trim theOedges of an image with -trim but the image was scanned and theMtarget background color may differ by a small amount. This option can accountfor these differences.
‡

IThe distance can be in absolute intensity units or, by appendingO"%", as a percentage of the maximum possible intensity (255 or 65535).
 !

.; -gamma <value>+
Ī

level of gamma correction
‡

OThe same color image displayed on two different workstations may look differentIdue to differences in the display monitor. Use gamma correction to adjustPfor this color difference. Reasonable values extend from 0.8 to2.3.
‡

HYou can apply separate gamma values to the red, green, and blue channels<of the image with a gamma value list delineated with slashesG(e.g., 1.7/2.3/1.2).
‡

*Use +gamma value7to set the image gamma level without actually adjustingHthe image pixels. This option is useful if the image is of a known gamma4but not set as an image attribute (e.g. PNG images).
 !

.P -Gaussian <radius>x<sigma>+
ē

blur the image with a Gaussian operator
‡

4Use the given radius and standard deviation (sigma).
 !

.â -geometry <width>x<height>{+-}<x>{+-}<y>{%}{@} {!}{<}{>}+
ŧ

preferred size and location of the Image window.
‡

(By default, the window size is the image9size and the location is chosen by you when it is mapped.
‡

GBy default, the width and height are maximum values. That is, the imageMis expanded or contracted to fit the width and height value while maintainingNthe aspect ratio of the image. Append an exclamation point to the geometryJto force the image size to exactly the size you specify. For example,Iif you specify 640x480! the image width is set to 640 pixels andheight to 480.
‡

5If only the width is specified, the width assumes theIvalue and the height is chosen to maintain the aspect ratio of the image.KSimilarly, if only the height is specified (e.g., -geometry x256),1the width is chosen to maintain the aspect ratio.
‡

ITo specify a percentage width or height instead, append %. The image sizeKis multiplied by the width and height percentages to obtain the final imageFdimensions. To increase the size of an image, use a value greater thanH100 (e.g. 125%). To decrease an image's size, use a percentage less than100.
‡

AUse @ to specify the maximum area in pixels of an image.
‡

HUse > to change the dimensions of the image only ifMits width or height exceeds the geometry specification. < resizesLthe image only if both of its dimensions are less than the geometryspecification. For example,Nif you specify '640x480>' and the image size is 256x256, the imageJsize does not change. However, if the image is 512x512 or 1024x1024, it isMresized to 480x480. Enclose the geometry specification in quotation marks toOprevent the < or > from being interpreted by your shellas a file redirection.
‡

LWhen used with animate and display, offsets are handled inYthe same manner as in X(1) and the -gravity option is not used.>If the x is negative, the offset is measured leftwardfrom the right edge of the6screen to the right edge of the image being displayed.ISimilarly, negative y is measured between the bottom edges. The]offsets are not affected by "%"; they are always measured in pixels.
‡

DWhen used as a composite option, -geometry?gives the dimensions of the image and its location with respectKto the composite image. If the -gravity option is presentLwith NorthEast, East, or SouthEast gravity, the xMrepresents the distance from the right edge of the image to the right edge ofSthe composite image. Similarly, if the -gravity option is presentIwith SouthWest, South, or SouthEast gravity, yIis measured between the bottom edges. Accordingly, a positive offset will7never point in the direction outside of the image. TheDoffsets are not affected by "%"; they are always measured in pixels.RTo specify the dimensions of the composite image, use the -resizeoption.
‡

LWhen used as a convert, import or mogrify option,J-geometry is synonymous with -resize andNspecifies the size of the output image. The offsets, if present, are ignored.
‡

VWhen used as a montage option, -geometry specifies the imageEsize and border size for each tile; default is 256x256+0+0. NegativeKoffsets (border dimensions) are meaningless. The -gravityFoption affects the placement of the image within the tile; the defaultHgravity for this purpose is Center. If the "%" sign appears inHthe geometry specification, the tile size is the specified percentage of*the original dimensions of the first tile.JTo specify the dimensions of the montage, use the -resizeoption.
 !

.> -gravity <type>+
Č

direction primitive gravitates to when annotating the image.
‡

Choices are: NorthWest, North,;NorthEast, West, Center, East, SouthWest, South, SouthEast.
‡

FThe direction you choose specifies where to position the text or other!graphic primitive when annotatingMthe image. For example Center gravity forces the text to be centeredFwithin the image. By default, the image gravity is NorthWest.ESee -draw for more details about graphic primitives.
‡

`The -gravity option is also used in concert with the -geometryYoption and other options that take <geometry> as a parameter, such\as the -crop option. See -geometry for details of how the3-gravity option interacts with theR<x> and <y> parameters of a geometry'specification.
‡

GWhen used as an option to composite, -gravityCgives the direction that the image gravitates within the composite.
‡

YWhen used as an option to montage, -gravity gives the directionOthat an image gravitates within a tile. The default gravity is Centerfor this purpose.
 !

.Q -green-primary <x>,<y>+
Ŧ

green chromaticity primary point
 !

. -help+
Ģ

print usage instructions
 !

.L -iconGeometry <geometry>+
Ī

specify the icon geometry
‡

AOffsets, if present in the geometry specification, are handled inSthe same manner as the -geometry option, using X11 style to handle*negative offsets.
 !

. -iconic+
›

iconic animation
 !

. -immutable+
Ÿ

make image immutable
 !

." -implode <factor>+
°

implode image pixels about the center
 !

.< -intent <type>+
Ę

use this type of rendering intent when managing the image color
‡

MUse this option to affect the the color management operation of an image (see-profile).Choose from these intents:;Absolute, Perceptual, Relative, Saturation
‡

The default intent is undefined.
 !

.B -interlace <type>+
Đ

the type of interlacing scheme
‡

0Choices are: None, Line, Plane,Dor Partition. The default is None.
‡

KThis option is used to specify the type of interlacing scheme for raw imageVformats such as RGB or YUV.
‡

,None means do not interlace1(RGBRGBRGBRGBRGBRGB...),
‡

/Line uses scanline interlacing'(RRR...GGG...BBB...RRR...GGG...BBB...),and
‡

ePlane uses plane interlacing (RRRRRR...GGGGGG...BBBBBB...).
‡

PartitionGis like plane except the different planes are saved to individual files%(e.g. image.R, image.G, and image.B).
‡

@Use Line or Plane to create an;interlaced PNG or GIF or(progressive JPEG image.
 !

.: -label <name>+
Ĩ

assign a label to an image
‡

GUse this option to assign a specific label to the image. Optionally youMcan include the image filename, type, width, height, or other image attributeQby embedding special format character. See -comment for details.
‡

For example,

     -label "%m:%f %wx%h"
‡

Vproduces an image label of MIFF:bird.miff 512x480 for an image titledbird.miff)and whose width is 512 and height is 480.
‡

KIf the first character of string is @, the image label isBread from a file titled by the remaining characters in the string.
‡

KWhen converting to PostScript, use this option to specify a header<string to print above the image. Specify the label font with-font.
 !

.; -level <value>+
­

adjust the level of image contrast
‡

EGive three point values delineated with commas: black, mid, and whiteG(e.g. 10,1.0,65000). The white and black points range from 0 to MaxRGBand mid ranges from 0 to 10.
 !

.H -limit <type> <value>+
Ū

Disk, Map, or Memory resource limit
‡

9The value is in Megabytes. By default all are unlimited.DWhen the limit is reached, ImageMagick will fail in some fashion, or&take compensating actions if possible.BFor example, -limit memory 32 -limit map 64 limits memory5When the pixel cache reaches the memory limit it usesImemory mapping. When that limit is reached it goes to disk. If disk has=a hard limit, the program will fail.
 !

. -linewidth+
ļ

the line width for subsequent draw operations
 !

.8 -list <type>+
›

the type of list
‡

XChoices are: Delegate, Format, Magic,2Module, or Type.
‡

iCThis option lists entries from the ImageMagick configuration files.i
f e!

g. > -loop <iterations>+

add Netscape loop extension to your GIF animation
‡

CA value other than zero forces the animation to repeat itself up toiiterationsstimes.
 F!

n.T" -magnify <factor>+

magnify the image
 c!

f.t: -map <filename>+

choose a particular set of colors from this image
‡

r?[convert or mogrify]

tFBy default, color reduction chooses an optimal set of colors that bestHrepresent the original image. Alternatively, you can choose a particularKset of colors from an image file with this option.

tUsei+map to reduceAOall images in the image sequence that follows to a single optimal set of colorso;that best represent all the images. The sequence of imagesb.is terminated by the appearance of any option.If the +map]option appears after all of the input images, all images are mapped.
i t!

s.'><6 -map <type>+

<0display image using this type.
‡

s?[animate or display]

iLChoose from these Standard Colormap types:

<	     bestg     default	     grayb     red
     green	     blueg
‡

tMThe X server must support the Standard Colormap you choose,o]otherwise an error occurs. Use list as the type and displaybQsearches the list of colormap types in top-to-bottom order until>Ione is located. See xstdcmap(1) for one way of creating Standard>#Colormaps.
=.i< -mask <filename>+


Specify a clipping mask
‡

oFThe image read from the file is used as a clipping mask. It must haveGthe same dimensions as the image being masked.

eKIf the mask image contains an opacity channel, the opacity of each pixel istGused to define the mask. Otherwise, the intensity (gray level) of eache'pixel is used.

oPUse +mask to remove the clipping mask.
‡

a^It is not necessary to use -clip to activate the mask; -clip>is implied by -mask.
 >!

a.f& -matte+
ģ

store matte channel if the image has one

eAIf the image does not have a matte channel, create an opaque one.a

pNUse +matte to ignore the matte channel and to avoid writing a:matte channel in the output file.
 S!

1.eE -mattecolor <color> +

specify the color to be used with the -frame option

/FThe color is specified using the format described in the "Color Names"2section of X(1).
 r!

t.'>t! -median <radius>i+
­

apply a median filter to the image
t d!

.'>t -mode <value>+

mode of operation
 i!

g.'> A -modulate <value>d+
ŋ

vary the brightness, saturation, and hue of an image

GSpecify the percent change in brightness, the color saturation, and thegFhue separated by commas. For example, to increase the color brightnessLby 20% and decrease the color saturation by 10% and leave the hue unchanged,'use: -modulate 120,90.e
S =!

A./ -monochrome>+

transform the image to black and white
 c!

.>< -morph <frames>+
Ģ

morphs an image sequence

rOBoth the image pixels and size are linearly interpolated to give the appearancea/of a meta-morphosis from one image to the next.o

iThe sequence of images.is terminated by the appearance of any option.If the -morph^option appears after all of the input images, all images are morphed.
 d!

/.'>x( -mosaic+

create a mosaic from an image sequence

djThe -page option is used to locate the images within the mosaic.
‡

eThe sequence of images.is terminated by the appearance of any option.If the -mosaicrEoption appears after all of the input images, all images are included>'in the mosaic.
d d!

>. -name>+
˜

name an image
 !

a./( -negate+

replace every pixel with its complementary color

x=The red, green, and blue intensities of an image are negated.>White becomes black,yellow becomes blue, etc.CUse +negate1to only negate the grayscale pixels of the image.o
> >!

S. A -noise <radius|type>"+

add or reduce noise in an image
‡


dEUse radius to specify the width of the neighborhood.l

oUUse +noise followed by a noise type to add noise to an image. Choose+from these noise types:e
t
d     Uniform
     Gaussiang     Multiplicativet     Impulse     Laplacian     Poisson
 i!

i.'>=$ -noop+

NOOP (no option)

MLThe -noop option can be used to terminate a group of imagesFand reset all options to their default values, when no other option is!desired.
e r!

i.<. -normalize+

transform image to span the full range of color values

")This is a contrast enhancement technique.t
f =!

P.'>>= -opaque <color>-+

change this color to the pen color within the image
‡

dFThe color is specified using the format described in the "Color Names"2section of X(1).
‡

.,See -fill for more details.
d !

o. Č -page <width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}+

size and location of an image canvas

t0Use this option to specify the dimensions of thePostScript pageGin dots per inch or a TEXT page in pixels. The choices for a PostScript/ page are:L
-
d     11x17         792  1224     Ledger       1224   792     Legal         612  1008     Letter        612   792     LetterSmall   612   792     ArchE        2592  3456     ArchD        1728  2592     ArchC        1296  1728     ArchB         864  1296     ArchA         648   864     A0           2380  3368     A1           1684  2380     A2           1190  1684     A3            842  1190     A4            595   842     A4Small       595   842     A5            421   595     A6            297   421     A7            210   297     A8            148   210     A9            105   148     A10            74   105     B0           2836  4008     B1           2004  2836     B2           1418  2004     B3           1002  1418     B4            709  1002     B5            501   709     C0           2600  3677     C1           1837  2600     C2           1298  1837     C3            918  1298     C4            649   918     C5            459   649     C6            323   459     Flsa          612   936     Flse          612   936     HalfLetter    396   612
‡

"HFor convenience you can specify the page size by media (e.g. A4, Ledger,:etc.). Otherwise, -page behaves much likeC-geometry (e.g. -page letter+43+43>).>

tIThis option is also used to place subimages when writing to a multi-image-gravity>option./]To position a GIF or MNG image, use -page{+-}<x>{+-}<y>*L(e.g. -page +100+200). When writing to a MNG file, a -pageFoption appearing ahead of the first image in the sequence with nonzeroHwidth and height defines the width and height values that are written inRthe MHDR chunk. Otherwise, the MNG width and height are computedEfrom the bounding box that contains all images in the sequence. When Kwriting a GIF89 file, only the bounding box method is used to determine its dimensions.-
‡

pYFor a PostScript page, the image is sized as in -geometry and positionedg5relative to the lower left hand corner of the page by+G{+-}<xoffset>{+-}<ypoffset>. Use6-page 612x792>, for example, to center theHimage within the page. If the image size exceeds the PostScript page, itis reduced to fit the page.t2The default gravity for the -pageCoption is NorthWest, i.e., positive x and>Sy offset are measured rightward and downward from the topeTleft corner of the page, unless the -gravity option is present with&a value other than NorthWest.

l8The default page dimensions for a TEXT image is 612x792.

>This option is used in concert with -density.
L >!

a.d< -paint <radius>+

simulate an oil painting

CLEach pixel is replaced by the most frequent color in a circular neighborhood.whose width is specified with radius.
 >!

a. = -pause <seconds>l+

pause between animation loops [animate]
‡

>>Pause for the specified number of seconds before repeating the#animation.
t !

.>= -pause <seconds>d+

pause between snapshots [import]

<@Pause for the specified number of seconds before taking the next"snapshot.
 !

<.n7 -pen <color><+
·

specify the pen color for drawing operations

-FThe color is specified using the format described in the "Color Names"2section of X(1).
‡

WThis option is deprecated; use -fill instead.
n n!

y.'>/ -ping;+
ķ

efficiently determine image characteristics
 >!

b.o# -pointsize <value>s+

pointsize of the PostScript, OPTION1, or TrueType font
f e!

t.s> -preview <type>+

image preview type

hAUse this option to affect the preview operation of an image (e.g." converttC-preview Gamma Preview:gamma.png). Choose from these previews:>
e
b     Rotate"
     Shear	     Roll=     Hue     Saturationg     Brightness 
     Gamma
     Spiff	     Dulli     Grayscale
     Quantizea     Despeckle     ReduceNoise     Add Noise     Sharpen	     Blur      Threshold     EdgeDetect      Spreadw
     Shade
     Raise     Segment
     Solarize 
     Swirl     Implode	     Wavet
     OilPainte     CharcoalDrawing	     JPEGg
‡

>-The default preview is JPEG.t
> h!

D./A -process <command>"+

process a sequence of images

>The sequence of imagesGis terminated by the appearance of any option.

/ If the -process`option appears after all of the input images, all images are processed.
 t!

e.lB -profile <filename>+

add ICM, IPTC, or generic profile to image
‡

C-profile filename adds an ICM (ICC color management), IPTC>S(newswire information), or a generic profile to the image
.i‡

z2Use +profile icm, +profile iptc,:or +profile profile_name to remove the respectiveMprofile. Use identify -verbose to find out what profiles are in the<>image file. Use +profile "*" to remove all profiles.

QTo extract a profile, the -profile option is not used. Instead,t!simply write the file to an image Sformat such as APP1, 8BIM, ICM, or IPTC.

oDFor example, to extract the Exif data (which is stored in JPEG files"in the APP1 profile), use
>
&    convert cockatoo.jpg exifdata.app1
 !

5.-quality <value>0+

JPEG/MIFF/PNG compression level
‡

gGFor the JPEG and MPEG image formats, quality is 0 (lowest image quality and highestEOcompression) to 100 (best quality but least effective compression). The defaulteWquality is 75. Use the -sampling-factor option to specify the factors"for chroma downsampling.

aJFor the MIFF image format, quality/10 is the zlib compression level, whichHis 0 (worst but fastest compression) to 9 (best but slowest). It has nobeffect on the image appearance, since the compression is always lossless.
‡

sNFor the MNG and PNG image formats, the quality value sets the zlib compressionGlevel (quality / 10) and filter-type (quality % 10). Compression levelsoMrange from 0 (fastest compression) to 100 (best but slowest). For compression

iIfNfilter-type is 4 or less, the specified filter-type is used for all scanlines:
l
g     0: none     1: subw
     2: up     3: averagey
     4: Paethe
‡

bGIf filter-type is 5, adaptive filtering is used when quality is greater Gthan 50 and the image does not have a color map, otherwise no filteringhis used.

'If filter-type is 6, adaptive filtering,with minimum-sum-of-absolute-valuesis used.
‡

iMOnly if the output is MNG, if filter-type is 7, the LOCO color transformation"Cand adaptive filtering with minimum-sum-of-absolute-values< are used.t

bJThe default is quality is 75, which means nearly the best compression withHadaptive filtering. The quality setting has no effect on the appearance@of PNG and MNG images, since the compression is always lossless.

LOFor further information, see the PNGhspecification.
, =!

i. J -raise <width>x<height>+

lighten or darken image edges
‡

oThis will create a 3-D effect.*See -geometry for details)details about the geometry specification. Offsets are not used.h
‡

<]Use -raise to create a raised effect, otherwise use +raise.a
> 3!

L.oM -red-primary <x>,<y>e+

red chromaticity primary point
c n!

.-region <width>x<height>{+-}<x>{+-}<y>+

apply options to a portion of the image
‡

%{The x and y offsets are treated in the same manner as in -crop
.> !

r.=( -remote+

perform a remote operation

<7The only command recognized at this time is the name ofIan image file to load.
L e!

h.-resize <width>x<height>{%}{@}{!}{<}{>}o+

resize an image
‡

0PThis is an alias for the -geometry option and it behaves in theYsame manner. If the -filter option precedes the -resize/>option, the specified filter is used.
‡

>3There are some exceptions:

eXWhen used as a composite option, -resize conveys the preferredBsize of the output image, while -geometry conveysFthe size and placement of the composite image within the mainimage.
‡

VWhen used as a montage option, -resize conveys the preferred=size of the montage, while -geometry conveysi5information about the tiles.
h "!

n.cb -roll {+-}<x>{+-}<y>+
ģ

roll an image vertically or horizontally

r*See -geometry for detailsthe geometry specification.l6The x and y offsets are not affected(by the -gravity option.

/RA negative x offset rolls the image left-to-right. A negative y%offset rolls the image top-to-bottom."
t e!

F. g -rotate <degrees>{<}{>}/+

apply Paeth image rotation to the image
‡

tKUse > to rotate the image only if its width exceeds the height.< rotates the image only if its width is less than the Lheight. For example, if you specify -rotate "-90>" and the image;size is 480x640, the image is not rotated. However, if the"Limage is 640x480, it is rotated by -90 degrees. If you use > orE<, enclose it in quotation marks to prevent it from beingi%misinterpreted as a file redirection. 

tKEmpty triangles left over from rotating the image are filled with the color bdefined as background (class backgroundColor). See X(1) for details.
t s!

r.s@ -sample <geometry>+

scale image with pixel sampling
‡

r0See -geometry for details aboutthe geometry specification.nn-sample ignores the -filter selection if the -filter optionIis present. Offsets, if present in the geometry string, are ignored, andi3the -gravity option has no effect. 
5 t!

c.ds -sampling-factor <horizontal_factor>x<vertical_factor>l+
Ó

sampling factors used by JPEG or MPEG-2 encoder and YUV decoder/encoder.
‡

>MThis option specifies the sampling factors to be used by the JPEG encoder forAchroma downsampling. If this option is omitted, the JPEG library Hwill use its own default values. When reading or writing the YUV format-and when writing the M2V (MPEG-2) format, useah-sampling-factor 2x1 to specify the 4:2:2 downsampling method.
 -!

a.t> -scale <geometry>+

scale the image.

d0See -geometry for details aboutVthe geometry specification. -scale uses a simpler, faster algorithm,\and it ignores the -filter selection if the -filter optionIis present. Offsets, if present in the geometry string, are ignored, andg3the -gravity option has no effect.h
n %!

h.e; -scene <value>9+

set scene number

% /!

0. C -scenes <value-value>u+

range of image scene numbers to read
‡

FEach image in the range is readmQwith the filename followed by a period (.) and the decimal scenet number. YouOcan change this behavior by embedding a %d, %0Nd, %o, %0No, %x, or %0Nx \printf format specification in the file name. For example,

""    montage -scenes 5-7 image.miff
‡

l
='    animate -scenes 0-12 image%02d.miff/
‡

rYanimates files image00.miff, image01.miff, through image12.miff.
g !

g.o( -screen+

specify the screen to capture
‡

;HThis option indicates that the GetImage request used to obtain the imageHshould be done on the root window, rather than directly on the specifiedIwindow. In this way, you can obtain pieces of other windows that overlap/Jthe specified window, and more importantly, you can capture menus or otherbpopups that are independent windows but appear over the specified window.
 !

o.n -seed <value>+

pseudo-random number generator seed value
 i!

t.>g -segment <cluster threshold>x<smoothing threshold>+

segment an image
‡

HSegment an image by analyzing the histograms of the color components andHidentifying units that are homogeneous with the fuzzy c-means technique.

rJSpecify cluster threshold as the number of pixels in each clusterKmust exceed the the cluster threshold to be considered valid. SmoothinghJthreshold eliminates noise in the second derivative of the histogram.GAs the value is increased, you can expect a smoother second derivative. The default is 1.5. Seeo("Image Segmentation" for details.
 o!

r. O -shade <azimuth>x<elevation>s+

shade the image using a distant light source

LSpecify azimuth and elevation as the position of the lightPsource. Use +shade to return the shading results as a grayscaleimage.
> !

=.=/ -shadow <radius>x<sigma>r+

shadow the montage
t h!

.%6 -shared-memory+

use shared memory
‡

JThis option specifies whether the utility should attempt use shared memoryFfor pixmaps. ImageMagick must be compiled with shared memory support,Mand the display must support the MIT-SHM extension. Otherwise, this 9option is ignored. The default is True.x
t d!

.fN -sharpen <radius>x<sigma>+

sharpen the image
‡

r/Use a Gaussian operator of the given radius andtstandard deviation (sigma). 
" D!

a.tJ -shave <width>x<height>+

shave pixels from the image edges
‡

d7Specify the width of the region to be removed from bothtCsides of the image and the height of the regions to be removed fromEtop and bottom.
t i!

O.gQ -shear <x degrees>x<y degrees> +
°

shear the image along the X or Y axis
‡

G3Use the specified positive or negative shear angle.>

dFShearing slides one edge of an image along the X or Y axis, creating aJparallelogram. An X direction shear slides an edge along the X axis, whileFa Y direction shear slides an edge along the Y axis. The amount of thePshear is controlled by a shear angle. For X direction shears, x degreesIis measured relative to the Y axis, and similarly, for Y direction shearsiyt0degrees is measured relative to the X axis.
‡

KEmpty triangles left over from shearing the image are filled with the color bdefined as background (class backgroundColor). See X(1) for details.
G e!

e.p -silent +

operate silently
h !

t.c_ -size <width>x<height>{+offset}o+

width and height of the image
‡

oNUse this option to specify the width and height of raw images whose dimensions*are unknown such as GRAY,;RGB, or CMYK. In additioncto width and height, useG-size with an offset to skip any header information in3Fthe image or tell the number of colors in a MAP imagefile, (e.g. -size 640x512+256).>

;FFor Photo CD images, choose from these sizes:

i     192x128     384x256     768x512     1536x1024     3072x2048
‡

mJFinally, use this option to choose a particular resolution layer of a JBIG$or JPEG image (e.g. -size 1024x768).
d !

."; -snaps <value>i+

number of screen snapshots

Use this optionw?to grab more than one image from the X server screen, to create /an animation sequence.
s t!

i.-solarize <factor>+

negate all pixels above the threshold level
‡

Specify factor as the/percent threshold of the intensity (0 - 99.9%).e

mHThis option produces a solarization effect seen when exposing a:photographic film to light during the development process.
 /!

m. > -spread <amount>+

displace image pixels by a random amount
‡

>IAmount defines the size of the neighborhood around each pixel to!choose a candidate pixel to swap.p
p c!

>.'>m@ -stegano <offset>+
Đ

hide watermark within an image

>FUse an offset to start the image hiding some number of pixels from theGbeginning of the image. Note this offset and the image size. You wille9need this information to recover the steganographic image02(e.g. display -size 320x256+35 stegano:image.png).
b c!

..,( -stereo+
ŧ

composite two images to create a stereo anaglyph

JThe left side of the stereo pair is saved as the red channel of the outputGimage. The right side is saved as the green channel. Red-green stereo07glasses are required to properly view the stereo image. 
d !

e.O= -stroke <color><+

color to use when stroking a graphic primitive

=FThe color is specified using the format described in the "Color Names"2section of X(1).
‡

c&See -draw for furtherdetails.
 n!

.G -strokewidth <value>c+

set the stroke width

r/See -draw for further details.s
/=.d= -swirl <degrees>>+


swirl image pixels about the center
‡

"4Degrees defines the tightness of the swirl.
h a!

h.BB -text-font <name>+

font for writing fixed-width text
‡

KSpecifies the name of the preferred font to use in fixed (typewriter style)d:formatted text. The default is 14 point Courier.

pFYou can tag a font to specify whether it is a PostScript, TrueType, orCOPTION1 font. For example, Courier.ttf is a TrueType font and x:fixed is OPTION1.
> !

e.d$ -texture <filename>+

name of texture to tile onto the image background
 %!

h.dT -threshold <value>{%}+
ž

threshold the image
‡

tFCreate a bi-level image such that any pixel intensity that is equal orGexceeds the threshold is reassigned the maximum intensity otherwise thedminimum intensity.
d 3!

L.o! -tile <filename>o+

tile image when filling a graphic primitive
 E!

..=! -tile <geometry>>+

layout of images [montage]
 a!

. < -title <string>+
Ï

assign title to displayed image [animate, display, montage]

mIUse this option to assign a specific title to the image. This is assignediGto the image window and is typically displayed in the window title bar.aFOptionally you can include the image filename, type, width, height, orVother image attribute by embedding special format characters:

d     %b   file size<     %c   comment.     %d   directoryo     %e   filename extension     %f   filename     %h   height     %i   input filename!     %k   number of unique colors      %l   label%     %m   magick     %n   number of scenes     %o   output filenamee     %p   page number      %q   quantum depth      %s   scene number     %t   top of filenameb#     %u   unique temporary filenamet     %w   widthc     %x   x resolution     %y   y resolution     %#   signature<     \n   newline>     \r   carriage returnE
‡

O For example,
"
c     -title "%m:%f %wx%h"F
‡

wGproduces an image title of MIFF:bird.miff 512x480 for an image Ctitled bird.miff and whose width is 512 and height is 480./
b !

<.". -transform+

transform the image
‡

s=This option applies the transformation matrix from a previous -affine option.

L=    convert -affine 2,2,-2,2,0,0 -transform bird.ppm bird.jpge
 t!

".'>=G -transparent <color>d+

make this color transparent within the image

FThe color is specified using the format described in the "Color Names"2section of X(1).
<.lC -treedepth <value>"+


tree depth for the color reduction algorithm

xHNormally, this integer value is zero or one. A zero or one tells displayZto choose an optimal tree depth for the color reduction algorithm
‡

GAn optimal depth generally allows the best representation of the source Jimage with the fastest computational speed and the least amount of memory.FHowever, the default depth is inappropriate for some images. To assureGthe best representation, try values between 2 and 8 for this parameter.eRefer to6quantize for more details.
‡

o_The -colors or -monochrome option is required for this option"to take effect.z
ih.s$ -trim+


trim an image
‡

DThis option removes any edges that are exactly the same color as the[corner pixels. Use -fuzz to make -trim remove edges that,Hare nearly the same color as the corner pixels.
 !

e.e8 -type <type>+
™

the image type
‡

/ Choose from:OBilevel, Grayscale, Palette, [PaletteMatte, TrueColor, TrueColorMatte,"fColorSeparation, ColorSeparationMatte, or Optimize.

/GNormally, when a format supports different subformats such as grayscalenEand truecolor, the encoder will try to choose an efficient subformat.hNThe -type option can be used to overrride this behavior. ForFexample, to prevent a JPEG from being written in grayscale format even(though only gray pixels are present, use
i
r-    convert bird.pgm -type TrueColor bird.jpgn
‡

ESimilarly, using -type TrueColorMatte will force the encoder
n -!

s.>? -update <seconds>t+
fy

hCdetect when image file is modified and redisplay.
‡

rISuppose that while you are displaying an image the file that is currentlyddisplayed is over-written.7display will automatically detect thattKthe input file has been changed and update the displayed image accordingly.h
n %!

s.,: -units <type>+

the type of image resolution

eKChoose from: Undefined, PixelsPerInch, or>%PixelsPerCentimeter.t
< d!

.eo -unsharp <radius>x<sigma>+<amount>+<threshold>a+

sharpen the image with an unsharp mask operator
‡

UThe -unsharp option sharpens an image. We convolve the image with a EGaussian operator of the given radius and standard deviation (sigma).lIFor reasonable results, radius should be larger than sigma. Use a radius Jof 0 to have the method select a suitable radius.
‡

"The parameters are:<
a
 :    radius:    The radius of the Gaussian, in pixels,  not5               counting the center pixel (default 0).9    sigma:     The standard deviation of the Gaussian, in1$               pixels (default 1.0).;    amount:    The percentage of the difference between thea=               original and the blur image that is added backz/               into the original (default 1.0).c=    threshold: The threshold, as a fraction of MaxRGB, neededr=               to apply the difference amount (default 0.05).s
 !

w.n -use-pixmapt+

use the pixmap
e >!

o.* -verbose+
ĩ

print detailed information about the image

bHThis information is printed: image scene number; image name; image size;Pthe image class (DirectClass or PseudoClass); the total numberLof unique colors; and the number of seconds to read and transform the image.KRefer to miff for a description of the image class.h

eSIf -colors is also specified, the total unique colors in the image<[and color reduction error values are printed. Refer to quantizer"for a description of these values.
/ !

.p* -version+

print ImageMagick version string
h d!

i.  -view <string>>+

FlashPix viewing parameters
 m!

i.rL -virtual-pixel <method>+
Ŋ

specify contents of "virtual pixels"

i This option Mdefines "virtual pixels" for use in operations that can access pixels outside 4the boundaries of an image.
‡

cChoose from these methods:
t
o.    Constant:  Use the image background color.?    Edge:      Extend the edge pixel toward infinity (default).t     Mirror:    Mirror the image.    Tile:      Tile the image.
‡

'This option affects operations that use"virtual pixels such as -blur, -sharpen, -wave, etc.
s n!

a.e< -visual <type>+

animate images using this X visual type
‡

e!Choose from these visual classes:e
t
<     StaticGrayw     GrayScale     StaticColor     PseudoColor     TrueColor     DirectColor     default     visual id
‡

nKThe X server must support the visual you choose, otherwise an error occurs.oHIf a visual is not specified, the visual class that can display the most4simultaneous colors on the default screen is chosen.
t C!

n.f; -watermark <brightness>x<saturation>=+

percent brightness and saturation of a watermark
B !

n.eP -wave <amplitude>x<wavelength>+

alter an image along a sine wave

y2Specify amplitude and wavelength of the wave.
p d!

x.-M -white-point <x>,<y>5+

chromaticity white point
a t!

l.w: -window <id>+

make image the background of a window
‡

BIid can be a window id or name. Specify root toL,select X's root window as the target window.

t?By default the image is tiled onto the background of the targetnHwindow. If backdrop or -geometry areEspecified, the image is surrounded by the background color. Refer to>)X RESOURCES for details.i

cCThe image will not display on the root window if the image has more:unique colors than the target window colormap allows. Use8-colors to reduce the number of colors.
d e!

.i -window-groupe+

specify the window group
= %!

l.d> -write <filename>+

write an image sequence [convert, composite]

LSThe image sequence following the -write filenameoption ish3written out, and then processing continues with theoDsame image in its current state if there are additional options. To=restore the image to its original state after writing it, userNthe +write filename option.
 y!

<. > -write <filename>+

write the image to a file [display]

QIf filename already exists, you will be prompted as to whether it should (be overwritten.
‡

CFBy default, the image is written in the format that it was read in as.MTo specify a particular image format, prefix filename with the imageKtype and a colon (e.g., ps:image) or specify the image type as the filename/Jsuffix (e.g., image.ps). See convert(1) for a list of valid image formats.6Specify file as - for standard output. If file has the extension .Z orT.gz, the file size is compressed using compress orgzip

aUse -compress to specify the type of image compression.

s,The equivalent X resource for this option isFwriteFilename (class WriteFilename).SeeLX Resourcesg%for details.
n

+Back to Contents  

  m&
>%Files and Formats/+
c>



lIBy default, the image format is determined by its magic number, i.e., thet'first few bytes of the file. To specifytIa particular image format, precede the filename with an image format name/Uand a colon (i.e.ps:image) or specify the image type as thecfilename suffix.:The magic number takes precedence over the filename suffixDand the prefix takes precedence over the magic number and the suffixin input files.0-The prefix takes precedence over the filename Jsuffix in output files. To read the "built-in" formats (GRANITE, H, LOGO,HNETSCAPE, PLASMA, and ROSE) use a prefix (including the colon) without aIfilename or suffix. To read the XC format, follow the colon with a colorHspecification. To read the CAPTION format, follow the colon with a textKstring or with a filename prefixed with the at symbol (@).G
 


CPWhen you specify X as your image type, the filename has specialBmeaning. It specifies an X window by id, name, orroot. IfmFno filename is specified, the window is selected by clicking the mousein the desired window.

wESpecify input_file as - for standard input, output_fileSas - for standard output. If input_file has the extension>.Z orj.gz, the file is uncompressed with uncompress or gunzipNrespectively. If output_file has the extension .Z or.gz,pDthe file is compressed using with compress or gzip respectively.<

fMFinally, when running on platforms that allow it, precede the image file name>Pwith | to pipe to or from a system command (this feature is not1available on VMS, Win32 and Macintosh platforms).R

iNUse an optional index enclosed in brackets after an input file name to specifyCa desired subimage of a multi-resolution image format like Photo CD;9(e.g. img0001.pcd[4]) or a range for MPEG images,(e.g. video.mpg[50-75]). A subimagePspecification can be disjoint (e.g. image.tiff[2,7,4]). For raw images,"specify a subimage with a geometry@(e.g. -size 640x512 image.rgb[320x256+50+50]).O

Single images are written with the filename you specify. However, multi-part Wimages (e.g., a multi-page PostScript document with +adjoin specified)e are writtendVwith the filename followed by a period (.) and the scene number. YouHcan change this behavior by embedding a %d, %0Nd, %o, %0No, %x, or %0Nx printf3format specification in the file name. For example,"

"    image%02d.miff


d6writes files image00.miff, image01.miff, etc.

>+When running a commandline utility, you can"Cprepend an at sign @ to a filename to read a list of image Ffilenames from that file. This is convenient in the event you have too0many image filenames to fit on the command line.



+Back to Contents <  

  e&
>Environment+
w>

 t!

i.m DISPLAY +

To get the default host, display number, and screen.
>


+Back to Contents l  

  s&
>Authors+
b>



d John Cristy,Omagick-users@imagemagick.org,mImageMagick Studio LLC,
nGlenn Randers-Pehrson,=randeg@alum.rpi.edu,iImageMagick Studio LLC.e
n
 




+Back to Contents  

  &
>Copyright+
l>



o6Copyright (C) 2002 ImageMagick Studio

aMPermission is hereby granted, free of charge, to any person obtaining Ka copy of this software and associated documentation files ("ImageMagick"),"Hto deal in ImageMagick without restriction, including without limitationHthe rights to use, copy, modify, merge, publish, distribute, sublicense,Pand/or sell copies of ImageMagick, and to permit persons to whom the ImageMagickDis furnished to do so, subject to the following conditions:

bOThe above copyright notice and this permission notice shall be includedl>in all copies or substantial portions of ImageMagick.

dOThe software is provided "as is", without warranty of any kind, expressrKor implied, including but not limited to the warranties of merchantability,rFfitness for a particular purpose and noninfringement.In no event shallGImageMagick Studio be liable for any claim, damages or other liability,>Fwhether in an action of contract, tort or otherwise, arising from, outDof or in connection with ImageMagick or the use or other dealings inImageMagick.t

r;Except as contained in this notice, the name of the>GImageMagick Studio LLC shall not be used in advertising or otherwise torLpromote the sale, use or other dealings in ImageMagick without prior written3authorization from the ImageMagick Studio.p



+Back to Contents  


>

n9Image manipulation software that works like magic.t