Annotated List of Command-line Options
- • -adaptive-blur
- • -adaptive-resize
- • -adaptive-sharpen
- • -adjoin
- • -affine
- • -alpha
- • -annotate
- • -antialias
- • -append
- • -attenuate
- • -authenticate
- • -auto-gamma
- • -auto-level
- • -auto-orient
- • -auto-threshold
- • -backdrop
- • -background
- • -bench
- • -bias
- • -bilateral-blur
- • -black-point-compensation
- • -black-threshold
- • -blend
- • -blue-primary
- • -blue-shift
- • -blur
- • -border
- • -bordercolor
- • -borderwidth
- • -brightness-contrast
- • -cache
- • -canny
- • -caption
- • -cdl
- • -channel
- • -charcoal
- • -channel-fx
- • -chop
- • -clahe
- • -clamp
- • -clip
- • -clip-mask
- • -clip-path
- • -clone
- • -clut
- • -coalesce
- • -colorize
- • -colormap
- • -color-matrix
- • -colors
- • -colorspace
- • -color-threshold
- • -combine
- • -comment
- • -compare
- • -complex
- • -compose
- • -composite
- • -compress
- • -connected-components
- • -contrast
- • -contrast-stretch
- • -convolve
- • -copy
- • -crop
- • -cycle
- • -debug
- • -decipher
- • -deconstruct
- • -define
- • -delay
- • -delete
- • -density
- • -depth
- • -descend
- • -deskew
- • -despeckle
- • -direction
- • -displace
- • -display
- • -dispose
- • -dissimilarity-threshold
- • -dissolve
- • -distort
- • -distribute-cache
- • -dither
- • -draw
- • -duplicate
- • -edge
- • -emboss
- • -encipher
- • -encoding
- • -endian
- • -enhance
- • -equalize
- • -evaluate
- • -evaluate-sequence
- • -extent
- • -extract
- • -family
- • -features
- • -fft
- • -fill
- • -filter
- • -flatten
- • -flip
- • -floodfill
- • -flop
- • -font
- • -foreground
- • -format
- • -format[identify]
- • -frame
- • -frame[import]
- • -function
- • -fuzz
- • -fx
- • -gamma
- • -gaussian-blur
- • -geometry
- • -gravity
- • -grayscale
- • -green-primary
- • -hald-clut
- • -help
- • -highlight-color
- • -hough-lines
- • -iconGeometry
- • -iconic
- • -identify
- • -ift
- • -immutable
- • -implode
- • -insert
- • -intensity
- • -intent
- • -interlace
- • -interline-spacing
- • -interpolate
- • -interpolative-resize
- • -interword-spacing
- • -kerning
- • -kmeans
- • -kuwahara
- • -label
- • -lat
- • -layers
- • -level
- • -level-colors
- • -limit
- • -linear-stretch
- • -linewidth
- • -liquid-rescale
- • -list
- • -log
- • -loop
- • -lowlight-color
- • -magnify
- • -map
- • -map[stream]
- • -mattecolor
- • -median
- • -mean-shift
- • -metric
- • -mode
- • -modulate
- • -moments
- • -monitor
- • -monochrome
- • -morph
- • -morphology
- • -mosaic
- • -motion-blur
- • -name
- • -negate
- • -noise
- • -normalize
- • -opaque
- • -ordered-dither
- • -orient
- • -page
- • -paint
- • -path
- • -pause[animate]
- • -pause[import]
- • -perceptible
- • -ping
- • -pointsize
- • -polaroid
- • -poly
- • -posterize
- • -precision
- • -preview
- • -process
- • -profile
- • -quality
- • -quantize
- • -quiet
- • -radial-blur
- • -raise
- • -random-threshold
- • -range-threshold
- • -read-mask
- • -red-primary
- • -regard-warnings
- • -region
- • -remap
- • -remote
- • -render
- • -repage
- • -resample
- • -resize
- • -respect-parentheses
- • -reverse
- • -roll
- • -rotate
- • -sample
- • -sampling-factor
- • -scale
- • -scene
- • -screen
- • -seed
- • -segment
- • -selective-blur
- • -separate
- • -sepia-tone
- • -set
- • -shade
- • -shadow
- • -shared-memory
- • -sharpen
- • -shave
- • -shear
- • -sigmoidal-contrast
- • -silent
- • -similarity-threshold
- • -size
- • -sketch
- • -smush
- • -snaps
- • -solarize
- • -sparse-color
- • -splice
- • -spread
- • -statistic
- • -stegano
- • -stereo
- • -storage-type
- • -stretch
- • -strip
- • -stroke
- • -strokewidth
- • -style
- • -subimage-search
- • -swap
- • -swirl
- • -synchronize
- • -taint
- • -text-font
- • -texture
- • -threshold
- • -thumbnail
- • -tile
- • -tile-offset
- • -tint
- • -title
- • -transform
- • -transparent
- • -transparent-color
- • -transpose
- • -transverse
- • -treedepth
- • -trim
- • -type
- • -undercolor
- • -unique-colors
- • -units
- • -unsharp
- • -update
- • -verbose
- • -version
- • -view
- • -vignette
- • -virtual-pixel
- • -visual
- • -watermark
- • -wave
- • -wavelet-denoise
- • -weight
- • -white-balance
- • -white-point
- • -white-threshold
- • -window
- • -window-group
- • -write
- • -write-mask
Below is list of command-line options recognized by the ImageMagick command-line tools. If you want a description of a particular option, click on the option name in the navigation bar above and you will go right to it. Unless otherwise noted, each option is recognized by the commands: convert and mogrify.
Adaptively blur pixels, with decreasing effect near edges.
A Gaussian operator of the given radius and standard deviation (sigma) is used. If sigma is not given it defaults to 1.
The sigma value is the important argument, and determines the actual amount of blurring that will take place.
The radius is only used to determine the size of the array which will hold the calculated Gaussian distribution. It should be an integer. If not given, or set to zero, IM will calculate the largest possible radius that will provide meaningful results for the Gaussian distribution.
Resize the image using data-dependent triangulation.
See Image Geometry for complete details about the geometry argument. The -adaptive-resize option defaults to data-dependent triangulation. Use the -filter to choose a different resampling algorithm. Offsets, if present in the geometry string, are ignored, and the -gravity option has no effect.
Adaptively sharpen pixels, with increasing effect near edges.
A Gaussian operator of the given radius and standard deviation (sigma) is used. If sigma is not given it defaults to 1.
The sigma value is the important argument, and determines the actual amount of sharpening that will take place.
The radius is only used to determine the size of the array which will hold the calculated Gaussian distribution. It should be an integer. If not given, or set to zero, IM will calculate the largest possible radius that will provide meaningful results for the Gaussian distribution.
Join images into a single multi-image file.
This option is enabled by default. An attempt is made to save all images of an image sequence into the given output file. However, some formats, such as JPEG and PNG, do not support more than one image per file, and in that case ImageMagick is forced to write each image as a separate file. As such, if more than one image needs to be written, the filename given is modified by adding a -scene number before the suffix, in order to make distinct names for each image.
Use +adjoin to force each image to be written to separate files, whether or not the file format allows multiple images per file (for example, GIF, MIFF, and TIFF).
Including a C-style integer format string in the output filename will
automagically enable +adjoin and are used to specify
where the -scene number is placed in the filenames. These
strings, such as '%d' or '%03d', are familiar to those
who have used the standard printf()' C-library function. As an
example, the command
convert logo: rose: -morph 15 my%02dmorph.jpg
Note that a infinitely tiled perspective images involving the horizon can be very slow, because of the number of pixels that are compressed to generate each individual pixel close to the 'horizon'. You can turn off EWA resampling, by specifying the special -filter setting of 'point' (recommended if you plan to use super-sampling instead).
If an image generates invalid pixels, such as the 'sky' in the last example, -distort will use the current -mattecolor setting for these pixels. If you do not what these pixels to be visible, set the color to match the rest of the ground.
The output image size will by default be the same as the input image. This means that if the part of the distorted image falls outside the viewed area of the 'distorted space', those parts is clipped and lost. However if you use the plus form of the operator (+distort) the operator will attempt (if possible) to show the whole of the distorted image, while retaining a correct 'virtual canvas' offset, for image layering. This offset may need to be removed using +repage, to remove if it is unwanted.
Setting -verbose setting, will cause -distort to attempt to output the internal coefficients, and the -fx equivalent to the distortion, for expert study, and debugging purposes. This many not be available for all distorts.
You can alternatively specify a special "-define distort:viewport={geometry_string}" setting which will specify the size and the offset of the generated 'viewport' image of the distorted image space.
Setting a "-define distort:scale=scale_factor" will scale the output image (viewport or otherwise) by that factor without changing the viewed contents of the distorted image. This can be used either for 'super-sampling' the image for a higher quality result, or for panning and zooming around the image (with appropriate viewport changes, or post-distort cropping and resizing).
Setting "-define resample:verbose=1" will output the cylindrical filter lookup table created by the EWA (Elliptical Weighted Average) resampling algorithm. Note this table uses a squared radius lookup value. This is typically only used for debugging EWA resampling.
Launch a distributed pixel cache server.
Apply a Riemersma or Floyd-Steinberg error diffusion dither to images when general color reduction is applied via an option, or automagically when saving to specific formats. This enabled by default.
Dithering places two or more colors in neighboring pixels so that to the eye a closer approximation of the images original color is reproduced. This reduces the number of colors needed to reproduce the image but at the cost of a lower level pattern of colors. Error diffusion dithers can use any set of colors (generated or user defined) to an image.
Dithering is turned on by default, to turn it off use the plus form of the setting, +dither. This will also render PostScript without text or graphic aliasing. Disabling dithering often (but not always) leads to faster process, a smaller number of colors, but more cartoon like image coloring. Generally resulting in 'color banding' effects in areas with color gradients.
The color reduction operators -colors, -monochrome, -remap, and -posterize, apply dithering to images using the reduced color set they created. These operators are also used as part of automatic color reduction when saving images to formats with limited color support, such as GIF:, XBM:, and others, so dithering may also be used in these cases.
Alternatively you can use -random-threshold to generate purely random dither. Or use -ordered-dither to apply threshold mapped dither patterns, using uniform color maps, rather than specific color maps.
Use "-define dither:diffusion-amount=35%, for example, to control the amount of Floyd-Steinberg dither.
Annotate an image with one or more graphic primitives.
Use this option to annotate or decorate an image with one or more graphic primitives. The primitives include shapes, text, transformations, and pixel operations.
The shape primitives:
- 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
- specification
- image
- operator x0,y0 w,h filename
The text primitive:
- text
- x0,y0 string
The text gravity primitive:
- gravity
- NorthWest, North, NorthEast, West, Center, East, SouthWest, South, or SouthEast
The text gravity primitive only affects the placement of text and does not interact with the other primitives. It is equivalent to using the -gravity command-line option, except that it is limited in scope to the -draw option in which it appears.
The transformation primitives:
- rotate
- degrees
- translate
- dx,dy
- scale
- sx,sy
- skewX
- degrees
- skewY
- degrees
The pixel operation primitives:
- color
- x0,y0 method
- matte
- x0,y0 method
The shape primitives are drawn in the color specified by the preceding -fill setting. For unfilled shapes, use -fill none. You can optionally control the stroke (the "outline" of a shape) with the -stroke and -strokewidth settings.
A point primitive is specified by a single point in the pixel plane, that is, by an ordered pair of integer coordinates, x,y. (As it involves only a single pixel, a point primitive is not affected by -stroke or -strokewidth.)
A line primitive requires a start point and end point.
A rectangle primitive is specified by the pair of points at the upper left and lower right corners.
A roundRectangle primitive takes the same corner points as a rectangle followed by the width and height of the rounded corners to be removed.
The circle primitive makes a disk (filled) or circle (unfilled). Give the center and any point on the perimeter (boundary). Note, by using a translation, you can remove the need to calculate the circles edge coordinate, but can just give the radius directly:
magick -size 100x60 xc: -stroke SeaGreen -fill PaleGreen -strokewidth 2 -draw 'translate 50,30 circle 0,0 25,0' circle.gif
For other settings that affect fonts, see the options -font, -family, -stretch, and -weight.
Search for subimage.
This option enables the compare function to search for the best match location of a small image within a larger image. The search process generates either one or two output images (or frames), depending on whether the metric is accelerated.
- The first output is the difference image.
- The second output, if present, is the similarity score image.
When utilizing the HDRI-enabled compile of ImageMagick and the FFTW delegate is installed, specific metricsβNCC, MSE, RMSE, PSNR, PHASE, and DPCβare automatically accelerated using FFT (Fast Fourier Transform) processing. This is the default behavior. However, by using the flag -define compare:frequency-domain=false, you can disable FFT acceleration and instead opt for the slower spatial domain processing, if desired.
The similarity score image matches the dimensions of the larger image. Each pixel in this output represents a potential position for the top-left corner of the small image within the larger one. The brightest spot in the similarity image corresponds to the best match location. For FFT-accelerated metrics, the similarity score at this position is also displayed in square brackets alongside the match coordinates.
It is important to note that the best match in the similarity image does not necessarily imply a perfect match. The actual brightness of the peak reflects the quality of the match. Additionally, other bright peaks in the similarity image may indicate alternate potential matching locations.
Metrics differ in their definition of a perfect match. For metrics like MSE, RMSE, PSNR (MAE, FUZZ, DSIM, and PHASH), a perfect match has a value of 0. Conversely, metrics such as NCC, PHASE, DPC (AE, PAE, MEPP, and SSIM) define a perfect match as 1. To maintain consistency, for metrics where the perfect match is 0, the similarity image is inverted, ensuring that the best match location appears as the brightest point, just as it does for metrics with a perfect match at 1.
Swap the positions of two images in the image sequence.
For example, -swap 0,2 swaps the first and the third images in the current image sequence. Use +swap to switch the last two images in the sequence.
Swirl image pixels about the center.
Degrees defines the tightness of the swirl.
Synchronize image to storage device.
Set to "true" to ensure all image data is fully flushed and synchronized to disk. There is a performance penalty, but the benefits include ensuring a valid image file in the event of a system crash and early reporting if there is not enough disk space for the image pixel cache.
Mark the image as modified.
Font for writing fixed-width text.
Specifies the name of the preferred font to use in fixed (typewriter style) formatted text. The default is 14 point Courier.
You can tag a font to specify whether it is a PostScript, TrueType, or X11 font. For example, Courier.ttf is a TrueType font and x:fixed is X11.
Name of texture to tile onto the image background.