summaryrefslogtreecommitdiff
path: root/utilities/gm.1
diff options
context:
space:
mode:
Diffstat (limited to 'utilities/gm.1')
-rw-r--r--utilities/gm.1999
1 files changed, 596 insertions, 403 deletions
diff --git a/utilities/gm.1 b/utilities/gm.1
index a79996c..5c56358 100644
--- a/utilities/gm.1
+++ b/utilities/gm.1
@@ -1,4 +1,4 @@
-.TH gm 1 "2020/07/19" "GraphicsMagick"
+.TH gm 1 "2022/03/11" "GraphicsMagick"
.TP
.in 15
.in 15
@@ -399,8 +399,9 @@ number in the filename, it is necessary to include a printf-style
%d format specification in the file name and use the +adjoin
option. For example,
+.nf
image%02d.miff
-
+.fi
writes files \fIimage00.miff, image01.miff,\fP etc. Only a single
specification is allowed within an output filename. If more than one
@@ -445,8 +446,9 @@ files. If \fB+adjoin\fP is used, then the output filename must
include a printf style formatting specification for the numeric part
of the filename. For example,
+.nf
image%02d.miff
-
+.fi
.TP
.B "-affine \fI<matrix>"\fP
\fRdrawing transform matrix
@@ -473,7 +475,7 @@ is terminated by the appearance of any option.
If the \fB-append\fP
option appears after all of the input images, all images are appended.
.TP
-.B " \fI-asc-cdl <spec>"\fP
+.B "-asc-cdl \fI<spec>"\fP
\fRapply ASC CDL color transform
Applies ("bakes in") the ASC CDL, which is a format for the exchange
@@ -488,16 +490,18 @@ numbers comprising a single color decision. The tenth number
The argument string is comma delimited and is in the following form
(but without invervening spaces or line breaks)
+.nf
redslope,redoffset,redpower:
greenslope,greenoffset,greenpower:
blueslope,blueoffset,bluepower:
saturation
-
+.fi
with the unity (no change) specification being:
+.nf
"1.0,0.0,1.0:1.0,0.0,1.0:1.0,0.0,1.0:1.0"
-
+.fi
.TP
.B "-authenticate \fI<string>"\fP
\fRdecrypt image with this password
@@ -625,8 +629,9 @@ If a clipping path is present, it will be applied to subsequent operations.
For example, if you type the following command:
+.nf
gm convert -clip -negate cockatoo.tif negated.tif
-
+.fi
only the pixels within the clipping path are negated.
@@ -654,9 +659,10 @@ a colorization value list delimited with slashes (e.g. 0/0/50).
The \fB-colorize\fP option may be used in conjunction with \fB-modulate\fP
to produce a nice sepia toned image like:
+.nf
gm convert input.ppm -modulate 115,0,100 \\
-colorize 7,21,50 output.ppm.
-
+.fi
.TP
.B "-colormap \fI<type>"\fP
\fRdefine the colormap type
@@ -738,8 +744,9 @@ instead.
For example,
+.nf
-comment "%m:%f %wx%h"
-
+.fi
produces an image comment of \fBMIFF:bird.miff 512x480\fP for an image
titled \fBbird.miff\fP and whose width is 512 and height is 480.
@@ -791,6 +798,7 @@ boolean operations.
By default, the \fIOver\fP composite operator is used. The following
composite operators are available:
+.nf
Over
In
Out
@@ -813,7 +821,7 @@ composite operators are available:
CopyMagenta
CopyYellow
CopyBlack
-
+.fi
The behavior of each operator is described below.
@@ -822,7 +830,7 @@ The behavior of each operator is described below.
.in 15
.B "Over"
.in 20
-\fR
+ \fR
.in 20
The result will be the union of the two image shapes, with opaque areas
of \fIchange-image\fP obscuring \fIbase-image\fP in the region of
@@ -832,7 +840,7 @@ overlap.
.in 15
.B "In"
.in 20
-\fR
+ \fR
.in 20
The result is simply \fIchange-image\fP cut by the shape of
\fIbase-image\fP. None of the image data of \fIbase-image\fP will be in
@@ -842,7 +850,7 @@ the result.
.in 15
.B "Out"
.in 20
-\fR
+ \fR
.in 20
The resulting image is \fIchange-image\fP with the shape of
\fIbase-image\fP cut out.
@@ -851,7 +859,7 @@ The resulting image is \fIchange-image\fP with the shape of
.in 15
.B "Atop"
.in 20
-\fR
+ \fR
.in 20
The result is the same shape as \fIbase-image\fP, with
\fIchange-image\fP obscuring \fIbase-image\fP where the image shapes
@@ -863,7 +871,7 @@ the result.
.in 15
.B "Xor"
.in 20
-\fR
+ \fR
.in 20
The result is the image data from both \fIchange-image\fP and
\fIbase-image\fP that is outside the overlap region. The overlap region
@@ -873,7 +881,7 @@ will be blank.
.in 15
.B "Plus"
.in 20
-\fR
+ \fR
.in 20
The result is just the sum of the image data. Output values are cropped
to MaxRGB (no overflow). This operation is independent of the matte
@@ -883,7 +891,7 @@ channels.
.in 15
.B "Minus"
.in 20
-\fR
+ \fR
.in 20
The result of \fIchange-image\fP - \fIbase-image\fP, with underflow
cropped to zero. The matte channel is ignored (set to opaque, full
@@ -893,7 +901,7 @@ coverage).
.in 15
.B "Add"
.in 20
-\fR
+ \fR
.in 20
The result of \fIchange-image\fP + \fIbase-image\fP, with overflow
wrapping around (\fImod\fP MaxRGB+1).
@@ -902,7 +910,7 @@ wrapping around (\fImod\fP MaxRGB+1).
.in 15
.B "Subtract"
.in 20
-\fR
+ \fR
.in 20
The result of \fIchange-image\fP - \fIbase-image\fP, with underflow
wrapping around (\fImod\fP MaxRGB+1). The \fBadd\fP and \fBsubtract\fP
@@ -912,7 +920,7 @@ operators can be used to perform reversible transformations.
.in 15
.B "Difference"
.in 20
-\fR
+ \fR
.in 20
The result of abs(\fIchange-image\fP - \fIbase-image\fP). This is
useful for comparing two very similar images.
@@ -921,7 +929,7 @@ useful for comparing two very similar images.
.in 15
.B "Divide"
.in 20
-\fR
+ \fR
.in 20
The result of \fIchange-image\fP / \fIbase-image\fP. This is useful
for improving the readability of text on unevenly illuminated photos (by
@@ -931,7 +939,7 @@ using a gaussian blurred copy of change-image as base-image).
.in 15
.B "Multiply"
.in 20
-\fR
+ \fR
.in 20
The result of \fIchange-image\fP * \fIbase-image\fP. This is useful for
the creation of drop-shadows.
@@ -940,7 +948,7 @@ the creation of drop-shadows.
.in 15
.B "Bumpmap"
.in 20
-\fR
+ \fR
.in 20
The result \fIbase-image\fP shaded by \fIchange-image\fP.
@@ -948,7 +956,7 @@ The result \fIbase-image\fP shaded by \fIchange-image\fP.
.in 15
.B "Copy"
.in 20
-\fR
+ \fR
.in 20
The resulting image is \fIbase-image\fP replaced with
\fIchange-image\fP. Here the matte information is ignored.
@@ -957,7 +965,7 @@ The resulting image is \fIbase-image\fP replaced with
.in 15
.B "CopyRed"
.in 20
-\fR
+ \fR
.in 20
The resulting image is the red channel in \fIbase-image\fP replaced with
the red channel in \fIchange-image\fP. The other channels are copied
@@ -967,7 +975,7 @@ untouched.
.in 15
.B "CopyGreen"
.in 20
-\fR
+ \fR
.in 20
The resulting image is the green channel in \fIbase-image\fP replaced
with the green channel in \fIchange-image\fP. The other channels are
@@ -977,7 +985,7 @@ copied untouched.
.in 15
.B "CopyBlue"
.in 20
-\fR
+ \fR
.in 20
The resulting image is the blue channel in \fIbase-image\fP replaced
with the blue channel in \fIchange-image\fP. The other channels are
@@ -987,7 +995,7 @@ copied untouched.
.in 15
.B "CopyOpacity"
.in 20
-\fR
+ \fR
.in 20
The resulting image is the opacity channel in \fIbase-image\fP replaced
with the opacity channel in \fIchange-image\fP. The other channels are
@@ -997,7 +1005,7 @@ copied untouched.
.in 15
.B "CopyCyan"
.in 20
-\fR
+ \fR
.in 20
The resulting image is the cyan channel in \fIbase-image\fP replaced
with the cyan channel in \fIchange-image\fP. The other channels are
@@ -1008,7 +1016,7 @@ CMYK(A) colorspace.
.in 15
.B "CopyMagenta"
.in 20
-\fR
+ \fR
.in 20
The resulting image is the magenta channel in \fIbase-image\fP
replaced with the magenta channel in \fIchange-image\fP. The other
@@ -1019,7 +1027,7 @@ base-image be in CMYK(A) colorspace.
.in 15
.B "CopyYellow"
.in 20
-\fR
+ \fR
.in 20
The resulting image is the yellow channel in \fIbase-image\fP
replaced with the yellow channel in \fIchange-image\fP. The other
@@ -1030,7 +1038,7 @@ base-image be in CMYK(A) colorspace.
.in 15
.B "CopyBlack"
.in 20
-\fR
+ \fR
.in 20
The resulting image is the black channel in \fIbase-image\fP
replaced with the black channel in \fIchange-image\fP. The other
@@ -1076,8 +1084,9 @@ or \fB+contrast\fP to reduce the image contrast.
For a more pronounced effect you can repeat the option:
+.nf
gm convert rose: -contrast -contrast rose_c2.png
-
+.fi
.TP
.B "-convolve \fI<kernel>"\fP
\fRconvolve image with the specified convolution kernel
@@ -1159,8 +1168,9 @@ Warning, or
X11,
For example, to log cache and blob events, use
+.nf
gm convert -debug "Cache,Blob" rose: rose.png
-
+.fi
The "User" domain is normally empty, but developers can log "User" events
in their private copy of GraphicsMagick.
@@ -1205,7 +1215,7 @@ The following definitions may be created:
.in 15
.B "cineon:colorspace={rgb|cineonlog}"
.in 20
-\fR
+ \fR
.in 20
Use the cineon:colorspace option when reading a Cineon file to
specify the colorspace the Cineon file uses. This overrides the colorspace
@@ -1215,7 +1225,7 @@ type implied by the DPX header (if any).
.in 15
.B "dpx:bits-per-sample=<value>"
.in 20
-\fR
+ \fR
.in 20
If the dpx:bits-per-sample key is defined, GraphicsMagick will write
DPX images with the specified bits per sample, overriding any existing
@@ -1229,7 +1239,7 @@ below).
.in 15
.B "dpx:colorspace={rgb|cineonlog}"
.in 20
-\fR
+ \fR
.in 20
Use the dpx:colorspace option when reading a DPX file to
specify the colorspace the DPX file uses. This overrides the colorspace
@@ -1239,7 +1249,7 @@ type implied by the DPX header (if any).
.in 15
.B "dpx:packing-method={packed|a|b|lsbpad|msbpad}"
.in 20
-\fR
+ \fR
.in 20
DPX samples are output within 32-bit words. They may be tightly
packed end-to-end within the words ("packed"), padded with null bits to
@@ -1253,7 +1263,7 @@ of 10 bits with type A padding.
.in 15
.B "dpx:pixel-endian={lsb|msb}"
.in 20
-\fR
+ \fR
.in 20
Allows the user to specify the endian order of the pixels when
reading or writing the DPX files. Sometimes this is useful if the file is
@@ -1264,15 +1274,15 @@ use different endianness.
.in 15
.B "dpx:swap-samples={true|false}"
.in 20
-\fR
+ \fR
.in 15
.B "dpx:swap-samples-read={true|false}"
.in 20
-\fR
+ \fR
.in 15
.B "dpx:swap-samples-write={true|false}"
.in 20
-\fR
+ \fR
.in 20
GraphicsMagick strives to adhere to the DPX standard but certain
aspects of the standard can be quite confusing. As a result, some
@@ -1288,7 +1298,7 @@ in the writer.
.in 15
.B "gradient:direction={South|North|West|East|NorthWest|NorthEast|SouthWest|SouthEast}"
.in 20
-\fR
+ \fR
.in 20
By default, the gradient coder produces a gradient from top to
bottom ("South"). Since GraphicsMagick 1.3.35, the gradient direction
@@ -1304,7 +1314,7 @@ Top-Left), \fBNorthEast\fP (Bottom-Left to Top-Right),
.in 15
.B "jp2:rate=<value>"
.in 20
-\fR
+ \fR
.in 20
Specify the compression factor to use while writing JPEG-2000
files. The compression factor is the reciprocal of the compression
@@ -1317,7 +1327,7 @@ setting. The default quality setting of 75 results in a rate value of
.in 15
.B "jpeg:block-smoothing={true|false}"
.in 20
-\fR
+ \fR
.in 20
Enables or disables block smoothing when reading a JPEG file
(default enabled).
@@ -1326,7 +1336,7 @@ Enables or disables block smoothing when reading a JPEG file
.in 15
.B "jpeg:dct-method=<value>"
.in 20
-\fR
+ \fR
.in 20
Selects the IJG JPEG library DCT implementation to use. The
encoding implementations vary in speed and encoding error. The
@@ -1340,7 +1350,7 @@ behaves.
.in 15
.B "jpeg:fancy-upsampling={true|false}"
.in 20
-\fR
+ \fR
.in 20
Enables or disables fancy upsampling when reading a JPEG file
(default enabled).
@@ -1349,7 +1359,7 @@ Enables or disables fancy upsampling when reading a JPEG file
.in 15
.B "jpeg:max-scan-number=<value>"
.in 20
-\fR
+ \fR
.in 20
Specifies an integer value for the maximum number of progressive
scans allowed in a JPEG file. The default maximum is 100 scans. This
@@ -1360,7 +1370,7 @@ small JPEG files to take many minutes or hours to be read.
.in 15
.B "jpeg:max-warnings=<value>"
.in 20
-\fR
+ \fR
.in 20
Specifies an integer value for how many warnings are allowed for
any given error type before being promoted to a hard error. JPEG
@@ -1370,7 +1380,7 @@ files producing excessive warnings indicate a problem with the file.
.in 15
.B "jpeg:optimize-coding={true|false}"
.in 20
-\fR
+ \fR
.in 20
Selects if huffman encoding should be used. Huffman encoding is enabled
by default, but may be disabled for very large images since it encoding
@@ -1382,7 +1392,7 @@ memory consumption.
.in 15
.B "jpeg:preserve-settings"
.in 20
-\fR
+ \fR
.in 20
If the jpeg:preserve-settings flag is defined, the JPEG encoder will
use the same "quality" and "sampling-factor" settings that were found
@@ -1396,16 +1406,30 @@ are not.
.in 15
.B "pcl:fit-to-page"
.in 20
-\fR
+ \fR
.in 20
If the pcl:fit-to-page flag is defined, then the printer is
requested to scale the image to fit the page size (width and/or
height).
.in 15
.in 15
+.B "png:chunk-malloc-max=<value>"
+.in 20
+ \fR
+.in 20
+png:chunk-malloc-max specifies the maximum chunk size that libpng
+will be allowed to read. Libpng's default is normally 8,000,000
+bytes. Very rarely, a valid PNG file may be encountered where the
+error is reported "chunk data is too large". In this case, the limit
+may be increased using this option. Take care when increasing this
+limit since an excessively large limit could allow untrusted files to
+use excessive memory.
+
+.in 15
+.in 15
.B "mng:maximum-loops=<value>"
.in 20
-\fR
+ \fR
.in 20
mng:maximum-loops specifies the maximum number of loops allowed to
be specified by a MNG LOOP chunk. Without an imposed limit, a MNG file
@@ -1416,7 +1440,7 @@ time. The current default limit is 512 loops.
.in 15
.B "pdf:use-cropbox={true|false}"
.in 20
-\fR
+ \fR
.in 20
If the pdf:use-cropbox flag is set to \fBtrue\fP, then
Ghostscript is requested to apply the PDF crop box.
@@ -1425,7 +1449,7 @@ Ghostscript is requested to apply the PDF crop box.
.in 15
.B "pdf:stop-on-error={true|false}"
.in 20
-\fR
+ \fR
.in 20
If the pdf:stop-on-error flag is set to \fBtrue\fP, then
Ghostscript is requested to stop processing the PDF when the first
@@ -1436,7 +1460,7 @@ requested pages.
.in 15
.B "ps:imagemask"
.in 20
-\fR
+ \fR
.in 20
If the ps:imagemask flag is defined, the PS3 and EPS3 coders will
create Postscript files that render bilevel images with the Postscript
@@ -1446,7 +1470,7 @@ imagemask operator instead of the image operator.
.in 15
.B "ptif:minimum-geometry=<geometry>"
.in 20
-\fR
+ \fR
.in 20
If the ptif:minimum-geometry key is defined, GraphicsMagick will
use it to determine the minimum frame size to output when writing a
@@ -1457,7 +1481,7 @@ versions of the first frame). The default minimum geometry is 32x32.
.in 15
.B "tiff:alpha={unspecified|associated|unassociated}"
.in 20
-\fR
+ \fR
.in 20
Specify the TIFF alpha channel type when reading or writing TIFF files,
overriding the normal value. The default alpha channel type for new files
@@ -1478,7 +1502,7 @@ the pixels.
.in 15
.B "tiff:fill-order={msb2lsb|lsb2msb}"
.in 20
-\fR
+ \fR
.in 20
If the tiff:fill-order key is defined, GraphicsMagick will use it to
determine the bit fill order used while writing TIFF files. The normal default
@@ -1491,7 +1515,7 @@ therefore RFC 2301 recommends using reverse order.
.in 15
.B "tiff:group-three-options=<value>"
.in 20
-\fR
+ \fR
.in 20
If the tiff:group-three-options key is defined, GraphicsMagick
will use it to set the group3 options tag when writing
@@ -1502,7 +1526,7 @@ usage of this tag. The default value is 4.
.in 15
.B "tiff:ignore-tags=<tags>"
.in 20
-\fR
+ \fR
.in 20
If the tiff:ignore-tags key is defined, then it is used as a list
of comma-delimited integer TIFF tag values to ignore while reading the
@@ -1515,7 +1539,7 @@ data at all.
.in 15
.B "tiff:report-warnings={false|true}"
.in 20
-\fR
+ \fR
.in 20
If the tiff:report-warnings key is defined and set to \fBtrue\fP,
then TIFF warnings are reported as a warning exception rather than as
@@ -1529,7 +1553,7 @@ to the use of proprietary or specialized extensions.
.in 15
.B "tiff:sample-format={unsigned|ieeefp}"
.in 20
-\fR
+ \fR
.in 20
If the tiff:sample-format key is defined, GraphicsMagick will use it to
determine the sample format used while writing TIFF files. The default is
@@ -1542,7 +1566,7 @@ to use.
.in 15
.B "tiff:max-sample-value=<value>"
.in 20
-\fR
+ \fR
.in 20
If the tiff:max-sample-value key is defined, GraphicsMagick will use the
assigned value as the maximum floating point value while reading or
@@ -1557,7 +1581,7 @@ SMaxSampleValue tag is not present, it may be necessary to
.in 15
.B "tiff:min-sample-value=<value>"
.in 20
-\fR
+ \fR
.in 20
If the tiff:min-sample-value key is defined, GraphicsMagick will use
the assigned value as the minimum floating point value while reading or
@@ -1568,7 +1592,7 @@ the value obtained from the file's SMinSampleValue tag (if present).
.in 15
.B "tiff:bits-per-sample=<value>"
.in 20
-\fR
+ \fR
.in 20
If the tiff:bits-per-sample key is defined, GraphicsMagick will write
images with the specified bits per sample, overriding any existing depth
@@ -1582,7 +1606,7 @@ depend on the nature of the image (e.g. colormapped, grayscale, RGB, CMYK).
.in 15
.B "tiff:samples-per-pixel=<value>"
.in 20
-\fR
+ \fR
.in 20
If the tiff:samples-per-pixel key is defined to a value, the TIFF coder
will write TIFF images with the defined samples per pixel, overriding any
@@ -1592,7 +1616,7 @@ value stored in the image. This option should not normally be used.
.in 15
.B "tiff:rows-per-strip=<value>"
.in 20
-\fR
+ \fR
.in 20
Allows the user to specify the number of rows per TIFF strip.
Rounded up to a multiple of 16 when using JPEG compression. Ignored when
@@ -1602,7 +1626,7 @@ using tiles.
.in 15
.B "tiff:strip-per-page=true"
.in 20
-\fR
+ \fR
.in 20
Requests that the image is written in a single TIFF strip. This is
normally the default when group3 or group4 compression is requested
@@ -1613,7 +1637,7 @@ result in failure due to resource consumption in the writer or reader.
.in 15
.B "tiff:tile"
.in 20
-\fR
+ \fR
.in 20
Enable writing tiled TIFF (rather than stripped) using the default tile
size. Tiled TIFF organizes the image as an array of smaller images
@@ -1623,7 +1647,7 @@ size. Tiled TIFF organizes the image as an array of smaller images
.in 15
.B "tiff:tile-geometry=<width>x<height>"
.in 20
-\fR
+ \fR
.in 20
Specify the tile size to use while writing tiled TIFF. Width and
height should be a multiple of 16. If the value is not a multiple of 16,
@@ -1640,7 +1664,7 @@ with smaller tile sizes.
.in 15
.B "tiff:tile-width=<width>"
.in 20
-\fR
+ \fR
.in 20
Specify the tile width to use while writing tiled TIFF. The tile height
is then defaulted to an appropriate size. Width should be a multiple of
@@ -1651,7 +1675,7 @@ Enables tiled TIFF if it has not already been enabled.
.in 15
.B "tiff:tile-height=<height>"
.in 20
-\fR
+ \fR
.in 20
Specify the tile height to use while writing tiled TIFF. The tile width
is then defaulted to an appropriate size. Height should be a multiple of
@@ -1662,7 +1686,7 @@ Enables tiled TIFF if it has not already been enabled.
.in 15
.B "tiff:webp-lossless={TRUE|FALSE}"
.in 20
-\fR
+ \fR
.in 20
Specify a value of \fBTRUE\fP to enable lossless mode while
writing WebP-compressed TIFF files. The WebP \fBwebp:lossless\fP
@@ -1674,7 +1698,7 @@ expended while compressing.
.in 15
.B "tiff:zstd-compress-level=<value>"
.in 20
-\fR
+ \fR
.in 20
Specify the compression level to use while writing Zstd-compressed
TIFF files. The valid range is 1 to 22. If this define is not
@@ -1686,7 +1710,7 @@ quality setting of 75 is translated to a compress level of 9 such that
.in 15
.B "webp:lossless={true|false}"
.in 20
-\fR
+ \fR
.in 20
Enable lossless encoding.
@@ -1694,7 +1718,7 @@ Enable lossless encoding.
.in 15
.B "webp:method={0-6}"
.in 20
-\fR
+ \fR
.in 20
Quality/speed trade-off.
@@ -1702,7 +1726,7 @@ Quality/speed trade-off.
.in 15
.B "webp:image-hint={default,graph,photo,picture}"
.in 20
-\fR
+ \fR
.in 20
Hint for image type.
@@ -1710,7 +1734,7 @@ Hint for image type.
.in 15
.B "webp:target-size=<integer>"
.in 20
-\fR
+ \fR
.in 20
Target size in bytes.
@@ -1718,7 +1742,7 @@ Target size in bytes.
.in 15
.B "webp:target-psnr=<float>"
.in 20
-\fR
+ \fR
.in 20
Minimal distortion to try to achieve.
@@ -1726,7 +1750,7 @@ Minimal distortion to try to achieve.
.in 15
.B "webp:segments={1-4}"
.in 20
-\fR
+ \fR
.in 20
Maximum number of segments to use.
@@ -1734,7 +1758,7 @@ Maximum number of segments to use.
.in 15
.B "webp:sns-strength={0-100}"
.in 20
-\fR
+ \fR
.in 20
Spatial Noise Shaping.
@@ -1742,7 +1766,7 @@ Spatial Noise Shaping.
.in 15
.B "webp:filter-strength={0-100}"
.in 20
-\fR
+ \fR
.in 20
Filter strength.
@@ -1750,7 +1774,7 @@ Filter strength.
.in 15
.B "webp:filter-sharpness={0-7}"
.in 20
-\fR
+ \fR
.in 20
Filter sharpness.
@@ -1758,7 +1782,7 @@ Filter sharpness.
.in 15
.B "webp:filter-type={0,1}"
.in 20
-\fR
+ \fR
.in 20
Filtering type. 0 = simple, 1 = strong (only used if
filter-strength > 0 or autofilter is enabled).
@@ -1767,7 +1791,7 @@ filter-strength > 0 or autofilter is enabled).
.in 15
.B "webp:auto-filter={true|false}"
.in 20
-\fR
+ \fR
.in 20
Auto adjust filter's strength.
@@ -1775,7 +1799,7 @@ Auto adjust filter's strength.
.in 15
.B "webp:alpha-compression=<integer>"
.in 20
-\fR
+ \fR
.in 20
Algorithm for encoding the alpha plane (0 = none, 1 = compressed
with WebP lossless). Default is 1.
@@ -1784,7 +1808,7 @@ with WebP lossless). Default is 1.
.in 15
.B "webp:alpha-filtering=<integer>"
.in 20
-\fR
+ \fR
.in 20
Predictive filtering method for alpha plane. 0: none, 1: fast, 2:
best. Default is 1.
@@ -1793,7 +1817,7 @@ best. Default is 1.
.in 15
.B "webp:alpha-quality={0-100}"
.in 20
-\fR
+ \fR
.in 20
Between 0 (smallest size) and 100 (lossless). Default is 100.
@@ -1801,7 +1825,7 @@ Between 0 (smallest size) and 100 (lossless). Default is 100.
.in 15
.B "webp:pass=[1..10]"
.in 20
-\fR
+ \fR
.in 20
Number of entropy-analysis passes.
@@ -1809,7 +1833,7 @@ Number of entropy-analysis passes.
.in 15
.B "webp:show-compressed={true|false}"
.in 20
-\fR
+ \fR
.in 20
Export the compressed picture back. In-loop filtering is not
applied.
@@ -1818,7 +1842,7 @@ applied.
.in 15
.B "webp:preprocessing=[0,1,2]"
.in 20
-\fR
+ \fR
.in 20
0=none, 1=segment-smooth, 2=pseudo-random dithering
@@ -1826,7 +1850,7 @@ applied.
.in 15
.B "webp:partitions=[0-3]"
.in 20
-\fR
+ \fR
.in 20
log2(number of token partitions) in [0..3]. Default is 0 for
easier progressive decoding.
@@ -1835,7 +1859,7 @@ easier progressive decoding.
.in 15
.B "webp:partition-limit={0-100}"
.in 20
-\fR
+ \fR
.in 20
Quality degradation allowed to fit the 512k limit on prediction
modes coding (0: no degradation, 100: maximum possible
@@ -1845,7 +1869,7 @@ degradation).
.in 15
.B "webp:emulate-jpeg-size={true|false}"
.in 20
-\fR
+ \fR
.in 20
If true, compression parameters will be remapped to better match
the expected output size from JPEG compression. Generally, the output
@@ -1855,7 +1879,7 @@ size will be similar but the degradation will be lower.
.in 15
.B "webp:thread-level=<integer>"
.in 20
-\fR
+ \fR
.in 20
If non-zero, try and use multi-threaded encoding.
@@ -1863,7 +1887,7 @@ If non-zero, try and use multi-threaded encoding.
.in 15
.B "webp:low-memory={true|false}"
.in 20
-\fR
+ \fR
.in 20
If set, reduce memory usage (but increase CPU use)
@@ -1871,7 +1895,7 @@ If set, reduce memory usage (but increase CPU use)
.in 15
.B "webp:use-sharp-yuv={true|false}"
.in 20
-\fR
+ \fR
.in 20
If set, if needed, use sharp (and slow) RGB->YUV conversion
@@ -1882,8 +1906,9 @@ If set, if needed, use sharp (and slow) RGB->YUV conversion
For example, to create a postscript file that will render only the black
pixels of a bilevel image, use:
+.nf
gm convert bilevel.tif -define ps:imagemask eps3:stencil.ps
-
+.fi
.TP
.B "-delay \fI<1/100ths of a second>"\fP
\fRdisplay the next image after pausing
@@ -1969,6 +1994,7 @@ be treated after being displayed.
Here are the valid methods:
+.nf
Undefined No disposal specified.
None Do not dispose between frames.
Background Overwrite the image area with
@@ -1976,7 +2002,7 @@ Here are the valid methods:
Previous Overwrite the image area with
what was there prior to rendering
the image.
-
+.fi
.TP
.B "-dissolve \fI<percent>"\fP
\fRdissolve an image into another by the given percent
@@ -2006,6 +2032,7 @@ Use this option to annotate an image with one or more graphic primitives.
The primitives include shapes, text, transformations,
and pixel operations. The shape primitives are
+.nf
point x,y
line x0,y0 x1,y1
rectangle x0,y0 x1,y1
@@ -2018,18 +2045,20 @@ and pixel operations. The shape primitives are
Bezier x0,y0 ... xn,yn
path path specification
image operator x0,y0 w,h filename
-
+.fi
The text primitive is
+.nf
text x0,y0 string
-
+.fi
The text gravity primitive is
+.nf
gravity NorthWest, North, NorthEast, West, Center,
East, SouthWest, South, or SouthEast
-
+.fi
The text gravity primitive only affects the placement of text and
does not interact with the other primitives. It is equivalent to
@@ -2038,18 +2067,20 @@ limited in scope to the \fB-draw\fP option in which it appears.
The transformation primitives are
+.nf
rotate degrees
translate dx,dy
scale sx,sy
skewX degrees
skewY degrees
-
+.fi
The pixel operation primitives are
+.nf
color x0,y0 method
matte x0,y0 method
-
+.fi
The shape primitives are drawn in the color specified in the preceding
\fB-stroke\fP option. Except for the \fBline\fP and \fBpoint\fP
@@ -2083,8 +2114,9 @@ Coordinates are integers separated by an optional comma. For example,
to define a circle centered at 100,100
that extends to 150,150 use:
+.nf
-draw 'circle 100,100 150,150'
-
+.fi
\fBPaths\fP
(See Paths)
@@ -2101,8 +2133,9 @@ Use \fBimage\fP to composite an image with another image. Follow the
image keyword with the composite operator, image location, image size,
and filename:
+.nf
-draw 'image Over 100,100 225,225 image.jpg'
-
+.fi
You can use 0,0 for the image size, which means to use the actual
dimensions found in the image header. Otherwise, it will
@@ -2118,6 +2151,7 @@ special format character. See \fB-comment\fP for details.
For example,
+.nf
-draw 'text 100,100 "%m:%f %wx%h"'
@@ -2154,12 +2188,13 @@ Use \fBcolor\fP to change the color of a pixel to the fill color (see
\fB-fill\fP). Follow the pixel coordinate
with a method:
+.nf
point
replace
floodfill
filltoborder
reset
-
+.fi
Consider the target pixel as that specified by your coordinate. The
\fBpoint\fP
@@ -2231,19 +2266,21 @@ For example, this command creates a thumbnail of an image, and centers
it on a red color backdrop image, offsetting the canvas ten pixels to
the left and five pixels up, with respect to the thumbnail:
+.nf
gm convert infile.jpg -thumbnail 120x80 -background red -gravity center \\
-extent 140x100-10-5 outfile.jpg
-
+.fi
This command reduces or expands a JPEG image to fit on an 800x600
display:
+.nf
gm convert -size 800x600 input.jpg \\
-resize 800x600 -background black \\
-compose Copy -gravity center \\
-extent 800x600 \\
-quality 92 output.jpg
-
+.fi
If the aspect ratio of the input image isn't exactly 4:3, then the
image is centered on an 800x600 black canvas.
@@ -2264,6 +2301,7 @@ before the changes are obvious.
Colors are represented in GraphicsMagick in the same form used by SVG. Use "gm convert -list color" to list named colors:
+.nf
name (named color)
#RGB (hex numbers, 4 bits each)
#RRGGBB (8 bits each)
@@ -2275,17 +2313,18 @@ Colors are represented in GraphicsMagick in the same form used by SVG. Use "gm c
#RRRRGGGGBBBBAAAA (16 bits each)
rgb(r,g,b) (r,g,b are decimal numbers)
rgba(r,g,b,a) (r,g,b,a are decimal numbers)
-
+.fi
Enclose the color specification in quotation marks to prevent the "#"
or the parentheses from being interpreted by your shell.
For example,
+.nf
gm convert -fill blue ...
gm convert -fill "#ddddff" ...
gm convert -fill "rgb(65000,65000,65535)" ...
-
+.fi
The shorter forms are scaled up, if necessary by replication. For example,
#3af, #33aaff, and #3333aaaaffff are all equivalent.
@@ -2300,6 +2339,7 @@ Use this option to affect the resizing operation of an image (see
Choose from these filters (ordered by approximate increasing CPU
time):
+.nf
Point
Box
Triangle
@@ -2315,7 +2355,7 @@ time):
Lanczos
Bessel
Sinc
-
+.fi
The default filter is automatically selected to provide the best quality
while consuming a reasonable amount of time. The \fBMitchell\fP filter
@@ -2343,15 +2383,17 @@ image.
For example, this composites an image on top of a 640x400 transparent
black canvas image:
+.nf
gm convert -size 640x300 xc:transparent \\
-compose over -page +0-100 \\
frame.png -flatten output.png
-
+.fi
and this flattens a Photoshop PSD file:
+.nf
gm convert input.psd -flatten output.png
-
+.fi
.TP
.B "-flip"
\fRcreate a "mirror image"
@@ -2401,6 +2443,7 @@ choosing. You can include the image filename, type, width, height,
Exif data, or other image attributes by embedding special format
characters:
+.nf
%b file size
%c comment
%d directory
@@ -2442,12 +2485,13 @@ characters:
\\n newline
\\r carriage return
%% %
-
+.fi
For example,
+.nf
-format "%m:%f %wx%h"
-
+.fi
displays \fBMIFF:bird.miff 512x480\fP for an image
titled \fBbird.miff\fP and whose width is 512 and height is 480.
@@ -2460,6 +2504,7 @@ any readable file on the system (a security risk).
The values of image type (\fB%r\fP) which may be returned include:
+.nf
Bilevel
Grayscale
GrayscaleMatte
@@ -2470,16 +2515,18 @@ The values of image type (\fB%r\fP) which may be returned include:
ColorSeparation
ColorSeparationMatte
Optimize
-
+.fi
You can also use the following special formatting syntax to print Exif
information contained in the file:
+.nf
%[EXIF:<tag>]
-
+.fi
Where "<tag>" may be one of the following:
+.nf
* (print all Exif tags, in keyword=data format)
! (print all Exif tags, in tag_number format)
#hhhh (print data for Exif tag #hhhh)
@@ -2565,23 +2612,25 @@ Where "<tag>" may be one of the following:
SensingMethod
FileSource
SceneType
-
+.fi
JPEG specific information (from reading a JPEG file) may be obtained
like this:
+.nf
%[JPEG-<tag>]
-
+.fi
Where "<tag>" may be one of the following:
+.nf
* (all JPEG-related tags, in
keyword=data format)
Quality IJG JPEG "quality" estimate
Colorspace JPEG colorspace numeric ID
Colorspace-Name JPEG colorspace name
Sampling-factors JPEG sampling factors
-
+.fi
Please note that JPEG has no notion of "quality" and that the quality
metric used by, and estimated by the software is based on the quality
@@ -2873,8 +2922,9 @@ See \fB-comment\fP for details.
For example,
+.nf
-label "%m:%f %wx%h"
-
+.fi
produces an image label of \fBMIFF:bird.miff 512x480\fP for an image titled
\fBbird.miff\fP
@@ -2916,8 +2966,9 @@ sensitive to pixel quantum depth.
For example,
+.nf
-colorspace gray -lat "10x10-5%"
-
+.fi
will help clarify a scanned grayscale or color document, producing a
bi-level equivalent.
@@ -2936,28 +2987,41 @@ interface works similar to Photoshop's "Image->Adjustments->Levels..."
"Input Levels" interface.
.TP
.B "-limit \fI<type> <value>"\fP
-\fRDisk, File, Map, Memory, Pixels, Width, Height or Threads resource limit
+\fRDisk, File, Map, Memory, Pixels, Width, Height, Read, or Threads resource limit
By default, resource limits are estimated based on the available
-resources of the system. The resource limits are \fBDisk\fP, maximum
-total disk space consumed; \fBFile\fP, maximum number of file
-descriptors allowed to be open at once; \fBMap\fP, maximum total
-number of file bytes which may be memory mapped; \fBMemory\fP,
-maximum total number of bytes of heap memory used for image storage;
-\fBPixels\fP, maximum absolute image size (per image); \fBWidth\fP,
-maximum image pixels width; \fBHeight\fP, maximum image pixels
-height; and \fBThreads\fP, the maximum number of worker threads to
-use per OpenMP thread team.
-
-These resource limits are used to decide if (for a given image) the
-decoded image ("pixel cache") should be stored in heap memory (RAM),
-in a memory-mapped disk file, or in a disk file accessed via
-read/write I/O. The number of total pixels in one image, and/or the
-width/height, may also be limited in order to force the reading, or
-creation of images larger than the limit (in pixels) to intentionally
-fail. The disk limit establishes an overall limit since using the disk
-is the means of last resort. When the disk limit has been reached, no
-more images may be read.
+resources and capabilities of the system. The resource limits are
+\fBDisk\fP, maximum total disk space consumed; \fBFile\fP, maximum
+number of file descriptors allowed to be open at once; \fBMap\fP,
+maximum total number of file bytes which may be memory mapped;
+\fBMemory\fP, maximum total number of bytes of heap memory used for
+image storage; \fBPixels\fP, maximum absolute image size (per image);
+\fBWidth\fP, maximum image pixels width; \fBHeight\fP, maximum image
+pixels height; \fBRead\fP, maximum number of uncompressed bytes to
+read; and \fBThreads\fP, the maximum number of worker threads to use
+per OpenMP thread team.
+
+The \fBDisk\fP and \fBMap\fP resource limits are used to decide if
+(for a given image) the decoded image ("pixel cache") should be stored
+in heap memory (RAM), in a memory-mapped disk file, or in a disk file
+accessed via read/write I/O.
+
+The number of total pixels in one image (\fBPixels\fP), and/or the
+width/height (\fBWidth\fP/\fBHeight\fP), may be limited in order to
+force the reading, or creation of images larger than the limit (in
+pixels) to intentionally fail. The disk limit (\fBDisk\fP)
+establishes an overall limit since using the disk is the means of last
+resort. When the disk limit has been reached, no more images may be
+read.
+
+The amount of uncompressed data read when reading one image may be
+limited by the \fBRead\fP limit. Reading the image fails when the
+limit is hit. This option is useful if the data is read from a stream
+(pipe) or from a compressed file such as a gzipped file. Some files
+are very compressable and so a small compressed file can decompress to
+a huge amount of data. This option also defends against files which
+produce seemingly endless loops while decoding by seeking backwards in
+the file.
The value argument is an absolute value, but may have standard binary
suffix characters applied ('K', 'M', 'G', 'T', 'P', 'E') to apply a
@@ -2971,10 +3035,11 @@ Resource limits may also be set using environment variables. The
environment variables \fBMAGICK_LIMIT_DISK\fP,
\fBMAGICK_LIMIT_FILES\fP, \fBMAGICK_LIMIT_MAP\fP,
\fBMAGICK_LIMIT_MEMORY\fP, \fBMAGICK_LIMIT_PIXELS\fP,
-\fBMAGICK_LIMIT_WIDTH\fP, \fBMAGICK_LIMIT_HEIGHT\fP,and
-\fBOMP_NUM_THREADS\fP may be used to set the limits for disk space,
-open files, memory mapped size, heap memory, per-image pixels, image
-width, image height, and threads respectively.
+\fBMAGICK_LIMIT_WIDTH\fP, \fBMAGICK_LIMIT_HEIGHT\fP.
+\fBMAGICK_LIMIT_READ\fP, and \fBOMP_NUM_THREADS\fP may be used to
+set the limits for disk space, open files, memory mapped size, heap
+memory, per-image pixels, image width, image height, and threads
+respectively.
Use the option -list resource list the current limits.
.TP
@@ -2999,6 +3064,7 @@ option is active.
You can display the following components by embedding
special format characters:
+.nf
%d domain
%e event
%f function
@@ -3011,12 +3077,13 @@ special format characters:
%% percent sign
\\n newline
\\r carriage return
-
+.fi
For example:
+.nf
gm convert -debug coders -log "%u %m:%l %e" in.gif out.png
-
+.fi
The default behavior is to print all of the components.
.TP
@@ -3061,13 +3128,14 @@ option appears after all of the input images, all images are mapped.
Choose from these \fIStandard Colormap\fP types:
+.nf
best
default
gray
red
green
blue
-
+.fi
The \fIX server\fP must support the \fIStandard Colormap\fP you choose,
otherwise an error occurs. Use \fBlist\fP as the type and \fBdisplay\fP
@@ -3207,12 +3275,13 @@ The following is an example of composing an image based on red, green,
and blue layers extracted from a sequence of images and pasted on the
canvas image at specified offsets:
+.nf
gm convert -background black \\
-compose CopyRed -page +0-100 red.png \\
-compose CopyGreen -page +0+40 green.png \\
-compose CopyBlue -page +0+180 blue.png \\
-mosaic output.png
-
+.fi
.TP
.B "-motion-blur \fI<radius>{x<sigma>}{+angle}"\fP
\fRSimulate motion blur
@@ -3251,6 +3320,7 @@ Use \fB+noise\fP followed by a noise type to add noise to an image.
The noise added modulates the existing image pixels. Choose from these
noise types:
+.nf
Uniform
Gaussian
Multiplicative
@@ -3258,7 +3328,7 @@ noise types:
Laplacian
Poisson
Random (uniform distribution)
-
+.fi
.TP
.B "-noop"
\fRNOOP (no option)
@@ -3337,7 +3407,7 @@ The following is a description of the operators:
.in 15
.B "Add"
.in 20
-\fR
+ \fR
.in 20
Result is rvalue added to channel value.
@@ -3345,7 +3415,7 @@ Result is rvalue added to channel value.
.in 15
.B "And"
.in 20
-\fR
+ \fR
.in 20
Result is the logical AND of rvalue with channel value.
@@ -3353,7 +3423,7 @@ Result is the logical AND of rvalue with channel value.
.in 15
.B "Assign"
.in 20
-\fR
+ \fR
.in 20
Result is rvalue.
@@ -3361,7 +3431,7 @@ Result is rvalue.
.in 15
.B "Depth"
.in 20
-\fR
+ \fR
.in 20
Result is channel value adjusted so that it may be (approximately)
stored in the specified number of bits without additional loss.
@@ -3370,7 +3440,7 @@ stored in the specified number of bits without additional loss.
.in 15
.B "Divide"
.in 20
-\fR
+ \fR
.in 20
Result is channel value divided by rvalue.
@@ -3378,7 +3448,7 @@ Result is channel value divided by rvalue.
.in 15
.B "Gamma"
.in 20
-\fR
+ \fR
.in 20
Result is channel value gamma adjusted by rvalue.
@@ -3386,7 +3456,7 @@ Result is channel value gamma adjusted by rvalue.
.in 15
.B "LShift"
.in 20
-\fR
+ \fR
.in 20
Result is channel value bitwise left shifted by rvalue bits.
@@ -3394,7 +3464,7 @@ Result is channel value bitwise left shifted by rvalue bits.
.in 15
.B "Log"
.in 20
-\fR
+ \fR
.in 20
Result is computed as log(value*rvalue+1)/log(rvalue+1).
@@ -3402,7 +3472,7 @@ Result is computed as log(value*rvalue+1)/log(rvalue+1).
.in 15
.B "Max"
.in 20
-\fR
+ \fR
.in 20
Result is assigned to rvalue if rvalue is greater than value.
@@ -3410,7 +3480,7 @@ Result is assigned to rvalue if rvalue is greater than value.
.in 15
.B "Min"
.in 20
-\fR
+ \fR
.in 20
Result is assigned to rvalue if rvalue is less than value.
@@ -3418,7 +3488,7 @@ Result is assigned to rvalue if rvalue is less than value.
.in 15
.B "Multiply"
.in 20
-\fR
+ \fR
.in 20
Result is channel value multiplied by rvalue.
@@ -3426,7 +3496,7 @@ Result is channel value multiplied by rvalue.
.in 15
.B "Negate"
.in 20
-\fR
+ \fR
.in 20
Result is inverse of channel value (like a film negative). An rvalue
must be supplied but is currently not used. Inverting the image twice
@@ -3436,7 +3506,7 @@ results in the original image.
.in 15
.B "Or"
.in 20
-\fR
+ \fR
.in 20
Result is the logical OR of rvalue with channel value.
@@ -3444,7 +3514,7 @@ Result is the logical OR of rvalue with channel value.
.in 15
.B "Pow"
.in 20
-\fR
+ \fR
.in 20
Result is computed as pow(value,rvalue). Similar to Gamma except that
rvalue is not inverted.
@@ -3453,7 +3523,7 @@ rvalue is not inverted.
.in 15
.B "RShift"
.in 20
-\fR
+ \fR
.in 20
Result is channel value bitwise right shifted by rvalue bits.
@@ -3461,7 +3531,7 @@ Result is channel value bitwise right shifted by rvalue bits.
.in 15
.B "Subtract"
.in 20
-\fR
+ \fR
.in 20
Result is channel value minus rvalue.
@@ -3469,7 +3539,7 @@ Result is channel value minus rvalue.
.in 15
.B "Threshold"
.in 20
-\fR
+ \fR
.in 20
Result is maximum (white) if channel value is greater than rvalue,
or minimum (black) if it is less than or equal to rvalue. If \fBall\fP
@@ -3480,7 +3550,7 @@ intensity.
.in 15
.B "Threshold-white"
.in 20
-\fR
+ \fR
.in 20
Result is maximum (white) if channel value is greater than rvalue and
is unchanged if it is less than or equal to rvalue. This can be used to
@@ -3492,7 +3562,7 @@ intensity.
.in 15
.B "Threshold-White-Negate"
.in 20
-\fR
+ \fR
.in 20
Result is set to black if channel value is greater than
rvalue and is unchanged if it is less than or equal to rvalue. If
@@ -3503,7 +3573,7 @@ computed pixel intensity.
.in 15
.B "Threshold-black"
.in 20
-\fR
+ \fR
.in 20
Result is minimum (black) if channel value is less than than rvalue
and is unchanged if it is greater than or equal to rvalue. This can be
@@ -3515,7 +3585,7 @@ computed pixel intensity.
.in 15
.B "Threshold-Black-Negate"
.in 20
-\fR
+ \fR
.in 20
Result is set to white if channel value is less than than
rvalue and is unchanged if it is greater than or equal to rvalue. If
@@ -3526,7 +3596,7 @@ computed pixel intensity.
.in 15
.B "Xor"
.in 20
-\fR
+ \fR
.in 20
Result is the logical XOR of rvalue with channel value. An
interesting property of XOR is that performing the same operation twice
@@ -3536,7 +3606,7 @@ results in the original value.
.in 15
.B "Noise-Gaussian"
.in 20
-\fR
+ \fR
.in 20
Result is the current channel value modulated with gaussian noise
according to the intensity specified by rvalue.
@@ -3545,7 +3615,7 @@ according to the intensity specified by rvalue.
.in 15
.B "Noise-Impulse"
.in 20
-\fR
+ \fR
.in 20
Result is the current channel value modulated with impulse noise
according to the intensity specified by rvalue.
@@ -3554,7 +3624,7 @@ according to the intensity specified by rvalue.
.in 15
.B "Noise-Laplacian"
.in 20
-\fR
+ \fR
.in 20
Result is the current channel value modulated with laplacian noise
according to the intensity specified by rvalue.
@@ -3563,7 +3633,7 @@ according to the intensity specified by rvalue.
.in 15
.B "Noise-Multiplicative"
.in 20
-\fR
+ \fR
.in 20
Result is the current channel value modulated with multiplicative
gaussian noise according to the intensity specified by rvalue.
@@ -3572,7 +3642,7 @@ gaussian noise according to the intensity specified by rvalue.
.in 15
.B "Noise-Poisson"
.in 20
-\fR
+ \fR
.in 20
Result is the current channel value modulated with poisson noise
according to the intensity specified by rvalue.
@@ -3581,7 +3651,7 @@ according to the intensity specified by rvalue.
.in 15
.B "Noise-Random"
.in 20
-\fR
+ \fR
.in 20
Result is the current channel value modulated with random (uniform
distribution) noise according to the intensity specified by rvalue.
@@ -3592,7 +3662,7 @@ quantum span.
.in 15
.B "Noise-Uniform"
.in 20
-\fR
+ \fR
.in 20
Result is the channel value with uniform noise applied according to
the intensity specified by rvalue.
@@ -3605,14 +3675,16 @@ As an example, the \fBAssign\fP operator assigns a fixed value to a
channel. For example, this command sets the red channel to the mid-range
value:
+.nf
gm convert in.bmp -operator red assign "50%" out.bmp
-
+.fi
The following applies 50% thresholding to the image and returns a gray
image:
+.nf
gm convert in.bmp -operator gray threshold "50%" out.bmp
-
+.fi
.TP
.B "-ordered-dither \fI<channeltype> <NxN>"\fP
\fRordered dither the image
@@ -3691,6 +3763,7 @@ Use this option to specify the dimensions of the
in dots per inch or a TEXT page in pixels. The choices for a PostScript
page are:
+.nf
11x17 792 1224
Ledger 1224 792
Legal 612 1008
@@ -3729,7 +3802,7 @@ page are:
Flsa 612 936
Flse 612 936
HalfLetter 396 612
-
+.fi
For convenience you can specify the page size by media (e.g. A4, Ledger,
etc.). Otherwise, \fB-page\fP behaves much like
@@ -3807,6 +3880,7 @@ Use this option to affect the preview operation of an image (e.g.
convert file.png -preview Gamma Preview:gamma.png). Choose
from these previews:
+.nf
Rotate
Shear
Roll
@@ -3836,7 +3910,7 @@ from these previews:
OilPaint
CharcoalDrawing
JPEG
-
+.fi
The default preview is \fBJPEG\fP.
.TP
@@ -3844,7 +3918,7 @@ The default preview is \fBJPEG\fP.
\fRprocess a sequence of images using a process module
The command argument has the form \fBmodule=arg1,arg2,arg3,...,argN\fP
-where \fBmodule\fP is the name of the module to invoke (e.g. "analyze")
+where \fBmodule\fP is the name of the module to invoke (e.g. "Analyze")
and arg1,arg2,arg3,...,argN are an arbitrary number of arguments to
pass to the process module.
The sequence of images
@@ -3852,6 +3926,15 @@ is terminated by the appearance of any option.
If the \fB-process\fP
option appears after all of the input images, all images are processed.
+
+For example:
+
+.nf
+ gm convert logo: -process Analyze= \\
+ -format "%[BrightnessMean],%[BrightnessStddev]" info:-
+ 51952,23294
+
+.nf
.TP
.B "-profile \fI<filename>"\fP
\fRadd ICM, IPTC, or generic profile to image
@@ -3883,8 +3966,9 @@ For example, to extract the Exif data (which is stored in JPEG files
in the \fIAPP1\fP profile), use
+.nf
gm convert cockatoo.jpg exifdata.app1
-
+.fi
Note that GraphicsMagick does not attempt to update any profile to
reflect changes made to the image, e.g., rotation from portrait to landscape
orientation, so it is possible that the preserved profile may contain
@@ -3938,12 +4022,13 @@ necessarily the worst compression.
If
filter-type is 4 or less, the specified filter-type is used for all scanlines:
+.nf
0: none
1: sub
2: up
3: average
4: Paeth
-
+.fi
If filter-type is 5, adaptive filtering is used when quality is greater
than 50 and the image does not have a color map, otherwise no filtering
@@ -4039,60 +4124,67 @@ based on an alteration of the identity matrix.
Identity matrix of order 3
+.nf
1 0 0
0 1 0
0 0 1
-
+.fi
which may be formatted into a convenient matrix argument similar to
(comma is treated as white space):
+.nf
-recolor "1 0 0, 0 1 0, 0 0 1"
-
+.fi
Identity matrix of order 4
+.nf
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
-
+.fi
Identity matrix of order 5. The last row is required to exist
for the purpose of parsing, but is otherwise not used.
+.nf
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
-
+.fi
As an example, an image wrongly in BGR channel order may be converted
to RGB using this matrix (blue->red, red->blue):
+.nf
0 0 1
0 1 0
1 0 0
-
+.fi
and an RGB image using standard Rec.709 primaries may be converted
to grayscale using this matrix of standard weighting factors:
+.nf
0.2126 0.7152 0.0722
0.2126 0.7152 0.0722
0.2126 0.7152 0.0722
-
+.fi
and contrast may be reduced by scaling down by 80% and adding a 10%
offset:
+.nf
0.8 0.0 0.0 0.0 0.1
0.0 0.8 0.0 0.0 0.1
0.0 0.0 0.8 0.0 0.1
0.0 0.0 0.0 0.8 0.1
0.0 0.0 0.0 0.0 1.0
-
+.fi
.TP
.B "-red-primary \fI<x>,<y>"\fP
\fRred chromaticity primary point
@@ -4256,13 +4348,15 @@ number. You
can change this behavior by embedding a \fB%d, %0Nd, %o, %0No, %x, or %0Nx
printf\fP format specification in the file name. For example,
+.nf
gm montage -scenes 5-7 image.miff montage.miff
-
+.fi
makes a montage of files image.miff.5, image.miff.6, and image.miff.7, and
+.nf
gm animate -scenes 0-12 image%02d.miff
-
+.fi
animates files image00.miff, image01.miff, through image12.miff.
.TP
@@ -4369,12 +4463,13 @@ of colors in a \fBMAP\fP image file, (e.g. -size 640x512+256).
For Photo CD images, choose from these sizes:
+.nf
192x128
384x256
768x512
1536x1024
3072x2048
-
+.fi
Finally, use this option to choose a particular resolution layer of a JBIG
or JPEG image (e.g. -size 1024x768).
@@ -4468,8 +4563,9 @@ is applied, then the threshold is a percentage of the available range.
To efficiently create a black and white image from a color image, use
+.nf
gm convert -threshold 50% in.png out.png
-
+.fi
The optimum threshold value depends on the nature of the image.
In order to threshold individual channels, use the \fB-operator\fP
@@ -4505,8 +4601,9 @@ option.
For example,
+.nf
-title "%m:%f %wx%h"
-
+.fi
produces an image title of MIFF:bird.miff 512x480 for an image
titled bird.miff and whose width is 512 and height is 480.
@@ -4517,8 +4614,9 @@ titled bird.miff and whose width is 512 and height is 480.
This option applies the transformation matrix from a previous
\fB-affine\fP option.
+.nf
gm convert -affine 2,2,-2,2,0,0 -transform bird.ppm bird.jpg
-
+.fi
.TP
.B "-transparent \fI<color>"\fP
\fRmake this color transparent within the image
@@ -4577,8 +4675,9 @@ Sometimes a specific subformat is desired. For example, to force a JPEG
image to be written in TrueColor RGB format even though only gray pixels
are present, use
+.nf
gm convert bird.pgm -type TrueColor bird.jpg
-
+.fi
Similarly, using -type TrueColorMatte will force the encoder to
write an alpha channel even though the image is opaque, if the output
@@ -4588,8 +4687,9 @@ Some pseudo-formats (e.g. the XC format) will respect the requested
type if it occurs previously on the command line. For example, to obtain
a DirectClass solid color canvas image rather than PsuedoClass, use
+.nf
gm convert -size 640x480 -type TrueColor xc:red red.miff
-
+.fi
Likewise, specify \fB-type\fP \fBBilevel\fP, \fBGrayscale\fP,
\fBTrueColor\fP, or \fBTrueColorMatte\fP prior to reading a Postscript
@@ -4629,7 +4729,7 @@ The parameters are:
.in 15
.B "radius"
.in 20
-\fR
+ \fR
.in 20
The radius of the Gaussian, in pixels, not counting the center pixel (default 0).
@@ -4638,7 +4738,7 @@ The radius of the Gaussian, in pixels, not counting the center pixel (default 0)
.in 15
.B "sigma"
.in 20
-\fR
+ \fR
.in 20
The standard deviation of the Gaussian, in pixels (default 1.0).
@@ -4647,7 +4747,7 @@ The standard deviation of the Gaussian, in pixels (default 1.0).
.in 15
.B "amount"
.in 20
-\fR
+ \fR
.in 20
The percentage of the difference between the original and the blur image that
@@ -4657,7 +4757,7 @@ is added back into the original (default 1.0).
.in 15
.B "threshold"
.in 20
-\fR
+ \fR
.in 20
The threshold, as a fraction of MaxRGB, needed to apply the difference
@@ -4707,7 +4807,7 @@ Choose from these methods:
.in 15
.B "Constant"
.in 20
-\fR
+ \fR
.in 20
Use the image background color.
@@ -4716,7 +4816,7 @@ Use the image background color.
.in 15
.B "Edge"
.in 20
-\fR
+ \fR
.in 20
Extend the edge pixel toward infinity (default).
@@ -4725,7 +4825,7 @@ Extend the edge pixel toward infinity (default).
.in 15
.B "Mirror"
.in 20
-\fR
+ \fR
.in 20
Mirror the image.
@@ -4734,7 +4834,7 @@ Mirror the image.
.in 15
.B "Tile"
.in 20
-\fR
+ \fR
.in 20
Tile the image.
@@ -4751,6 +4851,7 @@ virtual pixels such as \fB-blur\fP, \fB-sharpen\fP, \fB-wave\fP, etc.
Choose from these visual classes:
+.nf
StaticGray
GrayScale
StaticColor
@@ -4759,7 +4860,7 @@ Choose from these visual classes:
DirectColor
default
visual id
-
+.fi
The X server must support the visual you choose, otherwise an error occurs.
If a visual is not specified, the visual class that can display the most
@@ -4816,9 +4917,10 @@ processing continues using that image. The following is an example of how
several sizes of an image may be generated in one command (repeat as
often as needed):
+.nf
gm convert input.jpg -resize 50% -write input50.jpg \\
-resize 25% input25.jpg
-
+.fi
.TP
.B "-write \fI<filename>"\fP
\fRwrite the image to a file [\fIdisplay\fP]
@@ -4991,6 +5093,15 @@ immediately. This is a per-image limit and does not limit the total
number of pixels due to multiple image frames/pages (e.g. multi-page
document or an animation).
.TP
+.B "MAGICK_LIMIT_READ"
+\fRMaximum number of uncompressed bytes which may be read while
+decoding an image. Each read by the software from the input file is
+counted against the total, even if it has been read before. Decoding
+fails when the limit is reached. This limit helps defend against
+highly compressed files (e.g. via gzip), or files which use complex
+looping structures, or when data is being read from a stream
+(pipe).
+.TP
.B "MAGICK_LIMIT_WIDTH"
\fRMaximum pixel width of an image read, or created.
.TP
@@ -5024,12 +5135,13 @@ GraphicsMagick uses a number of XML format configuration files:
.B "colors.mgk"
\fRcolors configuration file
+.nf
<?xml version="1.0"?>
<colormap>
<color name="AliceBlue" red="240" green="248" blue="255"
compliance="SVG, X11, XPM" />
</colormap>
-
+.fi
.TP
.B "delegates.mgk"
\fRdelegates configuration file
@@ -5037,6 +5149,7 @@ GraphicsMagick uses a number of XML format configuration files:
.B "log.mgk"
\fRlogging configuration file
+.nf
<?xml version="1.0"?>
<magicklog>
<log events="None" />
@@ -5046,20 +5159,22 @@ GraphicsMagick uses a number of XML format configuration files:
<log limit="2000" />
<log format="%t %r %u %p %m/%f/%l/%d:\\n %e" />
</magicklog>
-
+.fi
.TP
.B "modules.mgk"
\fRloadable modules configuration file
+.nf
<?xml version="1.0"?>
<modulemap>
<module magick="8BIM" name="META" />
</modulemap>
-
+.fi
.TP
.B "type.mgk"
\fRmaster type (fonts) configuration file
+.nf
<?xml version="1.0"?>
<typemap>
<\fB\fPinclude file="type-windows.mgk" />
@@ -5076,7 +5191,7 @@ GraphicsMagick uses a number of XML format configuration files:
glyphs="/usr/local/share/ghostscript/fonts/a010013l.pfb"
/>
</typemap>
-
+.fi
.SH GM ANIMATE
\fBAnimate\fP displays a sequence of images on any workstation display
@@ -5106,22 +5221,25 @@ it eliminates the need to compute a global colormap.
To animate a set of images of a cockatoo, use:
+.nf
gm animate cockatoo.*
-
+.fi
To animate a cockatoo image sequence while using the Standard Colormap
\fIbest\fP, use:
+.nf
xstdcmap -best
gm animate -map best cockatoo.*
-
+.fi
To animate an image of a cockatoo without a border centered on a backdrop,
use:
+.nf
gm animate +borderwidth -backdrop cockatoo.*
-
+.fi
.SH OPTIONS
For a more detailed description of each option, see
@@ -5207,7 +5325,7 @@ Options, above.
\fRthe type of interlacing scheme
.TP
.B "-limit \fI<type> <value>"\fP
-\fRDisk, File, Map, Memory, Pixels, Width, Height or Threads resource limit
+\fRDisk, File, Map, Memory, Pixels, Width, Height, Read, or Threads resource limit
.TP
.B "-log \fI<string>"\fP
\fRSpecify format for debug log
@@ -5292,9 +5410,10 @@ with 32 colors, the second with an unlimited number of colors, and the
third with only 16 colors, use:
+.nf
gm animate -colors 32 cockatoo.1 -noop cockatoo.2
-colors 16 cockatoo.3
-
+.fi
\fBAnimate\fP options can appear on the command line or in your X resources
file. See \fIX(1)\fP. Options on the command line supersede values specified
@@ -5347,21 +5466,21 @@ particular command.
.in 15
.B "\fBCtl+O\fP"
.in 20
-\fR
+ \fR
.in 20
Press to load an image from a file.
.in 15
.in 15
.B "\fBspace\fP"
.in 20
-\fR
+ \fR
.in 20
Press to display the next image in the sequence.
.in 15
.in 15
.B "\fB<\fP"
.in 20
-\fR
+ \fR
.in 20
Press to speed-up the display of the images. Refer to
\fB-delay\fP for more information.
@@ -5369,7 +5488,7 @@ Press to speed-up the display of the images. Refer to
.in 15
.B "\fB>\fP"
.in 20
-\fR
+ \fR
.in 20
Press to slow the display of the images. Refer to
\fB-delay\fP for more information.
@@ -5377,7 +5496,7 @@ Press to slow the display of the images. Refer to
.in 15
.B "\fB?\fP"
.in 20
-\fR
+ \fR
.in 20
Press to display information about the image. Press
any key or button to erase the information.
@@ -5389,14 +5508,14 @@ and the total number of unique colors in the image.
.in 15
.B "\fBF1\fP"
.in 20
-\fR
+ \fR
.in 20
Press to display helpful information about \fBanimate(1)\fP.
.in 15
.in 15
.B "\fBCtl-q\fP"
.in 20
-\fR
+ \fR
.in 20
Press to discard all images and exit program.
.in 15
@@ -5414,7 +5533,7 @@ the \fBanimate\fP program uses the following X resources:
.in 15
.B "\fBbackground\fP \fB(\fP\fIclass\fP \fBBackground)\fP"
.in 20
-\fR
+ \fR
.in 20
Specifies the preferred color to use for the Image window background. The
@@ -5423,7 +5542,7 @@ default is #ccc.
.in 15
.B "\fBborderColor\fP \fB(\fP\fIclass\fP \fBBorderColor)\fP"
.in 20
-\fR
+ \fR
.in 20
Specifies the preferred color to use for the Image window border. The default
@@ -5432,7 +5551,7 @@ is #ccc.
.in 15
.B "\fBborderWidth\fP \fB(\fP\fIclass\fP \fBBorderWidth)\fP"
.in 20
-\fR
+ \fR
.in 20
Specifies the width in pixels of the Image window border. The default is
@@ -5441,7 +5560,7 @@ Specifies the width in pixels of the Image window border. The default is
.in 15
.B "\fBfont\fP \fB(\fP\fIclass\fP \fBFont\fP \fBor\fP \fBFontList)\fP"
.in 20
-\fR
+ \fR
.in 20
Specifies the name of the preferred font to use in normal formatted text.
@@ -5450,7 +5569,7 @@ The default is 14 point \fIHelvetica\fP.
.in 15
.B "\fBforeground\fP \fB(\fP\fIclass\fP \fBForeground)\fP"
.in 20
-\fR
+ \fR
.in 20
Specifies the preferred color to use for text within the Image window.
@@ -5459,7 +5578,7 @@ The default is black.
.in 15
.B "\fBgeometry\fP \fB(\fP\fIclass\fP \fBgeometry)\fP"
.in 20
-\fR
+ \fR
.in 20
Specifies the preferred size and position of the image window. It is not
@@ -5472,7 +5591,7 @@ to the bottom edge of the icon.
.in 15
.B "\fBiconGeometry\fP \fB(\fP\fIclass\fP \fBIconGeometry)\fP"
.in 20
-\fR
+ \fR
.in 20
Specifies the preferred size and position of the application when iconified.
@@ -5482,7 +5601,7 @@ Offsets, if present, are handled in the same manner as in class Geometry.
.in 15
.B "\fBiconic\fP \fB(\fP\fIclass\fP \fBIconic)\fP"
.in 20
-\fR
+ \fR
.in 20
This resource indicates that you would prefer that the application's windows
@@ -5492,7 +5611,7 @@ by you. Window managers may choose not to honor the application's request.
.in 15
.B "\fBmatteColor\fP \fB(\fP\fIclass\fP \fBMatteColor)\fP"
.in 20
-\fR
+ \fR
.in 20
Specify the color of windows. It is used for the backgrounds of windows,
@@ -5502,7 +5621,7 @@ colors derived from this color. Default value: #ddd.
.in 15
.B "\fBname\fP \fB(\fP\fIclass\fP \fBName)\fP"
.in 20
-\fR
+ \fR
.in 20
This resource specifies the name under which resources for the application
@@ -5513,7 +5632,7 @@ to alter the executable file name. The default is the application name.
.in 15
.B "\fBsharedMemory\fP \fB(\fP\fIclass\fP \fBSharedMemory)\fP"
.in 20
-\fR
+ \fR
.in 20
This resource specifies whether animate should attempt use shared memory
@@ -5524,7 +5643,7 @@ is ignored. The default is True.
.in 15
.B "\fBtext_font\fP \fB(\fP\fIclass\fP \fBtextFont)\fP"
.in 20
-\fR
+ \fR
.in 20
Specifies the name of the preferred font to use in fixed (typewriter style)
@@ -5533,7 +5652,7 @@ formatted text. The default is 14 point \fICourier\fP.
.in 15
.B "\fBtitle\fP \fB(\fP\fIclass\fP \fBTitle)\fP"
.in 20
-\fR
+ \fR
.in 20
This resource specifies the title to be used for the Image window. This
@@ -5558,18 +5677,20 @@ converts all files matching '*.jpg' to TIFF format while rotating each
file by 90 degrees and stripping all embedded profiles. The shell
script syntax is standard Unix shell:
+.nf
for file in *.jpg
do
outfile=`basename $file .jpg`.tiff
echo convert -verbose "'$file'" -rotate 90 \\
+profile "'*'" "'$outfile'"
done | gm batch -echo on -feedback on -
-
+.fi
We can accomplish the same as the previous example by putting all the
commands in a text file and then specifying the name of the text file
as the script to execute:
+.nf
for file in *.jpg
do
outfile=`basename $file .jpg`.tiff
@@ -5577,7 +5698,7 @@ as the script to execute:
+profile "'*'" "'$outfile'"
done > script.txt
gm batch -echo on -feedback on script.txt
-
+.fi
.SH OPTIONS
Options are processed from left to right and must appear before any filename argument.
@@ -5651,27 +5772,31 @@ run once.
To obtain benchmark information for a single execution of a
command:
+.nf
gm benchmark convert input.ppm -gaussian 0x1 output.ppm
-
+.fi
To obtain benchmark information from 100 iterations of the
command:
+.nf
gm benchmark -iterations 100 convert input.ppm \\
-gaussian 0x1 output.ppm
-
+.fi
To obtain benchmark information by iterating the command until a
specified amount of time (in seconds) has been consumed:
+.nf
gm benchmark -duration 30 convert input.ppm \\
-gaussian 0x1 output.ppm
-
+.fi
To obtain a full performance report with an increasing number of
threads (1-32 threads, stepping the number of threads by four each
time):
+.nf
gm benchmark -duration 3 -stepthreads 4 convert \\
input.ppm -gaussian 0x2 output.ppm
-
+.fi
Here is the interpretation of the output:
\fBthreads\fP - number of threads used.
@@ -5743,14 +5868,16 @@ should have the same dimensions as \fIreference-image\fP.
To compare two images using Mean Square Error (MSE) statistical analysis
use:
+.nf
gm compare -metric mse original.miff compare.miff
-
+.fi
To create an annotated difference image use:
+.nf
gm compare -highlight-style assign -highlight-color purple \\
-file diff.miff original.miff compare.miff
-
+.fi
.SH OPTIONS
Options are processed in command line order. Any option you specify on
@@ -5764,9 +5891,15 @@ Options, above.
.B "-authenticate \fI<string>"\fP
\fRdecrypt image with this password
.TP
+.B "-auto-orient"
+\fRorient (rotate) image so it is upright
+.TP
.B "-colorspace \fI<value>"\fP
\fRthe type of colorspace
.TP
+.B "-compress \fI<type>"\fP
+\fRthe type of image compression
+.TP
.B "-debug \fI<events>"\fP
\fRenable debug printout
.TP
@@ -5801,7 +5934,7 @@ Options, above.
\fRthe type of interlacing scheme
.TP
.B "-limit \fI<type> <value>"\fP
-\fRDisk, File, Map, Memory, Pixels, Width, Height or Threads resource limit
+\fRDisk, File, Map, Memory, Pixels, Width, Height, Read, or Threads resource limit
.TP
.B "-log \fI<string>"\fP
\fRSpecify format for debug log
@@ -5854,37 +5987,42 @@ information.
To composite an image of a cockatoo with a perch, use:
+.nf
gm composite cockatoo.miff perch.ras composite.miff
-
+.fi
To compute the difference between images in a series, use:
+.nf
gm composite -compose difference series.2 series.1
difference.miff
-
+.fi
To composite an image of a cockatoo with a perch starting at location (100,150),
use:
+.nf
gm composite -geometry +100+150 cockatoo.miff
perch.ras composite.miff
-
+.fi
To tile a logo across your image of a cockatoo, use
+.nf
gm convert +shade 30x60 cockatoo.miff mask.miff
gm composite -compose bumpmap -tile logo.png
cockatoo.miff mask.miff composite.miff
-
+.fi
To composite a red, green, and blue color plane into a single composite image,
try
+.nf
gm composite -compose CopyGreen green.png red.png
red-green.png
gm composite -compose CopyBlue blue.png red-green.png
gm composite.png
-
+.fi
.SH OPTIONS
Options are processed in command line order. Any option you specify on
@@ -5977,7 +6115,7 @@ Options, above.
\fRassign a label to an image
.TP
.B "-limit \fI<type> <value>"\fP
-\fRDisk, File, Map, Memory, Pixels, Width, Height or Threads resource limit
+\fRDisk, File, Map, Memory, Pixels, Width, Height, Read, or Threads resource limit
.TP
.B "-log \fI<string>"\fP
\fRSpecify format for debug log
@@ -6092,6 +6230,7 @@ program, or those that do not have access to a Perl interpreter or a
compiler. The interpreter is called conjure and here is an example
script:
+.nf
<?xml version="1.0" encoding="UTF-8"?>
<image size="400x400" >
<read filename="image.gif" />
@@ -6103,12 +6242,13 @@ script:
to %[width]x%[height].\\n" />
<write filename="image.png" />
</image>
-
+.fi
invoked with
+.nf
gm conjure -dimensions 400x400 incantation.msl
-
+.fi
All operations will closely follow the key/value pairs defined in
PerlMagick, unless otherwise noted.
@@ -6176,7 +6316,7 @@ elements and their attributes:
.in 15
.B "<image>"
.in 20
-\fR
+ \fR
.in 20
background, color, id, size
.in 15
@@ -6191,6 +6331,7 @@ example:
.in 20
+.nf
<image>
<read filename="input.png" />
<get width="base-width" height="base-height" />
@@ -6198,20 +6339,21 @@ example:
<image />
<write filename="output.mng" />
</image>
-
+.fi
.in 15
.in 20
+.nf
<image size="400x400" />
-
+.fi
.in 15
.in 15
.B "<group>"
.in 20
-\fR
+ \fR
.in 20
Define a new group of image objects. By default, images are only
@@ -6221,10 +6363,11 @@ valid for the life of their \fB<image>\fPelement.
.in 20
+.nf
<image> -- creates the image
..... -- do stuff with it
</image> -- dispose of the image
-
+.fi
.in 15
.in 20
@@ -6236,6 +6379,7 @@ life of the group:
.in 20
+.nf
<group> -- start a group
<image> -- create an image
.... -- do stuff
@@ -6245,13 +6389,13 @@ life of the group:
</image> -- NOOP
<write filename="image.mng" /> -- output
</group> -- dispose of both images
-
+.fi
.in 15
.in 15
.B "<read>"
.in 20
-\fR
+ \fR
.in 20
filename
.in 15
@@ -6263,8 +6407,9 @@ Read a new image from a disk file.
.in 20
+.nf
<read filename="image.gif" />
-
+.fi
.in 15
.in 20
@@ -6275,15 +6420,16 @@ To read two images use
.in 20
+.nf
<read filename="image.gif" />
<read filename="image.png />
-
+.fi
.in 15
.in 15
.B "<write>"
.in 20
-\fR
+ \fR
.in 20
filename
.in 15
@@ -6295,12 +6441,13 @@ a single multiple-image file or multiple ones if necessary.
.in 20
+.nf
<write filename=image.tiff" />
-
+.fi
.in 15
.B "<get>"
.in 20
-\fR
+ \fR
.in 20
Get any attribute recognized by
PerlMagick's GetAttribute() and stores it as an image attribute for later
@@ -6309,15 +6456,16 @@ use. Currently only \fIwidth\fP and \fIheight\fP are supported.
.in 20
+.nf
<get width="base-width" height="base-height" />
<print output="Image size is %[base-width]x%[base-height].\\n" />
-
+.fi
.in 15
.in 15
.B "<set>"
.in 20
-\fR
+ \fR
.in 20
background, bordercolor, clip-mask, colorspace, density,
magick, mattecolor, opacity. Set an attribute recognized by
@@ -6326,7 +6474,7 @@ PerlMagick's GetAttribute().
.in 15
.B "<profile>"
.in 20
-\fR
+ \fR
.in 20
[profilename]
.in 15
@@ -6338,8 +6486,9 @@ Read one or more IPTC, ICC or generic profiles from file and assign to image
.in 20
+.nf
<profile iptc="profile.iptc" generic="generic.dat" />
-
+.fi
.in 15
.in 20
@@ -6350,55 +6499,57 @@ To remove a specified profile use "!" as the filename eg
.in 20
+.nf
<profile icm="!" iptc="profile.iptc" />
-
+.fi
.in 15
.in 15
.B "<border>"
.in 20
-\fR
+ \fR
.in 20
fill, geometry, height, width
.in 15
.in 15
.B "<blur>"
.in 20
-\fR
+ \fR
.in 20
radius, sigma
.in 15
.in 15
.B "<charcoal>"
.in 20
-\fR
+ \fR
.in 20
radius, sigma
.in 15
.in 15
.B "<chop>"
.in 20
-\fR
+ \fR
.in 20
geometry, height, width, x, y
.in 15
.in 15
.B "<crop>"
.in 20
-\fR
+ \fR
.in 20
geometry, height, width, x, y
.in 15
.in 15
.B "<composite>"
.in 20
-\fR
+ \fR
.in 20
compose, geometry, gravity, image, x, y
.in 15
.in 20
+.nf
<?xml version="1.0" encoding="UTF-8"?>
<group>
<image id="image_01">
@@ -6416,249 +6567,249 @@ To remove a specified profile use "!" as the filename eg
</image>
<write filename="result.png"/>
</group>
-
+.fi
.in 15
.in 15
.B "<despeckle>"
.in 20
-\fR
+ \fR
.in 15
.B "<emboss>"
.in 20
-\fR
+ \fR
.in 20
radius, sigma
.in 15
.in 15
.B "<enhance>"
.in 20
-\fR
+ \fR
.in 15
.B "<equalize>"
.in 20
-\fR
+ \fR
.in 15
.B "<edge>"
.in 20
-\fR
+ \fR
.in 20
radius
.in 15
.in 15
.B "<flip>"
.in 20
-\fR
+ \fR
.in 15
.B "<flop>"
.in 20
-\fR
+ \fR
.in 15
.B "<frame>"
.in 20
-\fR
+ \fR
.in 20
fill, geometry, height, width, x, y, inner, outer
.in 15
.in 15
.B "<flatten>"
.in 20
-\fR
+ \fR
.in 15
.B "<get>"
.in 20
-\fR
+ \fR
.in 20
height, width
.in 15
.in 15
.B "<gamma>"
.in 20
-\fR
+ \fR
.in 20
red, green, blue
.in 15
.in 15
.B "<image>"
.in 20
-\fR
+ \fR
.in 20
background, color, id, size
.in 15
.in 15
.B "<implode>"
.in 20
-\fR
+ \fR
.in 20
amount
.in 15
.in 15
.B "<magnify>"
.in 20
-\fR
+ \fR
.in 15
.B "<minify>"
.in 20
-\fR
+ \fR
.in 15
.B "<medianfilter>"
.in 20
-\fR
+ \fR
.in 20
radius
.in 15
.in 15
.B "<normalize>"
.in 20
-\fR
+ \fR
.in 15
.B "<oilpaint>"
.in 20
-\fR
+ \fR
.in 20
radius
.in 15
.in 15
.B "<print>"
.in 20
-\fR
+ \fR
.in 20
output
.in 15
.in 15
.B "<profile>"
.in 20
-\fR
+ \fR
.in 20
[profilename]
.in 15
.in 15
.B "<read>"
.in 20
-\fR
+ \fR
.in 15
.B "<resize>"
.in 20
-\fR
+ \fR
.in 20
blur, filter, geometry, height, width
.in 15
.in 15
.B "<roll>"
.in 20
-\fR
+ \fR
.in 20
geometry, x, y
.in 15
.in 15
.B "<rotate>"
.in 20
-\fR
+ \fR
.in 20
degrees
.in 15
.in 15
.B "<reducenoise>"
.in 20
-\fR
+ \fR
.in 20
radius
.in 15
.in 15
.B "<sample>"
.in 20
-\fR
+ \fR
.in 20
geometry, height, width
.in 15
.in 15
.B "<scale>"
.in 20
-\fR
+ \fR
.in 20
geometry, height, width
.in 15
.in 15
.B "<sharpen>"
.in 20
-\fR
+ \fR
.in 20
radius, sigma
.in 15
.in 15
.B "<shave>"
.in 20
-\fR
+ \fR
.in 20
geometry, height, width
.in 15
.in 15
.B "<shear>"
.in 20
-\fR
+ \fR
.in 20
x, y
.in 15
.in 15
.B "<solarize>"
.in 20
-\fR
+ \fR
.in 20
threshold
.in 15
.in 15
.B "<spread>"
.in 20
-\fR
+ \fR
.in 20
radius
.in 15
.in 15
.B "<stegano>"
.in 20
-\fR
+ \fR
.in 20
image
.in 15
.in 15
.B "<stereo>"
.in 20
-\fR
+ \fR
.in 20
image
.in 15
.in 15
.B "<swirl>"
.in 20
-\fR
+ \fR
.in 20
degrees
.in 15
.in 15
.B "<texture>"
.in 20
-\fR
+ \fR
.in 20
image
.in 15
.in 15
.B "<threshold>"
.in 20
-\fR
+ \fR
.in 20
threshold
.in 15
.in 15
.B "<transparent>"
.in 20
-\fR
+ \fR
.in 20
color
.in 15
.in 15
.B "<trim>"
.in 20
-\fR
+ \fR
.SH GM CONVERT
@@ -6672,9 +6823,10 @@ process. \fBConvert\fP recognizes the image formats listed in
To make a thumbnail of a JPEG image, use:
+.nf
gm convert -size 120x120 cockatoo.jpg -resize 120x120
+profile "*" thumbnail.jpg
-
+.fi
In this example, '-size 120x120' gives a hint to the JPEG decoder
that the image is going to be downscaled to 120x120, allowing it to run
@@ -6687,27 +6839,31 @@ that might be present in the input and aren't needed in the thumbnail.
To convert a \fIMIFF\fP image of a cockatoo to a SUN raster image, use:
+.nf
gm convert cockatoo.miff sun:cockatoo.ras
-
+.fi
To convert a multi-page \fIPostScript\fP document to individual FAX pages,
use:
+.nf
gm convert -monochrome document.ps fax:page
-
+.fi
To convert a TIFF image to a \fIPostScript\fP A4 page with the image in
the lower left-hand corner, use:
+.nf
gm convert -page A4+0+0 image.tiff document.ps
-
+.fi
To convert a raw Gray image with a 128 byte header to a portable graymap,
use:
+.nf
gm convert -depth 8 -size 768x512+128 gray:raw
image.pgm
-
+.fi
In this example, "raw" is the input file. Its format is "gray" and it
has the dimensions and number of header bytes specified by the -size
@@ -6717,38 +6873,44 @@ specifies its format.
To convert a Photo CD image to a TIFF image, use:
+.nf
gm convert -size 1536x1024 img0009.pcd image.tiff
gm convert img0009.pcd[4] image.tiff
-
+.fi
To create a visual image directory of all your JPEG images, use:
+.nf
gm convert 'vid:*.jpg' directory.miff
-
+.fi
To annotate an image with blue text using font 12x24 at position (100,100),
use:
+.nf
gm convert -font helvetica -fill blue
-draw "text 100,100 Cockatoo"
bird.jpg bird.miff
-
+.fi
To tile a 640x480 image with a JPEG texture with bumps use:
+.nf
gm convert -size 640x480 tile:bumps.jpg tiled.png
-
+.fi
To surround an icon with an ornamental border to use with Mosaic(1), use:
+.nf
gm convert -mattecolor "#697B8F" -frame 6x6 bird.jpg
icon.png
-
+.fi
To create a MNG animation from a DNA molecule sequence, use:
+.nf
gm convert -delay 20 dna.* dna.mng
-
+.fi
.SH OPTIONS
Options are processed in command line order. Any option you specify on
@@ -6773,7 +6935,7 @@ Options, above.
.B "-append"
\fRappend a set of images
.TP
-.B " \fI-asc-cdl <spec>"\fP
+.B "-asc-cdl \fI<spec>"\fP
\fRapply ASC CDL color transform
.TP
.B "-authenticate \fI<string>"\fP
@@ -6972,7 +7134,7 @@ Options, above.
\fRadjust the level of image contrast
.TP
.B "-limit \fI<type> <value>"\fP
-\fRDisk, File, Map, Memory, Pixels, Width, Height or Threads resource limit
+\fRDisk, File, Map, Memory, Pixels, Width, Height, Read, or Threads resource limit
.TP
.B "-list \fI<type>"\fP
\fRthe type of list
@@ -7306,41 +7468,48 @@ With \fBdisplay\fP, you can perform these functions on an image:
To scale an image of a cockatoo to exactly 640 pixels in width and 480
pixels in height and position the window at location (200,200), use:
+.nf
gm display -geometry 640x480+200+200! cockatoo.miff
-
+.fi
To display an image of a cockatoo without a border centered on a backdrop,
use:
+.nf
gm display +borderwidth -backdrop cockatoo.miff
-
+.fi
To tile a slate texture onto the root window, use:
+.nf
gm display -size 1280x1024 -window root slate.png
-
+.fi
To display a visual image directory of all your JPEG images, use:
+.nf
gm display 'vid:*.jpg'
-
+.fi
To display a MAP image that is 640 pixels in width and 480 pixels in height
with 256 colors, use:
+.nf
gm display -size 640x480+256 cockatoo.map
-
+.fi
To display an image of a cockatoo specified with a \fBWorld Wide Web (WWW)\fP
uniform resource locator \fB(URL)\fP, use:
+.nf
gm display ftp://wizards.dupont.com/images/cockatoo.jpg
-
+.fi
To display histogram of an image, use:
+.nf
gm gm convert file.jpg HISTOGRAM:- | gm display -
-
+.fi
.SH OPTIONS
Options are processed in command line order. Any option you specify on
@@ -7349,9 +7518,10 @@ the option again with a different effect. For example to display three images,
the first with 32 colors, the second with an unlimited number of colors,
and the third with only 16 colors, use:
+.nf
gm display -colors 32 cockatoo.miff -noop duck.miff
-colors 16 macaw.miff
-
+.fi
\fBDisplay\fP options can appear on the command line or in your X resources
file. See \fIX(1)\fP. Options on the command line supersede values specified
@@ -7479,7 +7649,7 @@ Options, above.
\fRassign a label to an image
.TP
.B "-limit \fI<type> <value>"\fP
-\fRDisk, File, Map, Memory, Pixels, Width, Height or Threads resource limit
+\fRDisk, File, Map, Memory, Pixels, Width, Height, Read, or Threads resource limit
.TP
.B "-log \fI<string>"\fP
\fRSpecify format for debug log
@@ -7794,9 +7964,10 @@ Accelerators are one or two key presses that effect a particular command.
The keyboard accelerators that
\fBdisplay\fP understands is:
+.nf
Ctl+O Press to load an image from a file.
space Press to display the next image.
-
+.fi
If the image is a multi-paged document such as a
\fIPostScript\fP document,
@@ -7804,8 +7975,9 @@ you can skip ahead several pages by preceding this command with a number.
For example to display the fourth page beyond the current page,
press 4space.
+.nf
backspace Press to display the former image.
-
+.fi
If the image is a multi-paged document such as a
\fIPostScript\fP document,
@@ -7813,6 +7985,7 @@ you can skip behind several pages by preceding this command with a number.
For example to display the fourth page preceding the current page, press
4n.
+.nf
Ctl-S Press to save the image to a file.
Ctl-P Press to print the image to a
\fIPostScript\fP printer.
@@ -7912,7 +8085,7 @@ For example to display the fourth page preceding the current page, press
Find Press to browse documentation about
GraphicsMagick.
1-9 Press to change the level of magnification.
-
+.fi
Use the arrow keys to move the image one pixel up, down, left, or right
within the magnify window. Be sure to first map the magnify window by pressing
@@ -8087,8 +8260,9 @@ are considered a precious resource, use them with discretion.
To set the geometry of the Magnify or Pan or window, use the geometry resource.
For example, to set the Pan window geometry to 256x256, use:
+.nf
gm display.pan.geometry: 256x256
-
+.fi
.SH IMAGE LOADING
To select an image to display, choose \fBOpen\fP of the \fBFile\fP sub-menu
@@ -9327,7 +9501,7 @@ as .displayrc:
.B "
\fBdisplay image centered on a backdrop\fP"
.in 20
-\fR
+ \fR
.in 20
This backdrop covers the entire workstation screen and is useful for hiding
@@ -9339,7 +9513,7 @@ for details.
.B "
\fBconfirm on program exit\fP"
.in 20
-\fR
+ \fR
.in 20
Ask for a confirmation before exiting the \fBdisplay(1)\fP program.
@@ -9348,7 +9522,7 @@ Ask for a confirmation before exiting the \fBdisplay(1)\fP program.
.B "
\fBcorrect image for display gamma\fP"
.in 20
-\fR
+ \fR
.in 20
If the image has a known gamma, the gamma is corrected to match that of
@@ -9358,7 +9532,7 @@ the X server (see the X Resource\fB displayGamma\fP).
.B "
\fBdisplay warning messages\fP"
.in 20
-\fR
+ \fR
.in 20
Display any warning messages.
@@ -9367,7 +9541,7 @@ Display any warning messages.
.B "
\fBapply Floyd/Steinberg error diffusion to image\fP"
.in 20
-\fR
+ \fR
.in 20
The basic strategy of dithering is to trade intensity resolution for spatial
@@ -9379,7 +9553,7 @@ improved with this preference.
.B "
\fBuse a shared colormap for colormapped X visuals\fP"
.in 20
-\fR
+ \fR
.in 20
This option only applies when the default X server visual is
@@ -9395,7 +9569,7 @@ image colormap is installed.
.B "
\fBdisplay images as an X server pixmap\fP"
.in 20
-\fR
+ \fR
.in 20
Images are maintained as a XImage by default. Set this resource to True
@@ -9423,14 +9597,16 @@ the image. If -verbose or +ping are provided as an option, the pixel
read rate is also displayed. An example line output from
\fBidentify\fP follows:
+.nf
images/aquarium.miff 640x480 PseudoClass 256c
308135b MIFF 0.000u 0:01
-
+.fi
If -verbose is set, expect additional output including any image
comment:
+.nf
Image: images/aquarium.miff
class: PseudoClass
colors: 256
@@ -9442,7 +9618,7 @@ comment:
format: MIFF
comments:
Imported from MTV raster image: aquarium.mtv
-
+.fi
For some formats, additional format-specific information about the file
will be written if the -debug coder or -debug all option
@@ -9483,7 +9659,7 @@ Options, above.
\fRthe type of interlacing scheme
.TP
.B "-limit \fI<type> <value>"\fP
-\fRDisk, File, Map, Memory, Pixels, Width, Height or Threads resource limit
+\fRDisk, File, Map, Memory, Pixels, Width, Height, Read, or Threads resource limit
.TP
.B "-log \fI<string>"\fP
\fRSpecify format for debug log
@@ -9526,28 +9702,32 @@ the screen capture and twice when it completes.
To select an X window or an area of the screen with the mouse and save it
in the MIFF image format to a file entitled window.miff, use:
+.nf
gm import window.miff
-
+.fi
To select an X window or an area of the screen with the mouse and save it
in the Encapsulated PostScript format to include in another document, use:
+.nf
gm import figure.eps
-
+.fi
To capture the entire X server screen in the JPEG image format in a file
entitled root.jpeg, without using the mouse, use:
+.nf
gm import -window root root.jpeg
-
+.fi
To capture the 512x256 area at the upper right corner of the X server
screen in the PNG image format in a well-compressed file entitled corner.png,
without using the mouse, use:
+.nf
gm import -window root -crop 512x256-0+0 -quality 90
corner.png
-
+.fi
.SH OPTIONS
Options are processed in command line order. Any option you specify on
@@ -9626,7 +9806,7 @@ Options, above.
\fRassign a label to an image
.TP
.B "-limit \fI<type> <value>"\fP
-\fRDisk, File, Map, Memory, Pixels, Width, Height or Threads resource limit
+\fRDisk, File, Map, Memory, Pixels, Width, Height, Read, or Threads resource limit
.TP
.B "-log \fI<string>"\fP
\fRSpecify format for debug log
@@ -9715,13 +9895,15 @@ The graphics formats supported by \fBmogrify\fP are listed in
To convert all the TIFF files in a particular directory to JPEG, use:
+.nf
gm mogrify -format jpeg *.tiff
-
+.fi
To convert a directory full of JPEG images to thumbnails, use:
+.nf
gm mogrify -size 120x120 *.jpg -resize 120x120 +profile "*"
-
+.fi
In this example, '-size 120x120' gives a hint to the JPEG decoder
that the images are going to be downscaled to 120x120, allowing it to run
@@ -9735,8 +9917,9 @@ that might be present in the input and aren't needed in the thumbnails.
To scale an image of a cockatoo to exactly 640 pixels in width and 480
pixels in height, use:
+.nf
gm mogrify -resize 640x480! cockatoo.miff
-
+.fi
.SH OPTIONS
Options are processed in command line order. Any option you specify on
@@ -9753,7 +9936,7 @@ Options, above.
.B "-antialias"
\fRremove pixel aliasing
.TP
-.B " \fI-asc-cdl <spec>"\fP
+.B "-asc-cdl \fI<spec>"\fP
\fRapply ASC CDL color transform
.TP
.B "-authenticate \fI<string>"\fP
@@ -9931,7 +10114,7 @@ Options, above.
\fRadjust the level of image contrast
.TP
.B "-limit \fI<type> <value>"\fP
-\fRDisk, File, Map, Memory, Pixels, Width, Height or Threads resource limit
+\fRDisk, File, Map, Memory, Pixels, Width, Height, Read, or Threads resource limit
.TP
.B "-linewidth"
\fRthe line width for subsequent draw operations
@@ -10236,36 +10419,41 @@ press a button to display it. See \fBdisplay(1)\fP and \fBmiff(5)\fP
To create a montage of a cockatoo, a parrot, and a hummingbird and write
it to a file called birds, use:
+.nf
gm montage cockatoo.miff parrot.miff hummingbird.miff
birds.miff
-
+.fi
To tile several bird images so that they are at most 256 pixels in width
and 192 pixels in height, surrounded by a red border, and separated by
10 pixels of background color, use:
+.nf
gm montage -geometry 256x192+10+10 -bordercolor red
birds.* montage.miff
-
+.fi
To create an unlabeled parrot image, 640 by 480 pixels, and surrounded
by a border of black, use:
+.nf
gm montage -geometry 640x480 -bordercolor black
-label "" parrot.miff bird.miff
-
+.fi
To create an image of an eagle with a textured background, use:
+.nf
gm montage -texture bumps.jpg eagle.jpg eagle.png
-
+.fi
To join several GIF images together without any extraneous graphics (e.g.
no label, no shadowing, no surrounding tile frame), use:
+.nf
gm montage +frame +shadow +label -tile 5x1
-geometry 50x50+0+0 *.png joined.png
-
+.fi
.SH OPTIONS
Any option you specify on the command line remains in effect for the group
@@ -10275,9 +10463,10 @@ the first with 32 colors, the second with an unlimited number of colors, and
the third with only 16 colors, use:
+.nf
gm montage -colors 32 cockatoo.1 -noop cockatoo.2
-colors 16 cockatoo.3 cockatoos.miff
-
+.fi
For a more detailed description of each option, see
Options, above.
@@ -10392,7 +10581,7 @@ Options, above.
\fRassign a label to an image
.TP
.B "-limit \fI<type> <value>"\fP
-\fRDisk, File, Map, Memory, Pixels, Width, Height or Threads resource limit
+\fRDisk, File, Map, Memory, Pixels, Width, Height, Read, or Threads resource limit
.TP
.B "-log \fI<string>"\fP
\fRSpecify format for debug log
@@ -10569,9 +10758,10 @@ provides way to measure command execution times similar to the Unix
To obtain time information for the execution of a
command:
+.nf
% gm time convert input.ppm -gaussian 0x2 output.ppm
convert input.ppm -gaussian 0x2 output.ppm 22.60s user 0.00s system 2354% cpu 0.960 total
-
+.fi
Here is the interpretation of the above output:
\fBuser\fP - the total user time consumed.
@@ -10592,34 +10782,37 @@ software was configured and the host system.
.SH EXAMPLES
To display the version information:
- GraphicsMagick 1.3.27a 2017-12-11 Q16 http://www.GraphicsMagick.org/
- Copyright (C) 2002-2020 GraphicsMagick Group.
+.nf
+ GraphicsMagick 1.3.37 2021-12-12 Q16 http://www.GraphicsMagick.org/
+ Copyright (C) 2002-2021 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Feature Support:
- Native Thread Safe yes
- Large Files (> 32 bit) yes
- Large Memory (> 32 bit) yes
- BZIP yes
- DPS no
- FlashPix no
- FreeType yes
- Ghostscript (Library) no
- JBIG yes
- JPEG-2000 yes
- JPEG yes
- Little CMS yes
- Loadable Modules no
- OpenMP yes (201307)
- PNG yes
- TIFF yes
- TRIO no
- UMEM no
- WebP yes
- WMF yes
- X11 yes
- XML yes
- ZLIB yes
+ Native Thread Safe yes
+ Large Files (> 32 bit) yes
+ Large Memory (> 32 bit) yes
+ BZIP yes
+ DPS no
+ FlashPix no
+ FreeType yes
+ Ghostscript (Library) no
+ JBIG yes
+ JPEG-2000 yes
+ JPEG yes
+ Little CMS yes
+ Loadable Modules no
+ Solaris mtmalloc no
+ Google perftools tcmalloc no
+ OpenMP yes (201511 "4.5")
+ PNG yes
+ TIFF yes
+ TRIO no
+ Solaris umem no
+ WebP yes
+ WMF yes
+ X11 yes
+ XML yes
+ ZLIB yes
Host type: x86_64-unknown-linux-gnu
Configured using the command:
./configure ...
@@ -10631,6 +10824,6 @@ To display the version information:
CXXFLAGS = ...
LDFLAGS = ...
LIBS = ...
-
+.fi
.SH OPTIONS
The version command does not currently support any options.