1gm(1) General Commands Manual gm(1)
2
3
4
5 NAME
6
7 gm - GraphicsMagick command-line utilities to create, edit, or
8 convert images
9
10
12 gm animate [ options ... ] file [ [ options ... ] file ... ]
13
14 compare [ options ... ] reference-image [ options ... ] compare-image [
15 options ... ]
16
17 gm composite [ options ... ] change-image base-image [ mask-image ]
18 output-image
19
20 gm conjure [ options ] script.msl [ [ options ] script.msl ]
21
22 gm convert [ [ options ... ] [ input-file ... ] [ options ... ] ] out‐
23 put-file
24
25 gm display [ options ... ] file ... [ [options ... ]file ... ]
26
27 gm identify file [ file ... ]
28
29 gm import [ options ... ] file
30
31 gm mogrify [ options ... ] file ...
32
33 gm montage [ options ... ] file [ [ options ... ] file ... ] output-
34 file
35
37 GraphicsMagick's gm provides a suite of command-line utilities for
38 creating, converting, editing, and displaying images:
39
40 Gm display is a machine architecture independent image processing and
41 display facility. It can display an image on any workstation display
42 running an X server.
43
44 Gm import reads an image from any visible window on an X server and
45 outputs it as an image file. You can capture a single window, the
46 entire screen, or any rectangular portion of the screen.
47
48 Gm montage creates a composite by combining several separate images.
49 The images are tiled on the composite image with the name of the image
50 optionally appearing just below the individual tile.
51
52 Gm convert converts an input file using one image format to an output
53 file with the same or differing image format while applying an arbi‐
54 trary number of image transformations.
55
56 Gm mogrify transforms an image or a sequence of images. These trans‐
57 forms include image scaling, image rotation, color reduction, and oth‐
58 ers. The transmogrified image overwrites the original image.
59
60 Gm identify describes the format and characteristics of one or more
61 image files. It will also report if an image is incomplete or corrupt.
62
63 Gm composite composites images (blends or merges images together) to
64 create new images.
65
66 Gm conjure interprets and executes scripts in the Magick Scripting Lan‐
67 guage (MSL).
68
69 The GraphicsMagick utilities recognize the following image formats:
70
71
72 Name Mode Description
73 o 8BIM *rw- Photoshop resource format
74 o 8BIMTEXT *rw- Photoshop resource format
75 o 8BIMWTEXT *rw- Photoshop resource format
76 o APP1 *rw- Photoshop resource format
77 o ART *r-- PF1: 1st Publisher
78 o AVI *r-- Audio/Visual Interleaved
79 o AVS *rw+ AVS X image
80 o BIE *rw- Joint Bi-level Image experts Group
81 interchange format
82 o BMP *rw+ Microsoft Windows bitmap image
83 o BMP2 *-w- Microsoft Windows bitmap image v2
84 o BMP3 *-w- Microsoft Windows bitmap image v3
85 o CACHE *--- Magick Persistent Cache image format
86 o CAPTION *r-- Caption (requires separate size info)
87 o CIN *rw- Kodak Cineon Format
88 o CMYK *rw- Raw cyan, magenta, yellow, and black
89 samples (8 or 16 bits, depending on
90 the image depth)
91 o CMYKA *rw- Raw cyan, magenta, yellow, black, and
92 matte samples (8 or 16 bits, depending
93 on the image depth)
94 o CUR *r-- Microsoft Cursor Icon
95 o CUT *r-- DR Halo
96 o DCM *r-- Digital Imaging and Communications in
97 Medicine image
98 o DCX *rw+ ZSoft IBM PC multi-page Paintbrush
99 o DPS *r-- Display PostScript
100 o DPX *rw- Digital Moving Picture Exchange
101 o EPDF *rw- Encapsulated Portable Document Format
102 o EPI *rw- Adobe Encapsulated PostScript
103 Interchange format
104 o EPS *rw- Adobe Encapsulated PostScript
105 o EPS2 *-w- Adobe Level II Encapsulated PostScript
106 o EPS3 *-w- Adobe Level III Encapsulated PostScript
107 o EPSF *rw- Adobe Encapsulated PostScript
108 o EPSI *rw- Adobe Encapsulated PostScript
109 Interchange format
110 o EPT *rw- Adobe Encapsulated PostScript with MS-DOS
111 TIFF preview
112 o EPT2 *rw- Adobe Level II Encapsulated PostScript
113 with MS-DOS TIFF preview
114 o EPT3 *rw- Adobe Level III Encapsulated PostScript
115 with MS-DOS TIFF preview
116 o EXIF *rw- Exif digital camera binary data
117 o FAX *rw+ Group 3 FAX
118 o FITS *rw- Flexible Image Transport System
119 o FPX *rw- FlashPix Format
120 o G3 *rw- Group 3 FAX
121 o GIF *rw+ CompuServe graphics interchange format
122 o GIF87 *rw- CompuServe graphics interchange format
123 (version 87a)
124 o GRADIENT *r-- Gradual passing from one shade to
125 another
126 o GRAY *rw+ Raw gray samples (8 or 16 bits,
127 depending on the image depth)
128 o HISTOGRAM *-w- Histogram of the image
129 o HTM *-w- Hypertext Markup Language and a
130 client-side image map
131 o HTML *-w- Hypertext Markup Language and a
132 client-side image map
133 o ICB *rw+ Truevision Targa image
134 o ICC *rw- ICC Color Profile
135 o ICM *rw- ICC Color Profile
136 o ICO *r-- Microsoft icon
137 o ICON *r-- Microsoft icon
138 o IPTC *rw- IPTC Newsphoto
139 o IPTCTEXT *rw- IPTC Newsphoto text format
140 o IPTCWTEXT *rw- IPTC Newsphoto wide text format
141 o JBG *rw+ Joint Bi-level Image experts Group
142 interchange format
143 o JBIG *rw+ Joint Bi-level Image experts Group
144 interchange format
145 o JNG *rw- JPEG Network Graphics
146 o JP2 *rw- JPEG-2000 JP2 File Format Syntax
147 o JPC *rw- JPEG-2000 Code Stream Syntax
148 o JPEG *rw- Joint Photographic Experts Group
149 JFIF format
150 o JPG *rw- Joint Photographic Experts Group
151 JFIF format
152 o LABEL *r-- Text image format
153 o LOGO *rw- GraphicsMagick Logo
154 o M2V *rw+ MPEG-2 Video Stream
155 o MAP *rw- Colormap intensities and indices
156 o MAT *r-- MATLAB image format
157 o MATTE *-w+ MATTE format
158 o MIFF *rw+ Magick Image File Format
159 o MNG *rw+ Multiple-image Network Graphics
160 o MONO *rw- Bi-level bitmap in least-significant-
161 -byte-first order
162 o MPC -rw- Magick Persistent Cache image format
163 o MPEG *rw+ MPEG-1 Video Stream
164 o MPG *rw+ MPEG-1 Video Stream
165 o MSL *r-- Magick Scripting Language
166 o MTV *rw+ MTV Raytracing image format
167 o MVG *rw- Magick Vector Graphics
168 o NULL *r-- Constant image of uniform color
169 o OTB *rw- On-the-air bitmap
170 o P7 *rw+ Xv thumbnail format
171 o PAL *rw- 16bit/pixel interleaved YUV
172 o PALM *rw- Palm Pixmap
173 o PBM *rw+ Portable bitmap format (black and white)
174 o PCD *rw- Photo CD
175 o PCDS *rw- Photo CD
176 o PCL *-w- Page Control Language
177 o PCT *rw- Apple Macintosh QuickDraw/PICT
178 o PCX *rw- ZSoft IBM PC Paintbrush
179 o PDB *rw+ Pilot Image Format
180 o PDF *rw+ Portable Document Format
181 o PFA *r-- TrueType font
182 o PFB *r-- TrueType font
183 o PGM *rw+ Portable graymap format (gray scale)
184 o PGX *r-- JPEG-2000 VM Format
185 o PICON *rw- Personal Icon
186 o PICT *rw- Apple Macintosh QuickDraw/PICT
187 o PIX *r-- Alias/Wavefront RLE image format
188 o PLASMA *r-- Plasma fractal image
189 o PNG *rw- Portable Network Graphics
190 o PNG24 *rw- Portable Network Graphics, 24 bit RGB
191 opaque only
192 o PNG32 *rw- Portable Network Graphics, 32 bit RGBA
193 semitransparency OK
194 o PNG8 *rw- Portable Network Graphics, 8-bit
195 indexed, binary transparency only
196 o PNM *rw+ Portable anymap
197 o PPM *rw+ Portable pixmap format (color)
198 o PREVIEW *-w- Show a preview an image enhancement,
199 effect, or f/x
200 o PS *rw+ Adobe PostScript
201 o PS2 *-w+ Adobe Level II PostScript
202 o PS3 *-w+ Adobe Level III PostScript
203 o PSD *rw- Adobe Photoshop bitmap
204 o PTIF *rw- Pyramid encoded TIFF
205 o PWP *r-- Seattle Film Works
206 o RAS *rw+ SUN Rasterfile
207 o RGB *rw+ Raw red, green, and blue samples (8, 16
208 or 32 bits, depending on the image depth)
209 o RGBA *rw+ Raw red, green, blue, and matte samples
210 (8, 16, or 32 bits, depending on the image
211 depth)
212 o RLA *r-- Alias/Wavefront image
213 o RLE *r-- Utah Run length encoded image
214 o SCT *r-- Scitex HandShake
215 o SFW *r-- Seattle Film Works
216 o SGI *rw+ Irix RGB image
217 o SHTML *-w- Hypertext Markup Language and a
218 client-side image map
219 o STEGANO *r-- Steganographic image
220 o SUN *rw+ SUN Rasterfile
221 o SVG *rw+ Scalable Vector Gaphics
222 o TEXT *rw+ Raw text
223 o TGA *rw+ Truevision Targa image
224 o TIFF *rw+ Tagged Image File Format
225 o TILE *r-- Tile image with a texture
226 o TIM *r-- PSX TIM
227 o TOPOL *r-- TOPOL X Image
228 o TTF *r-- TrueType font
229 o TXT *rw+ Raw text
230 o UIL *-w- X-Motif UIL table
231 o UYVY *rw- 16bit/pixel interleaved YUV
232 o VDA *rw+ Truevision Targa image
233 o VICAR *rw- VICAR rasterfile format
234 o VID *rw+ Visual Image Directory
235 o VIFF *rw+ Khoros Visualization image
236 o VST *rw+ Truevision Targa image
237 o WBMP *rw- Wireless Bitmap (level 0) image
238 o WMF *r-- Windows Metafile
239 o WPG *r-- Word Perfect Graphics
240 o X *rw- X Image
241 o XBM *rw- X Windows system bitmap (black
242 and white)
243 o XC *r-- Constant image uniform color
244 o XCF *r-- GIMP image
245 o XMP *rw- Adobe XML metadata
246 o XPM *rw- X Windows system pixmap (color)
247 o XV *rw+ Khoros Visualization image
248 o XWD *rw- X Windows system window dump (color)
249 o YUV *rw- CCIR 601 4:1:1 or 4:2:2 (8-bit only)
250
251 Modes:
252 * Native blob support
253 r Read
254 w Write
255 + Multi-image
256
257
258 Support for some of these formats require additional programs or
259 libraries. README tells where to find this software.
260
261 Note, a format delineated with + means that if more than one image is
262 specified, it is composited into a single multi-image file. Use +adjoin
263 if you want a single image produced for each frame.
264
265 Your installation might not support all of the formats in the list. To
266 get an up-to-date listing of the formats supported by your particular
267 configuration, run "convert -list format".
268
269 Raw images are expected to have one byte per pixel unless gm is com‐
270 piled in 16-bit mode or in 32-bit mode. Here, the raw data is expected
271 to be stored two or four bytes per pixel, respectively, in most-signif‐
272 icant-byte-first order. You can tell if gm was compiled in 16-bit mode
273 by typing "gm version" without any options, and looking for "Q:16" in
274 the first line of output.
275
277 By default, the image format is determined by its magic number, i.e.,
278 the first few bytes of the file. To specify a particular image format,
279 precede the filename with an image format name and a colon
280 (i.e.ps:image) or specify the image type as the filename suffix. The
281 magic number takes precedence over the filename suffix and the prefix
282 takes precedence over the magic number and the suffix in input files.
283 The prefix takes precedence over the filename suffix in output files.
284 To read the "built-in" formats (GRANITE, H, LOGO, NETSCAPE, PLASMA, and
285 ROSE) use a prefix (including the colon) without a filename or suffix.
286 To read the XC format, follow the colon with a color specification. To
287 read the CAPTION format, follow the colon with a text string or with a
288 filename prefixed with the at symbol (@).
289
290
291 When you specify X as your image type, the filename has special mean‐
292 ing. It specifies an X window by id, name, or root. If no filename is
293 specified, the window is selected by clicking the mouse in the desired
294 window.
295
296 Specify input_file as - for standard input, output_file as - for stan‐
297 dard output. If input_file has the extension .Z or .gz, the file is
298 uncompressed with uncompress or gunzip respectively. If output_file
299 has the extension .Z or .gz, the file is compressed using with compress
300 or gzip respectively.
301
302 Finally, when running on platforms that allow it, precede the image
303 file name with | to pipe to or from a system command (this feature is
304 not available on VMS, Win32 and Macintosh platforms). Use a backslash
305 or quotation marks to prevent your shell from interpreting the |.
306
307 Use an optional index enclosed in brackets after an input file name to
308 specify a desired subimage of a multi-resolution image format like
309 Photo CD (e.g. "img0001.pcd[4]") or a range for MPEG images (e.g.
310 "video.mpg[50-75]"). A subimage specification can be disjoint (e.g.
311 "image.tiff[2,7,4]"). For raw images, specify a subimage with a geome‐
312 try (e.g. -size 640x512 "image.rgb[320x256+50+50]"). Surround the
313 image name with quotation marks to prevent your shell from interpreting
314 the square brackets. Single images are written with the filename you
315 specify. However, multi-part images (e.g., a multi-page PostScript doc‐
316 ument with +adjoin specified) are written with the filename followed by
317 a period (.) and the scene number. You can change this behavior by
318 embedding a %d format specification in the file name. For example,
319
320 image%02d.miff
321
322 writes files image00.miff, image01.miff, etc. Only a single specifica‐
323 tion is allowed within an output filename. If more than one specifica‐
324 tion is present, it will be ignored.
325
326 When running a commandline utility, you can prepend an at sign @ to a
327 filename to read a list of image filenames from that file. This is con‐
328 venient in the event you have too many image filenames to fit on the
329 command line.
330
332 Options are processed in command line order. Any option you specify on
333 the command line remains in effect for the set of images that follows,
334 until the set is terminated by the appearance of any option or -noop.
335 Some options only affect the decoding of images and others only the
336 encoding. The latter can appear after the final group of input images.
337
338 This is a combined list of the commandline options used by the Graphic‐
339 sMagick utilities (animate, compare, composite, convert, display, iden‐
340 tify, import, mogrify and montage).
341
342
343 In this document, angle brackets ("<>") enclose variables and curly
344 brackets ("{}") enclose optional parameters. For example, "-fuzz <dis‐
345 tance>{%}" means you can use the option "-fuzz 10" or "-fuzz 2%".
346
347
348 -adjoin
349 join images into a single multi-image file
350
351 By default, all images of an image sequence are stored in the
352 same file. However, some formats (e.g. JPEG) do not support more
353 than one image and are saved to separate files. Use +adjoin to
354 force this behavior.
355
356 -affine <matrix>
357 drawing transform matrix
358
359 This option provides a transform matrix {sx,rx,ry,sy,tx,ty} for
360 use by subsequent -draw or -transform options.
361
362 -antialias
363 remove pixel aliasing
364
365 By default antialiasing algorithms are used when drawing objects
366 (e.g. lines) or rendering vector formats (e.g. WMF and Post‐
367 script). Use +antialias to disable use of antialiasing algo‐
368 rithms. Reasons to disable antialiasing include avoiding
369 increasing colors in the image, or improving rendering speed.
370
371 -append
372 append a set of images
373
374 This option creates a single image where the images in the orig‐
375 inal set are stacked top-to-bottom. If they are not of the same
376 width, any narrow images will be expanded to fit using the back‐
377 ground color. Use +append to stack images left-to-right. The
378 set of images is terminated by the appearance of any option. If
379 the -append option appears after all of the input images, all
380 images are appended.
381
382 -asc-cdl <spec>
383 apply ASC CDL color transform
384
385 Applies ("bakes in") the ASC CDL, which is a format for the
386 exchange of basic primary color grading information between
387 equipment and software from different manufacturers. The format
388 defines the math for three functions: slope, offset and power.
389 Each function uses a number for the red, green, and blue color
390 channels for a total of nine numbers comprising a single color
391 decision. The tenth number (optional) is for chromiance (satura‐
392 tion) as specified by ASC CDL 1.2.
393
394 The argument string is comma delimited and is in the following
395 form (but without invervening spaces or line breaks)
396
397 redslope,redoffset,redpower:
398 greenslope,greenoffset,greenpower:
399 blueslope,blueoffset,bluepower:
400 saturation
401
402 with the unity (no change) specification being:
403 "1.0,0.0,1.0:1.0,0.0,1.0:1.0,0.0,1.0:1.0"
404
405 -authenticate <string>
406 decrypt image with this password
407
408 Use this option to supply a password for decrypting an image or
409 an image sequence, if it is being read from a format such as PDF
410 that supports encryption. Encrypting images being written is
411 not supported.
412
413 -average
414 average a set of images
415
416 The set of images is terminated by the appearance of any option.
417 If the -average option appears after all of the input images,
418 all images are averaged.
419
420 -backdrop
421 display the image centered on a backdrop.
422
423 This backdrop covers the entire workstation screen and is useful
424 for hiding other X window activity while viewing the image. The
425 color of the backdrop is specified as the foreground color (X11
426 default is black). Refer to "X Resources", below, for details.
427
428 -background <color>
429 the background color
430
431 The color is specified using the format described under the
432 -fill option.
433
434 -black-threshold red[,green][,blue][,opacity]
435 pixels below the threshold become black
436
437 Use -black-threshold to set pixels with values below the speci‐
438 fied threshold to minimum value (black). If only one value is
439 supplied, or the red, green, and blue values are identical, then
440 intensity thresholding is used. If the color threshold values
441 are not identical then channel-based thresholding is used, and
442 color distortion will occur. Specify a negative value (e.g. -1)
443 if you want a channel to be ignored but you do want to threshold
444 a channel later in the list. If a percent (%) symbol is
445 appended, then the values are treated as a percentage of maximum
446 range.
447
448 -blue-primary <x>,<y>
449 blue chromaticity primary point
450
451 -blur <radius>{x<sigma>}
452 blur the image with a Gaussian operator
453
454 Blur with the given radius and standard deviation (sigma).
455
456 -border <width>x<height>
457 surround the image with a border of color
458
459 See -geometry for details about the geometry specification.
460
461 -bordercolor <color>
462 the border color
463
464 The color is specified using the format described under the
465 -fill option.
466
467 -borderwidth <geometry>
468 the border width
469
470 -box <color>
471 set the color of the annotation bounding box
472
473 The color is specified using the format described under the
474 -fill option.
475
476 See -draw for further details.
477
478 -channel <type>
479 the type of channel
480
481 Choose from: Red, Green, Blue, Opacity, Matte, Cyan, Magenta,
482 Yellow, Black, or Gray.
483
484 Use this option to extract a particular channel from the image.
485 Opacity, for example, is useful for extracting the opacity val‐
486 ues from an image.
487
488 -charcoal <factor>
489 simulate a charcoal drawing
490
491 -chop <width>x<height>{+-}<x>{+-}<y>{%}
492 remove pixels from the interior of an image
493
494 Width and height give the number of columns and rows to remove,
495 and x and y are offsets that give the location of the leftmost
496 column and topmost row to remove.
497
498 The x offset normally specifies the leftmost column to remove.
499 If the -gravity option is present with NorthEast, East, or
500 SouthEast gravity, it gives the distance leftward from the right
501 edge of the image to the rightmost column to remove. Similarly,
502 the y offset normally specifies the topmost row to remove, but
503 if the -gravity option is present with SouthWest, South, or
504 SouthEast gravity, it specifies the distance upward from the
505 bottom edge of the image to the bottom row to remove.
506
507 The -chop option removes entire rows and columns, and moves the
508 remaining corner blocks leftward and upward to close the gaps.
509
510 -clip apply the clipping path, if one is present
511
512 If a clipping path is present, it will be applied to subsequent
513 operations.
514
515 For example, if you type the following command:
516
517 gm convert -clip -negate cockatoo.tif negated.tif
518
519 only the pixels within the clipping path are negated.
520
521 The -clip feature requires the XML library. If the XML library
522 is not present, the option is ignored.
523
524 -coalesce
525 merge a sequence of images
526
527 Each image N in the sequence after Image 0 is replaced with the
528 image created by flattening images 0 through N.
529
530 The set of images is terminated by the appearance of any option.
531 If the -coalesce option appears after all of the input images,
532 all images are coalesced.
533
534 -colorize <value>
535 colorize the image with the pen color
536
537 Specify the amount of colorization as a percentage. You can
538 apply separate colorization values to the red, green, and blue
539 channels of the image with a colorization value list delimited
540 with slashes (e.g. 0/0/50).
541
542 The -colorize option may be used in conjunction with -modulate
543 to produce a nice sepia toned image like:
544
545 gm convert input.ppm -modulate 115,0,100 \
546 -colorize 7,21,50 output.ppm.
547
548 -colormap <type>
549 define the colormap type
550
551 Choose between shared or private.
552
553 This option only applies when the default X server visual is
554 PseudoColor or GRAYScale. Refer to -visual for more details. By
555 default, a shared colormap is allocated. The image shares colors
556 with other X clients. Some image colors could be approximated,
557 therefore your image may look very different than intended.
558 Choose Private and the image colors appear exactly as they are
559 defined. However, other clients may go technicolor when the
560 image colormap is installed.
561
562 -colors <value>
563 preferred number of colors in the image
564
565 The actual number of colors in the image may be less than your
566 request, but never more. Note, this is a color reduction option.
567 Images with less unique colors than specified with this option
568 will have any duplicate or unused colors removed. The ordering
569 of an existing color palette may be altered. When converting an
570 image from color to grayscale, convert the image to the gray
571 colorspace before reducing the number of colors since doing so
572 is most efficient. Refer to <a href="quantize.html">quantize for
573 more details.
574
575 Note, options -dither, -colorspace, and -treedepth affect the
576 color reduction algorithm.
577
578 -colorspace <value>
579 the type of colorspace
580
581 Choices are: CineonLog, CMYK, GRAY, HSL, HWB, OHTA, RGB,
582 Rec601Luma, Rec709Luma, Rec601YCbCr, Rec709YCbCr, Transparent,
583 XYZ, YCbCr, YIQ, YPbPr, or YUV.
584
585 Color reduction, by default, takes place in the RGB color space.
586 Empirical evidence suggests that distances in color spaces such
587 as YUV or YIQ correspond to perceptual color differences more
588 closely than do distances in RGB space. These color spaces may
589 give better results when color reducing an image. Refer to
590 quantize for more details. Two gray colorspaces are supported.
591 The Rec601Luma space is based on the recommendations for legacy
592 NTSC television (ITU-R BT.601-5). The Rec709Luma space is based
593 on the recommendations for HDTV (Rec. ITU-R BT.709-5) and is
594 suitable for suitable for use with computer graphics, and for
595 contemporary CRT displays. The GRAY colorspace currently selects
596 the Rec601Luma colorspace by default for backwards compatibly
597 reasons. This default may be re-considered in the future.
598
599 Two YCbCr colorspaces are supported. The Rec601YCbCr space is
600 based on the recommendations for legacy NTSC television (ITU-R
601 BT.601-5). The Rec709CbCr space is based on the recommendations
602 for HDTV (Rec. ITU-R BT.709-5) and is suitable for suitable for
603 use with computer graphics, and for contemporary CRT displays.
604 The YCbCr colorspace specification is equivalent toRec601YCbCr.
605
606
607 The Transparent color space behaves uniquely in that it pre‐
608 serves the matte channel of the image if it exists.
609
610 The -colors or -monochrome option, or saving to a file format
611 which requires color reduction, is required for this option to
612 take effect.
613
614 -comment <string>
615 annotate an image with a comment
616
617 Use this option to assign a specific comment to the image, when
618 writing to an image format that supports comments. You can
619 include the image filename, type, width, height, or other image
620 attribute by embedding special format characters listed under
621 the -format option. The comment is not drawn on the image, but
622 is embedded in the image datastream via a "Comment" tag or simi‐
623 lar mechanism. If you want the comment to be visible on the
624 image itself, use the -draw option.
625
626 For example,
627
628 -comment "%m:%f %wx%h"
629
630 produces an image comment of MIFF:bird.miff 512x480 for an image
631 titled bird.miff and whose width is 512 and height is 480.
632
633 If the first character of string is @, the image comment is read
634 from a file titled by the remaining characters in the string.
635
636 -compose <operator>
637 the type of image composition
638
639 The description of composition uses abstract terminology in
640 order to allow the the description to be more clear, while
641 avoiding constant values which are specific to a particular
642 build configuration. Each image pixel is represented by red,
643 green, and blue levels (which are equal for a gray pixel).
644 MaxRGB is the maximum integral value which may be stored in the
645 red, green, or blue channels of the image. Each image pixel may
646 also optionally (if the image matte channel is enabled) have an
647 associated level of opacity (ranging from opaque to transpar‐
648 ent), which may be used to determine the influence of the pixel
649 color when compositing the pixel with another image pixel. If
650 the image matte channel is disabled, then all pixels in the
651 image are treated as opaque. The color of an opaque pixel is
652 fully visible while the color of a transparent pixel color is
653 entirely absent (pixel color is ignored).
654
655 By definition, raster images have a rectangular shape. All image
656 rows are of equal length, and all image columns have the same
657 number of rows. By treating the opacity channel as a visual
658 "mask" the rectangular image may be given a "shape" by treating
659 the opacity channel as a cookie-cutter for the image. Pixels
660 within the shape are opaque, while pixels outside the shape are
661 transparent. Pixels on the boundary of the shape may be between
662 opaque and transparent in order to provide antialiasing (visual‐
663 ly smooth edges). The description of the composition operators
664 use this concept of image "shape" in order to make the descrip‐
665 tion of the operators easier to understand. While it is conve‐
666 nient to describe the operators in terms of "shapes" they are by
667 no means limited to mask-style operations since they are based
668 on continuous floating-point mathematics rather than simple
669 boolean operations.
670
671 By default, the Over composite operator is used. The following
672 composite operators are available:
673
674 Over
675 In
676 Out
677 Atop
678 Xor
679 Plus
680 Minus
681 Add
682 Subtract
683 Difference
684 Divide
685 Multiply
686 Bumpmap
687 Copy
688 CopyRed
689 CopyGreen
690 CopyBlue
691 CopyOpacity
692 CopyCyan
693 CopyMagenta
694 CopyYellow
695 CopyBlack
696
697 The behavior of each operator is described below.
698
699 Over
700
701 The result will be the union of the two image shapes, with
702 opaque areas of change-image obscuring base-image in the
703 region of overlap.
704
705 In
706
707 The result is simply change-image cut by the shape of
708 base-image. None of the image data of base-image will be
709 in the result.
710
711 Out
712
713 The resulting image is change-image with the shape of
714 base-image cut out.
715
716 Atop
717
718 The result is the same shape as base-image, with change-
719 image obscuring base-image where the image shapes overlap.
720 Note this differs from over because the portion of change-
721 image outside base-image's shape does not appear in the
722 result.
723
724 Xor
725
726 The result is the image data from both change-image and
727 base-image that is outside the overlap region. The overlap
728 region will be blank.
729
730 Plus
731
732 The result is just the sum of the image data. Output val‐
733 ues are cropped to MaxRGB (no overflow). This operation is
734 independent of the matte channels.
735
736 Minus
737
738 The result of change-image - base-image, with underflow
739 cropped to zero. The matte channel is ignored (set to
740 opaque, full coverage).
741
742 Add
743
744 The result of change-image + base-image, with overflow
745 wrapping around (mod MaxRGB+1).
746
747 Subtract
748
749 The result of change-image - base-image, with underflow
750 wrapping around (mod MaxRGB+1). The add and subtract oper‐
751 ators can be used to perform reversible transformations.
752
753 Difference
754
755 The result of abs(change-image - base-image). This is use‐
756 ful for comparing two very similar images.
757
758 Divide
759
760 The result of change-image / base-image. This is useful
761 for improving the readability of text on unevenly illumi‐
762 nated photos (by using a gaussian blurred copy of change-
763 image as base-image).
764
765 Multiply
766
767 The result of change-image * base-image. This is useful
768 for the creation of drop-shadows.
769
770 Bumpmap
771
772 The result base-image shaded by change-image.
773
774 Copy
775
776 The resulting image is base-image replaced with change-
777 image. Here the matte information is ignored.
778
779 CopyRed
780
781 The resulting image is the red channel in base-image
782 replaced with the red channel in change-image. The other
783 channels are copied untouched.
784
785 CopyGreen
786
787 The resulting image is the green channel in base-image
788 replaced with the green channel in change-image. The other
789 channels are copied untouched.
790
791 CopyBlue
792
793 The resulting image is the blue channel in base-image
794 replaced with the blue channel in change-image. The other
795 channels are copied untouched.
796
797 CopyOpacity
798
799 The resulting image is the opacity channel in base-image
800 replaced with the opacity channel in change-image. The
801 other channels are copied untouched.
802
803 CopyCyan
804
805 The resulting image is the cyan channel in base-image
806 replaced with the cyan channel in change-image. The other
807 channels are copied untouched. Use of this operator
808 requires that base-image be in CMYK(A) colorspace.
809
810 CopyMagenta
811
812 The resulting image is the magenta channel in base-image
813 replaced with the magenta channel in change-image. The
814 other channels are copied untouched. Use of this operator
815 requires that base-image be in CMYK(A) colorspace.
816
817 CopyYellow
818
819 The resulting image is the yellow channel in base-image
820 replaced with the yellow channel in change-image. The
821 other channels are copied untouched. Use of this operator
822 requires that base-image be in CMYK(A) colorspace.
823
824 CopyBlack
825
826 The resulting image is the black channel in base-image
827 replaced with the black channel in change-image. The other
828 channels are copied untouched. Use of this operator
829 requires that base-image be in CMYK(A) colorspace. If
830 change-image is not in CMYK space, then the change-image
831 pixel intensities are used.
832
833
834
835 -compress <type>
836 the type of image compression
837
838 Choices are: None, BZip, Fax, Group4, JPEG, Lossless, LZW, RLE
839 or Zip.
840
841
842 Specify +compress to store the binary image in an uncompressed
843 format. The default is the compression type of the specified
844 image file.
845
846 "Lossless" refers to lossless JPEG, which is only available if
847 the JPEG library has been patched to support it. Use of lossless
848 JPEG is generally not recommended.
849
850 Use the -quality option to set the compression level to be used
851 by JPEG, PNG, MIFF, and MPEG encoders. Use the -sampling-factor
852 option to set the sampling factor to be used by the DPX, JPEG,
853 MPEG, and YUV encoders for downsampling the chroma channels.
854
855 -contrast
856 enhance or reduce the image contrast
857
858 This option enhances the intensity differences between the
859 lighter and darker elements of the image. Use -contrast to
860 enhance the image or +contrast to reduce the image contrast.
861
862
863 For a more pronounced effect you can repeat the option:
864
865 gm convert rose: -contrast -contrast rose_c2.png
866
867 -convolve <kernel>
868 convolve image with the specified convolution kernel
869
870 The kernel is specified as a comma-separated list of floating
871 point values, ordered left-to right, starting with the top row.
872 The order of the kernel is determined by the square root of the
873 number of entries. Presently only square kernels are supported.
874
875 -create-directories
876 create output directory if required
877
878 Use this option with -output-directory if the input paths con‐
879 tain subdirectories and it is desired to create similar subdi‐
880 rectories in the output directory. Without this option, mogrify
881 will fail if the required output directory does not exist.
882
883 -crop <width>x<height>{+-}<x>{+-}<y>{%}
884 preferred size and location of the cropped image
885
886 See -geometry for details about the geometry specification.
887
888 The width and height give the size of the image that remains
889 after cropping, and x and y are offsets that give the location
890 of the top left corner of the cropped image with respect to the
891 original image. To specify the amount to be removed, use -shave
892 instead.
893
894 If the x and y offsets are present, a single image is generated,
895 consisting of the pixels from the cropping region. The offsets
896 specify the location of the upper left corner of the cropping
897 region measured downward and rightward with respect to the upper
898 left corner of the image. If the -gravity option is present
899 with NorthEast, East, or SouthEast gravity, it gives the dis‐
900 tance leftward from the right edge of the image to the right
901 edge of the cropping region. Similarly, if the -gravity option
902 is present with SouthWest, South, or SouthEast gravity, the dis‐
903 tance is measured upward between the bottom edges.
904
905 If the x and y offsets are omitted, a set of tiles of the speci‐
906 fied geometry, covering the entire input image, is generated.
907 The rightmost tiles and the bottom tiles are smaller if the
908 specified geometry extends beyond the dimensions of the input
909 image.
910
911 -cycle <amount>
912 displace image colormap by amount
913
914 Amount defines the number of positions each colormap entry
915 isshifted.
916
917
918 -debug <events>
919 enable debug printout
920
921 The events parameter specifies which events are to be logged.
922 It can be either None, All, or a comma-separated list consisting
923 of one or more of the following domains: Annotate, Blob, Cache,
924 Coder, Configure, Deprecate, Error, Exception, Locale, Ren‐
925 der,Resource, TemporaryFile, Transform, Warning, X11, or User.
926 For example, to log cache and blob events, use
927
928 gm convert -debug "Cache,Blob" rose: rose.png
929
930 The "User" domain is normally empty, but developers can log
931 "User" events in their private copy of GraphicsMagick.
932
933 Use the -log option to specify the format for debugging output.
934
935 Use +debug to turn off all logging.
936
937 An alternative to using -debug is to use the MAGICK_DEBUG envi‐
938 ronment variable. The allowed values for the MAGICK_DEBUG envi‐
939 ronment variable are the same as for the -debug option.
940
941 -deconstruct
942 break down an image sequence into constituent parts
943
944 This option compares each image with the next in a sequence and
945 returns the maximum bounding region of any pixel differences it
946 discovers. This method can undo a coalesced sequence returned
947 by the -coalesce option, and is useful for removing redundant
948 information from a GIF or MNG animation.
949
950 The sequence of images is terminated by the appearance of any
951 option. If the -deconstruct option appears after all of the
952 input images, all images are deconstructed.
953
954 -define <key>{=<value>},...
955 add coder/decoder specific options This option creates one or
956 more definitions for coders and decoders to use while reading
957 and writing image data. Definitions may be passed to coders and
958 decoders to control options that are specific to certain image
959 formats. If value is missing for a definition, an empty-valued
960 definition of a flag will be created with that name. This is
961 used to control on/off options. Use +define <key>,... to remove
962 definitions previously created. Use +define "*" to remove all
963 existing definitions.
964
965 The following definitions may be created:
966
967 cineon:colorspace={rgb|cineonlog}
968
969 Use the cineon:colorspace option when reading a Cineon
970 file to specify the colorspace the Cineon file uses. This
971 overrides the colorspace type implied by the DPX header
972 (if any).
973
974 dpx:bits-per-sample=<value>
975
976 If the dpx:bits-per-sample key is defined, GraphicsMagick
977 will write DPX images with the specified bits per sample,
978 overriding any existing depth value. If this option is not
979 specified, then the value is based on the existing image
980 depth value from the original image file. The DPX standard
981 supports bits per sample values of 1, 8, 10, 12, and 16.
982 Many DPX readers demand a sample size of 10 bits with type
983 A padding (see below).
984
985 dpx:colorspace={rgb|cineonlog}
986
987 Use the dpx:colorspace option when reading a DPX file to
988 specify the colorspace the DPX file uses. This overrides
989 the colorspace type implied by the DPX header (if any).
990
991 dpx:packing-method={packed|a|b|lsbpad|msbpad}
992
993 DPX samples are output within 32-bit words. They may be
994 tightly packed end-to-end within the words ("packed"),
995 padded with null bits to the right of the sample ("a" or
996 "lsbpad), or padded with null bits to the left of the sam‐
997 ple ("b" or "msbpad"). This option only has an effect for
998 sample sizes of 10 or 12 bits. If samples are not packed,
999 the DPX standard recommends type A padding. Many DPX read‐
1000 ers demand a sample size of 10 bits with type A padding.
1001
1002 dpx:pixel-endian={lsb|msb}
1003
1004 Allows the user to specify the endian order of the pixels
1005 when reading or writing the DPX files. Sometimes this is
1006 useful if the file is (or must be) written incorrectly so
1007 that the file header and the pixels use different endian‐
1008 ness.
1009
1010 dpx:swap-samples={true|false}
1011
1012 GraphicsMagick strives to adhere to the DPX standard but
1013 certain aspects of the standard can be quite confusing. As
1014 a result, some 10-bit DPX files have Red and Blue inter‐
1015 changed, or Cb and Cr interchanged due to an different
1016 interpretation of the standard, or getting the wires
1017 crossed. The swap-samples option may be supplied when
1018 reading or writing in order to read or write using the
1019 necessary sample order.
1020
1021 jp2:rate=<value>
1022
1023 Specify the compression factor to use while writing
1024 JPEG-2000 files. The compression factor is the reciprocal
1025 of the compression ratio. The valid range is 0.0 to 1.0,
1026 with 1.0 indicating lossless compression. If defined, this
1027 value overrides the -quality setting. The default quality
1028 setting of 75 results in a rate value of 0.06641.
1029
1030 jpeg:block-smoothing={true|false}
1031
1032 Enables or disables block smoothing when reading a JPEG
1033 file (default enabled).
1034
1035 jpeg:dct-method=<value>
1036
1037 Selects the IJG JPEG library DCT implementation to use.
1038 The encoding implementations vary in speed and encoding
1039 error. The available choices for value are islow, ifast,
1040 float, default and fastest. Note that fastest might not
1041 necessarily be fastest on your CPU, depending on the
1042 choices made when the JPEG library was built and how your
1043 CPU behaves.
1044
1045 jpeg:fancy-upsampling={true|false}
1046
1047 Enables or disables fancy upsampling when reading a JPEG
1048 file (default enabled).
1049
1050 jpeg:optimize-coding={true|false}
1051
1052
1053 Selects if huffman encoding should be used. Huffman encod‐
1054 ing is enabled by default, but may be disabled for very
1055 large images since it encoding requires that the entire
1056 image be buffered in memory. Huffman encoding produces
1057 smaller JPEG files at the expense of added compression
1058 time and memory consumption.
1059
1060 jpeg:preserve-settings
1061
1062 If the jpeg:preserve-settings flag is defined, the JPEG
1063 encoder will use the same "quality" and "sampling-factor"
1064 settings that were found in the input file, if the input
1065 was in JPEG format. These settings are also preserved if
1066 the input is a JPEG file and the output is a JNG file. If
1067 the colorspace of the output file differs from that of the
1068 input file, the quality setting is preserved but the sam‐
1069 pling-factors are not.
1070
1071 ps:imagemask
1072
1073 If the ps:imagemask flag is defined, the PS3 and EPS3
1074 coders will create Postscript files that render bilevel
1075 images with the Postscript imagemask operator instead of
1076 the image operator.
1077
1078 tiff:alpha={unspecified|associated|unassociated}
1079
1080 Specify the TIFF alpha channel type when reading or writ‐
1081 ing TIFF files, overriding the normal value. The default
1082 alpha channel type for new files is associated alpha.
1083 Existing alpha settings are preserved when converting from
1084 one TIFF file to another. When a TIFF file uses associated
1085 alpha, the image pixels are pre-multiplied (i.e. altered)
1086 with the alpha channel. Files with "associated" alpha
1087 appear as if they were alpha composited on a black back‐
1088 ground when the matte channel is disabled. If the unasso‐
1089 ciated alpha type is selected, then the alpha channel is
1090 saved without altering the pixels. Photoshop recognizes
1091 associated alpha as transparency information, if the file
1092 is saved with unassociated alpha, the alpha information is
1093 loaded as an independent channel. Note that for many
1094 years, ImageMagick and GraphicsMagick marked TIFF files as
1095 using associated alpha, without properly pre-multiplying
1096 the pixels.
1097
1098 tiff:fill-order={msb2lsb|lsb2msb}
1099
1100 If the tiff:fill-order key is defined, GraphicsMagick will
1101 use it to determine the bit fill order used while writing
1102 TIFF files. The normal default is "msb2lsb", which matches
1103 the native bit order of all modern CPUs. The only excep‐
1104 tion to this is when Group3 or Group4 FAX compression is
1105 requested since FAX machines send data in bit-reversed
1106 order and therefore RFC 2301 recommends using reverse
1107 order.
1108
1109 tiff:sample-format={unsigned|ieeefp}
1110
1111 If the tiff:sample-format key is defined, GraphicsMagick
1112 will use it to determine the sample format used while
1113 writing TIFF files. The default is "unsigned". Specify
1114 "ieeefp" in order to write floating-point TIFF files with
1115 float (32-bit) or double (64-bit) values. Use the
1116 tiff:bits-per-sample define to determine the type of
1117 floating-point value to use.
1118
1119 tiff:max-sample-value=<value>
1120
1121 If the tiff:max-sample-value key is defined, GraphicsMag‐
1122 ick will use the assigned value as the maximum floating
1123 point value while reading or writing IEEE floating point
1124 TIFFs. Otherwise the maximum value is 1.0 or the value
1125 obtained from the file's SMaxSampleValue tag (if present).
1126 The floating point data is currently not scanned in
1127 advance to determine a best maximum sample value so if the
1128 range is not 1.0, or the SMaxSampleValue tag is not
1129 present, it may be necessary to (intelligently) use this
1130 parameter to properly read a file.
1131
1132 tiff:min-sample-value=<value>
1133
1134 If the tiff:min-sample-value key is defined, GraphicsMag‐
1135 ick will use the assigned value as the minimum floating
1136 point value while reading or writing IEEE floating point
1137 TIFFs. Otherwise the minimum value is 0.0 or the value
1138 obtained from the file's SMinSampleValue tag (if present).
1139
1140 tiff:bits-per-sample=<value>
1141
1142 If the tiff:bits-per-sample key is defined, GraphicsMagick
1143 will write images with the specified bits per sample,
1144 overriding any existing depth value. Value may be any in
1145 the range of 1 to 32, or 64 when the default ´unsigned'
1146 format is written, or 16/32/24/64 if IEEEFP format is
1147 written. Please note that the baseline TIFF 6.0 specifi‐
1148 cation only requires readers to handle certain powers of
1149 two, and the values to be handled depend on the nature of
1150 the image (e.g. colormapped, grayscale, RGB, CMYK).
1151
1152 tiff:samples-per-pixel=<value>
1153
1154 If the tiff:samples-per-pixel key is defined to a value,
1155 the TIFF coder will write TIFF images with the defined
1156 samples per pixel, overriding any value stored in the
1157 image. This option should not normally be used.
1158
1159 tiff:rows-per-strip=<value>
1160
1161 Allows the user to specify the number of rows per TIFF
1162 strip. Rounded up to a multiple of 16 when using JPEG
1163 compression. Ignored when using tiles.
1164
1165 tiff:strip-per-page=true
1166
1167 Requests that the image is written in a single TIFF strip.
1168 This is normally the default when group3 or group4 com‐
1169 pression is requested within reasonable limits. Requesting
1170 a single strip for large images may result in failure due
1171 to resource consumption in the writer or reader.
1172
1173 tiff:tile
1174
1175 Enable writing tiled TIFF (rather than stripped) using the
1176 default tile size. Tiled TIFF organizes the image as an
1177 array of smaller images (tiles) in order to enable random
1178 access.
1179
1180 tiff:tile-geometry=<width>x<height>
1181
1182 Specify the tile size to use while writing tiled TIFF.
1183 Width and height should be a multiple of 16. If the value
1184 is not a multiple of 16, then it will be rounded down.
1185 Enables tiled TIFF if it has not already been enabled.
1186 GraphicsMagick does not use tiled storage internally so
1187 tiles need to be converted back and forth from the inter‐
1188 nal scanline-oriented storage to tile-oriented storage.
1189 Testing with typical RGB images shows that useful square
1190 tile size values range from 128x128 to 1024x1024. Large
1191 images which require using a disk-based pixel cache bene‐
1192 fit from large tile sizes while images which fit in memory
1193 work well with smaller tile sizes.
1194
1195 tiff:tile-width=<width>
1196
1197 Specify the tile width to use while writing tiled TIFF.
1198 The tile height is then defaulted to an appropriate size.
1199 Width should be a multiple of 16. If the value is not a
1200 multiple of 16, then it will be rounded down. Enables
1201 tiled TIFF if it has not already been enabled.
1202
1203 tiff:tile-height=<height>
1204
1205 Specify the tile height to use while writing tiled TIFF.
1206 The tile width is then defaulted to an appropriate size.
1207 Height should be a multiple of 16. If the value is not a
1208 multiple of 16, then it will be rounded down. Enables
1209 tiled TIFF if it has not already been enabled.
1210
1211
1212
1213 For example, to create a postscript file that will render only
1214 the black pixels of a bilevel image, use:
1215
1216 gm convert bilevel.tif -define ps:imagemask eps3:stencil.ps
1217
1218 -delay <1/100ths of a second>
1219 display the next image after pausing
1220
1221 This option is useful for regulating the animation of image
1222 sequences Delay/100 seconds must expire before the display of
1223 the next image. The default is no delay between each showing of
1224 the image sequence. The maximum delay is 65535.
1225
1226 You can specify a delay range (e.g. -delay 10-500) which sets
1227 the minimum and maximum delay.
1228
1229 -density <width>x<height>
1230 horizontal and vertical resolution in pixels of the image This
1231 option specifies the image resolution to store while encoding a
1232 raster image or the canvas resolution while rendering (reading)
1233 vector formats such as Postscript, PDF, WMF, and SVG into a
1234 raster image. Image resolution provides the unit of measure to
1235 apply when rendering to an output device or raster image. The
1236 default unit of measure is in dots per inch (DPI). The -units
1237 option may be used to select dots per centimeter instead.
1238 The default resolution is 72 dots per inch, which is equivalent
1239 to one point per pixel (Macintosh and Postscript standard). Com‐
1240 puter screens are normally 72 or 96 dots per inch while printers
1241 typically support 150, 300, 600, or 1200 dots per inch. To
1242 determine the resolution of your display, use a ruler to measure
1243 the width of your screen in inches, and divide by the number of
1244 horizontal pixels (1024 on a 1024x768 display). If the file
1245 format supports it, this option may be used to update the stored
1246 image resolution. Note that Photoshop stores and obtains image
1247 resolution from a proprietary embedded profile. If this profile
1248 is not stripped from the image, then Photoshop will continue to
1249 treat the image using its former resolution, ignoring the image
1250 resolution specified in the standard file header. The density
1251 option is an attribute and does not alter the underlying raster
1252 image. It may be used to adjust the rendered size for desktop
1253 publishing purposes by adjusting the scale applied to the pix‐
1254 els. To resize the image so that it is the same size at a dif‐
1255 ferent resolution, use the -resample option.
1256
1257 -depth <value>
1258 depth of the image
1259
1260 This is the number of bits of color to preserve in the image.
1261 Any value between 1 and QuantumDepth (build option) may be spec‐
1262 ified, although 8 or 16 are the most common values. Use this
1263 option to specify the depth of raw images whose depth is unknown
1264 such as GRAY, RGB, or CMYK, or to change the depth of any image
1265 after it has been read. The depth option is applied to the pix‐
1266 els immediately so it may be used as a form of simple compres‐
1267 sion by discarding the least significant bits. Reducing the
1268 depth in advance may speed up color quantization, and help cre‐
1269 ate smaller file sizes when using a compression algorithm like
1270 LZW or ZIP.
1271
1272 -descend
1273 obtain image by descending window hierarchy
1274
1275 -despeckle
1276 reduce the speckles within an image
1277
1278 -displace <horizontal scale>x<vertical scale>
1279 shift image pixels as defined by a displacement map
1280
1281 With this option, composite image is used as a displacement map.
1282 Black, within the displacement map, is a maximum positive dis‐
1283 placement. White is a maximum negative displacement and middle
1284 gray is neutral. The displacement is scaled to determine the
1285 pixel shift. By default, the displacement applies in both the
1286 horizontal and vertical directions. However, if you specify
1287 mask, composite image is the horizontal X displacement and mask
1288 the vertical Y displacement.
1289
1290 -display <host:display[.screen]>
1291 specifies the X server to contact
1292
1293 This option is used with convert for obtaining image or font
1294 from this X server. See X(1).
1295
1296 -dispose <method>
1297 GIF disposal method
1298
1299 The Disposal Method indicates the way in which the graphic is to
1300 be treated after being displayed.
1301
1302 Here are the valid methods:
1303
1304 Undefined No disposal specified.
1305 None Do not dispose between frames.
1306 Background Overwrite the image area with
1307 the background color.
1308 Previous Overwrite the image area with
1309 what was there prior to rendering
1310 the image.
1311
1312 -dissolve <percent>
1313 dissolve an image into another by the given percent
1314
1315 The opacity of the composite image is multiplied by the given
1316 percent, then it is composited over the main image.
1317
1318 -dither
1319 apply Floyd/Steinberg error diffusion to the image
1320
1321 The basic strategy of dithering is to trade intensity resolution
1322 for spatial resolution by averaging the intensities of several
1323 neighboring pixels. Images which suffer from severe contouring
1324 when reducing colors can be improved with this option.
1325
1326 The -colors or -monochrome option is required for this option to
1327 take effect.
1328
1329 Use +dither to turn off dithering and to render PostScript with‐
1330 out text or graphic aliasing. Disabling dithering often (but not
1331 always) leads to decreased processing time.
1332
1333 -draw <string>
1334 annotate an image with one or more graphic primitives
1335
1336 Use this option to annotate an image with one or more graphic
1337 primitives. The primitives include shapes, text, transforma‐
1338 tions, and pixel operations. The shape primitives are
1339
1340 point x,y
1341 line x0,y0 x1,y1
1342 rectangle x0,y0 x1,y1
1343 roundRectangle x0,y0 x1,y1 wc,hc
1344 arc x0,y0 x1,y1 a0,a1
1345 ellipse x0,y0 rx,ry a0,a1
1346 circle x0,y0 x1,y1
1347 polyline x0,y0 ... xn,yn
1348 polygon x0,y0 ... xn,yn
1349 Bezier x0,y0 ... xn,yn
1350 path path specification
1351 image operator x0,y0 w,h filename
1352
1353 The text primitive is
1354
1355 text x0,y0 string
1356
1357 The text gravity primitive is
1358
1359 gravity NorthWest, North, NorthEast, West, Center,
1360 East, SouthWest, South, or SouthEast
1361
1362 The text gravity primitive only affects the placement of text
1363 and does not interact with the other primitives. It is equiva‐
1364 lent to using the -gravity commandline option, except that it is
1365 limited in scope to the -draw option in which it appears.
1366
1367 The transformation primitives are
1368
1369 rotate degrees
1370 translate dx,dy
1371 scale sx,sy
1372 skewX degrees
1373 skewY degrees
1374
1375 The pixel operation primitives are
1376
1377 color x0,y0 method
1378 matte x0,y0 method
1379
1380 The shape primitives are drawn in the color specified in the
1381 preceding -stroke option. Except for the line and point primi‐
1382 tives, they are filled with the color specified in the preceding
1383 -fill option. For unfilled shapes, use -fill none.
1384
1385 Point requires a single coordinate.
1386
1387 Line requires a start and end coordinate.
1388
1389 Rectangle expects an upper left and lower right coordinate.
1390
1391 RoundRectangle has the upper left and lower right coordinates
1392 and the width and height of the corners.
1393
1394 Circle has a center coordinate and a coordinate for the outer
1395 edge.
1396
1397 Use Arc to inscribe an elliptical arc within a rectangle. Arcs
1398 require a start and end point as well as the degree of rotation
1399 (e.g. 130,30 200,100 45,90).
1400
1401 Use Ellipse to draw a partial ellipse centered at the given
1402 point with the x-axis and y-axis radius and start and end of arc
1403 in degrees (e.g. 100,100 100,150 0,360).
1404
1405 Finally, polyline and polygon require three or more coordinates
1406 to define its boundaries. Coordinates are integers separated by
1407 an optional comma. For example, to define a circle centered at
1408 100,100 that extends to 150,150 use:
1409
1410 -draw 'circle 100,100 150,150'
1411
1412 Paths (See Paths) represent an outline of an object which is
1413 defined in terms of moveto (set a new current point), lineto
1414 (draw a straight line), curveto (draw a curve using a cubic
1415 Bezier), arc (elliptical or circular arc) and closepath (close
1416 the current shape by drawing a line to the last moveto) ele‐
1417 ments. Compound paths (i.e., a path with subpaths, each consist‐
1418 ing of a single moveto followed by one or more line or curve
1419 operations) are possible to allow effects such as "donut holes"
1420 in objects.
1421
1422 Use image to composite an image with another image. Follow the
1423 image keyword with the composite operator, image location, image
1424 size, and filename:
1425
1426 -draw 'image Over 100,100 225,225 image.jpg'
1427
1428 You can use 0,0 for the image size, which means to use the
1429 actual dimensions found in the image header. Otherwise, it will
1430 be scaled to the given dimensions. See -compose for a descrip‐
1431 tion of the composite operators.
1432
1433 Use text to annotate an image with text. Follow the text coordi‐
1434 nates with a string. If the string has embedded spaces, enclose
1435 it in single or double quotes. Optionally you can include the
1436 image filename, type, width, height, or other image attribute by
1437 embedding special format character. See -comment for details.
1438
1439 For example,
1440
1441
1442 -draw 'text 100,100 "%m:%f %wx%h"'
1443
1444 annotates the image with MIFF:bird.miff 512x480 for an image
1445 titled bird.miff and whose width is 512 and height is 480.
1446
1447 If the first character of string is @, the text is read from a
1448 file titled by the remaining characters in the string.
1449
1450 Rotate rotates subsequent shape primitives and text primitives
1451 about the origin of the main image. If the -region option pre‐
1452 cedes the -draw option, the origin for transformations is the
1453 upper left corner of the region.
1454
1455 Translate translates them.
1456
1457 Scale scales them.
1458
1459 SkewX and SkewY skew them with respect to the origin of the main
1460 image or the region.
1461
1462 The transformations modify the current affine matrix, which is
1463 initialized from the initial affine matrix defined by the
1464 -affine option. Transformations are cumulative within the -draw
1465 option. The initial affine matrix is not affected; that matrix
1466 is only changed by the appearance of another -affine option. If
1467 another -draw option appears, the current affine matrix is
1468 reinitialized from the initial affine matrix.
1469
1470 Use color to change the color of a pixel to the fill color (see
1471 -fill). Follow the pixel coordinate with a method:
1472
1473 point
1474 replace
1475 floodfill
1476 filltoborder
1477 reset
1478
1479 Consider the target pixel as that specified by your coordinate.
1480 The point method recolors the target pixel. The replace method
1481 recolors any pixel that matches the color of the target pixel.
1482 Floodfill recolors any pixel that matches the color of the tar‐
1483 get pixel and is a neighbor, whereas filltoborder recolors any
1484 neighbor pixel that is not the border color. Finally, reset
1485 recolors all pixels.
1486
1487 Use matte to the change the pixel matte value to transparent.
1488 Follow the pixel coordinate with a method (see the color primi‐
1489 tive for a description of methods). The point method changes the
1490 matte value of the target pixel. The replace method changes the
1491 matte value of any pixel that matches the color of the target
1492 pixel. Floodfill changes the matte value of any pixel that
1493 matches the color of the target pixel and is a neighbor, whereas
1494 filltoborder changes the matte value of any neighbor pixel that
1495 is not the border color (-bordercolor). Finally reset changes
1496 the matte value of all pixels.
1497
1498 You can set the primitive color, font, and font bounding box
1499 color with -fill, -font, and -box respectively. Options are pro‐
1500 cessed in command line order so be sure to use these options
1501 before the -draw option.
1502
1503 -edge <radius>
1504 detect edges within an image
1505
1506 -emboss <radius>
1507 emboss an image
1508
1509 -encoding <type>
1510 specify the text encoding
1511
1512 Choose from AdobeCustom, AdobeExpert, AdobeStandard, AppleRoman,
1513 BIG5, GB2312, Latin 2, None, SJIScode, Symbol, Unicode, Wansung.
1514
1515 -endian <type>
1516 specify endianness (MSB, LSB, or Native) of image
1517
1518 MSB indicates big-endian (e.g. SPARC, Motorola 68K) while LSB
1519 indicates little-endian (e.g. Intel 'x86, VAX) byte ordering.
1520 Native indicates to use the normal ordering for the current CPU.
1521 This option currently only influences the CMYK, DPX, GRAY, RGB,
1522 and TIFF, formats.
1523
1524 Use +endian to revert to unspecified endianness.
1525
1526 -enhance
1527 apply a digital filter to enhance a noisy image
1528
1529 -equalize
1530 perform histogram equalization to the image
1531
1532 -extent <width>x<height>{+-}<x>{+-}<y>
1533 composite image on background color canvas image
1534
1535 This option composites the image on a background color (-back‐
1536 ground) canvas image. The existing image content is composited
1537 at the position specified by geometry x and y offset and/or
1538 desired gravity (-gravity) using the current image compose
1539 (-compose) method. Image content which falls outside the bounds
1540 of the new image dimensions is discarded.
1541
1542 For example, this command creates a thumbnail of an image, and
1543 centers it on a red color backdrop image:
1544
1545 gm convert infile.jpg -thumbnail 120x80 -background red
1546 -gravity center -extent 140x100 outfile.jpg
1547
1548 -file <filename>
1549 write annotated difference image to file
1550
1551 If -file is specified, then an annotated difference image is
1552 generated and written to the specified file. Pixels which differ
1553 between the reference and compare images are modified from those
1554 in the compare image so that the changed pixels become more
1555 obvious. Some images may require use of an alternative high‐
1556 light style (see -highlight-style) or highlight color (see
1557 -highlight-color) before the changes are obvious.
1558
1559 -fill <color>
1560 color to use when filling a graphic primitive
1561
1562 Colors are represented in GraphicsMagick in the same form used
1563 by SVG. Use "gm convert -list color" to list named colors:
1564
1565 name (named color)
1566 #RGB (hex numbers, 4 bits each)
1567 #RRGGBB (8 bits each)
1568 #RRRGGGBBB (12 bits each)
1569 #RRRRGGGGBBBB (16 bits each)
1570 #RGBA (4 bits each)
1571 #RRGGBBAA (8 bits each)
1572 #RRRGGGBBBAAA (12 bits each)
1573 #RRRRGGGGBBBBAAAA (16 bits each)
1574 rgb(r,g,b) (r,g,b are decimal numbers)
1575 rgba(r,g,b,a) (r,g,b,a are decimal numbers)
1576
1577 Enclose the color specification in quotation marks to prevent
1578 the "#" or the parentheses from being interpreted by your shell.
1579
1580 For example,
1581
1582 gm convert -fill blue ...
1583 gm convert -fill "#ddddff" ...
1584 gm convert -fill "rgb(65000,65000,65535)" ...
1585
1586 The shorter forms are scaled up, if necessary by replication.
1587 For example, #3af, #33aaff, and #3333aaaaffff are all equiva‐
1588 lent.
1589
1590 See -draw for further details.
1591
1592 -filter <type>
1593 use this type of filter when resizing an image
1594
1595 Use this option to affect the resizing operation of an image
1596 (see -geometry). Choose from these filters (ordered by approxi‐
1597 mate increasing CPU time):
1598
1599 Point
1600 Box
1601 Triangle
1602 Hermite
1603 Hanning
1604 Hamming
1605 Blackman
1606 Gaussian
1607 Quadratic
1608 Cubic
1609 Catrom
1610 Mitchell
1611 Lanczos
1612 Bessel
1613 Sinc
1614
1615 The default filter is automatically selected to provide the best
1616 quality while consuming a reasonable amount of time. The
1617 Mitchell filter is used if the image supports a palette, sup‐
1618 ports a matte channel, or is being enlarged, otherwise the Lanc‐
1619 zos filter is used.
1620
1621 -flatten
1622 flatten a sequence of images
1623
1624 The sequence of images is replaced by a single image created by
1625 composing each image after the first over the first image.
1626
1627 The sequence of images is terminated by the appearance of any
1628 option. If the -flatten option appears after all of the input
1629 images, all images are flattened.
1630
1631 -flip create a "mirror image"
1632
1633 reflect the scanlines in the vertical direction.
1634
1635 -flop create a "mirror image"
1636
1637 reflect the scanlines in the horizontal direction.
1638
1639 -font <name>
1640 use this font when annotating the image with text
1641
1642 You can tag a font to specify whether it is a PostScript, True‐
1643 Type, or X11 font. For example, Arial.ttf is a TrueType font,
1644 ps:helvetica is PostScript, and x:fixed is X11.
1645
1646 -foreground <color>
1647 define the foreground color
1648
1649 The color is specified using the format described under the
1650 -fill option.
1651
1652 -format <type>
1653 the image format type
1654
1655 When used with the mogrify utility, this option will convert any
1656 image to the image format you specify. See GraphicsMagick(1)
1657 for a list of image format types supported by GraphicsMagick, or
1658 see the output of 'gm -list format'.
1659
1660 By default the file is written to its original name. However,
1661 if the filename extension matches a supported format, the exten‐
1662 sion is replaced with the image format type specified with -for‐
1663 mat. For example, if you specify tiff as the format type and
1664 the input image filename is image.gif, the output image filename
1665 becomes image.tiff.
1666
1667 -format <string>
1668 output formatted image characteristics
1669
1670 When used with the identify utility, use this option to print
1671 information about the image in a format of your choosing. You
1672 can include the image filename, type, width, height, Exif data,
1673 or other image attributes by embedding special format charac‐
1674 ters:
1675
1676 %b file size
1677 %c comment
1678 %d directory
1679 %e filename extension
1680 %f filename
1681 %h height
1682 %i input filename
1683 %k number of unique colors
1684 %l label
1685 %m magick
1686 %n number of scenes
1687 %o output filename
1688 %p page number
1689 %q image minimum bit depth
1690 %r image type description
1691 %s scene number
1692 %t top of filename
1693 %u unique temporary filename
1694 %w width
1695 %x x resolution
1696 %y y resolution
1697 %# signature
1698 \n newline
1699 \r carriage return
1700
1701 For example,
1702
1703 -format "%m:%f %wx%h"
1704
1705 displays MIFF:bird.miff 512x480 for an image titled bird.miff
1706 and whose width is 512 and height is 480.
1707
1708 If the first character of string is @, the format is read from a
1709 file titled by the remaining characters in the string.
1710
1711 The values of image type (%p) which may be returned include:
1712
1713 Bilevel
1714 Grayscale
1715 GrayscaleMatte
1716 Palette
1717 PaletteMatte
1718 TrueColor
1719 TrueColorMatte
1720 ColorSeparation
1721 ColorSeparationMatte
1722 Optimize
1723
1724 You can also use the following special formatting syntax to
1725 print Exif information contained in the file:
1726
1727 %[EXIF:<tag>]
1728
1729 Where "<tag>" can be one of the following:
1730
1731 * (print all Exif tags, in keyword=data format)
1732 ! (print all Exif tags, in tag_number data format)
1733 #hhhh (print data for Exif tag #hhhh)
1734 ImageWidth
1735 ImageLength
1736 BitsPerSample
1737 Compression
1738 PhotometricInterpretation
1739 FillOrder
1740 DocumentName
1741 ImageDescription
1742 Make
1743 Model
1744 StripOffsets
1745 Orientation
1746 SamplesPerPixel
1747 RowsPerStrip
1748 StripByteCounts
1749 XResolution
1750 YResolution
1751 PlanarConfiguration
1752 ResolutionUnit
1753 TransferFunction
1754 Software
1755 DateTime
1756 Artist
1757 WhitePoint
1758 PrimaryChromaticities
1759 TransferRange
1760 JPEGProc
1761 JPEGInterchangeFormat
1762 JPEGInterchangeFormatLength
1763 YCbCrCoefficients
1764 YCbCrSubSampling
1765 YCbCrPositioning
1766 ReferenceBlackWhite
1767 CFARepeatPatternDim
1768 CFAPattern
1769 BatteryLevel
1770 Copyright
1771 ExposureTime
1772 FNumber
1773 IPTC/NAA
1774 ExifOffset
1775 InterColorProfile
1776 ExposureProgram
1777 SpectralSensitivity
1778 GPSInfo
1779 ISOSpeedRatings
1780 OECF
1781 ExifVersion
1782 DateTimeOriginal
1783 DateTimeDigitized
1784 ComponentsConfiguration
1785 CompressedBitsPerPixel
1786 ShutterSpeedValue
1787 ApertureValue
1788 BrightnessValue
1789 ExposureBiasValue
1790 MaxApertureValue
1791 SubjectDistance
1792 MeteringMode
1793 LightSource
1794 Flash
1795 FocalLength
1796 MakerNote
1797 UserComment
1798 SubSecTime
1799 SubSecTimeOriginal
1800 SubSecTimeDigitized
1801 FlashPixVersion
1802 ColorSpace
1803 ExifImageWidth
1804 ExifImageLength
1805 InteroperabilityOffset
1806 FlashEnergy
1807 SpatialFrequencyResponse
1808 FocalPlaneXResolution
1809 FocalPlaneYResolution
1810 FocalPlaneResolutionUnit
1811 SubjectLocation
1812 ExposureIndex
1813 SensingMethod
1814 FileSource
1815 SceneType
1816
1817 Surround the format specification with quotation marks to pre‐
1818 vent your shell from misinterpreting any spaces and square
1819 brackets.
1820
1821 -frame <width>x<height>+<outer bevel width>+<inner bevel width>
1822 surround the image with an ornamental border
1823
1824 See -geometry for details about the geometry specification. The
1825 -frame option is not affected by the -gravity option.
1826
1827 The color of the border is specified with the -mattecolor com‐
1828 mand line option.
1829
1830 -frame include the X window frame in the imported image
1831
1832 -fuzz <distance>{%}
1833 colors within this Euclidean distance are considered equal
1834
1835 A number of algorithms search for a target color. By default the
1836 color must be exact. Use this option to match colors that are
1837 close (in Euclidean distance) to the target color in RGB 3D
1838 space. For example, if you want to automatically trim the edges
1839 of an image with -trim but the image was scanned and the target
1840 background color may differ by a small amount. This option can
1841 account for these differences.
1842
1843 The distance can be in absolute intensity units or, by appending
1844 "%", as a percentage of the maximum possible intensity (255,
1845 65535, or 4294967295).
1846
1847 -gamma <value>
1848 level of gamma correction
1849
1850 The same color image displayed on two different workstations may
1851 look different due to differences in the display monitor. Use
1852 gamma correction to adjust for this color difference. Reasonable
1853 values extend from 0.8 to 2.3. Gamma less than 1.0 darkens the
1854 image and gamma greater than 1.0 lightens it. Large adjustments
1855 to image gamma may result in the loss of some image information
1856 if the pixel quantum size is only eight bits (quantum range 0 to
1857 255).
1858
1859 You can apply separate gamma values to the red, green, and blue
1860 channels of the image with a gamma value list delimited with
1861 slashes (e.g., 1.7/2.3/1.2).
1862
1863 Use +gamma value to set the image gamma level without actually
1864 adjusting the image pixels. This option is useful if the image
1865 is of a known gamma but not set as an image attribute (e.g. PNG
1866 images).
1867
1868 -gaussian <radius>{x<sigma>}
1869 blur the image with a Gaussian operator
1870
1871 Use the given radius and standard deviation (sigma).
1872
1873 -geometry <width>x<height>{+-}<x>{+-}<y>{%}{@}{!}{^}{<}{>}
1874 preferred size and location of the Image window.
1875
1876 By default, the window size is the image size and the location
1877 is chosen by you when it is mapped.
1878
1879 By default, the width and height are maximum values. That is,
1880 the image is expanded or contracted to fit the width and height
1881 value while maintaining the aspect ratio of the image.
1882
1883 Append a ^ to the geometry so that the image is resized while
1884 maintaining the aspect ratio of the image, but the resulting
1885 width or height are treated as minimum values rather than maxi‐
1886 mum values.
1887
1888 Append an exclamation point to the geometry to force the image
1889 size to exactly the size you specify. For example, if you spec‐
1890 ify 640x480! the image width is set to 640 pixels and height to
1891 480.
1892
1893 If only the width is specified, the width assumes the value and
1894 the height is chosen to maintain the aspect ratio of the image.
1895 Similarly, if only the height is specified (e.g., -geometry
1896 x256), the width is chosen to maintain the aspect ratio.
1897
1898 To specify a percentage width or height instead, append %. The
1899 image size is multiplied by the width and height percentages to
1900 obtain the final image dimensions. To increase the size of an
1901 image, use a value greater than 100 (e.g. 125%). To decrease an
1902 image's size, use a percentage less than 100.
1903
1904 Use @ to specify the maximum area in pixels of an image.
1905
1906 Use > to change the dimensions of the image only if its width or
1907 height exceeds the geometry specification. < resizes the image
1908 only if both of its dimensions are less than the geometry speci‐
1909 fication. For example, if you specify '640x480>' and the image
1910 size is 256x256, the image size does not change. However, if the
1911 image is 512x512 or 1024x1024, it is resized to 480x480.
1912 Enclose the geometry specification in quotation marks to prevent
1913 the < or > from being interpreted by your shell as a file redi‐
1914 rection.
1915
1916 When used with animate and display, offsets are handled in the
1917 same manner as in X(1) and the -gravity option is not used. If
1918 the x is negative, the offset is measured leftward from the
1919 right edge of the screen to the right edge of the image being
1920 displayed. Similarly, negative y is measured between the bottom
1921 edges. The offsets are not affected by "%"; they are always
1922 measured in pixels.
1923
1924 When used as a composite option, -geometry gives the dimensions
1925 of the image and its location with respect to the composite
1926 image. If the -gravity option is present with NorthEast, East,
1927 or SouthEast gravity, the x represents the distance from the
1928 right edge of the image to the right edge of the composite
1929 image. Similarly, if the -gravity option is present with South‐
1930 West, South, or SouthEast gravity, y is measured between the
1931 bottom edges. Accordingly, a positive offset will never point in
1932 the direction outside of the image. The offsets are not
1933 affected by "%"; they are always measured in pixels. To specify
1934 the dimensions of the composite image, use the -resize option.
1935
1936 When used as a convert, import or mogrify option, -geometry is
1937 synonymous with -resize and specifies the size of the output
1938 image. The offsets, if present, are ignored.
1939
1940 When used as a montage option, -geometry specifies the image
1941 size and border size for each tile; default is 256x256+0+0.
1942 Negative offsets (border dimensions) are meaningless. The
1943 -gravity option affects the placement of the image within the
1944 tile; the default gravity for this purpose is Center. If the
1945 "%" sign appears in the geometry specification, the tile size is
1946 the specified percentage of the original dimensions of the first
1947 tile. To specify the dimensions of the montage, use the -resize
1948 option.
1949
1950 -gravity <type>
1951 direction primitive gravitates to when annotating the image.
1952
1953 Choices are: NorthWest, North, NorthEast, West, Center, East,
1954 SouthWest, South, SouthEast.
1955
1956 The direction you choose specifies where to position the text
1957 when annotating the image. For example Center gravity forces the
1958 text to be centered within the image. By default, the image
1959 gravity is NorthWest. See -draw for more details about graphic
1960 primitives. Only the text primitive is affected by the -gravity
1961 option.
1962
1963 The -gravity option is also used in concert with the -geometry
1964 option and other options that take <geometry> as a parameter,
1965 such as the -crop option. See -geometry for details of how the
1966 -gravity option interacts with the <x> and <y> parameters of a
1967 geometry specification.
1968
1969 When used as an option to composite, -gravity gives the direc‐
1970 tion that the image gravitates within the composite.
1971
1972 When used as an option to montage, -gravity gives the direction
1973 that an image gravitates within a tile. The default gravity is
1974 Center for this purpose.
1975
1976 -green-primary <x>,<y>
1977 green chromaticity primary point
1978
1979 -hald-clut <clut>
1980 apply a Hald CLUT to the image
1981
1982 A Hald CLUT ("Color Look-Up Table") is a special square color
1983 image which contains a look-up table for red, green, and blue.
1984 The size of the Hald CLUT image is determined by its order. The
1985 width (and height) of a Hald CLUT is the cube of the order. For
1986 example, a Hald CLUT of order 8 is 512x512 pixels (262,144 col‐
1987 ors) and of order 16 is 4096x4096 (16,777,216 colors). A spe‐
1988 cial CLUT is the identity CLUT which which causes no change to
1989 the input image. In order to use the Hald CLUT, one takes an
1990 identity CLUT and adjusts its colors in some way. The modified
1991 CLUT can then be used to transform any number of images in an
1992 identical way.
1993
1994 GraphicsMagick contains a built-in identity CLUT generator via
1995 the IDENTITY coder. For example reading from the file name
1996 IDENTITY:8 returns an identity CLUT of order 8. Typical Hald
1997 CLUT identity images have an order of between 8 and 16. The
1998 default order for the IDENTITY CLUT generator is 8. Interpola‐
1999 tion is used so it is not usually necessary for CLUT images to
2000 be very large. The PNG file format is ideal for storing Hald
2001 CLUT images because it compresses them very well.
2002
2003 -help print usage instructions
2004
2005 -highlight-color <color>
2006 pixel annotation color
2007
2008 Specifies the color to use when annotating difference pixels.
2009
2010 -highlight-style <style>
2011 pixel annotation style
2012
2013 Specifies the pixel difference annotation style used to draw
2014 attention to changed pixels. May be one of Assign, Threshold,
2015 Tint, or XOR; where Assign replaces the pixel with the highlight
2016 color (see -highlight-color), Threshold replaces the pixel with
2017 black or white based on the difference in intensity, Tint alpha
2018 tints the pixel with the highlight color, and XOR does an XOR
2019 between the pixel and the highlight color.
2020
2021 -iconGeometry <geometry>
2022 specify the icon geometry
2023
2024 Offsets, if present in the geometry specification, are handled
2025 in the same manner as the -geometry option, using X11 style to
2026 handle negative offsets.
2027
2028 -iconic
2029 iconic animation
2030
2031 -immutable
2032 make image immutable
2033
2034 -implode <factor>
2035 implode image pixels about the center
2036
2037 -intent <type>
2038 use this type of rendering intent when managing the image color
2039
2040 Use this option to affect the the color management operation of
2041 an image (see -profile). Choose from these intents: Absolute,
2042 Perceptual, Relative, Saturation.
2043
2044 The default intent is undefined.
2045
2046 -interlace <type>
2047 the type of interlacing scheme
2048
2049 Choices are: None, Line, Plane, or Partition. The default is
2050 None.
2051
2052 This option is used to specify the type of interlacing scheme
2053 for raw image formats such as RGB or YUV. None means do not
2054 interlace (RGBRGBRGBRGBRGBRGB...),
2055
2056 Line uses scanline interlacing
2057 (RRR...GGG...BBB...RRR...GGG...BBB...), and Plane uses plane
2058 interlacing (RRRRRR...GGGGGG...BBBBBB...).
2059
2060 Partition is like plane except the different planes are saved to
2061 individual files (e.g. image.R, image.G, and image.B).
2062
2063 Use Line to create an interlaced PNG or GIF or progressive JPEG
2064 image.
2065
2066 -label <name>
2067 assign a label to an image
2068
2069 Use this option to assign a specific label to the image, when
2070 writing to an image format that supports labels, such as TIFF,
2071 PNG, MIFF, or PostScript. You can include the the image file‐
2072 name, type, width, height, or other image attribute by embedding
2073 special format character. A label is not drawn on the image,
2074 but is embedded in the image datastream via a "Label" tag or
2075 similar mechanism. If you want the label to be visible on the
2076 image itself, use the -draw option. See -comment for details.
2077
2078 For example,
2079
2080 -label "%m:%f %wx%h"
2081
2082 produces an image label of MIFF:bird.miff 512x480 for an image
2083 titled bird.miff and whose width is 512 and height is 480.
2084
2085 If the first character of string is @, the image label is read
2086 from a file titled by the remaining characters in the string.
2087
2088 When converting to PostScript, use this option to specify a
2089 header string to print above the image. Specify the label font
2090 with -font.
2091
2092 When creating a montage, by default the label associated with an
2093 image is displayed with the corresponding tile in the montage.
2094 Use the +label option to suppress this behavior.
2095
2096 -lat <width>x<height>{+-}<offset>{%}
2097 perform local adaptive thresholding
2098
2099 Perform local adaptive thresholding using the specified width,
2100 height, and offset. The offset is a distance in sample space
2101 from the mean, as an absolute integer ranging from 0 to the max‐
2102 imum sample value or as a percentage.
2103
2104 -level <black_point>{,<gamma>}{,<white_point>}{%}
2105 adjust the level of image contrast
2106
2107 Give one, two or three values delimited with commas: black-
2108 point, gamma, white-point (e.g. 10,1.0,250 or 2%,0.5,98%). The
2109 black and white points range from 0 to MaxRGB or from 0 to 100%;
2110 if the white point is omitted it is set to MaxRGB-black_point.
2111 If a "%" sign is present anywhere in the string, the black and
2112 white points are percentages of MaxRGB. Gamma is an exponent
2113 that ranges from 0.1 to 10.; if it is omitted, the default of
2114 1.0 (no gamma correction) is assumed. This interface works simi‐
2115 lar to Photoshop's "Image->Adjustments->Levels..." "Input Lev‐
2116 els" interface.
2117
2118 -limit <type> <value>
2119 Disk, File, Map, Memory, Pixels, or Threads resource limit
2120
2121 By default, resource limits are estimated based on the available
2122 resources of the system. The resource limits are Disk, maximum
2123 total disk space consumed; File, maximum number of file descrip‐
2124 tors allowed to be open at once; Map, maximum total number of
2125 file bytes which may be memory mapped; Memory, maximum total
2126 number of bytes of heap memory used for image storage; Pixels,
2127 maximum absolute image size (per image); and Threads, the maxi‐
2128 mum number of worker threads to use per OpenMP thread team.
2129
2130 These resource limits are used to decide if (for a given image)
2131 the decoded image ("pixel cache") should be stored in heap mem‐
2132 ory (RAM), in a memory-mapped disk file, or in a disk file
2133 accessed via read/write I/O. The number of total pixels in one
2134 image may also be limited in order to force the reading, or cre‐
2135 ation of images larger than the limit (in pixels) to intention‐
2136 ally fail. The disk limit establishes an overall limit since
2137 using the disk is the means of last resort. When the disk limit
2138 has been reached, no more images may be read.
2139
2140 The value argument is an absolute value, but may have standard
2141 binary suffix characters applied ('K', 'M', 'G', 'T', 'P', 'E')
2142 to apply a scaling to the value (based on a multiplier of 1024).
2143 Any additional characters are ignored. For example, '-limit Pix‐
2144 els 10MP' limits the maximum image size to 10 megapixels and
2145 '-limit memory 32MB -limit map 64MB' limits memory and memory
2146 mapped files to 32 megabytes and 64 megabytes respectively.
2147
2148 Resource limits may also be set using environment variables. The
2149 environment variables MAGICK_LIMIT_DISK, MAGICK_LIMIT_FILES,
2150 MAGICK_LIMIT_MAP, MAGICK_LIMIT_MEMORY, MAGICK_LIMIT_PIXELS, and
2151 OMP_NUM_THREADS may be used to set the limits for disk space,
2152 open files, memory mapped size, heap memory, per-image pixels,
2153 and threads respectively.
2154
2155 Use the option -list resource list the current limits.
2156
2157 -linewidth
2158 the line width for subsequent draw operations
2159
2160 -list <type>
2161 the type of list
2162
2163 Choices are: Color, Delegate, Format, Magic, Module, Resource,
2164 or Type. The Module option is only available if GraphicsMagick
2165 was built to support loadable modules.
2166
2167 This option lists information about the GraphicsMagick configu‐
2168 ration.
2169
2170 -log <string>
2171 Specify format for debug log
2172
2173 This option specifies the format for the log printed when the
2174 -debug option is active.
2175
2176 You can display the following components by embedding special
2177 format characters:
2178
2179 %d domain
2180 %e event
2181 %f function
2182 %l line
2183 %m module
2184 %p process ID
2185 %r real CPU time
2186 %t wall clock time
2187 %u user CPU time
2188 %% percent sign
2189 \n newline
2190 \r carriage return
2191
2192 For example:
2193
2194 gm convert -debug coders -log "%u %m:%l %e" in.gif out.png
2195
2196 The default behavior is to print all of the components.
2197
2198 -loop <iterations>
2199 add Netscape loop extension to your GIF animation
2200
2201 A value other than zero forces the animation to repeat itself up
2202 to iterations times.
2203
2204 -magnify
2205 magnify the image
2206
2207 The image size is doubled using linear interpolation.
2208
2209 -magnify <factor>
2210 magnify the image
2211
2212 The displayed image is magnified by factor.
2213
2214 -map <filename>
2215 choose a particular set of colors from this image
2216
2217 [convert or mogrify]
2218
2219 By default, color reduction chooses an optimal set of colors
2220 that best represent the original image. Alternatively, you can
2221 choose a particular set of colors from an image file with this
2222 option.
2223
2224 Use +map to reduce all images in the image sequence that follows
2225 to a single optimal set of colors that best represent all the
2226 images. The sequence of images is terminated by the appearance
2227 of any option. If the +map option appears after all of the
2228 input images, all images are mapped.
2229
2230 -map <type>
2231 display image using this type.
2232
2233 [animate or display]
2234
2235 Choose from these Standard Colormap types:
2236
2237 best
2238 default
2239 gray
2240 red
2241 green
2242 blue
2243
2244 The X server must support the Standard Colormap you choose, oth‐
2245 erwise an error occurs. Use list as the type and display
2246 searches the list of colormap types in top-to-bottom order until
2247 one is located. See xstdcmap(1) for one way of creating Standard
2248 Colormaps.
2249
2250 -mask <filename>
2251 Specify a clipping mask
2252
2253 The image read from the file is used as a clipping mask. It
2254 must have the same dimensions as the image being masked.
2255
2256 If the mask image contains an opacity channel, the opacity of
2257 each pixel is used to define the mask. Otherwise, the intensity
2258 (gray level) of each pixel is used. Unmasked (black) pixels are
2259 modified while masked pixels (not black) are protected from
2260 alteration.
2261
2262 Use +mask to remove the clipping mask.
2263
2264 It is not necessary to use -clip to activate the mask; -clip is
2265 implied by -mask.
2266
2267 -matte store matte channel if the image has one
2268
2269 If the image does not have a matte channel, create an opaque
2270 one.
2271
2272 Use +matte to ignore the matte channel and to avoid writing a
2273 matte channel in the output file.
2274
2275 -mattecolor <color>
2276 specify the color to be used with the -frame option
2277
2278 The color is specified using the format described under the
2279 -fill option.
2280
2281 -maximum-error <limit>
2282 specifies the maximum amount of total image error
2283
2284 Specifies the maximum amount of total image error (based on com‐
2285 parison using a specified metric) before an error ("image dif‐
2286 ference exceeds limit") is reported. The error is reported via
2287 a non-zero command execution return status.
2288
2289 -median <radius>
2290 apply a median filter to the image
2291
2292 -minify <factor>
2293 minify the image
2294
2295 The image size is halved using linear interpolation.
2296
2297 -mode <value>
2298 mode of operation
2299
2300 The available montage modes are frame to place the images in a
2301 rectangular grid while adding a decorative frame with drop‐
2302 shadow, unframe to place undecorated images in a rectangular
2303 grid, and concatenate to pack the images closely together with‐
2304 out any well-defined grid or decoration.
2305
2306 -modulate brightness[,saturation[,hue]]
2307 vary the brightness, saturation, and hue of an image
2308
2309 Specify the percent change in brightness, color saturation, and
2310 hue separated by commas. Default argument values are 100 per‐
2311 cent, resulting in no change. For example, to increase the color
2312 brightness by 20% and decrease the color saturation by 10% and
2313 leave the hue unchanged, use: -modulate 120,90.
2314
2315 Hue is the percentage of absolute rotation from the current
2316 position. For example 50 results in a counter-clockwise rotation
2317 of 90 degrees, 150 results in a clockwise rotation of 90
2318 degrees, with 0 and 200 both resulting in a rotation of 180
2319 degrees.
2320
2321 -monitor
2322 show progress indication
2323
2324 A simple command-line progress indication is shown while the
2325 command is running. The process indication shows the operation
2326 currently being performed and the percent completed. Commands
2327 using X11 may replace the command line progress indication with
2328 a graphical one once an image has been displayed.
2329
2330 -monochrome
2331 transform the image to black and white
2332
2333 -morph <frames>
2334 morphs an image sequence
2335
2336 Both the image pixels and size are linearly interpolated to give
2337 the appearance of a meta-morphosis from one image to the next.
2338
2339 The sequence of images is terminated by the appearance of any
2340 option. If the -morph option appears after all of the input
2341 images, all images are morphed.
2342
2343 -mosaic
2344 create a mosaic from an image or an image sequence
2345
2346 The -page option can be used to establish the dimensions of the
2347 mosaic and to locate the images within the mosaic.
2348
2349 The sequence of images is terminated by the appearance of any
2350 option. If the -mosaic option appears after all of the input
2351 images, all images are included in the mosaic.
2352
2353 -motion-blur <radius>{x<sigma>}{+angle}
2354 Simulate motion blur
2355
2356 Simulate motion blur by convolving the image with a Gaussian
2357 operator of the given radius and standard deviation (sigma). For
2358 reasonable results, radius should be larger than sigma. If
2359 radius is zero, then a suitable radius is automatically selected
2360 based on sigma. The angle specifies the angle that the object is
2361 coming from (side which is blurred).
2362
2363 -name name an image
2364
2365 -negate
2366 replace every pixel with its complementary color
2367
2368 The red, green, and blue intensities of an image are negated.
2369 White becomes black, yellow becomes blue, etc. Use +negate to
2370 only negate the grayscale pixels of the image.
2371
2372 -noise <radius|type>
2373 add or reduce noise in an image
2374
2375 The principal function of noise peak elimination filter is to
2376 smooth the objects within an image without losing edge informa‐
2377 tion and without creating undesired structures. The central idea
2378 of the algorithm is to replace a pixel with its next neighbor in
2379 value within a pixel window, if this pixel has been found to be
2380 noise. A pixel is defined as noise if and only if this pixel is
2381 a maximum or minimum within the pixel window.
2382
2383 Use radius to specify the width of the neighborhood.
2384
2385 Use +noise followed by a noise type to add noise to an image.
2386 Choose from these noise types:
2387
2388 Uniform
2389 Gaussian
2390 Multiplicative
2391 Impulse
2392 Laplacian
2393 Poisson
2394
2395 -noop NOOP (no option)
2396
2397 The -noop option can be used to terminate a group of images and
2398 reset all options to their default values, when no other option
2399 is desired.
2400
2401 -normalize
2402 transform image to span the full range of color values
2403
2404 This is a contrast enhancement technique.
2405
2406 -opaque <color>
2407 change this color to the pen color within the image
2408
2409 The color is specified using the format described under the
2410 -fill option. The color is replaced if it is identical to the
2411 target color, or close enough to the target color in a 3D space
2412 as defined by the Euclidean distance specified by -fuzz.
2413
2414 See -fill and -fuzz for more details.
2415
2416 -operator channel operator rvalue[%]
2417 apply a mathematical, bitwise, or value operator to an image
2418 channel
2419
2420 Apply a low-level mathematical, bitwise, or value operator to a
2421 selected image channel or all image channels. Operations which
2422 result in negative results are reset to zero, and operations
2423 which overflow the available range are reset to the maximum pos‐
2424 sible value.
2425
2426 Select a channel from: Red, Green, Blue, Opacity, Matte, Cyan,
2427 Magenta, Yellow, Black, All, or Gray. All only modifies the
2428 color channels and does not modify the Opacity channel. Except
2429 for the threshold operators, All operates on each channel inde‐
2430 pendently so that operations are on a per-channel basis.
2431
2432 Gray treats the color channels as a grayscale intensity and per‐
2433 forms the requested operation on the equivalent pixel intensity
2434 so the result is a gray image.
2435
2436 Select an operator from Add, And, Assign, Depth, Divide, Gamma,
2437 Negate, LShift, Log, Max, Min, Multiply, Or, Pow RShift, Sub‐
2438 tract, Threshold, Threshold-White, Threshold-Black, Xor, Noise-
2439 Gaussian, Noise-Impulse, Noise-Laplacian, Noise-Multiplicative,
2440 Noise-Poisson, and Noise-Uniform.
2441
2442 Rvalue may be any floating point or integer value. Normally
2443 rvalue will be in the range of 0 to MaxRGB, where MaxRGB is the
2444 largest quantum value supported by the GraphicsMagick build
2445 (255, 65535, or 4294967295) but values outside this range are
2446 useful for some arithmetic operations. Arguments to logical or
2447 bit-wise operations are rounded to a positive integral value
2448 prior to use. If a percent (%) symbol is appended to the argu‐
2449 ment, then the argument has a range of 0 to 100 percent.
2450
2451 The following is a description of the operators:
2452
2453 Add
2454
2455 Result is rvalue added to channel value.
2456
2457 And
2458
2459 Result is the logical AND of rvalue with channel value.
2460
2461 Assign
2462
2463 Result is rvalue.
2464
2465 Depth
2466
2467 Result is channel value adjusted so that it may be
2468 (approximately) stored in the specified number of bits
2469 without additional loss.
2470
2471 Divide
2472
2473 Result is channel value divided by rvalue.
2474
2475 Gamma
2476
2477 Result is channel value gamma adjusted by rvalue.
2478
2479 LShift
2480
2481 Result is channel value bitwise left shifted by rvalue
2482 bits.
2483
2484 Log
2485
2486 Result is computed as log(value*rvalue+1)/log(rvalue+1).
2487
2488 Max
2489
2490 Result is assigned to rvalue if rvalue is greater than
2491 value.
2492
2493 Min
2494
2495 Result is assigned to rvalue if rvalue is less than value.
2496
2497 Multiply
2498
2499 Result is channel value multiplied by rvalue.
2500
2501 Negate
2502
2503 Result is inverse of channel value (like a film negative).
2504 An rvalue must be supplied but is currently not used.
2505 Inverting the image twice results in the original image.
2506
2507 Or
2508
2509 Result is the logical OR of rvalue with channel value.
2510
2511 Pow
2512
2513 Result is computed as pow(value,rvalue). Similar to Gamma
2514 except that rvalue is not inverted.
2515
2516 RShift
2517
2518 Result is channel value bitwise right shifted by rvalue
2519 bits.
2520
2521 Subtract
2522
2523 Result is channel value minus rvalue.
2524
2525 Threshold
2526
2527 Result is maximum (white) if channel value is greater than
2528 rvalue, or minimum (black) if it is less than or equal to
2529 rvalue. If all channels are specified, then thresholding
2530 is done based on computed pixel intensity.
2531
2532 Threshold-white
2533
2534 Result is maximum (white) if channel value is greater than
2535 rvalue and is unchanged if it is less than or equal to
2536 rvalue. This can be used to remove apparent noise from the
2537 bright parts of an image. If all channels are specified,
2538 then thresholding is done based on computed pixel inten‐
2539 sity.
2540
2541 Threshold-black
2542
2543 Result is minimum (black) if channel value is less than
2544 than rvalue and is unchanged if it is greater than or
2545 equal to rvalue. This can be used to remove apparent noise
2546 from the dark parts of an image. If all channels are spec‐
2547 ified, then thresholding is done based on computed pixel
2548 intensity.
2549
2550 Xor
2551
2552 Result is the logical XOR of rvalue with channel value. An
2553 interesting property of XOR is that performing the same
2554 operation twice results in the original value.
2555
2556 Noise-Gaussian
2557
2558 Result is the channel value with gaussian noise applied
2559 according to the intensity specified by rvalue.
2560
2561 Noise-Impulse
2562
2563 Result is the channel value with impulse noise applied
2564 according to the intensity specified by rvalue.
2565
2566 Noise-Laplacian
2567
2568 Result is the channel value with laplacian noise applied
2569 according to the intensity specified by rvalue.
2570
2571 Noise-Multiplicative
2572
2573 Result is the channel value with multiplicative noise
2574 applied according to the intensity specified by rvalue.
2575
2576 Noise-Poisson
2577
2578 Result is the channel value with poisson noise applied
2579 according to the intensity specified by rvalue.
2580
2581 Noise-Uniform
2582
2583 Result is the channel value with uniform noise applied
2584 according to the intensity specified by rvalue.
2585
2586
2587
2588 As an example, the Assign operator assigns a fixed value to a
2589 channel. For example, this command sets the red channel to the
2590 mid-range value:
2591
2592 gm convert in.bmp -operator red assign "50%" out.bmp
2593
2594 The following applies 50% thresholding to the image and returns
2595 a gray image:
2596
2597 gm convert in.bmp -operator gray threshold "50%" out.bmp
2598
2599 -ordered-dither <channeltype> <NxN>
2600 ordered dither the image
2601
2602 The channel or channels specified in the channeltype argument
2603 are reduced to binary, using an ordered dither method. The
2604 choices for channeltype are All, Intensity, Red, Green, Blue,
2605 Cyan, Magenta, Yellow, Black, and Opacity
2606
2607 When channeltype is "All", the color samples are dithered into a
2608 gray level and then that gray level is stored in the three color
2609 channels. Separately, the opacity channel is dithered into a
2610 bilevel opacity value which is stored in the opacity channel.
2611
2612 When channeltype is "Intensity", only the color samples are
2613 dithered. When channeltype is "opacity" or "matte", only the
2614 opacity channel is dithered. When a color channel is specified,
2615 only that channel is dithered.
2616
2617 The choices for N are 2, 3, or 4. When N is 2, the image is
2618 divided into 2x2 pixel tiles. In each tile, 0, 1, 2, 3, or 4
2619 pixels are turned to white depending on their intensity. When N
2620 is 3, there are 3x3 tiles and 10 levels of gray can be repre‐
2621 sented. When N is 4, there are 4x4 tiles and 17 levels of gray.
2622
2623 -output-directory <directory>
2624 output files to directory
2625
2626 Use -output-directory to specify a directory under which to
2627 write the output files. Normally mogrify overwrites the input
2628 files but with this option the output files may be written to a
2629 different directory so that the input files are preserved. The
2630 algorithm used preserves all of the input path specification in
2631 the output path so that the user-specified input path (including
2632 any directory part) is appended to the output path. The user is
2633 responsible for creating the output directory.
2634
2635 -page <width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}
2636 size and location of an image canvas
2637
2638 Use this option to specify the dimensions of the PostScript page
2639 in dots per inch or a TEXT page in pixels. The choices for a
2640 PostScript page are:
2641
2642 11x17 792 1224
2643 Ledger 1224 792
2644 Legal 612 1008
2645 Letter 612 792
2646 LetterSmall 612 792
2647 ArchE 2592 3456
2648 ArchD 1728 2592
2649 ArchC 1296 1728
2650 ArchB 864 1296
2651 ArchA 648 864
2652 A0 2380 3368
2653 A1 1684 2380
2654 A2 1190 1684
2655 A3 842 1190
2656 A4 595 842
2657 A4Small 595 842
2658 A5 421 595
2659 A6 297 421
2660 A7 210 297
2661 A8 148 210
2662 A9 105 148
2663 A10 74 105
2664 B0 2836 4008
2665 B1 2004 2836
2666 B2 1418 2004
2667 B3 1002 1418
2668 B4 709 1002
2669 B5 501 709
2670 C0 2600 3677
2671 C1 1837 2600
2672 C2 1298 1837
2673 C3 918 1298
2674 C4 649 918
2675 C5 459 649
2676 C6 323 459
2677 Flsa 612 936
2678 Flse 612 936
2679 HalfLetter 396 612
2680
2681 For convenience you can specify the page size by media (e.g. A4,
2682 Ledger, etc.). Otherwise, -page behaves much like -geometry
2683 (e.g. -page letter+43+43>).
2684
2685 This option is also used to place subimages when writing to a
2686 multi-image format that supports offsets, such as GIF89 and MNG.
2687 When used for this purpose the offsets are always measured from
2688 the top left corner of the canvas and are not affected by the
2689 -gravity option. To position a GIF or MNG image, use
2690 -page{+-}<x>{+-}<y> (e.g. -page +100+200). When writing to a
2691 MNG file, a -page option appearing ahead of the first image in
2692 the sequence with nonzero width and height defines the width and
2693 height values that are written in the MHDR chunk. Otherwise,
2694 the MNG width and height are computed from the bounding box that
2695 contains all images in the sequence. When writing a GIF89 file,
2696 only the bounding box method is used to determine its dimen‐
2697 sions.
2698
2699 For a PostScript page, the image is sized as in -geometry and
2700 positioned relative to the lower left hand corner of the page by
2701 {+-}<xoffset>{+-}<y offset>. Use -page 612x792>, for example, to
2702 center the image within the page. If the image size exceeds the
2703 PostScript page, it is reduced to fit the page. The default
2704 gravity for the -page option is NorthWest, i.e., positive x and
2705 y offset are measured rightward and downward from the top left
2706 corner of the page, unless the -gravity option is present with a
2707 value other than NorthWest.
2708
2709 The default page dimensions for a TEXT image is 612x792.
2710
2711 This option is used in concert with -density.
2712
2713 Use +page to remove the page settings for an image.
2714
2715 -paint <radius>
2716 simulate an oil painting
2717
2718 Each pixel is replaced by the most frequent color in a circular
2719 neighborhood whose width is specified with radius.
2720
2721 -pause <seconds>
2722 pause between animation loops [animate]
2723
2724 Pause for the specified number of seconds before repeating the
2725 animation.
2726
2727 -pause <seconds>
2728 pause between snapshots [import]
2729
2730 Pause for the specified number of seconds before taking the next
2731 snapshot.
2732
2733 -pen <color>
2734 (This option has been replaced by the -fill option)
2735
2736 -ping efficiently determine image characteristics
2737
2738 Use this option to disable reading the image pixels so that
2739 image characteristics such as the image dimensions may be
2740 obtained very quickly. For identify, use +ping to force reading
2741 the image pixels so that the pixel read rate may be included in
2742 the displayed information.
2743
2744 -pointsize <value>
2745 pointsize of the PostScript, X11, or TrueType font
2746
2747 -preview <type>
2748 image preview type
2749
2750 Use this option to affect the preview operation of an image
2751 (e.g. convert file.png -preview Gamma Preview:gamma.png).
2752 Choose from these previews:
2753
2754 Rotate
2755 Shear
2756 Roll
2757 Hue
2758 Saturation
2759 Brightness
2760 Gamma
2761 Spiff
2762 Dull
2763 Grayscale
2764 Quantize
2765 Despeckle
2766 ReduceNoise
2767 AddNoise
2768 Sharpen
2769 Blur
2770 Threshold
2771 EdgeDetect
2772 Spread
2773 Shade
2774 Raise
2775 Segment
2776 Solarize
2777 Swirl
2778 Implode
2779 Wave
2780 OilPaint
2781 CharcoalDrawing
2782 JPEG
2783
2784 The default preview is JPEG.
2785
2786 -process <command>
2787 process a sequence of images using a process module
2788
2789 The command argument has the form module=arg1,arg2,arg3,...,argN
2790 where module is the name of the module to invoke (e.g. "ana‐
2791 lyze") and arg1,arg2,arg3,...,argN are an arbitrary number of
2792 arguments to pass to the process module. The sequence of images
2793 is terminated by the appearance of any option.
2794
2795 If the -process option appears after all of the input images,
2796 all images are processed.
2797
2798 -profile <filename>
2799 add ICM, IPTC, or generic profile to image
2800
2801 -profile filename adds an ICM (ICC color management), IPTC
2802 (newswire information), or a generic profile to the image
2803
2804 Use +profile icm, +profile iptc, or +profile profile_name to
2805 remove the respective profile. Multiple profiles may be listed,
2806 separated by commas. Profiles may be excluded from subsequent
2807 listed matches by preceding their name with an exclamation
2808 point. For example, +profile '!icm,*' strips all profiles
2809 except for the ICM profile. Use identify -verbose to find out
2810 what profiles are in the image file. Use +profile "*" to remove
2811 all profiles.
2812
2813 To extract a profile, the -profile option is not used. Instead,
2814 simply write the file to an image format such as APP1, 8BIM,
2815 ICM, or IPTC.
2816
2817 For example, to extract the Exif data (which is stored in JPEG
2818 files in the APP1 profile), use
2819
2820
2821 gm convert cockatoo.jpg exifdata.app1
2822
2823 +progress
2824 disable progress monitor and busy cursor
2825
2826 By default, when an image is displayed, a progress monitor bar
2827 is shown in the top left corner of an existing image display
2828 window, and the current cursor is replaced with an hourglass
2829 cursor. Use +progress to disable the progress monitor and busy
2830 cursor during display operations. While the progress monitor is
2831 disabled for all operations, the busy cursor continues to be
2832 enabled for non-display operations such as image processing.
2833 This option is useful for non-interactive display operations, or
2834 when a "clean" look is desired.
2835
2836 -quality <value>
2837 JPEG/MIFF/PNG/TIFF compression level
2838 For the JPEG and MPEG image formats, quality is 0 (lowest image
2839 quality and highest compression) to 100 (best quality but least
2840 effective compression). The default quality is 75. Use the
2841 -sampling-factor option to specify the factors for chroma down‐
2842 sampling. To use the same quality value as that found by the
2843 JPEG decoder, use the -define jpeg:preserve-settings flag.
2844
2845 For the MIFF image format, and the TIFF format while using ZIP
2846 compression, quality/10 is the zlib compression level, which is
2847 0 (worst but fastest compression) to 9 (best but slowest). It
2848 has no effect on the image appearance, since the compression is
2849 always lossless.
2850
2851 For the JPEG-2000 image format, quality is mapped using a non-
2852 linear equation to the compression ratio required by the Jasper
2853 library. This non-linear equation is intended to loosely approx‐
2854 imate the quality provided by the JPEG v1 format. The default
2855 quality value 75 results in a request for 16:1 compression. The
2856 quality value 100 results in a request for non-lossy compres‐
2857 sion.
2858
2859 For the MNG and PNG image formats, the quality value sets the
2860 zlib compression level (quality / 10) and filter-type (quality %
2861 10). Compression levels range from 0 (fastest compression) to
2862 100 (best but slowest). For compression level 0, the Huffman-
2863 only strategy is used, which is fastest but not necessarily the
2864 worst compression.
2865
2866 If filter-type is 4 or less, the specified filter-type is used
2867 for all scanlines:
2868
2869 0: none
2870 1: sub
2871 2: up
2872 3: average
2873 4: Paeth
2874
2875 If filter-type is 5, adaptive filtering is used when quality is
2876 greater than 50 and the image does not have a color map, other‐
2877 wise no filtering is used.
2878
2879 If filter-type is 6, adaptive filtering with minimum-sum-of-
2880 absolute-values is used.
2881
2882 Only if the output is MNG, if filter-type is 7, the LOCO color
2883 transformation and adaptive filtering with minimum-sum-of-abso‐
2884 lute-values are used.
2885
2886 The default is quality is 75, which means nearly the best com‐
2887 pression with adaptive filtering. The quality setting has no
2888 effect on the appearance of PNG and MNG images, since the com‐
2889 pression is always lossless.
2890
2891 For further information, see the PNG specification.
2892
2893 When writing a JNG image with transparency, two quality values
2894 are required, one for the main image and one for the grayscale
2895 image that conveys the opacity channel. These are written as a
2896 single integer equal to the main image quality plus 1000 times
2897 the opacity quality. For example, if you want to use quality 75
2898 for the main image and quality 90 to compress the opacity data,
2899 use -quality 90075.
2900
2901 For the PNM family of formats (PNM, PGM, and PPM) specify a
2902 quality factor of zero in order to obtain the ASCII variant of
2903 the format. Note that -compress none used to be used to trigger
2904 ASCII output but provided the opposite result of what was
2905 expected as compared with other formats.
2906
2907 -raise <width>x<height>
2908 lighten or darken image edges
2909
2910 This will create a 3-D effect. See -geometry for details details
2911 about the geometry specification. Offsets are not used.
2912
2913 Use -raise to create a raised effect, otherwise use +raise.
2914
2915 -random-threshold <channeltype> <LOWxHIGH>
2916 random threshold the image
2917
2918 The channel or channels specified in the <channeltype> argument
2919 are reduced to binary, using an random-threshold method. The
2920 choices for channeltype are All, Intensity, Red, Green, Blue,
2921 Cyan, Magenta, Yellow, Black, and Opacity
2922
2923 When channeltype is "All", the color samples are thresholded
2924 into a graylevel and then that gray level is stored in the three
2925 color channels. Separately, the opacity channel is thresholded
2926 into a bilevel opacity value which is stored in the opacity
2927 channel. For each pixel, a new random number is used to estab‐
2928 lish the threshold to be used. The threshold never exceeds the
2929 specified maximum (HIGH) and is never less than the specified
2930 minimum (LOW).
2931
2932 When channeltype is "intensity", only the color samples are
2933 thresholded. When channeltype is "opacity" or "matte", only the
2934 opacity channel is thresholded. The other named channels only
2935 threshold the associated channel.
2936
2937 -recolor <matrix>
2938 apply a color translation matrix to image channels
2939
2940 A user supplied color translation matrix (expressed as a text
2941 string) is used to translate/blend the image channels based on
2942 weightings in a supplied matrix which may be of order 3 (color
2943 channels only), 4 (color channels plus opacity), or 5 (color
2944 channels plus opacity and offset). Values in the columns of the
2945 matrix (red, green, blue, opacity) are used as multipliers with
2946 the existing channel values and added together according to the
2947 rows of the matrix. Matrix values are floating point and may be
2948 negative. The offset column (column 5) is purely additive and
2949 is scaled such that 0.0 to 1.0 represents the maximum quantum
2950 range (but values are not limited to this range). The math for
2951 the color translation matrix is similar to that used by Adobe
2952 Flash except that the offset is scaled to 1.0 (divide Flash off‐
2953 set by 255 for use with GraphicsMagick) so that the results are
2954 independent of quantum depth.
2955
2956 An identity matrix exists for each matrix order which results in
2957 no change to the image. The translation matrix should be based
2958 on an alteration of the identity matrix.
2959
2960 Identity matrix of order 3
2961
2962 1 0 0
2963 0 1 0
2964 0 0 1
2965
2966 which may be formatted into a convenient matrix argument similar
2967 to (comma is treated as white space):
2968
2969 -recolor "1 0 0, 0 1 0, 0 0 1"
2970
2971 Identity matrix of order 4
2972
2973 1 0 0 0
2974 0 1 0 0
2975 0 0 1 0
2976 0 0 0 1
2977
2978 Identity matrix of order 5. The last row is required to exist
2979 for the purpose of parsing, but is otherwise not used.
2980
2981 1 0 0 0 0
2982 0 1 0 0 0
2983 0 0 1 0 0
2984 0 0 0 1 0
2985 0 0 0 0 1
2986
2987 As an example, an image wrongly in BGR channel order may be con‐
2988 verted to RGB using this matrix (green->red, red->green):
2989
2990 0 0 1
2991 0 1 0
2992 1 0 0
2993
2994 and an RGB image using standard Rec.709 primaries may be con‐
2995 verted to grayscale using this matrix of standard weighting fac‐
2996 tors:
2997
2998 0.2126 0.7152 0.0722
2999 0.2126 0.7152 0.0722
3000 0.2126 0.7152 0.0722
3001
3002 and contrast may be reduced by scaling down by 80% and adding a
3003 10% offset:
3004
3005 0.8 0.0 0.0 0.0 0.1
3006 0.0 0.8 0.0 0.0 0.1
3007 0.0 0.0 0.8 0.0 0.1
3008 0.0 0.0 0.0 0.8 0.1
3009 0.0 0.0 0.0 0.0 1.0
3010
3011 -red-primary <x>,<y>
3012 red chromaticity primary point
3013
3014 -region <width>x<height>{+-}<x>{+-}<y>
3015 apply options to a portion of the image
3016
3017 The x and y offsets are treated in the same manner as in -crop.
3018
3019 -remote
3020 perform a X11 remote operation
3021
3022 The -remote command sends a command to a "gm display" or "gm
3023 animate" which is already running. The only command recognized
3024 at this time is the name of an image file to load. This capabil‐
3025 ity is very useful to load new images without needing to restart
3026 GraphicsMagick (e.g. for a slide-show or to use GraphicsMagick
3027 as the display engine for a different GUI). Also see the
3028 +progress option for a way to disable progress indication for a
3029 clean look while loading new images.
3030
3031 -render
3032 render vector operations
3033
3034 Use +render to turn off rendering vector operations. This is
3035 useful when saving the result to vector formats such as MVG or
3036 SVG.
3037
3038 -resample <horizontal>x<vertical>
3039 Resample image to specified horizontal and vertical resolution
3040
3041 Resize the image so that its rendered size remains the same as
3042 the original at the specified target resolution. Either the cur‐
3043 rent image resolution units or the previously set with -units
3044 are used to interpret the argument. For example, if a 300 DPI
3045 image renders at 3 inches by 2 inches on a 300 DPI device, when
3046 the image has been resampled to 72 DPI, it will render at 3
3047 inches by 2 inches on a 72 DPI device. Note that only a small
3048 number of image formats (e.g. JPEG, PNG, and TIFF) are capable
3049 of storing the image resolution. For formats which do not sup‐
3050 port an image resolution, the original resolution of the image
3051 must be specified via -density on the command line prior to
3052 specifying the resample resolution.
3053
3054 Note that Photoshop stores and obtains image resolution from a
3055 proprietary embedded profile. If this profile exists in the
3056 image, then Photoshop will continue to treat the image using its
3057 former resolution, ignoring the image resolution specified in
3058 the standard file header.
3059
3060 Some image formats (e.g. PNG) require use of metric or english
3061 units so even if the original image used a particular unit sys‐
3062 tem, if it is saved to a different format prior to resampling,
3063 then it may be necessary to specify the desired resolution units
3064 using -units since the original units may have been lost. In
3065 other words, do not assume that the resolution units are
3066 restored if the image has been saved to a file.
3067
3068 -resize <width>x<height>{%}{@}{!}{<}{>}
3069 resize an image
3070
3071 This is an alias for the -geometry option and it behaves in the
3072 same manner. If the -filter option precedes the -resize option,
3073 the specified filter is used.
3074
3075 There are some exceptions:
3076
3077 When used as a composite option, -resize conveys the preferred
3078 size of the output image, while -geometry conveys the size and
3079 placement of the composite image within the main image.
3080
3081 When used as a montage option, -resize conveys the preferred
3082 size of the montage, while -geometry conveys information about
3083 the tiles.
3084
3085 -roll {+-}<x>{+-}<y>
3086 roll an image vertically or horizontally
3087
3088 See -geometry for details the geometry specification. The x and
3089 y offsets are not affected by the -gravity option.
3090
3091 A negative x offset rolls the image left-to-right. A negative y
3092 offset rolls the image top-to-bottom.
3093
3094 -rotate <degrees>{<}{>}
3095 rotate the image
3096
3097 Positive angles rotate the image in a clockwise direction while
3098 negative angles rotate counter-clockwise.
3099
3100 Use > to rotate the image only if its width exceeds the height.
3101 < rotates the image only if its width is less than the height.
3102 For example, if you specify -rotate "-90>" and the image size is
3103 480x640, the image is not rotated. However, if the image is
3104 640x480, it is rotated by -90 degrees. If you use > or <,
3105 enclose it in quotation marks to prevent it from being misinter‐
3106 preted as a file redirection.
3107
3108 Empty triangles left over from rotating the image are filled
3109 with the color defined as background (class backgroundColor).
3110 The color is specified using the format described under the
3111 -fill option.
3112
3113 -sample <geometry>
3114 scale image using pixel sampling
3115
3116 See -geometry for details about the geometry specification.
3117 -sample ignores the -filter selection if the -filter option is
3118 present. Offsets, if present in the geometry string, are
3119 ignored, and the -gravity option has no effect.
3120
3121 -sampling-factor <horizontal_factor>x<vertical_factor>
3122 chroma subsampling factors
3123
3124 This option specifies the sampling factors to be used by the
3125 DPX, JPEG, MPEG, or YUV encoders for chroma downsampling. The
3126 sampling factor must be specified while reading the raw YUV for‐
3127 mat since it is not preserved in the file header. Industry-
3128 standard video subsampling notation such as "4:2:2" may also be
3129 used to specify the sampling factors. "4:2:2" is equivalent to a
3130 specification of "2x1"
3131
3132 The JPEG decoder obtains the original sampling factors (and
3133 quality settings) when a JPEG file is read. To re-use the origi‐
3134 nal sampling factors (and quality setting) when JPEG is output,
3135 use the -define jpeg:preserve-settings flag.
3136
3137 -scale <geometry>
3138 scale the image.
3139
3140 See -geometry for details about the geometry specification.
3141 -scale uses a simpler, faster algorithm, and it ignores the
3142 -filter selection if the -filter option is present. Offsets, if
3143 present in the geometry string, are ignored, and the -gravity
3144 option has no effect.
3145
3146 -scene <value>
3147 set scene number
3148
3149 This option sets the scene number of an image or the first image
3150 in an image sequence.
3151
3152 -scenes <value-value>
3153 range of image scene numbers to read
3154
3155 Each image in the range is read with the filename followed by a
3156 period (.) and the decimal scene number. You can change this
3157 behavior by embedding a %d, %0Nd, %o, %0No, %x, or %0Nx printf
3158 format specification in the file name. For example,
3159
3160 gm montage -scenes 5-7 image.miff
3161
3162 makes a montage of files image.miff.5, image.miff.6, and
3163 image.miff.7, and
3164
3165 gm animate -scenes 0-12 image%02d.miff
3166
3167 animates files image00.miff, image01.miff, through image12.miff.
3168
3169 -screen
3170 specify the screen to capture
3171
3172 This option indicates that the GetImage request used to obtain
3173 the image should be done on the root window, rather than
3174 directly on the specified window. In this way, you can obtain
3175 pieces of other windows that overlap the specified window, and
3176 more importantly, you can capture menus or other popups that are
3177 independent windows but appear over the specified window.
3178
3179 -set <attribute> <value>
3180 set an image attribut
3181
3182 Set a named image attribute. The attribute is set on the cur‐
3183 rent (previously specified on command line) image.
3184
3185 -segment <cluster threshold>x<smoothing threshold>
3186 segment an image
3187
3188 Segment an image by analyzing the histograms of the color compo‐
3189 nents and identifying units that are homogeneous with the fuzzy
3190 c-means technique.
3191
3192 Segmentation is a very useful fast and and approximate color
3193 quantization algorithm for scanned printed pages or scanned car‐
3194 toons. It may also be used as a special effect. Specify cluster
3195 threshold as the minimum percentage of total pixels in a cluster
3196 before it is considered valid. For huge images containing small
3197 detail, this may need to be a tiny fraction of a percent (e.g.
3198 0.015) so that important detail is not lost. Smoothing thresh‐
3199 old eliminates noise in the second derivative of the histogram.
3200 As the value is increased, you can expect a smoother second de‐
3201 rivative. The default is 1.5. Add the -verbose option to see a
3202 dump of cluster statistics given the parameters used. The sta‐
3203 tistics may be used as a guide to help fine tune the options.
3204
3205 -shade <azimuth>x<elevation>
3206 shade the image using a distant light source
3207
3208 Specify azimuth and elevation as the position of the light
3209 source. Use +shade to return the shading results as a grayscale
3210 image.
3211
3212 -shadow <radius>{x<sigma>}
3213 shadow the montage
3214
3215 -shared-memory
3216 use shared memory
3217
3218 This option specifies whether the utility should attempt to use
3219 shared memory for pixmaps. GraphicsMagick must be compiled with
3220 shared memory support, and the display must support the MIT-SHM
3221 extension. Otherwise, this option is ignored. The default is
3222 True.
3223
3224 -sharpen <radius>{x<sigma>}
3225 sharpen the image
3226
3227 Use a Gaussian operator of the given radius and standard devia‐
3228 tion (sigma).
3229
3230 -shave <width>x<height>{%}
3231 shave pixels from the image edges
3232
3233 Specify the width of the region to be removed from both sides of
3234 the image and the height of the regions to be removed from top
3235 and bottom.
3236
3237 -shear <x degrees>x<y degrees>
3238 shear the image along the X or Y axis
3239
3240 Use the specified positive or negative shear angle.
3241
3242 Shearing slides one edge of an image along the X or Y axis, cre‐
3243 ating a parallelogram. An X direction shear slides an edge along
3244 the X axis, while a Y direction shear slides an edge along the Y
3245 axis. The amount of the shear is controlled by a shear angle.
3246 For X direction shears, x degrees is measured relative to the Y
3247 axis, and similarly, for Y direction shears y degrees is mea‐
3248 sured relative to the X axis.
3249
3250 Empty triangles left over from shearing the image are filled
3251 with the color defined as background (class backgroundColor).
3252 The color is specified using the format described under the
3253 -fill option.
3254
3255 -silent
3256 operate silently
3257
3258 -size <width>x<height>{+offset}
3259 width and height of the image
3260
3261 Use this option to specify the width and height of raw images
3262 whose dimensions are unknown such as GRAY, RGB, or CMYK. In
3263 addition to width and height, use -size with an offset to skip
3264 any header information in the image or tell the number of colors
3265 in a MAP image file, (e.g. -size 640x512+256).
3266
3267 For Photo CD images, choose from these sizes:
3268
3269 192x128
3270 384x256
3271 768x512
3272 1536x1024
3273 3072x2048
3274
3275 Finally, use this option to choose a particular resolution layer
3276 of a JBIG or JPEG image (e.g. -size 1024x768).
3277
3278 -snaps <value>
3279 number of screen snapshots
3280
3281 Use this option to grab more than one image from the X server
3282 screen, to create an animation sequence.
3283
3284 -solarize <factor>
3285 negate all pixels above the threshold level
3286
3287 Specify factor as the percent threshold of the intensity (0 -
3288 99.9%).
3289
3290 This option produces a solarization effect seen when exposing a
3291 photographic film to light during the development process.
3292
3293 -spread <amount>
3294 displace image pixels by a random amount
3295
3296 Amount defines the size of the neighborhood around each pixel to
3297 choose a candidate pixel to swap.
3298
3299 -stegano <offset>
3300 hide watermark within an image
3301
3302 Use an offset to start the image hiding some number of pixels
3303 from the beginning of the image. Note this offset and the image
3304 size. You will need this information to recover the stegano‐
3305 graphic image (e.g. display -size 320x256+35 stegano:image.png).
3306
3307 -stereo
3308 composite two images to create a stereo anaglyph
3309
3310 The left side of the stereo pair is saved as the red channel of
3311 the output image. The right side is saved as the green channel.
3312 Red-green stereo glasses are required to properly view the
3313 stereo image.
3314
3315 -stroke <color>
3316 color to use when stroking a graphic primitive
3317
3318 The color is specified using the format described under the
3319 -fill option.
3320
3321 See -draw for further details.
3322
3323 -strokewidth <value>
3324 set the stroke width
3325
3326 See -draw for further details.
3327
3328 -swirl <degrees>
3329 swirl image pixels about the center
3330
3331 Degrees defines the tightness of the swirl.
3332
3333 -text-font <name>
3334 font for writing fixed-width text
3335
3336 Specifies the name of the preferred font to use in fixed (type‐
3337 writer style) formatted text. The default is 14 point Courier.
3338
3339 You can tag a font to specify whether it is a PostScript, True‐
3340 Type, or X11 font. For example, Courier.ttf is a TrueType font
3341 and x:fixed is X11.
3342
3343 -texture <filename>
3344 name of texture to tile onto the image background
3345
3346 -threshold <value>{%}
3347 threshold the image
3348
3349 Modify the image such that any pixel sample with an intensity
3350 value greater than the threshold is assigned the maximum inten‐
3351 sity (white), or otherwise is assigned the minimum intensity
3352 (black). If a percent prefix is applied, then the threshold is a
3353 percentage of the available range.
3354
3355 To efficiently create a black and white image from a color
3356 image, use
3357
3358 gm convert -threshold 50% in.png out.png
3359
3360 The optimum threshold value depends on the nature of the image.
3361 In order to threshold individual channels, use the -operator
3362 subcommand with it's Threshold, Threshold-White, or Threshold-
3363 Black options.
3364
3365 -thumbnail <width>x<height>{%}{@}{!}{<}{>}
3366 resize an image (quickly)
3367
3368 The -thumbnail command resizes the image as quickly as possible,
3369 with more concern for speed than resulting image quality.
3370 Regardless, resulting image quality should be acceptable for
3371 many uses. It is primarily intended to be used to generate
3372 smaller versions of the image, but may also be used to enlarge
3373 the image. The -thumbnail geometry argument observes the same
3374 syntax and rules as it does for -resize.
3375
3376 -tile <filename>
3377 tile image when filling a graphic primitive
3378
3379 -tile <geometry>
3380 layout of images [montage]
3381
3382 -title <string>
3383 assign title to displayed image [animate, display, montage]
3384
3385 Use this option to assign a specific title to the image. This is
3386 assigned to the image window and is typically displayed in the
3387 window title bar. Optionally you can include the image file‐
3388 name, type, width, height, Exif data, or other image attribute
3389 by embedding special format characters described under the -for‐
3390 mat option.
3391
3392 For example,
3393
3394 -title "%m:%f %wx%h"
3395
3396 produces an image title of MIFF:bird.miff 512x480 for an image
3397 titled bird.miff and whose width is 512 and height is 480.
3398
3399 -transform
3400 transform the image
3401
3402 This option applies the transformation matrix from a previous
3403 -affine option.
3404
3405 gm convert -affine 2,2,-2,2,0,0 -transform bird.ppm bird.jpg
3406
3407 -transparent <color>
3408 make this color transparent within the image
3409
3410 The color is specified using the format described under the
3411 -fill option.
3412
3413 -treedepth <value>
3414 tree depth for the color reduction algorithm
3415
3416 Normally, this integer value is zero or one. A value of zero or
3417 one causes the use of an optimal tree depth for the color reduc‐
3418 tion algorithm
3419
3420 An optimal depth generally allows the best representation of the
3421 source image with the fastest computational speed and the least
3422 amount of memory. However, the default depth is inappropriate
3423 for some images. To assure the best representation, try values
3424 between 2 and 8 for this parameter. Refer to quantize for more
3425 details.
3426
3427 The -colors or -monochrome option, or writing to an image format
3428 which requires color reduction, is required for this option to
3429 take effect.
3430
3431 -trim trim an image
3432
3433 This option removes any edges that are exactly the same color as
3434 the corner pixels. Use -fuzz to make -trim remove edges that
3435 are nearly the same color as the corner pixels.
3436
3437 -type <type>
3438 the image type
3439
3440 Choose from: Bilevel, Grayscale, Palette, PaletteMatte, True‐
3441 Color, TrueColorMatte, ColorSeparation, ColorSeparationMatte, or
3442 Optimize.
3443
3444 Normally, when a format supports different subformats such as
3445 bilevel, grayscale, palette, truecolor, and truecolor+alpha, the
3446 encoder will try to choose a suitable subformat based on the
3447 nature of the image. The -type option may be used to tailor the
3448 output subformat. By default the output subformat is based on
3449 readily available image information and is usually similar to
3450 the input format.
3451
3452 Specify -type Optimize in order to enable inspecting all pixels
3453 (if necessary) in order to find the most efficient subformat.
3454 Inspecting all of the pixels may be slow for very large images,
3455 particularly if they are stored in a disk cache. If an RGB image
3456 contains only gray pixels, then every pixel in the image must be
3457 inspected in order to decide that the image is actually
3458 grayscale!
3459
3460 Sometimes a specific subformat is desired. For example, to force
3461 a JPEG image to be written in TrueColor RGB format even though
3462 only gray pixels are present, use
3463
3464 gm convert bird.pgm -type TrueColor bird.jpg
3465
3466 Similarly, using -type TrueColorMatte will force the encoder to
3467 write an alpha channel even though the image is opaque, if the
3468 output format supports transparency.
3469
3470 Some pseudo-formats (e.g. the XC format) will respect the
3471 requested type if it occurs previously on the command line. For
3472 example, to obtain a DirectClass solid color canvas image rather
3473 than PsuedoClass, use
3474
3475 gm convert -size 640x480 -type TrueColor xc:red red.miff
3476
3477 Likewise, specify -type Bilevel, Grayscale, TrueColor, or True‐
3478 ColorMatte prior to reading a Postscript (or PDF file) in order
3479 to influence the type of image that Ghostcript returns. Reading
3480 performance will be dramatically improved for black/white Post‐
3481 script if Bilevel is specified, and will be considerably faster
3482 if Grayscale is specified.
3483
3484 -update <seconds>
3485 detect when image file is modified and redisplay.
3486
3487 Suppose that while you are displaying an image the file that is
3488 currently displayed is over-written. display will automatically
3489 detect that the input file has been changed and update the dis‐
3490 played image accordingly.
3491
3492 -units <type>
3493 the units of image resolution
3494
3495 Choose from: Undefined, PixelsPerInch, or PixelsPerCentimeter.
3496 This option is normally used in conjunction with the -density
3497 option.
3498
3499 -unsharp <radius>{x<sigma>}{+<amount>}{+<threshold>}
3500 sharpen the image with an unsharp mask operator
3501
3502 The -unsharp option sharpens an image. The image is convolved
3503 with a Gaussian operator of the given radius and standard devia‐
3504 tion (sigma). For reasonable results, radius should be larger
3505 than sigma. Use a radius of 0 to have the method select a suit‐
3506 able radius.
3507
3508 The parameters are:
3509
3510 radius
3511
3512
3513 The radius of the Gaussian, in pixels, not counting the
3514 center pixel (default 0).
3515
3516 sigma
3517
3518
3519 The standard deviation of the Gaussian, in pixels (default
3520 1.0).
3521
3522 amount
3523
3524
3525 The percentage of the difference between the original and
3526 the blur image that is added back into the original
3527 (default 1.0).
3528
3529 threshold
3530
3531
3532 The threshold, as a fraction of MaxRGB, needed to apply
3533 the difference amount (default 0.05).
3534
3535
3536
3537 -use-pixmap
3538 use the pixmap
3539
3540 -verbose
3541 print detailed information about the image
3542
3543 This information is printed: image scene number; image name;
3544 image size; the image class (DirectClass or PseudoClass); the
3545 total number of unique colors; and the number of seconds to read
3546 and transform the image. If the image is DirectClass, the total
3547 number of unique colors is not displayed unless -verbose is
3548 specified twice since it may take quite a long time to compute,
3549 particularly for deep images. If the image is PseudoClass then
3550 its pixels are defined by indexes into a colormap. If the image
3551 is DirectClass then each pixel includes a complete and indepen‐
3552 dent color specification.
3553
3554 If -colors is also specified, the total unique colors in the
3555 image and color reduction error values are printed. Refer to
3556 quantize for a description of these values.
3557
3558 -version
3559 print GraphicsMagick version string
3560
3561 -view <string>
3562 FlashPix viewing parameters
3563
3564 -virtual-pixel <method>
3565 specify contents of "virtual pixels"
3566
3567 This option defines "virtual pixels" for use in operations that
3568 can access pixels outside the boundaries of an image.
3569
3570 Choose from these methods:
3571
3572 Constant
3573
3574
3575 Use the image background color.
3576
3577 Edge
3578
3579
3580 Extend the edge pixel toward infinity (default).
3581
3582 Mirror
3583
3584
3585 Mirror the image.
3586
3587 Tile
3588
3589
3590 Tile the image.
3591
3592
3593
3594 This option affects operations that use virtual pixels such as
3595 -blur, -sharpen, -wave, etc.
3596
3597 -visual <type>
3598 animate images using this X visual type
3599
3600 Choose from these visual classes:
3601
3602 StaticGray
3603 GrayScale
3604 StaticColor
3605 PseudoColor
3606 TrueColor
3607 DirectColor
3608 default
3609 visual id
3610
3611 The X server must support the visual you choose, otherwise an
3612 error occurs. If a visual is not specified, the visual class
3613 that can display the most simultaneous colors on the default
3614 screen is chosen.
3615
3616 -watermark <brightness>x<saturation>
3617 percent brightness and saturation of a watermark
3618
3619 -wave <amplitude>x<wavelength>
3620 alter an image along a sine wave
3621
3622 Specify amplitude and wavelength of the wave.
3623
3624 -white-point <x>,<y>
3625 chromaticity white point
3626
3627 -white-threshold red[,green][,blue][,opacity]
3628 pixels above the threshold become white
3629
3630 Use -white-threshold to set pixels with values above the speci‐
3631 fied threshold to maximum value (white). If only one value is
3632 supplied, or the red, green, and blue values are identical, then
3633 intensity thresholding is used. If the color threshold values
3634 are not identical then channel-based thresholding is used, and
3635 color distortion will occur. Specify a negative value (e.g. -1)
3636 if you want a channel to be ignored but you do want to threshold
3637 a channel later in the list. If a percent (%) symbol is
3638 appended, then the values are treated as a percentage of maximum
3639 range.
3640
3641 -window <id>
3642 make image the background of a window
3643
3644 id can be a window id or name. Specify root to select X's root
3645 window as the target window.
3646
3647 By default the image is tiled onto the background of the target
3648 window. If backdrop or -geometry are specified, the image is
3649 surrounded by the background color. Refer to X RESOURCES for
3650 details.
3651
3652 The image will not display on the root window if the image has
3653 more unique colors than the target window colormap allows. Use
3654 -colors to reduce the number of colors.
3655
3656 -window-group
3657 specify the window group
3658
3659 -write <filename>
3660 write an intermediate image [convert, composite]
3661
3662 The current image is written to the specified filename and then
3663 processing continues using that image. The following is an exam‐
3664 ple of how several sizes of an image may be generated in one
3665 command (repeat as often as needed):
3666
3667 gm convert input.jpg -resize 50% -write input50.jpg
3668 -resize 25% input25.jpg
3669
3670 -write <filename>
3671 write the image to a file [display]
3672
3673 If filename already exists, you will be prompted as to whether
3674 it should be overwritten.
3675
3676 By default, the image is written in the format that it was read
3677 in as. To specify a particular image format, prefix filename
3678 with the image type and a colon (e.g., ps:image) or specify the
3679 image type as the filename suffix (e.g., image.ps). Specify file
3680 as - for standard output. If file has the extension .Z or .gz,
3681 the file size is compressed using compress or gzip respectively.
3682 Precede the image file name with | to pipe to a system command.
3683
3684 Use -compress to specify the type of image compression.
3685
3686 The equivalent X resource for this option is writeFilename
3687 (class WriteFilename). See "X Resources", below, for details.
3688
3691 animate [ options ...] file [ [ options ...] file ...]
3692
3693
3695 </im>
3696
3697 Animate displays a sequence of images on any workstation display run‐
3698 ning an X server. animate first determines the hardware capabilities of
3699 the workstation. If the number of unique colors in an image is less
3700 than or equal to the number the workstation can support, the image is
3701 displayed in an X window. Otherwise the number of colors in the image
3702 is first reduced to match the color resolution of the workstation
3703 before it is displayed.
3704
3705 This means that a continuous-tone 24 bits-per-pixel image can display
3706 on a 8 bit pseudo-color device or monochrome device. In most instances
3707 the reduced color image closely resembles the original. Alternatively,
3708 a monochrome or pseudo-color image sequence can display on a continu‐
3709 ous-tone 24 bits-per-pixel device.
3710
3711 To help prevent color flashing on X server visuals that have colormaps,
3712 animate creates a single colormap from the image sequence. This can be
3713 rather time consuming. You can speed this operation up by reducing the
3714 colors in the image before you "animate" them. Use mogrify to color
3715 reduce the images to a single colormap. See mogrify(1) for details.
3716 Alternatively, you can use a Standard Colormap; or a static, direct, or
3717 true color visual. You can define a Standard Colormap with xstdcmap.
3718 See xstdcmap(1) for details. This method is recommended for colormapped
3719 X server because it eliminates the need to compute a global colormap.
3720
3722 To animate a set of images of a cockatoo, use:
3723
3724 gm animate cockatoo.*
3725
3726 To animate a cockatoo image sequence while using the Standard Colormap
3727 best, use:
3728
3729 xstdcmap -best
3730 gm animate -map best cockatoo.*
3731
3732 To animate an image of a cockatoo without a border centered on a back‐
3733 drop, use:
3734
3735
3736 gm animate +borderwidth -backdrop cockatoo.*
3737
3739 For a more detailed description of each option, see Options, above.
3740
3741
3742 -authenticate <string>
3743 decrypt image with this password
3744
3745 -backdrop
3746 display the image centered on a backdrop.
3747
3748 -background <color>
3749 the background color
3750
3751 -bordercolor <color>
3752 the border color
3753
3754 -borderwidth <geometry>
3755 the border width
3756
3757 -chop <width>x<height>{+-}<x>{+-}<y>{%}
3758 remove pixels from the interior of an image
3759
3760 -colormap <type>
3761 define the colormap type
3762
3763 -colors <value>
3764 preferred number of colors in the image
3765
3766 -colorspace <value>
3767 the type of colorspace
3768
3769 -crop <width>x<height>{+-}<x>{+-}<y>{%}
3770 preferred size and location of the cropped image
3771
3772 -debug <events>
3773 enable debug printout
3774
3775 -define <key>{=<value>},...
3776 add coder/decoder specific options
3777
3778 -delay <1/100ths of a second>
3779 display the next image after pausing
3780
3781 -density <width>x<height>
3782 horizontal and vertical resolution in pixels of the image
3783
3784 -depth <value>
3785 depth of the image
3786
3787 -display <host:display[.screen]>
3788 specifies the X server to contact
3789
3790 -dispose <method>
3791 GIF disposal method
3792
3793 -dither
3794 apply Floyd/Steinberg error diffusion to the image
3795
3796 -font <name>
3797 use this font when annotating the image with text
3798
3799 -foreground <color>
3800 define the foreground color
3801
3802 -gamma <value>
3803 level of gamma correction
3804
3805 -geometry <width>x<height>{+-}<x>{+-}<y>{%}{@}{!}{^}{<}{>}
3806 preferred size and location of the Image window.
3807
3808 -help print usage instructions
3809
3810 -iconGeometry <geometry>
3811 specify the icon geometry
3812
3813 -iconic
3814 iconic animation
3815
3816 -interlace <type>
3817 the type of interlacing scheme
3818
3819 -limit <type> <value>
3820 Disk, File, Map, Memory, Pixels, or Threads resource limit
3821
3822 -log <string>
3823 Specify format for debug log
3824
3825 -map <type>
3826 display image using this type.
3827
3828 -matte store matte channel if the image has one
3829
3830 -mattecolor <color>
3831 specify the color to be used with the -frame option
3832
3833 -monitor
3834 show progress indication
3835
3836 -monochrome
3837 transform the image to black and white
3838
3839 -name name an image
3840
3841 -noop NOOP (no option)
3842
3843 -pause <seconds>
3844 pause between animation loops [animate]
3845
3846 -remote
3847 perform a X11 remote operation
3848
3849 -rotate <degrees>{<}{>}
3850 rotate the image
3851
3852 -sampling-factor <horizontal_factor>x<vertical_factor>
3853 chroma subsampling factors
3854
3855 -scenes <value-value>
3856 range of image scene numbers to read
3857
3858 -shared-memory
3859 use shared memory
3860
3861 -size <width>x<height>{+offset}
3862 width and height of the image
3863
3864 -text-font <name>
3865 font for writing fixed-width text
3866
3867 -title <string>
3868 assign title to displayed image [animate, display, montage]
3869
3870 -treedepth <value>
3871 tree depth for the color reduction algorithm
3872
3873 -trim trim an image
3874
3875 -type <type>
3876 the image type
3877
3878 -verbose
3879 print detailed information about the image
3880
3881 -version
3882 print GraphicsMagick version string
3883
3884 -visual <type>
3885 animate images using this X visual type
3886
3887 -window <id>
3888 make image the background of a window
3889
3890 For a more detailed description of each option, see Options,
3891 above.
3892
3893
3894 Any option you specify on the command line remains in effect for
3895 the group of images following it, until the group is terminated
3896 by the appearance of any option or -noop. For example, to ani‐
3897 mate three images, the first with 32 colors, the second with an
3898 unlimited number of colors, and the third with only 16 colors,
3899 use:
3900
3901
3902 gm animate -colors 32 cockatoo.1 -noop cockatoo.2
3903 -colors 16 cockatoo.3
3904
3905 Animate options can appear on the command line or in your X
3906 resources file. See X(1). Options on the command line supersede
3907 values specified in your X resources file. Image filenames may
3908 appear in any order on the command line if the image format is
3909 MIFF (refer to miff(5) and the scene keyword is specified in the
3910 image. Otherwise the images will display in the order they
3911 appear on the command line.
3912
3914 Press any button to map or unmap the Command widget. See the next sec‐
3915 tion for more information about the Command widget.
3916
3918 The Command widget lists a number of sub-menus and commands. They are
3919
3920 Animate
3921
3922 Open
3923 Play
3924 Step
3925 Repeat
3926 Auto Reverse
3927
3928 Speed
3929
3930 Faster
3931 Slower
3932
3933 Direction
3934
3935 Forward
3936 Reverse
3937
3938 Image Info
3939 Help
3940 Quit
3941
3942
3943 Menu items with a indented triangle have a sub-menu. They are repre‐
3944 sented above as the indented items. To access a sub-menu item, move the
3945 pointer to the appropriate menu and press a button and drag. When you
3946 find the desired sub-menu item, release the button and the command is
3947 executed. Move the pointer away from the sub-menu if you decide not to
3948 execute a particular command.
3949
3951 Ctl+O
3952
3953 Press to load an image from a file.
3954 space
3955
3956 Press to display the next image in the sequence.
3957 <
3958
3959 Press to speed-up the display of the images. Refer to
3960 -delay for more information.
3961 >
3962
3963 Press to slow the display of the images. Refer to -delay
3964 for more information.
3965 ?
3966
3967 Press to display information about the image. Press any
3968 key or button to erase the information.
3969 This information is printed: image name; image size; and
3970 the total number of unique colors in the image.
3971 F1
3972
3973 Press to display helpful information about animate(1).
3974 Ctl-q
3975
3976 Press to discard all images and exit program.
3977
3978
3980 Animate options can appear on the command line or in your X resource
3981 file. Options on the command line supersede values specified in your X
3982 resource file. See X(1) for more information on X resources.
3983
3984 All animate options have a corresponding X resource. In addition, the
3985 animate program uses the following X resources:
3986
3987 background (class Background)
3988
3989
3990 Specifies the preferred color to use for the Image window
3991 background. The default is #ccc.
3992 borderColor (class BorderColor)
3993
3994
3995 Specifies the preferred color to use for the Image window
3996 border. The default is #ccc.
3997 borderWidth (class BorderWidth)
3998
3999
4000 Specifies the width in pixels of the Image window border.
4001 The default is 2.
4002 font (class Font or FontList)
4003
4004
4005 Specifies the name of the preferred font to use in normal
4006 formatted text. The default is 14 point Helvetica.
4007 foreground (class Foreground)
4008
4009
4010 Specifies the preferred color to use for text within the
4011 Image window. The default is black.
4012 geometry (class geometry)
4013
4014
4015 Specifies the preferred size and position of the image
4016 window. It is not necessarily obeyed by all window man‐
4017 agers. Offsets, if present, are handled in X(1) style. A
4018 negative x offset is measured from the right edge of the
4019 screen to the right edge of the icon, and a negative y
4020 offset is measured from the bottom edge of the screen to
4021 the bottom edge of the icon.
4022 iconGeometry (class IconGeometry)
4023
4024
4025 Specifies the preferred size and position of the applica‐
4026 tion when iconified. It is not necessarily obeyed by all
4027 window managers. Offsets, if present, are handled in the
4028 same manner as in class Geometry.
4029 iconic (class Iconic)
4030
4031
4032 This resource indicates that you would prefer that the
4033 application's windows initially not be visible as if the
4034 windows had be immediately iconified by you. Window man‐
4035 agers may choose not to honor the application's request.
4036 matteColor (class MatteColor)
4037
4038
4039 Specify the color of windows. It is used for the back‐
4040 grounds of windows, menus, and notices. A 3D effect is
4041 achieved by using highlight and shadow colors derived from
4042 this color. Default value: #ddd.
4043 name (class Name)
4044
4045
4046 This resource specifies the name under which resources for
4047 the application should be found. This resource is useful
4048 in shell aliases to distinguish between invocations of an
4049 application, without resorting to creating links to alter
4050 the executable file name. The default is the application
4051 name.
4052 sharedMemory (class SharedMemory)
4053
4054
4055 This resource specifies whether animate should attempt use
4056 shared memory for pixmaps. ImageMagick must be compiled
4057 with shared memory support, and the display must support
4058 the MIT-SHM extension. Otherwise, this resource is
4059 ignored. The default is True.
4060 text_font (class textFont)
4061
4062
4063 Specifies the name of the preferred font to use in fixed
4064 (typewriter style) formatted text. The default is 14 point
4065 Courier.
4066 title (class Title)
4067
4068
4069 This resource specifies the title to be used for the Image
4070 window. This information is sometimes used by a window
4071 manager to provide some sort of header identifying the
4072 window. The default is the image file name.
4073
4074
4076 compare compares two similar images using a specified statistical
4077 method (see -metric) and/or by writing a difference image (-file), with
4078 the altered pixels annotated using a specified method (see -highlight-
4079 style) and color (see -highlight-color). Reference-image is the origi‐
4080 nal image and compare-image is the (possibly) altered version, which
4081 should have the same dimensions as reference-image.
4082
4084 To compare two images using Mean Square Error (MSE) statistical analy‐
4085 sis use:
4086
4087 gm compare -metric mse original.miff compare.miff
4088
4089 To create an annotated difference image use:
4090
4091 gm compare -algorithm annotate -highlight-color purple
4092 -file diff.miff original.miff compare.miff
4093
4095 Options are processed in command line order. Any option you specify on
4096 the command line remains in effect only for the image that follows.
4097 All options are reset to their default values after each image is read.
4098
4099 For a more detailed description of each option, see Options, above.
4100
4101
4102 -authenticate <string>
4103 decrypt image with this password
4104
4105 -colorspace <value>
4106 the type of colorspace
4107
4108 -debug <events>
4109 enable debug printout
4110
4111 -define <key>{=<value>},...
4112 add coder/decoder specific options
4113
4114 -density <width>x<height>
4115 horizontal and vertical resolution in pixels of the image
4116
4117 -depth <value>
4118 depth of the image
4119
4120 -display <host:display[.screen]>
4121 specifies the X server to contact
4122
4123 -endian <type>
4124 specify endianness (MSB, LSB, or Native) of image
4125
4126 -file <filename>
4127 write annotated difference image to file
4128
4129 -help print usage instructions
4130
4131 -highlight-color <color>
4132 pixel annotation color
4133
4134 -highlight-style <style>
4135 pixel annotation style
4136
4137 -interlace <type>
4138 the type of interlacing scheme
4139
4140 -limit <type> <value>
4141 Disk, File, Map, Memory, Pixels, or Threads resource limit
4142
4143 -log <string>
4144 Specify format for debug log
4145
4146 -matte store matte channel if the image has one
4147
4148 -maximum-error <limit>
4149 specifies the maximum amount of total image error
4150
4151 -monitor
4152 show progress indication
4153
4154 -sampling-factor <horizontal_factor>x<vertical_factor>
4155 chroma subsampling factors
4156
4157 -size <width>x<height>{+offset}
4158 width and height of the image
4159
4160 -type <type>
4161 the image type
4162
4163 -verbose
4164 print detailed information about the image
4165
4166 -version
4167 print GraphicsMagick version string
4168
4169 For a more detailed description of each option, see Options,
4170 above.
4171
4172
4174 composite composites (combines) images to create new images. base-
4175 image is the base image and change-image contains the changes. ouput-
4176 image is the result, and normally has the same dimensions as base-
4177 image.
4178
4179
4180 The optional mask-image can be used to provide opacity information for
4181 change-image when it has none or if you want a different mask. A mask
4182 image is typically grayscale and the same size as base-image. If mask-
4183 image is not grayscale, it is converted to grayscale and the resulting
4184 intensities are used as opacity information.
4185
4187 To composite an image of a cockatoo with a perch, use:
4188
4189 gm composite cockatoo.miff perch.ras composite.miff
4190
4191 To compute the difference between images in a series, use:
4192
4193 gm composite -compose difference series.2 series.1
4194 difference.miff
4195
4196 To composite an image of a cockatoo with a perch starting at location
4197 (100,150), use:
4198
4199 gm composite -geometry +100+150 cockatoo.miff
4200 perch.ras composite.miff
4201
4202 To tile a logo across your image of a cockatoo, use
4203
4204 gm convert +shade 30x60 cockatoo.miff mask.miff
4205 gm composite -compose bumpmap -tile logo.png
4206 cockatoo.miff mask.miff composite.miff
4207
4208 To composite a red, green, and blue color plane into a single composite
4209 image, try
4210
4211 gm composite -compose CopyGreen green.png red.png
4212 red-green.png
4213 gm composite -compose CopyBlue blue.png red-green.png
4214 gm composite.png
4215
4217 Options are processed in command line order. Any option you specify on
4218 the command line remains in effect only for the image that follows.
4219 All options are reset to their default values after each image is read.
4220
4221 For a more detailed description of each option, see Options, above.
4222
4223
4224 -authenticate <string>
4225 decrypt image with this password
4226
4227 -background <color>
4228 the background color
4229
4230 -blue-primary <x>,<y>
4231 blue chromaticity primary point
4232
4233 -colors <value>
4234 preferred number of colors in the image
4235
4236 -colorspace <value>
4237 the type of colorspace
4238
4239 -comment <string>
4240 annotate an image with a comment
4241
4242 -compose <operator>
4243 the type of image composition
4244
4245 -compress <type>
4246 the type of image compression
4247
4248 -debug <events>
4249 enable debug printout
4250
4251 -define <key>{=<value>},...
4252 add coder/decoder specific options
4253
4254 -density <width>x<height>
4255 horizontal and vertical resolution in pixels of the image
4256
4257 -depth <value>
4258 depth of the image
4259
4260 -displace <horizontal scale>x<vertical scale>
4261 shift image pixels as defined by a displacement map
4262
4263 -display <host:display[.screen]>
4264 specifies the X server to contact
4265
4266 -dispose <method>
4267 GIF disposal method
4268
4269 -dissolve <percent>
4270 dissolve an image into another by the given percent
4271
4272 -dither
4273 apply Floyd/Steinberg error diffusion to the image
4274
4275 -encoding <type>
4276 specify the text encoding
4277
4278 -endian <type>
4279 specify endianness (MSB, LSB, or Native) of image
4280
4281 -filter <type>
4282 use this type of filter when resizing an image
4283
4284 -font <name>
4285 use this font when annotating the image with text
4286
4287 -geometry <width>x<height>{+-}<x>{+-}<y>{%}{@}{!}{^}{<}{>}
4288 preferred size and location of the Image window.
4289
4290 -gravity <type>
4291 direction primitive gravitates to when annotating the image.
4292
4293 -green-primary <x>,<y>
4294 green chromaticity primary point
4295
4296 -help print usage instructions
4297
4298 -interlace <type>
4299 the type of interlacing scheme
4300
4301 -label <name>
4302 assign a label to an image
4303
4304 -limit <type> <value>
4305 Disk, File, Map, Memory, Pixels, or Threads resource limit
4306
4307 -log <string>
4308 Specify format for debug log
4309
4310 -matte store matte channel if the image has one
4311
4312 -monitor
4313 show progress indication
4314
4315 -monochrome
4316 transform the image to black and white
4317
4318 -negate
4319 replace every pixel with its complementary color
4320
4321 -page <width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}
4322 size and location of an image canvas
4323
4324 -profile <filename>
4325 add ICM, IPTC, or generic profile to image
4326
4327 -quality <value>
4328 JPEG/MIFF/PNG/TIFF compression level
4329
4330 -recolor <matrix>
4331 apply a color translation matrix to image channels
4332
4333 -red-primary <x>,<y>
4334 red chromaticity primary point
4335
4336 -render
4337 render vector operations
4338
4339 -resize <width>x<height>{%}{@}{!}{<}{>}
4340 resize an image
4341
4342 -rotate <degrees>{<}{>}
4343 rotate the image
4344
4345 -sampling-factor <horizontal_factor>x<vertical_factor>
4346 chroma subsampling factors
4347
4348 -scene <value>
4349 set scene number
4350
4351 -set <attribute> <value>
4352 set an image attribut
4353
4354 -sharpen <radius>{x<sigma>}
4355 sharpen the image
4356
4357 -size <width>x<height>{+offset}
4358 width and height of the image
4359
4360 -stegano <offset>
4361 hide watermark within an image
4362
4363 -stereo
4364 composite two images to create a stereo anaglyph
4365
4366 -thumbnail <width>x<height>{%}{@}{!}{<}{>}
4367 resize an image (quickly)
4368
4369 -treedepth <value>
4370 tree depth for the color reduction algorithm
4371
4372 -trim trim an image
4373
4374 -type <type>
4375 the image type
4376
4377 -units <type>
4378 the units of image resolution
4379
4380 -unsharp <radius>{x<sigma>}{+<amount>}{+<threshold>}
4381 sharpen the image with an unsharp mask operator
4382
4383 -verbose
4384 print detailed information about the image
4385
4386 -version
4387 print GraphicsMagick version string
4388
4389 -watermark <brightness>x<saturation>
4390 percent brightness and saturation of a watermark
4391
4392 -white-point <x>,<y>
4393 chromaticity white point
4394
4395 -write <filename>
4396 write an intermediate image [convert, composite]
4397
4398 For a more detailed description of each option, see Options,
4399 above.
4400
4401
4403 The Magick scripting language (MSL) will primarily benefit those that
4404 want to accomplish custom image processing tasks but do not wish to
4405 program, or those that do not have access to a Perl interpreter or a
4406 compiler. The interpreter is called conjure and here is an example
4407 script:
4408
4409 <?xml version="1.0" encoding="UTF-8"?>
4410 <image size="400x400" >
4411 <read filename="image.gif" />
4412 <get width="base-width" height="base-height" />
4413 <resize geometry="%[dimensions]" />
4414 <get width="width" height="height" />
4415 <print output=
4416 "Image sized from %[base-width]x%[base-height]
4417 to %[width]x%[height].\n" />
4418 <write filename="image.png" />
4419 </image>
4420
4421 invoked with
4422
4423 gm conjure -dimensions 400x400 incantation.msl
4424
4425 All operations will closely follow the key/value pairs defined in Perl‐
4426 Magick, unless otherwise noted.
4427
4429 Options are processed in command line order. Any option you specify on
4430 the command line remains in effect until it is explicitly changed by
4431 specifying the option again with a different effect, or if it is
4432 changed by a statement in the scripting language.
4433
4434 You can define your own keyword/value pairs on the command line. The
4435 script can then use this information when setting values by including
4436 %[keyword] in the string. For example, if you included "-dimensions
4437 400x400" on the command line, as illustrated above, then any string
4438 containing "%[dimensions]" would have 400x400 substituted. The
4439 "%[string]" can be used either an entire string, such as geome‐
4440 try="%[dimensions]" or as a part of a string such as filename="%[base‐
4441 name].png".
4442
4443 The keyword can be any string except for the following reserved strings
4444 (in any upper, lower, or mixed case variant): debug, help, and verbose,
4445 whose usage is described below.
4446
4447 The value can be any string. If either the keyword or the value con‐
4448 tains white space or any symbols that have special meanings to your
4449 shell such as "#", "|", or "%", enclose the string in quotation marks
4450 or use "\" to escape the white space and special symbols.
4451
4452 Keywords and values are case dependent. "Key", "key", and "KEY" would
4453 be three different keywords.
4454
4455 For a more detailed description of each option, see Options, above.
4456
4457
4458 -debug <events>
4459 enable debug printout
4460
4461 -define <key>{=<value>},...
4462 add coder/decoder specific options
4463
4464 -help print usage instructions
4465
4466 -log <string>
4467 Specify format for debug log
4468
4469 -verbose
4470 print detailed information about the image
4471
4472 -version
4473 print GraphicsMagick version string
4474
4476 The Magick Scripting Language (MSL) presently defines the following
4477 elements and their attributes:
4478
4479 <image>
4480
4481 background, color, id, size
4482
4483 Define a new image object. </image> destroys it. Because
4484 of this, if you wish to reference multiple "subimages"
4485 (aka pages or layers), you can embed one image element
4486 inside of another. For example:
4487
4488
4489
4490 <image>
4491 <read filename="input.png" />
4492 <get width="base-width" height="base-height" />
4493 <image height="base-height" width="base-width">
4494 <image />
4495 <write filename="output.mng" />
4496 </image>
4497
4498
4499
4500 <image size="400x400" />
4501
4502 <group>
4503
4504
4505 Define a new group of image objects. By default, images
4506 are only valid for the life of their <image>element.
4507
4508
4509
4510 <image> -- creates the image
4511 ..... -- do stuff with it
4512 </image> -- dispose of the image
4513
4514
4515 However, in a group, all images in that group will stay
4516 around for the life of the group:
4517
4518
4519
4520 <group> -- start a group
4521 <image> -- create an image
4522 .... -- do stuff
4523 </image> -- NOOP
4524 <image> -- create another
4525 image
4526 .... -- do more stuff
4527 </image> -- NOOP
4528 <write filename="image.mng" /> -- output
4529 </group> -- dispose of both
4530 images
4531
4532 <read>
4533
4534 filename
4535
4536 Read a new image from a disk file.
4537
4538
4539
4540 <read filename="image.gif" />
4541
4542
4543 To read two images use
4544
4545
4546
4547 <read filename="image.gif" />
4548 <read filename="image.png />
4549
4550 <write>
4551
4552 filename
4553 Write the image(s) to disk, either as a single multiple-
4554 image file or multiple ones if necessary.
4555
4556
4557
4558 <write filename=image.tiff" />
4559 <get>
4560
4561 Get any attribute recognized by PerlMagick's GetAt‐
4562 tribute() and stores it as an image attribute for later
4563 use. Currently only width and height are supported.
4564
4565
4566 <get width="base-width" height="base-height" />
4567 <print output="Image size is %[base-width]x%[base-
4568 height].\n" />
4569
4570 <set>
4571
4572 background, bordercolor, clip-mask, colorspace, density,
4573 magick, mattecolor, opacity. Set an attribute recognized
4574 by PerlMagick's GetAttribute().
4575 <profile>
4576
4577 [profilename]
4578
4579 Read one or more IPTC, ICC or generic profiles from file
4580 and assign to image
4581
4582
4583
4584 <profile iptc="profile.iptc" generic="generic.dat" />
4585
4586
4587 To remove a specified profile use "!" as the filename eg
4588
4589
4590
4591 <profile icm="!" iptc="profile.iptc" />
4592
4593 <border>
4594
4595 fill, geometry, height, width
4596 <blur>
4597
4598 radius, sigma
4599 <charcoal>
4600
4601 radius, sigma
4602 <chop>
4603
4604 geometry, height, width, x, y
4605 <crop>
4606
4607 geometry, height, width, x, y
4608 <composite>
4609
4610 compose, geometry, gravity, image, x, y
4611
4612
4613 <?xml version="1.0" encoding="UTF-8"?>
4614 <group>
4615 <image id="image_01">
4616 <read filename="cloud3.gif"/>
4617 <resize geometry="250x90"/>
4618 </image>
4619 <image id="image_02">
4620 <read filename="cloud4.gif"/>
4621 <resize geometry="190x100"/>
4622 </image>
4623 <image>
4624 <read filename="background.jpg"/>
4625 <composite image="image_01" geome‐
4626 try="+740+470"/>
4627 <composite image="image_02" geome‐
4628 try="+390+415"/>
4629 </image>
4630 <write filename="result.png"/>
4631 </group>
4632
4633 <despeckle>
4634
4635 <emboss>
4636
4637 radius, sigma
4638 <enhance>
4639
4640 <equalize>
4641
4642 <edge>
4643
4644 radius
4645 <flip>
4646
4647 <flop>
4648
4649 <frame>
4650
4651 fill, geometry, height, width, x, y, inner, outer
4652 <flatten>
4653
4654 <get>
4655
4656 height, width
4657 <gamma>
4658
4659 red, green, blue
4660 <image>
4661
4662 background, color, id, size
4663 <implode>
4664
4665 amount
4666 <magnify>
4667
4668 <minify>
4669
4670 <medianfilter>
4671
4672 radius
4673 <normalize>
4674
4675 <oilpaint>
4676
4677 radius
4678 <print>
4679
4680 output
4681 <profile>
4682
4683 [profilename]
4684 <read>
4685
4686 <resize>
4687
4688 blur, filter, geometry, height, width
4689 <roll>
4690
4691 geometry, x, y
4692 <rotate>
4693
4694 degrees
4695 <reducenoise>
4696
4697 radius
4698 <sample>
4699
4700 geometry, height, width
4701 <scale>
4702
4703 geometry, height, width
4704 <sharpen>
4705
4706 radius, sigma
4707 <shave>
4708
4709 geometry, height, width
4710 <shear>
4711
4712 x, y
4713 <solarize>
4714
4715 threshold
4716 <spread>
4717
4718 radius
4719 <stegano>
4720
4721 image
4722 <stereo>
4723
4724 image
4725 <swirl>
4726
4727 degrees
4728 <texture>
4729
4730 image
4731 <threshold>
4732
4733 threshold
4734 <transparent>
4735
4736 color
4737 <trim>
4738
4739
4740
4741
4742 GM CONVERT
4743
4744 Convert converts an input file using one image format to an out‐
4745 put file with a differing image format. In addition, various
4746 types of image processing can be performed on the converted
4747 image during the conversion process. Convert recognizes the
4748 image formats listed in GraphicsMagick(1).
4749
4750
4752 To make a thumbnail of a JPEG image, use:
4753
4754 gm convert -size 120x120 cockatoo.jpg -resize 120x120
4755 +profile "*" thumbnail.jpg
4756
4757 In this example, '-size 120x120' gives a hint to the JPEG decoder that
4758 the image is going to be downscaled to 120x120, allowing it to run
4759 faster by avoiding returning full-resolution images to GraphicsMagick
4760 for the subsequent resizing operation. The ´-resize 120x120' specifies
4761 the desired dimensions of the output image. It will be scaled so its
4762 largest dimension is 120 pixels. The ´+profile "*"' removes any ICM,
4763 EXIF, IPTC, or other profiles that might be present in the input and
4764 aren't needed in the thumbnail.
4765
4766 To convert a MIFF image of a cockatoo to a SUN raster image, use:
4767
4768 gm convert cockatoo.miff sun:cockatoo.ras
4769
4770 To convert a multi-page PostScript document to individual FAX pages,
4771 use:
4772
4773 gm convert -monochrome document.ps fax:page
4774
4775 To convert a TIFF image to a PostScript A4 page with the image in the
4776 lower left-hand corner, use:
4777
4778 gm convert -page A4+0+0 image.tiff document.ps
4779
4780 To convert a raw Gray image with a 128 byte header to a portable
4781 graymap, use:
4782
4783 gm convert -depth 8 -size 768x512+128 gray:raw
4784 image.pgm
4785
4786 In this example, "raw" is the input file. Its format is "gray" and it
4787 has the dimensions and number of header bytes specified by the -size
4788 option and the sample depth specified by the -depth option. The output
4789 file is "image.pgm". The suffix ".pgm" specifies its format.
4790
4791 To convert a Photo CD image to a TIFF image, use:
4792
4793 gm convert -size 1536x1024 img0009.pcd image.tiff
4794 gm convert img0009.pcd[4] image.tiff
4795
4796 To create a visual image directory of all your JPEG images, use:
4797
4798 gm convert 'vid:*.jpg' directory.miff
4799
4800 To annotate an image with blue text using font 12x24 at position
4801 (100,100), use:
4802
4803 gm convert -font helvetica -fill blue
4804 -draw "text 100,100 Cockatoo"
4805 bird.jpg bird.miff
4806
4807 To tile a 640x480 image with a JPEG texture with bumps use:
4808
4809 gm convert -size 640x480 tile:bumps.jpg tiled.png
4810
4811 To surround an icon with an ornamental border to use with Mosaic(1),
4812 use:
4813
4814 gm convert -mattecolor "#697B8F" -frame 6x6 bird.jpg
4815 icon.png
4816
4817 To create a MNG animation from a DNA molecule sequence, use:
4818
4819 gm convert -delay 20 dna.* dna.mng
4820
4822 Options are processed in command line order. Any option you specify on
4823 the command line remains in effect for the set of images that follows,
4824 until the set is terminated by the appearance of any option or -noop.
4825 Some options only affect the decoding of images and others only the
4826 encoding. The latter can appear after the final group of input images.
4827
4828 For a more detailed description of each option, see Options, above.
4829
4830
4831 -adjoin
4832 join images into a single multi-image file
4833
4834 -affine <matrix>
4835 drawing transform matrix
4836
4837 -antialias
4838 remove pixel aliasing
4839
4840 -append
4841 append a set of images
4842
4843 -asc-cdl <spec>
4844 apply ASC CDL color transform
4845
4846 -authenticate <string>
4847 decrypt image with this password
4848
4849 -average
4850 average a set of images
4851
4852 -background <color>
4853 the background color
4854
4855 -black-threshold red[,green][,blue][,opacity]
4856 pixels below the threshold become black
4857
4858 -blue-primary <x>,<y>
4859 blue chromaticity primary point
4860
4861 -blur <radius>{x<sigma>}
4862 blur the image with a Gaussian operator
4863
4864 -border <width>x<height>
4865 surround the image with a border of color
4866
4867 -bordercolor <color>
4868 the border color
4869
4870 -box <color>
4871 set the color of the annotation bounding box
4872
4873 -channel <type>
4874 the type of channel
4875
4876 -charcoal <factor>
4877 simulate a charcoal drawing
4878
4879 -chop <width>x<height>{+-}<x>{+-}<y>{%}
4880 remove pixels from the interior of an image
4881
4882 -clip apply the clipping path, if one is present
4883
4884 -coalesce
4885 merge a sequence of images
4886
4887 -colorize <value>
4888 colorize the image with the pen color
4889
4890 -colors <value>
4891 preferred number of colors in the image
4892
4893 -colorspace <value>
4894 the type of colorspace
4895
4896 -comment <string>
4897 annotate an image with a comment
4898
4899 -compose <operator>
4900 the type of image composition
4901
4902 -compress <type>
4903 the type of image compression
4904
4905 -contrast
4906 enhance or reduce the image contrast
4907
4908 -convolve <kernel>
4909 convolve image with the specified convolution kernel
4910
4911 -crop <width>x<height>{+-}<x>{+-}<y>{%}
4912 preferred size and location of the cropped image
4913
4914 -cycle <amount>
4915 displace image colormap by amount
4916
4917 -debug <events>
4918 enable debug printout
4919
4920 -deconstruct
4921 break down an image sequence into constituent parts
4922
4923 -define <key>{=<value>},...
4924 add coder/decoder specific options
4925
4926 -delay <1/100ths of a second>
4927 display the next image after pausing
4928
4929 -density <width>x<height>
4930 horizontal and vertical resolution in pixels of the image
4931
4932 -depth <value>
4933 depth of the image
4934
4935 -despeckle
4936 reduce the speckles within an image
4937
4938 -display <host:display[.screen]>
4939 specifies the X server to contact
4940
4941 -dispose <method>
4942 GIF disposal method
4943
4944 -dither
4945 apply Floyd/Steinberg error diffusion to the image
4946
4947 -draw <string>
4948 annotate an image with one or more graphic primitives
4949
4950 -edge <radius>
4951 detect edges within an image
4952
4953 -emboss <radius>
4954 emboss an image
4955
4956 -encoding <type>
4957 specify the text encoding
4958
4959 -endian <type>
4960 specify endianness (MSB, LSB, or Native) of image
4961
4962 -enhance
4963 apply a digital filter to enhance a noisy image
4964
4965 -equalize
4966 perform histogram equalization to the image
4967
4968 -extent <width>x<height>{+-}<x>{+-}<y>
4969 composite image on background color canvas image
4970
4971 -fill <color>
4972 color to use when filling a graphic primitive
4973
4974 -filter <type>
4975 use this type of filter when resizing an image
4976
4977 -flatten
4978 flatten a sequence of images
4979
4980 -flip create a "mirror image"
4981
4982 -flop create a "mirror image"
4983
4984 -font <name>
4985 use this font when annotating the image with text
4986
4987 -frame <width>x<height>+<outer bevel width>+<inner bevel width>
4988 surround the image with an ornamental border
4989
4990 -fuzz <distance>{%}
4991 colors within this Euclidean distance are considered equal
4992
4993 -gamma <value>
4994 level of gamma correction
4995
4996 -gaussian <radius>{x<sigma>}
4997 blur the image with a Gaussian operator
4998
4999 -geometry <width>x<height>{+-}<x>{+-}<y>{%}{@}{!}{^}{<}{>}
5000 preferred size and location of the Image window.
5001
5002 -gravity <type>
5003 direction primitive gravitates to when annotating the image.
5004
5005 -green-primary <x>,<y>
5006 green chromaticity primary point
5007
5008 -hald-clut <clut>
5009 apply a Hald CLUT to the image
5010
5011 -help print usage instructions
5012
5013 -implode <factor>
5014 implode image pixels about the center
5015
5016 -intent <type>
5017 use this type of rendering intent when managing the image color
5018
5019 -interlace <type>
5020 the type of interlacing scheme
5021
5022 -label <name>
5023 assign a label to an image
5024
5025 -lat <width>x<height>{+-}<offset>{%}
5026 perform local adaptive thresholding
5027
5028 -level <black_point>{,<gamma>}{,<white_point>}{%}
5029 adjust the level of image contrast
5030
5031 -limit <type> <value>
5032 Disk, File, Map, Memory, Pixels, or Threads resource limit
5033
5034 -list <type>
5035 the type of list
5036
5037 -log <string>
5038 Specify format for debug log
5039
5040 -loop <iterations>
5041 add Netscape loop extension to your GIF animation
5042
5043 -magnify
5044 magnify the image
5045
5046 -map <filename>
5047 choose a particular set of colors from this image
5048
5049 -mask <filename>
5050 Specify a clipping mask
5051
5052 -matte store matte channel if the image has one
5053
5054 -mattecolor <color>
5055 specify the color to be used with the -frame option
5056
5057 -median <radius>
5058 apply a median filter to the image
5059
5060 -minify <factor>
5061 minify the image
5062
5063 -modulate brightness[,saturation[,hue]]
5064 vary the brightness, saturation, and hue of an image
5065
5066 -monitor
5067 show progress indication
5068
5069 -monochrome
5070 transform the image to black and white
5071
5072 -morph <frames>
5073 morphs an image sequence
5074
5075 -mosaic
5076 create a mosaic from an image or an image sequence
5077
5078 -motion-blur <radius>{x<sigma>}{+angle}
5079 Simulate motion blur
5080
5081 -negate
5082 replace every pixel with its complementary color
5083
5084 -noise <radius|type>
5085 add or reduce noise in an image
5086
5087 -noop NOOP (no option)
5088
5089 -normalize
5090 transform image to span the full range of color values
5091
5092 -opaque <color>
5093 change this color to the pen color within the image
5094
5095 -operator channel operator rvalue[%]
5096 apply a mathematical, bitwise, or value operator to an image
5097 channel
5098
5099 -ordered-dither <channeltype> <NxN>
5100 ordered dither the image
5101
5102 -page <width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}
5103 size and location of an image canvas
5104
5105 -paint <radius>
5106 simulate an oil painting
5107
5108 -pen <color>
5109 (This option has been replaced by the -fill option)
5110
5111 -ping efficiently determine image characteristics
5112
5113 -pointsize <value>
5114 pointsize of the PostScript, X11, or TrueType font
5115
5116 -preview <type>
5117 image preview type
5118
5119 -process <command>
5120 process a sequence of images using a process module
5121
5122 -profile <filename>
5123 add ICM, IPTC, or generic profile to image
5124
5125 -quality <value>
5126 JPEG/MIFF/PNG/TIFF compression level
5127
5128 -raise <width>x<height>
5129 lighten or darken image edges
5130
5131 -random-threshold <channeltype> <LOWxHIGH>
5132 random threshold the image
5133
5134 -recolor <matrix>
5135 apply a color translation matrix to image channels
5136
5137 -red-primary <x>,<y>
5138 red chromaticity primary point
5139
5140 -region <width>x<height>{+-}<x>{+-}<y>
5141 apply options to a portion of the image
5142
5143 -render
5144 render vector operations
5145
5146 -resample <horizontal>x<vertical>
5147 Resample image to specified horizontal and vertical resolution
5148
5149 -resize <width>x<height>{%}{@}{!}{<}{>}
5150 resize an image
5151
5152 -roll {+-}<x>{+-}<y>
5153 roll an image vertically or horizontally
5154
5155 -rotate <degrees>{<}{>}
5156 rotate the image
5157
5158 -sample <geometry>
5159 scale image using pixel sampling
5160
5161 -sampling-factor <horizontal_factor>x<vertical_factor>
5162 chroma subsampling factors
5163
5164 -scale <geometry>
5165 scale the image.
5166
5167 -scene <value>
5168 set scene number
5169
5170 -set <attribute> <value>
5171 set an image attribut
5172
5173 -segment <cluster threshold>x<smoothing threshold>
5174 segment an image
5175
5176 -shade <azimuth>x<elevation>
5177 shade the image using a distant light source
5178
5179 -sharpen <radius>{x<sigma>}
5180 sharpen the image
5181
5182 -shave <width>x<height>{%}
5183 shave pixels from the image edges
5184
5185 -shear <x degrees>x<y degrees>
5186 shear the image along the X or Y axis
5187
5188 -size <width>x<height>{+offset}
5189 width and height of the image
5190
5191 -solarize <factor>
5192 negate all pixels above the threshold level
5193
5194 -spread <amount>
5195 displace image pixels by a random amount
5196
5197 -stroke <color>
5198 color to use when stroking a graphic primitive
5199
5200 -strokewidth <value>
5201 set the stroke width
5202
5203 -swirl <degrees>
5204 swirl image pixels about the center
5205
5206 -texture <filename>
5207 name of texture to tile onto the image background
5208
5209 -threshold <value>{%}
5210 threshold the image
5211
5212 -thumbnail <width>x<height>{%}{@}{!}{<}{>}
5213 resize an image (quickly)
5214
5215 -tile <filename>
5216 tile image when filling a graphic primitive
5217
5218 -transform
5219 transform the image
5220
5221 -transparent <color>
5222 make this color transparent within the image
5223
5224 -treedepth <value>
5225 tree depth for the color reduction algorithm
5226
5227 -trim trim an image
5228
5229 -type <type>
5230 the image type
5231
5232 -units <type>
5233 the units of image resolution
5234
5235 -unsharp <radius>{x<sigma>}{+<amount>}{+<threshold>}
5236 sharpen the image with an unsharp mask operator
5237
5238 -use-pixmap
5239 use the pixmap
5240
5241 -verbose
5242 print detailed information about the image
5243
5244 -version
5245 print GraphicsMagick version string
5246
5247 -view <string>
5248 FlashPix viewing parameters
5249
5250 -virtual-pixel <method>
5251 specify contents of "virtual pixels"
5252
5253 -wave <amplitude>x<wavelength>
5254 alter an image along a sine wave
5255
5256 -white-point <x>,<y>
5257 chromaticity white point
5258
5259 -white-threshold red[,green][,blue][,opacity]
5260 pixels above the threshold become white
5261
5262 -write <filename>
5263 write an intermediate image [convert, composite]
5264
5265 For a more detailed description of each option, see Options,
5266 above.
5267
5269 Display is a machine architecture independent image processing and dis‐
5270 play program. It can display an image on any workstation screen running
5271 an X server. Display can read and write many of the more popular image
5272 formats (e.g. JPEG, TIFF, PNM, Photo CD, etc.).
5273
5274 With display, you can perform these functions on an image:
5275
5276 o load an image from a file
5277 o display the next image
5278 o display the former image
5279 o display a sequence of images as a slide show
5280 o write the image to a file
5281 o print the image to a PostScript printer
5282 o delete the image file
5283 o create a Visual Image Directory
5284 o select the image to display by its thumbnail rather than
5285 name
5286 o undo last image transformation
5287 o copy a region of the image
5288 o paste a region to the image
5289 o restore the image to its original size
5290 o refresh the image
5291 o half the image size
5292 o double the image size
5293 o resize the image
5294 o crop the image
5295 o cut the image
5296 o flop image in the horizontal direction
5297 o flip image in the vertical direction
5298 o rotate the image 90 degrees clockwise
5299 o rotate the image 90 degrees counter-clockwise
5300 o rotate the image
5301 o shear the image
5302 o roll the image
5303 o trim the image edges
5304 o invert the colors of the image
5305 o vary the color brightness
5306 o vary the color saturation
5307 o vary the image hue
5308 o gamma correct the image
5309 o sharpen the image contrast
5310 o dull the image contrast
5311 o perform histogram equalization on the image
5312 o perform histogram normalization on the image
5313 o negate the image colors
5314 o convert the image to grayscale
5315 o set the maximum number of unique colors in the image
5316 o reduce the speckles within an image
5317 o eliminate peak noise from an image
5318 o detect edges within the image
5319 o emboss an image
5320 o segment the image by color
5321 o simulate an oil painting
5322 o simulate a charcoal drawing
5323 o annotate the image with text
5324 o draw on the image
5325 o edit an image pixel color
5326 o edit the image matte information
5327 o composite an image with another
5328 o add a border to the image
5329 o surround image with an ornamental border
5330 o apply image processing techniques to a region of interest
5331 o display information about the image
5332 o zoom a portion of the image
5333 o show a histogram of the image
5334 o display image to background of a window
5335 o set user preferences
5336 o display information about this program
5337 o discard all images and exit program
5338 o change the level of magnification
5339 o display images specified by a World Wide Web (WWW) uniform
5340 resource locator (URL)
5341
5342
5344 To scale an image of a cockatoo to exactly 640 pixels in width and 480
5345 pixels in height and position the window at location (200,200), use:
5346
5347 gm display -geometry 640x480+200+200! cockatoo.miff
5348
5349 To display an image of a cockatoo without a border centered on a back‐
5350 drop, use:
5351
5352 gm display +borderwidth -backdrop cockatoo.miff
5353
5354 To tile a slate texture onto the root window, use:
5355
5356 gm display -size 1280x1024 -window root slate.png
5357
5358 To display a visual image directory of all your JPEG images, use:
5359
5360 gm display 'vid:*.jpg'
5361
5362 To display a MAP image that is 640 pixels in width and 480 pixels in
5363 height with 256 colors, use:
5364
5365 gm display -size 640x480+256 cockatoo.map
5366
5367 To display an image of a cockatoo specified with a World Wide Web (WWW)
5368 uniform resource locator (URL), use:
5369
5370 gm display ftp://wizards.dupont.com/images/cockatoo.jpg
5371
5372 To display histogram of an image, use:
5373
5374 gm gm convert file.jpg HISTOGRAM:- | gm display -
5375
5377 Options are processed in command line order. Any option you specify on
5378 the command line remains in effect until it is explicitly changed by
5379 specifying the option again with a different effect. For example to
5380 display three images, the first with 32 colors, the second with an
5381 unlimited number of colors, and the third with only 16 colors, use:
5382
5383 gm display -colors 32 cockatoo.miff -noop duck.miff
5384 -colors 16 macaw.miff
5385
5386 Display options can appear on the command line or in your X resources
5387 file. See X(1). Options on the command line supersede values specified
5388 in your X resources file.
5389
5390 For a more detailed description of each option, see Options, above.
5391
5392
5393 -authenticate <string>
5394 decrypt image with this password
5395
5396 -backdrop
5397 display the image centered on a backdrop.
5398
5399 -background <color>
5400 the background color
5401
5402 -border <width>x<height>
5403 surround the image with a border of color
5404
5405 -bordercolor <color>
5406 the border color
5407
5408 -borderwidth <geometry>
5409 the border width
5410
5411 -colormap <type>
5412 define the colormap type
5413
5414 -colors <value>
5415 preferred number of colors in the image
5416
5417 -colorspace <value>
5418 the type of colorspace
5419
5420 -comment <string>
5421 annotate an image with a comment
5422
5423 -compress <type>
5424 the type of image compression
5425
5426 -contrast
5427 enhance or reduce the image contrast
5428
5429 -crop <width>x<height>{+-}<x>{+-}<y>{%}
5430 preferred size and location of the cropped image
5431
5432 -debug <events>
5433 enable debug printout
5434
5435 -define <key>{=<value>},...
5436 add coder/decoder specific options
5437
5438 -delay <1/100ths of a second>
5439 display the next image after pausing
5440
5441 -density <width>x<height>
5442 horizontal and vertical resolution in pixels of the image
5443
5444 -depth <value>
5445 depth of the image
5446
5447 -despeckle
5448 reduce the speckles within an image
5449
5450 -display <host:display[.screen]>
5451 specifies the X server to contact
5452
5453 -dispose <method>
5454 GIF disposal method
5455
5456 -dither
5457 apply Floyd/Steinberg error diffusion to the image
5458
5459 -edge <radius>
5460 detect edges within an image
5461
5462 -endian <type>
5463 specify endianness (MSB, LSB, or Native) of image
5464
5465 -enhance
5466 apply a digital filter to enhance a noisy image
5467
5468 -filter <type>
5469 use this type of filter when resizing an image
5470
5471 -flip create a "mirror image"
5472
5473 -flop create a "mirror image"
5474
5475 -font <name>
5476 use this font when annotating the image with text
5477
5478 -foreground <color>
5479 define the foreground color
5480
5481 -frame <width>x<height>+<outer bevel width>+<inner bevel width>
5482 surround the image with an ornamental border
5483
5484 -gamma <value>
5485 level of gamma correction
5486
5487 -geometry <width>x<height>{+-}<x>{+-}<y>{%}{@}{!}{^}{<}{>}
5488 preferred size and location of the Image window.
5489
5490 -help print usage instructions
5491
5492 -iconGeometry <geometry>
5493 specify the icon geometry
5494
5495 -iconic
5496 iconic animation
5497
5498 -immutable
5499 make image immutable
5500
5501 -interlace <type>
5502 the type of interlacing scheme
5503
5504 -label <name>
5505 assign a label to an image
5506
5507 -limit <type> <value>
5508 Disk, File, Map, Memory, Pixels, or Threads resource limit
5509
5510 -log <string>
5511 Specify format for debug log
5512
5513 -magnify <factor>
5514 magnify the image
5515
5516 -map <type>
5517 display image using this type.
5518
5519 -matte store matte channel if the image has one
5520
5521 -mattecolor <color>
5522 specify the color to be used with the -frame option
5523
5524 -monitor
5525 show progress indication
5526
5527 -monochrome
5528 transform the image to black and white
5529
5530 -name name an image
5531
5532 -negate
5533 replace every pixel with its complementary color
5534
5535 -noop NOOP (no option)
5536
5537 -page <width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}
5538 size and location of an image canvas
5539
5540 +progress
5541 disable progress monitor and busy cursor
5542
5543 -quality <value>
5544 JPEG/MIFF/PNG/TIFF compression level
5545
5546 -raise <width>x<height>
5547 lighten or darken image edges
5548
5549 -remote
5550 perform a X11 remote operation
5551
5552 -roll {+-}<x>{+-}<y>
5553 roll an image vertically or horizontally
5554
5555 -rotate <degrees>{<}{>}
5556 rotate the image
5557
5558 -sample <geometry>
5559 scale image using pixel sampling
5560
5561 -sampling-factor <horizontal_factor>x<vertical_factor>
5562 chroma subsampling factors
5563
5564 -scenes <value-value>
5565 range of image scene numbers to read
5566
5567 -set <attribute> <value>
5568 set an image attribut
5569
5570 -segment <cluster threshold>x<smoothing threshold>
5571 segment an image
5572
5573 -shared-memory
5574 use shared memory
5575
5576 -sharpen <radius>{x<sigma>}
5577 sharpen the image
5578
5579 -size <width>x<height>{+offset}
5580 width and height of the image
5581
5582 -text-font <name>
5583 font for writing fixed-width text
5584
5585 -texture <filename>
5586 name of texture to tile onto the image background
5587
5588 -title <string>
5589 assign title to displayed image [animate, display, montage]
5590
5591 -treedepth <value>
5592 tree depth for the color reduction algorithm
5593
5594 -trim trim an image
5595
5596 -type <type>
5597 the image type
5598
5599 -update <seconds>
5600 detect when image file is modified and redisplay.
5601
5602 -use-pixmap
5603 use the pixmap
5604
5605 -verbose
5606 print detailed information about the image
5607
5608 -version
5609 print GraphicsMagick version string
5610
5611 -visual <type>
5612 animate images using this X visual type
5613
5614 -window <id>
5615 make image the background of a window
5616
5617 -window-group
5618 specify the window group
5619
5620 -write <filename>
5621 write the image to a file [display]
5622
5623 For a more detailed description of each option, see Options,
5624 above.
5625
5626
5628 The effects of each button press is described below. Three buttons are
5629 required. If you have a two button mouse, button 1 and 3 are returned.
5630 Press ALT and button 3 to simulate button 2.
5631
5632 1 Press this button to map or unmap the Command widget . See the
5633 next section for more information about the Command widget.
5634
5635 2 Press and drag to define a region of the image to magnify.
5636
5637 3 Press and drag to choose from a select set of display(1) com‐
5638 mands. This button behaves differently if the image being dis‐
5639 played is a visual image directory. Choose a particular tile of
5640 the directory and press this button and drag to select a command
5641 from a pop-up menu. Choose from these menu items:
5642
5643 Open
5644 Next
5645 Former
5646 Delete
5647 Update
5648
5649
5650 If you choose Open, the image represented by the tile is dis‐
5651 played. To return to the visual image directory, choose Next
5652 from the Command widget (refer to Command Widget). Next and
5653 Former moves to the next or former image respectively. Choose
5654 Delete to delete a particular image tile. Finally, choose Update
5655 to synchronize all the image tiles with their respective images.
5656 See montage and miff for more details.
5657
5659 The Command widget lists a number of sub-menus and commands. They are
5660
5661 File
5662
5663 Open...
5664 Next
5665 Former
5666 Select...
5667 Save...
5668 Print...
5669 Delete...
5670 Canvas...
5671 Visual Directory...
5672 Quit
5673
5674
5675
5676 Edit
5677
5678 Undo
5679 Redo
5680 Cut
5681 Copy
5682 Paste
5683
5684
5685
5686 View
5687
5688 Half Size
5689 Original Size
5690 Double Size
5691 Resize...
5692 Apply
5693 Refresh
5694 Restore
5695
5696
5697
5698 Transform
5699
5700 Crop
5701 Chop
5702 Flop
5703 Flip
5704 Rotate Right
5705 Rotate Left
5706 Rotate...
5707 Shear...
5708 Roll...
5709 Trim Edges
5710
5711
5712
5713 Enhance
5714
5715 Hue...
5716 Saturation...
5717 Brightness...
5718 Gamma...
5719 Spiff...
5720 Dull
5721 Equalize
5722 Normalize
5723 Negate
5724 GRAYscale
5725 Quantize...
5726
5727
5728
5729 Effects
5730
5731 Despeckle
5732 Emboss
5733 Reduce Noise
5734 Add Noise
5735 Sharpen...
5736 Blur...
5737 Threshold...
5738 Edge Detect...
5739 Spread...
5740 Shade...
5741 Raise...
5742 Segment...
5743
5744
5745
5746 F/X
5747
5748 Solarize...
5749 Swirl...
5750 Implode...
5751 Wave...
5752 Oil Paint...
5753 Charcoal Draw...
5754
5755
5756
5757 Image Edit
5758
5759 Annotate...
5760 Draw...
5761 Color...
5762 Matte...
5763 Composite...
5764 Add Border...
5765 Add Frame...
5766 Comment...
5767 Launch...
5768 Region of Interest...
5769
5770
5771
5772 Miscellany
5773
5774 Image Info
5775 Zoom Image
5776 Show Preview...
5777 Show Histogram
5778 Show Matte
5779 Background...
5780 Slide Show
5781 Preferences...
5782
5783
5784
5785 Help
5786
5787 Overview
5788 Browse Documentation
5789 About Display
5790
5791
5792
5793 Menu items with a indented triangle have a sub-menu. They are repre‐
5794 sented above as the indented items. To access a sub-menu item, move the
5795 pointer to the appropriate menu and press button 1 and drag. When you
5796 find the desired sub-menu item, release the button and the command is
5797 executed. Move the pointer away from the sub-menu if you decide not to
5798 execute a particular command.
5799
5801 Accelerators are one or two key presses that effect a particular com‐
5802 mand. The keyboard accelerators that display understands is:
5803
5804 Ctl+O Press to load an image from a file.
5805 space Press to display the next image.
5806
5807 If the image is a multi-paged document such as a PostScript document,
5808 you can skip ahead several pages by preceding this command with a num‐
5809 ber. For example to display the fourth page beyond the current page,
5810 press 4space.
5811
5812 backspace Press to display the former image.
5813
5814 If the image is a multi-paged document such as a PostScript document,
5815 you can skip behind several pages by preceding this command with a num‐
5816 ber. For example to display the fourth page preceding the current
5817 page, press 4n.
5818
5819 Ctl-S Press to save the image to a file.
5820 Ctl-P Press to print the image to a
5821 PostScript printer.
5822 Ctl-D Press to delete an image file.
5823 Ctl-N Press to create a blank canvas.
5824 Ctl-Q Press to discard all images and exit program.
5825 Ctl+Z Press to undo last image transformation.
5826 Ctl+R Press to redo last image transformation.
5827 Ctl-X Press to cut a region of
5828 the image.
5829 Ctl-C Press to copy a region of
5830 the image.
5831 Ctl-V Press to paste a region to
5832 the image.
5833 < Press to halve the image size.
5834 . Press to return to the original image size.
5835 > Press to double the image size.
5836 % Press to resize the image to a width and height
5837 you specify.
5838 Cmd-A Press to make any image transformations
5839 permanent.
5840 By default, any image size transformations are
5841 applied to the original image to create the
5842 image displayed on the X server. However, the
5843 transformations are not permanent (i.e. the
5844 original image does not change size only the
5845 X image does). For example, if you press ">"
5846 the X image will appear to double in size, but
5847 the original image will in fact remain the same
5848 size. To force the original image to double in
5849 size, press ">" followed by "Cmd-A".
5850 @ Press to refresh the image window.
5851 C Press to crop the image.
5852 [ Press to chop the image.
5853 H Press to flop image in the horizontal direction.
5854 V Press to flip image in the vertical direction.
5855 / Press to rotate the image 90 degrees clockwise.
5856 \ Press to rotate the image 90 degrees
5857 counter-clockwise.
5858 * Press to rotate the image
5859 the number of degrees you specify.
5860 S Press to shear the image the number of degrees
5861 you specify.
5862 R Press to roll the image.
5863 T Press to trim the image edges.
5864 Shft-H Press to vary the color hue.
5865 Shft-S Press to vary the color saturation.
5866 Shft-L Press to vary the image brightness.
5867 Shft-G Press to gamma correct the image.
5868 Shft-C Press to spiff up the image contrast.
5869 Shft-Z Press to dull the image contrast.
5870 = Press to perform histogram equalization on
5871 the image.
5872 Shft-N Press to perform histogram normalization on
5873 the image.
5874 Shft-~ Press to negate the colors of the image.
5875 . Press to convert the image colors to gray.
5876 Shft-# Press to set the maximum number of unique
5877 colors in the image.
5878 F2 Press to reduce the speckles in an image.
5879 F2 Press to emboss an image.
5880 F4 Press to eliminate peak noise from an image.
5881 F5 Press to add noise to an image.
5882 F6 Press to sharpen an image.
5883 F7 Press to blur image an image.
5884 F8 Press to threshold the image.
5885 F9 Press to detect edges within an image.
5886 F10 Press to displace pixels by a random amount.
5887 F11 Press to shade the image using a distant light
5888 source.
5889 F12 Press to lighten or darken image edges to
5890 create a 3-D effect.
5891 F13 Press to segment the image by color.
5892 Meta-S Press to swirl image pixels about the center.
5893 Meta-I Press to implode image pixels about the center.
5894 Meta-W Press to alter an image along a sine wave.
5895 Meta-P Press to simulate an oil painting.
5896 Meta-C Press to simulate a charcoal drawing.
5897 Alt-X Press to composite the image
5898 with another.
5899 Alt-A Press to annotate the image with text.
5900 Alt-D Press to draw a line on the image.
5901 Alt-P Press to edit an image pixel color.
5902 Alt-M Press to edit the image matte information.
5903 Alt-X Press to composite the image with another.
5904 Alt-A Press to add a border to the image.
5905 Alt-F Press to add a ornamental frame to the image.
5906 Alt-Shft-! Press to add an image comment.
5907 Ctl-A Press to apply image processing techniques to a
5908 region of interest.
5909 Shft-? Press to display information about the image.
5910 Shft-+ Press to map the zoom image window.
5911 Shft-P Press to preview an image enhancement, effect,
5912 or f/x.
5913 F1 Press to display helpful information about
5914 the "display" utility.
5915 Find Press to browse documentation about
5916 GraphicsMagick.
5917 1-9 Press to change the level of magnification.
5918
5919 Use the arrow keys to move the image one pixel up, down, left, or right
5920 within the magnify window. Be sure to first map the magnify window by
5921 pressing button 2.
5922
5923 Press ALT and one of the arrow keys to trim off one pixel from any side
5924 of the image.
5925
5927 Display options can appear on the command line or in your X resource
5928 file. Options on the command line supersede values specified in your X
5929 resource file. See X(1) for more information on X resources.
5930
5931 Most display options have a corresponding X resource. In addition, dis‐
5932 play uses the following X resources:
5933
5934 background (class Background)
5935 Specifies the preferred color to use for the Image window back‐
5936 ground. The default is #ccc.
5937
5938 borderColor (class BorderColor)
5939 Specifies the preferred color to use for the Image window bor‐
5940 der. The default is #ccc.
5941
5942 borderWidth (class BorderWidth)
5943 Specifies the width in pixels of the image window border. The
5944 default is 2.
5945
5946 browseCommand (class browseCommand)
5947 Specifies the name of the preferred browser when displaying
5948 GraphicsMagick documentation. The default is netscape %s.
5949
5950 confirmExit (class ConfirmExit)
5951 Display pops up a dialog box to confirm exiting the program
5952 when exiting the program. Set this resource to False to exit
5953 without a confirmation.
5954
5955 displayGamma (class DisplayGamma)
5956 Specifies the gamma of the X server. You can apply separate
5957 gamma values to the red, green, and blue channels of the image
5958 with a gamma value list delineated with slashes (i.e.
5959 1.7/2.3/1.2). The default is 2.2.
5960
5961 displayWarnings (class DisplayWarnings)
5962 Display pops up a dialog box whenever a warning message occurs.
5963 Set this resource to False to ignore warning messages.
5964
5965 font (class FontList)
5966 Specifies the name of the preferred font to use in normal for‐
5967 matted text. The default is 14 point Helvetica.
5968
5969 font[1-9] (class Font[1-9])
5970 Specifies the name of the preferred font to use when annotating
5971 the image window with text. The default fonts are fixed, vari‐
5972 able, 5x8, 6x10, 7x13bold, 8x13bold, 9x15bold, 10x20, and 12x24.
5973
5974 foreground (class Foreground)
5975 Specifies the preferred color to use for text within the image
5976 window. The default is black.
5977
5978 gammaCorrect (class gammaCorrect)
5979 This resource, if true, will lighten or darken an image of
5980 known gamma to match the gamma of the display (see resource dis‐
5981 playGamma). The default is True.
5982
5983 geometry (class Geometry)
5984 Specifies the preferred size and position of the image window.
5985 It is not necessarily obeyed by all window managers.
5986
5987 Offsets, if present, are handled in X(1) style. A negative x
5988 offset is measured from the right edge of the screen to the
5989 right edge of the icon, and a negative y offset is measured from
5990 the bottom edge of the screen to the bottom edge of the icon.
5991
5992 iconGeometry (class IconGeometry)
5993 Specifies the preferred size and position of the application
5994 when iconified. It is not necessarily obeyed by all window man‐
5995 agers.
5996
5997 Offsets, if present, are handled in the same manner as in class
5998 Geometry.
5999
6000 iconic (class Iconic)
6001 This resource indicates that you would prefer that the applica‐
6002 tion's windows initially not be visible as if the windows had be
6003 immediately iconified by you. Window managers may choose not to
6004 honor the application's request.
6005
6006 magnify (class Magnify)
6007 specifies an integral factor by which the image should be
6008 enlarged. The default is 3. This value only affects the magni‐
6009 fication window which is invoked with button number 3 after the
6010 image is displayed.
6011
6012 matteColor (class MatteColor)
6013 Specify the color of windows. It is used for the backgrounds of
6014 windows, menus, and notices. A 3D effect is achieved by using
6015 highlight and shadow colors derived from this color. Default
6016 value: #697B8F.
6017
6018 name (class Name)
6019 This resource specifies the name under which resources for the
6020 application should be found. This resource is useful in shell
6021 aliases to distinguish between invocations of an application,
6022 without resorting to creating links to alter the executable file
6023 name. The default is the application name.
6024
6025 pen[1-9] (class Pen[1-9])
6026 Specifies the color of the preferred font to use when annotat‐
6027 ing the image window with text. The default colors are black,
6028 blue, green, cyan, gray, red, magenta, yellow, and white.
6029
6030 printCommand (class PrintCommand)
6031 This command is executed whenever Print is issued. In general,
6032 it is the command to print PostScript to your printer. Default
6033 value: lp -c -s %i.
6034
6035 sharedMemory (class SharedMemory)
6036 This resource specifies whether display should attempt use
6037 shared memory for pixmaps. GraphicsMagick must be compiled with
6038 shared memory support, and the display must support the MIT-SHM
6039 extension. Otherwise, this resource is ignored. The default is
6040 True.
6041
6042 textFont (class textFont)
6043 Specifies the name of the preferred font to use in fixed (type‐
6044 writer style) formatted text. The default is 14 point Courier.
6045
6046 title (class Title)
6047 This resource specifies the title to be used for the image win‐
6048 dow. This information is sometimes used by a window manager to
6049 provide a header identifying the window. The default is the
6050 image file name.
6051
6052 undoCache (class UndoCache)
6053 Specifies, in mega-bytes, the amount of memory in the undo edit
6054 cache. Each time you modify the image it is saved in the undo
6055 edit cache as long as memory is available. You can subsequently
6056 undo one or more of these transformations. The default is 16
6057 Megabytes.
6058
6059 usePixmap (class UsePixmap)
6060 Images are maintained as a XImage by default. Set this resource
6061 to True to utilize a server Pixmap instead. This option is use‐
6062 ful if your image exceeds the dimensions of your server screen
6063 and you intend to pan the image. Panning is much faster with
6064 Pixmaps than with a XImage. Pixmaps are considered a precious
6065 resource, use them with discretion.
6066
6067 To set the geometry of the Magnify or Pan or window, use the
6068 geometry resource. For example, to set the Pan window geometry
6069 to 256x256, use:
6070
6071 gm display.pan.geometry: 256x256
6072
6074 To select an image to display, choose Open of the File sub-menu from
6075 the Command widget. A file browser is displayed. To choose a particu‐
6076 lar image file, move the pointer to the filename and press any button.
6077 The filename is copied to the text window. Next, press Open or press
6078 the RETURN key. Alternatively, you can type the image file name
6079 directly into the text window. To descend directories, choose a direc‐
6080 tory name and press the button twice quickly. A scrollbar allows a
6081 large list of filenames to be moved through the viewing area if it
6082 exceeds the size of the list area.
6083
6084 You can trim the list of file names by using shell globbing characters.
6085 For example, type *.jpg to list only files that end with .jpg.
6086
6087 To select your image from the X server screen instead of from a file,
6088 Choose Grab of the Open widget.
6089
6091 To create a Visual Image Directory, choose Visual Directory of the File
6092 sub-menu from the Command widget . A file browser is displayed. To cre‐
6093 ate a Visual Image Directory from all the images in the current direc‐
6094 tory, press Directory or press the RETURN key. Alternatively, you can
6095 select a set of image names by using shell globbing characters. For
6096 example, type *.jpg to include only files that end with .jpg. To
6097 descend directories, choose a directory name and press the button twice
6098 quickly. A scrollbar allows a large list of filenames to be moved
6099 through the viewing area if it exceeds the size of the list area.
6100
6101 After you select a set of files, they are turned into thumbnails and
6102 tiled onto a single image. Now move the pointer to a particular thumb‐
6103 nail and press button 3 and drag. Finally, select Open. The image rep‐
6104 resented by the thumbnail is displayed at its full size. Choose Next
6105 from the File sub-menu of the Command widget to return to the Visual
6106 Image Directory.
6107
6109 Note that cut information for image window is not retained for col‐
6110 ormapped X server visuals (e.g. StaticColor, StaticColor, GRAYScale,
6111 PseudoColor). Correct cutting behavior may require a TrueColor or
6112 DirectColor visual or a Standard Colormap.
6113
6114 To begin, press choose Cut of the Edit sub-menu from the Command wid‐
6115 get. Alternatively, press F3 in the image window.
6116
6117 A small window appears showing the location of the cursor in the image
6118 window. You are now in cut mode. In cut mode, the Command widget has
6119 these options:
6120
6121 Help
6122 Dismiss
6123
6124
6125 To define a cut region, press button 1 and drag. The cut region is
6126 defined by a highlighted rectangle that expands or contracts as it fol‐
6127 lows the pointer. Once you are satisfied with the cut region, release
6128 the button. You are now in rectify mode. In rectify mode, the Command
6129 widget has these options:
6130
6131 Cut
6132 Help
6133 Dismiss
6134
6135
6136 You can make adjustments by moving the pointer to one of the cut rec‐
6137 tangle corners, pressing a button, and dragging. Finally, press Cut to
6138 commit your copy region. To exit without cutting the image, press Dis‐
6139 miss.
6140
6142 To begin, press choose Copy of the Edit sub-menu from the Command wid‐
6143 get. Alternatively, press F4 in the image window.
6144
6145 A small window appears showing the location of the cursor in the image
6146 window. You are now in copy mode. In copy mode, the Command widget has
6147 these options:
6148
6149 Help
6150 Dismiss
6151
6152
6153 To define a copy region, press button 1 and drag. The copy region is
6154 defined by a highlighted rectangle that expands or contracts as it fol‐
6155 lows the pointer. Once you are satisfied with the copy region, release
6156 the button. You are now in rectify mode. In rectify mode, the Command
6157 widget has these options:
6158
6159 Copy
6160 Help
6161 Dismiss
6162
6163
6164 You can make adjustments by moving the pointer to one of the copy rec‐
6165 tangle corners, pressing a button, and dragging. Finally, press Copy to
6166 commit your copy region. To exit without copying the image, press Dis‐
6167 miss.
6168
6170 To begin, press choose Paste of the Edit sub-menu from the Command wid‐
6171 get. Alternatively, press F5 in the image window.
6172
6173 A small window appears showing the location of the cursor in the image
6174 window. You are now in Paste mode. To exit immediately, press Dismiss.
6175 In Paste mode, the Command widget has these options:
6176
6177 Operators
6178
6179 over
6180 in
6181 out
6182 atop
6183 xor
6184 plus
6185 minus
6186 add
6187 subtract
6188 difference
6189 multiply
6190 bumpmap
6191 replace
6192
6193 Help
6194 Dismiss
6195
6196
6197 Choose a composite operation from the Operators sub-menu of the Command
6198 widget. How each operator behaves is described below. image window is
6199 the image currently displayed on your X server and image is the image
6200 obtained with the File Browser widget.
6201
6202 over The result is the union of the two image shapes, with image
6203 obscuring image window in the region of overlap.
6204
6205 in The result is simply image cut by the shape of image window.
6206 None of the image data of image window is in the result.
6207
6208 out The resulting image is image with the shape of image window cut
6209 out.
6210
6211 atop The result is the same shape as image window, with image
6212 obscuring image window where the image shapes overlap. Note this
6213 differs from over because the portion of image outside image
6214 window's shape does not appear in the result.
6215
6216 xor The result is the image data from both image and image window
6217 that is outside the overlap region. The overlap region is blank.
6218
6219 plus The result is just the sum of the image data. Output values are
6220 cropped to the maximum value (no overflow). This operation is
6221 independent of the matte channels.
6222
6223 minus The result of image - image window, with underflow cropped to
6224 zero. The matte channel is ignored (set to opaque, full cover‐
6225 age).
6226
6227 add The result of image + image window, with overflow wrapping
6228 around (mod MaxRGB+1).
6229
6230 subtract
6231 The result of image - image window, with underflow wrapping
6232 around (mod MaxRGB+1). The add and subtract operators can be
6233 used to perform reversible transformations.
6234
6235 difference
6236 The result of abs(image - image window). This is useful for
6237 comparing two very similar images.
6238
6239 multiply
6240 The result of image * image window. This is useful for the cre‐
6241 ation of drop-shadows.
6242
6243 bumpmap
6244 The result of image window shaded by window.
6245
6246 replace
6247 The resulting image is image window replaced with image. Here
6248 the matte information is ignored.
6249
6250 The image compositor requires a matte, or alpha channel in the
6251 image for some operations. This extra channel usually defines a
6252 mask which represents a sort of a cookie-cutter for the image.
6253 This is the case when matte is 255 (full coverage) for pixels
6254 inside the shape, zero outside, and between zero and 255 on the
6255 boundary. If image does not have a matte channel, it is initial‐
6256 ized with 0 for any pixel matching in color to pixel location
6257 (0,0), otherwise 255. See Matte Editing for a method of defining
6258 a matte channel.
6259
6260 Note that matte information for image window is not retained for
6261 colormapped X server visuals (e.g. StaticColor, StaticColor,
6262 GrayScale, PseudoColor). Correct compositing behavior may
6263 require a TrueColor or DirectColor visual or a Standard Col‐
6264 ormap.
6265
6266 Choosing a composite operator is optional. The default operator
6267 is replace. However, you must choose a location to composite
6268 your image and press button 1. Press and hold the button before
6269 releasing and an outline of the image will appear to help you
6270 identify your location.
6271
6272 The actual colors of the pasted image is saved. However, the
6273 color that appears in image window may be different. For exam‐
6274 ple, on a monochrome screen image window will appear black or
6275 white even though your pasted image may have many colors. If the
6276 image is saved to a file it is written with the correct colors.
6277 To assure the correct colors are saved in the final image, any
6278 PseudoClass image is promoted to DirectClass. To force a Pseu‐
6279 doClass image to remain PseudoClass, use -colors.
6280
6282 To begin, press choose Crop of the Transform submenu from the Command
6283 widget. Alternatively, press C in the image window.
6284
6285 A small window appears showing the location of the cursor in the image
6286 window. You are now in crop mode. In crop mode, the Command widget has
6287 these options:
6288
6289 Help
6290 Dismiss
6291
6292
6293 To define a cropping region, press button 1 and drag. The cropping
6294 region is defined by a highlighted rectangle that expands or contracts
6295 as it follows the pointer. Once you are satisfied with the cropping
6296 region, release the button. You are now in rectify mode. In rectify
6297 mode, the Command widget has these options:
6298
6299 Crop
6300 Help
6301 Dismiss
6302
6303
6304 You can make adjustments by moving the pointer to one of the cropping
6305 rectangle corners, pressing a button, and dragging. Finally, press Crop
6306 to commit your cropping region. To exit without cropping the image,
6307 press Dismiss.
6308
6310 An image is chopped interactively. There is no command line argument to
6311 chop an image. To begin, choose Chop of the Transform sub-menu from the
6312 Command widget. Alternatively, press [ in the Image window.
6313
6314 You are now in Chop mode. To exit immediately, press Dismiss. In Chop
6315 mode, the Command widget has these options:
6316
6317 Direction
6318
6319 horizontal
6320 vertical
6321
6322 Help
6323 Dismiss
6324
6325
6326 If the you choose the horizontal direction (this is the default), the
6327 area of the image between the two horizontal endpoints of the chop line
6328 is removed. Otherwise, the area of the image between the two vertical
6329 endpoints of the chop line is removed.
6330
6331 Select a location within the image window to begin your chop, press and
6332 hold any button. Next, move the pointer to another location in the
6333 image. As you move a line will connect the initial location and the
6334 pointer. When you release the button, the area within the image to chop
6335 is determined by which direction you choose from the Command widget.
6336
6337 To cancel the image chopping, move the pointer back to the starting
6338 point of the line and release the button.
6339
6341 Press the / key to rotate the image 90 degrees or \ to rotate -90
6342 degrees. To interactively choose the degree of rotation, choose
6343 Rotate... of the Transform submenu from the Command Widget. Alterna‐
6344 tively, press * in the image window.
6345
6346 A small horizontal line is drawn next to the pointer. You are now in
6347 rotate mode. To exit immediately, press Dismiss. In rotate mode, the
6348 Command widget has these options:
6349
6350 Pixel Color
6351
6352 black
6353 blue
6354 cyan
6355 green
6356 gray
6357 red
6358 magenta
6359 yellow
6360 white
6361 Browser...
6362
6363 Direction
6364
6365 horizontal
6366 vertical
6367
6368 Help
6369 Dismiss
6370
6371
6372 Choose a background color from the Pixel Color sub-menu. Additional
6373 background colors can be specified with the color browser. You can
6374 change the menu colors by setting the X resources pen1 through pen9.
6375
6376 If you choose the color browser and press Grab, you can select the
6377 background color by moving the pointer to the desired color on the
6378 screen and press any button.
6379
6380 Choose a point in the image window and press this button and hold.
6381 Next, move the pointer to another location in the image. As you move a
6382 line connects the initial location and the pointer. When you release
6383 the button, the degree of image rotation is determined by the slope of
6384 the line you just drew. The slope is relative to the direction you
6385 choose from the Direction sub-menu of the Command widget.
6386
6387 To cancel the image rotation, move the pointer back to the starting
6388 point of the line and release the button.
6389
6391 An image is annotated interactively. There is no command line argument
6392 to annotate an image. To begin, choose Annotate of the Image Edit sub-
6393 menu from the Command widget. Alternatively, press a in the image win‐
6394 dow.
6395
6396 A small window appears showing the location of the cursor in the image
6397 window. You are now in annotate mode. To exit immediately, press Dis‐
6398 miss. In annotate mode, the Command widget has these options:
6399
6400
6401 Font Name
6402
6403
6404 fixed
6405
6406 variable
6407
6408 5x8
6409
6410 6x10
6411
6412 7x13bold
6413
6414 8x13bold
6415
6416 9x15bold
6417
6418 10x20
6419
6420 12x24
6421
6422 Browser...
6423
6424
6425 Font Color
6426
6427
6428 black
6429
6430 blue
6431
6432 cyan
6433
6434 green
6435
6436 gray
6437
6438 red
6439
6440 magenta
6441
6442 yellow
6443
6444 white
6445
6446 transparent
6447
6448 Browser...
6449
6450
6451 Box Color
6452
6453
6454 black
6455
6456 blue
6457
6458 cyan
6459
6460 green
6461
6462 gray
6463
6464 red
6465
6466 magenta
6467
6468 yellow
6469
6470 white
6471
6472 transparent
6473
6474 Browser...
6475
6476
6477 Rotate Text
6478
6479
6480 -90
6481
6482 -45
6483
6484 -30
6485
6486 0
6487
6488 30
6489
6490 45
6491
6492 90
6493
6494 180
6495
6496 Dialog...
6497
6498
6499 Help
6500
6501 Dismiss
6502
6503
6504 Choose a font name from the Font Name sub-menu. Additional font names
6505 can be specified with the font browser. You can change the menu names
6506 by setting the X resources font1 through font9.
6507
6508 Choose a font color from the Font Color sub-menu. Additional font col‐
6509 ors can be specified with the color browser. You can change the menu
6510 colors by setting the X resources pen1 through pen9.
6511
6512 If you select the color browser and press Grab, you can choose the font
6513 color by moving the pointer to the desired color on the screen and
6514 press any button.
6515
6516 If you choose to rotate the text, choose Rotate Text from the menu and
6517 select an angle. Typically you will only want to rotate one line of
6518 text at a time. Depending on the angle you choose, subsequent lines may
6519 end up overwriting each other.
6520
6521 Choosing a font and its color is optional. The default font is fixed
6522 and the default color is black. However, you must choose a location to
6523 begin entering text and press a button. An underscore character will
6524 appear at the location of the pointer. The cursor changes to a pencil
6525 to indicate you are in text mode. To exit immediately, press Dismiss.
6526
6527 In text mode, any key presses will display the character at the loca‐
6528 tion of the underscore and advance the underscore cursor. Enter your
6529 text and once completed press Apply to finish your image annotation. To
6530 correct errors press BACK SPACE. To delete an entire line of text,
6531 press DELETE. Any text that exceeds the boundaries of the image window
6532 is automatically continued onto the next line.
6533
6534 The actual color you request for the font is saved in the image. How‐
6535 ever, the color that appears in your Image window may be different. For
6536 example, on a monochrome screen the text will appear black or white
6537 even if you choose the color red as the font color. However, the image
6538 saved to a file with -write is written with red lettering. To assure
6539 the correct color text in the final image, any PseudoClass image is
6540 promoted to DirectClass (see miff(5)). To force a PseudoClass image to
6541 remain PseudoClass, use -colors.
6542
6544 An image composite is created interactively. There is no command line
6545 argument to composite an image. To begin, choose Composite of the Image
6546 Edit from the Command widget. Alternatively, press x in the Image win‐
6547 dow.
6548
6549 First a popup window is displayed requesting you to enter an image
6550 name. Press Composite, Grab or type a file name. Press Cancel if you
6551 choose not to create a composite image. When you choose Grab, move the
6552 pointer to the desired window and press any button.
6553
6554 If the Composite image does not have any matte information, you are
6555 informed and the file browser is displayed again. Enter the name of a
6556 mask image. The image is typically grayscale and the same size as the
6557 composite image. If the image is not grayscale, it is converted to
6558 grayscale and the resulting intensities are used as matte information.
6559
6560 A small window appears showing the location of the cursor in the image
6561 window. You are now in composite mode. To exit immediately, press Dis‐
6562 miss. In composite mode, the Command widget has these options:
6563
6564
6565 Operators
6566
6567
6568 over
6569
6570 in
6571
6572 out
6573
6574 atop
6575
6576 xor
6577
6578 plus
6579
6580 minus
6581
6582 add
6583
6584 subtract
6585
6586 difference
6587
6588 bumpmap
6589
6590 replace
6591
6592
6593 Blend
6594
6595 Displace
6596
6597 Help
6598
6599 Dismiss
6600
6601
6602 Choose a composite operation from the Operators sub-menu of the Command
6603 widget. How each operator behaves is described below. image window is
6604 the image currently displayed on your X server and image is the image
6605 obtained
6606
6607 over The result is the union of the two image shapes, with image
6608 obscuring image window in the region of overlap.
6609
6610 in The result is simply image cut by the shape of image window.
6611 None of the image data of image window is in the result.
6612
6613 out The resulting image is image with the shape of image window cut
6614 out.
6615
6616 atop The result is the same shape as image window, with image
6617 obscuring image window where the image shapes overlap. Note this
6618 differs from over because the portion of image outside image
6619 window's shape does not appear in the result.
6620
6621 xor The result is the image data from both image and image window
6622 that is outside the overlap region. The overlap region is blank.
6623
6624 plus The result is just the sum of the image data. Output values are
6625 cropped to 255 (no overflow). This operation is independent of
6626 the matte channels.
6627
6628 minus The result of image - image window, with underflow cropped to
6629 zero. The matte channel is ignored (set to 255, full coverage).
6630
6631 add The result of image + image window, with overflow wrapping
6632 around (mod 256).
6633
6634 subtract
6635 The result of image - image window, with underflow wrapping
6636 around (mod 256). The add and subtract operators can be used to
6637 perform reversible transformations.
6638
6639 difference
6640 The result of abs(image - image window). This is useful for
6641 comparing two very similar images.
6642
6643 bumpmap
6644 The result of image window shaded by window.
6645
6646 replace
6647 The resulting image is image window replaced with image. Here
6648 the matte information is ignored.
6649
6650 The image compositor requires a matte, or alpha channel in the
6651 image for some operations. This extra channel usually defines a
6652 mask which represents a sort of a cookie-cutter for the image.
6653 This is the case when matte is 255 (full coverage) for pixels
6654 inside the shape, zero outside, and between zero and 255 on the
6655 boundary. If image does not have a matte channel, it is initial‐
6656 ized with 0 for any pixel matching in color to pixel location
6657 (0,0), otherwise 255. See Matte Editing for a method of defining
6658 a matte channel.
6659
6660 If you choose blend, the composite operator becomes over. The
6661 image matte channel percent transparency is initialized to fac‐
6662 tor. The image window is initialized to (100-factor). Where
6663 factor is the value you specify in the Dialog widget.
6664
6665 Displace shifts the image pixels as defined by a displacement
6666 map. With this option, image is used as a displacement map.
6667 Black, within the displacement map, is a maximum positive dis‐
6668 placement. White is a maximum negative displacement and middle
6669 gray is neutral. The displacement is scaled to determine the
6670 pixel shift. By default, the displacement applies in both the
6671 horizontal and vertical directions. However, if you specify
6672 mask, image is the horizontal X displacement and mask the verti‐
6673 cal Y displacement.
6674
6675 Note that matte information for image window is not retained for
6676 colormapped X server visuals (e.g. StaticColor, StaticColor,
6677 GrayScale, PseudoColor). Correct compositing behavior may
6678 require a TrueColor or DirectColor visual or a Standard Col‐
6679 ormap.
6680
6681 Choosing a composite operator is optional. The default operator
6682 is replace. However, you must choose a location to composite
6683 your image and press button 1. Press and hold the button before
6684 releasing and an outline of the image will appear to help you
6685 identify your location.
6686
6687 The actual colors of the composite image is saved. However, the
6688 color that appears in image window may be different. For exam‐
6689 ple, on a monochrome screen Image window will appear black or
6690 white even though your composited image may have many colors. If
6691 the image is saved to a file it is written with the correct col‐
6692 ors. To assure the correct colors are saved in the final image,
6693 any PseudoClass image is promoted to DirectClass (see miff). To
6694 force a PseudoClass image to remain PseudoClass, use -colors.
6695
6697 Changing the the color of a set of pixels is performed interactively.
6698 There is no command line argument to edit a pixel. To begin, choose
6699 Color from the Image Edit submenu of the Command widget. Alterna‐
6700 tively, press c in the image window.
6701
6702 A small window appears showing the location of the cursor in the image
6703 window. You are now in color edit mode. To exit immediately, press Dis‐
6704 miss. In color edit mode, the Command widget has these options:
6705
6706
6707 Method
6708
6709
6710 point
6711
6712 replace
6713
6714 floodfill
6715
6716 reset
6717
6718
6719 Pixel Color
6720
6721
6722 black
6723
6724 blue
6725
6726 cyan
6727
6728 green
6729
6730 gray
6731
6732 red
6733
6734 magenta
6735
6736 yellow
6737
6738 white
6739
6740 Browser...
6741
6742
6743 Border Color
6744
6745
6746 black
6747
6748 blue
6749
6750 cyan
6751
6752 green
6753
6754 gray
6755
6756 red
6757
6758 magenta
6759
6760 yellow
6761
6762 white
6763
6764 Browser...
6765
6766
6767 Fuzz
6768
6769
6770 0
6771
6772 2
6773
6774 4
6775
6776 8
6777
6778 16
6779 Dialog...
6780
6781
6782 Undo
6783
6784 Help
6785
6786 Dismiss
6787
6788
6789 Choose a color editing method from the Method sub-menu of the Command
6790 widget. The point method recolors any pixel selected with the pointer
6791 unless the button is released. The replace method recolors any pixel
6792 that matches the color of the pixel you select with a button press.
6793 Floodfill recolors any pixel that matches the color of the pixel you
6794 select with a button press and is a neighbor. Whereas filltoborder
6795 changes the matte value of any neighbor pixel that is not the border
6796 color. Finally reset changes the entire image to the designated color.
6797
6798 Next, choose a pixel color from the Pixel Color sub-menu. Additional
6799 pixel colors can be specified with the color browser. You can change
6800 the menu colors by setting the X resources pen1 through pen9.
6801
6802 Now press button 1 to select a pixel within the Image window to change
6803 its color. Additional pixels may be recolored as prescribed by the
6804 method you choose. additional pixels by increasing the Delta value.
6805
6806 If the Magnify widget is mapped, it can be helpful in positioning your
6807 pointer within the image (refer to button 2). Alternatively you can
6808 select a pixel to recolor from within the Magnify widget. Move the
6809 pointer to the Magnify widget and position the pixel with the cursor
6810 control keys. Finally, press a button to recolor the selected pixel (or
6811 pixels).
6812
6813 The actual color you request for the pixels is saved in the image. How‐
6814 ever, the color that appears in your Image window may be different. For
6815 example, on a monochrome screen the pixel will appear black or white
6816 even if you choose the color red as the pixel color. However, the image
6817 saved to a file with -write is written with red pixels. To assure the
6818 correct color text in the final image, any PseudoClass image is pro‐
6819 moted to DirectClass To force a PseudoClass image to remain Pseudo‐
6820 Class, use -colors.
6821
6823 Matte information within an image is useful for some operations such as
6824 image compositing. This extra channel usually defines a mask which rep‐
6825 resents a sort of a cookie-cutter for the image. This is the case when
6826 matte is 255 (full coverage) for pixels inside the shape, zero outside,
6827 and between zero and 255 on the boundary.
6828
6829 Setting the matte information in an image is done interactively. There
6830 is no command line argument to edit a pixel. To begin, and choose Matte
6831 of the Image Edit sub-menu from the Command widget.
6832
6833 Alternatively, press m in the image window.
6834
6835 A small window appears showing the location of the cursor in the image
6836 window. You are now in matte edit mode. To exit immediately, press Dis‐
6837 miss. In matte edit mode, the Command widget has these options:
6838
6839
6840 Method
6841
6842
6843 point
6844
6845 replace
6846
6847 floodfill
6848
6849 reset
6850
6851
6852 Border Color
6853
6854
6855 black
6856
6857 blue
6858
6859 cyan
6860
6861 green
6862
6863 gray
6864
6865 red
6866
6867 magenta
6868
6869 yellow
6870
6871 white
6872
6873 Browser...
6874
6875
6876 Fuzz
6877
6878
6879 0
6880
6881 2
6882
6883 4
6884
6885 8
6886
6887 16
6888 Dialog...
6889
6890
6891 Matte
6892
6893 Undo
6894
6895 Help
6896
6897 Dismiss
6898
6899 Choose a matte editing method from the Method sub-menu of the Command
6900 widget. The point method changes the matte value of the any pixel
6901 selected with the pointer until the button is released. The replace
6902 method changes the matte value of any pixel that matches the color of
6903 the pixel you select with a button press. Floodfill changes the matte
6904 value of any pixel that matches the color of the pixel you select with
6905 a button press and is a neighbor. Whereas filltoborder recolors any
6906 neighbor pixel that is not the border color. Finally reset changes the
6907 entire image to the designated matte value. Choose Matte Value and a
6908 dialog appears requesting a matte value. Enter a value between 0 and
6909 255. This value is assigned as the matte value of the selected pixel or
6910 pixels. Now, press any button to select a pixel within the Image win‐
6911 dow to change its matte value. You can change the matte value of addi‐
6912 tional pixels by increasing the Delta value. The Delta value is first
6913 added then subtracted from the red, green, and blue of the target
6914 color. Any pixels within the range also have their matte value updated.
6915 If the Magnify widget is mapped, it can be helpful in positioning your
6916 pointer within the image (refer to button 2). Alternatively you can
6917 select a pixel to change the matte value from within the Magnify wid‐
6918 get. Move the pointer to the Magnify widget and position the pixel
6919 with the cursor control keys. Finally, press a button to change the
6920 matte value of the selected pixel (or pixels). Matte information is
6921 only valid in a DirectClass image. Therefore, any PseudoClass image is
6922 promoted to DirectClass. Note that matte information for PseudoClass is
6923 not retained for colormapped X server visuals (e.g. StaticColor, Stat‐
6924 icColor, GrayScale, PseudoColor) unless you immediately save your image
6925 to a file (refer to Write). Correct matte editing behavior may require
6926 a TrueColor or DirectColor visual or a Standard Colormap.
6927
6929 An image is drawn upon interactively. There is no command line argument
6930 to draw on an image. To begin, choose Draw of the Image Edit sub-menu
6931 from the Command widget. Alternatively, press d in the image window.
6932
6933 The cursor changes to a crosshair to indicate you are in draw mode. To
6934 exit immediately, press Dismiss. In draw mode, the Command widget has
6935 these options:
6936
6937
6938 Primitive
6939
6940
6941 point
6942
6943 line
6944
6945 rectangle
6946
6947 fill rectangle
6948
6949 circle
6950
6951 fill circle
6952
6953 ellipse
6954
6955 fill ellipse
6956
6957 polygon
6958
6959 fill polygon
6960
6961
6962 Color
6963
6964
6965 black
6966
6967 blue
6968
6969 cyan
6970
6971 green
6972
6973 gray
6974
6975 red
6976
6977 magenta
6978
6979 yellow
6980
6981 white
6982
6983 transparent
6984
6985 Browser...
6986
6987
6988 Stipple
6989
6990
6991 Brick
6992
6993 Diagonal
6994
6995 Scales
6996
6997 Vertical
6998
6999 Wavy
7000
7001 Translucent
7002
7003 Opaque
7004
7005 Open...
7006
7007
7008 Width
7009
7010
7011 1
7012
7013 2
7014
7015 4
7016
7017 8
7018
7019 16
7020 Dialog...
7021
7022
7023 Undo
7024
7025 Help
7026
7027 Dismiss
7028
7029 Choose a drawing primitive from the Primitive sub-menu.
7030
7031 Next, choose a color from the Color sub-menu. Additional colors can be
7032 specified with the color browser. You can change the menu colors by
7033 setting the X resources pen1 through pen9. The transparent color
7034 updates the image matte channel and is useful for image compositing.
7035
7036 If you choose the color browser and press Grab, you can select the
7037 primitive color by moving the pointer to the desired color on the
7038 screen and press any button. The transparent color updates the image
7039 matte channel and is useful for image compositing.
7040
7041 Choose a stipple, if appropriate, from the Stipple sub-menu. Additional
7042 stipples can be specified with the file browser. Stipples obtained from
7043 the file browser must be on disk in the X11 bitmap format.
7044
7045 Choose a line width, if appropriate, from the Width sub-menu. To choose
7046 a specific width select the Dialog widget.
7047
7048 Choose a point in the image window and press button 1 and hold. Next,
7049 move the pointer to another location in the image. As you move, a line
7050 connects the initial location and the pointer. When you release the
7051 button, the image is updated with the primitive you just drew. For
7052 polygons, the image is updated when you press and release the button
7053 without moving the pointer.
7054
7055 To cancel image drawing, move the pointer back to the starting point of
7056 the line and release the button.
7057
7059 To begin, press choose Region of Interest of the Pixel Transform sub-
7060 menu from the Command widget. Alternatively, press R in the image win‐
7061 dow.
7062
7063 A small window appears showing the location of the cursor in the image
7064 window. You are now in region of interest mode. In region of interest
7065 mode, the Command widget has these options:
7066
7067
7068 Help
7069
7070 Dismiss
7071
7072
7073 To define a region of interest, press button 1 and drag. The region of
7074 interest is defined by a highlighted rectangle that expands or con‐
7075 tracts as it follows the pointer. Once you are satisfied with the
7076 region of interest, release the button. You are now in apply mode. In
7077 apply mode the Command widget has these options:
7078
7079
7080 File
7081
7082
7083 Save...
7084
7085 Print...
7086
7087
7088 Edit
7089
7090
7091 Undo
7092
7093 Redo
7094
7095
7096 Transform
7097
7098
7099 Flip
7100
7101 Flop
7102
7103 Rotate Right
7104
7105 Rotate Left
7106
7107
7108 Enhance
7109
7110
7111 Hue...
7112
7113 Saturation...
7114
7115 Brightness...
7116
7117 Gamma...
7118
7119 Spiff
7120
7121 Dull
7122
7123 Equalize
7124
7125 Normalize
7126
7127 Negate
7128
7129 GRAYscale
7130
7131 Quantize...
7132
7133
7134 Effects
7135
7136
7137 Despeckle
7138
7139 Emboss
7140
7141 Reduce Noise
7142
7143 Add Noise
7144
7145 Sharpen...
7146
7147 Blur...
7148
7149 Threshold...
7150
7151 Edge Detect...
7152
7153 Spread...
7154
7155 Shade...
7156
7157 Raise...
7158
7159 Segment...
7160
7161
7162
7163
7164 F/X
7165
7166
7167 Solarize...
7168
7169 Swirl...
7170
7171 Implode...
7172
7173 Wave...
7174
7175 Oil Paint
7176
7177 Charcoal Draw...
7178
7179
7180
7181
7182 Miscellany
7183
7184
7185 Image Info
7186
7187 Zoom Image
7188
7189 Show Preview...
7190
7191 Show Histogram
7192
7193 Show Matte
7194
7195
7196 Help
7197
7198 Dismiss
7199
7200
7201 You can make adjustments to the region of interest by moving the
7202 pointer to one of the rectangle corners, pressing a button, and drag‐
7203 ging. Finally, choose an image processing technique from the Command
7204 widget. You can choose more than one image processing technique to
7205 apply to an area. Alternatively, you can move the region of interest
7206 before applying another image processing technique. To exit, press Dis‐
7207 miss.
7208
7210 When an image exceeds the width or height of the X server screen, dis‐
7211 play maps a small panning icon. The rectangle within the panning icon
7212 shows the area that is currently displayed in the the image window. To
7213 pan about the image, press any button and drag the pointer within the
7214 panning icon. The pan rectangle moves with the pointer and the image
7215 window is updated to reflect the location of the rectangle within the
7216 panning icon. When you have selected the area of the image you wish to
7217 view, release the button.
7218
7219 Use the arrow keys to pan the image one pixel up, down, left, or right
7220 within the image window.
7221
7222 The panning icon is withdrawn if the image becomes smaller than the
7223 dimensions of the X server screen.
7224
7226 Preferences affect the default behavior of display(1). The preferences
7227 are either true or false and are stored in your home directory as .dis‐
7228 playrc:
7229
7230 display image centered on a backdrop"
7231
7232
7233 This backdrop covers the entire workstation screen and is
7234 useful for hiding other X window activity while viewing
7235 the image. The color of the backdrop is specified as the
7236 background color. Refer to X Resources for details.
7237 confirm on program exit"
7238
7239
7240 Ask for a confirmation before exiting the display(1) pro‐
7241 gram.
7242 correct image for display gamma"
7243
7244
7245 If the image has a known gamma, the gamma is corrected to
7246 match that of the X server (see the X Resource dis‐
7247 playGamma).
7248 display warning messages"
7249
7250
7251 Display any warning messages.
7252 apply Floyd/Steinberg error diffusion to image"
7253
7254
7255 The basic strategy of dithering is to trade intensity res‐
7256 olution for spatial resolution by averaging the intensi‐
7257 ties of several neighboring pixels. Images which suffer
7258 from severe contouring when reducing colors can be
7259 improved with this preference.
7260 use a shared colormap for colormapped X visuals"
7261
7262
7263 This option only applies when the default X server visual
7264 is PseudoColor or GRAYScale. Refer to -visual for more
7265 details. By default, a shared colormap is allocated. The
7266 image shares colors with other X clients. Some image col‐
7267 ors could be approximated, therefore your image may look
7268 very different than intended. Otherwise the image colors
7269 appear exactly as they are defined. However, other clients
7270 may go technicolor when the image colormap is installed.
7271 display images as an X server pixmap"
7272
7273
7274 Images are maintained as a XImage by default. Set this
7275 resource to True to utilize a server Pixmap instead. This
7276 option is useful if your image exceeds the dimensions of
7277 your server screen and you intend to pan the image. Pan‐
7278 ning is much faster with Pixmaps than with a XImage.
7279 Pixmaps are considered a precious resource, use them with
7280 discretion.
7281
7282
7284 Identify describes the format and characteristics of one or more image
7285 files. It will also report if an image is incomplete or corrupt. The
7286 information displayed includes the scene number, the file name, the
7287 width and height of the image, whether the image is colormapped or not,
7288 the number of colors in the image, the number of bytes in the image,
7289 the format of the image (JPEG, PNM, etc.), and finally the number of
7290 seconds in both user time and elapsed time it took to read and process
7291 the image. If -verbose or +ping are provided as an option, the pixel
7292 read rate is also displayed. An example line output from identify fol‐
7293 lows:
7294
7295 images/aquarium.miff 640x480 PseudoClass 256c
7296 308135b MIFF 0.000u 0:01
7297
7298 If -verbose is set, expect additional output including any image com‐
7299 ment:
7300
7301
7302 Image: images/aquarium.miff
7303 class: PseudoClass
7304 colors: 256
7305 signature: eb5dca81dd93ae7e6ffae99a527eb5dca8...
7306 matte: False
7307 geometry: 640x480
7308 depth: 8
7309 bytes: 308135
7310 format: MIFF
7311 comments:
7312 Imported from MTV raster image: aquarium.mtv
7313
7314 For some formats, additional format-specific information about the file
7315 will be written if the -debug coder or -debug all option is used.
7316
7318 Options are processed in command line order. Any option you specify on
7319 the command line remains in effect for the set of images immediately
7320 following, until the set is terminated by the appearance of any option
7321 or -noop.
7322
7323 For a more detailed description of each option, see Options, above.
7324
7325
7326 -authenticate <string>
7327 decrypt image with this password
7328
7329 -debug <events>
7330 enable debug printout
7331
7332 -define <key>{=<value>},...
7333 add coder/decoder specific options
7334
7335 -density <width>x<height>
7336 horizontal and vertical resolution in pixels of the image
7337
7338 -depth <value>
7339 depth of the image
7340
7341 -format <string>
7342 output formatted image characteristics
7343
7344 -help print usage instructions
7345
7346 -interlace <type>
7347 the type of interlacing scheme
7348
7349 -limit <type> <value>
7350 Disk, File, Map, Memory, Pixels, or Threads resource limit
7351
7352 -log <string>
7353 Specify format for debug log
7354
7355 -ping efficiently determine image characteristics
7356
7357 -sampling-factor <horizontal_factor>x<vertical_factor>
7358 chroma subsampling factors
7359
7360 -size <width>x<height>{+offset}
7361 width and height of the image
7362
7363 -verbose
7364 print detailed information about the image
7365
7366 -version
7367 print GraphicsMagick version string
7368
7369 For a more detailed description of each option, see Options,
7370 above.
7371
7372
7374 Import reads an image from any visible window on an X server and out‐
7375 puts it as an image file. You can capture a single window, the entire
7376 screen, or any rectangular portion of the screen. Use display for
7377 redisplay, printing, editing, formatting, archiving, image processing,
7378 etc. of the captured image.
7379
7380 The target window can be specified by id, name, or may be selected by
7381 clicking the mouse in the desired window. If you press a button and
7382 then drag, a rectangle will form which expands and contracts as the
7383 mouse moves. To save the portion of the screen defined by the rectan‐
7384 gle, just release the button. The keyboard bell is rung once at the
7385 beginning of the screen capture and twice when it completes.
7386
7388 To select an X window or an area of the screen with the mouse and save
7389 it in the MIFF image format to a file entitled window.miff, use:
7390
7391 gm import window.miff
7392
7393 To select an X window or an area of the screen with the mouse and save
7394 it in the Encapsulated PostScript format to include in another docu‐
7395 ment, use:
7396
7397 gm import figure.eps
7398
7399 To capture the entire X server screen in the JPEG image format in a
7400 file entitled root.jpeg, without using the mouse, use:
7401
7402 gm import -window root root.jpeg
7403
7404 To capture the 512x256 area at the upper right corner of the X server
7405 screen in the PNG image format in a well-compressed file entitled cor‐
7406 ner.png, without using the mouse, use:
7407
7408 gm import -window root -crop 512x256-0+0 -quality 90
7409 corner.png
7410
7412 Options are processed in command line order. Any option you specify on
7413 the command line remains in effect until it is explicitly changed by
7414 specifying the option again with a different effect.
7415
7416 Import options can appear on the command line or in your X resources
7417 file. See X(1). Options on the command line supersede values specified
7418 in your X resources file.
7419
7420 For a more detailed description of each option, see Options, above.
7421
7422
7423 -bordercolor <color>
7424 the border color
7425
7426 -colors <value>
7427 preferred number of colors in the image
7428
7429 -colorspace <value>
7430 the type of colorspace
7431
7432 -comment <string>
7433 annotate an image with a comment
7434
7435 -crop <width>x<height>{+-}<x>{+-}<y>{%}
7436 preferred size and location of the cropped image
7437
7438 -debug <events>
7439 enable debug printout
7440
7441 -define <key>{=<value>},...
7442 add coder/decoder specific options
7443
7444 -delay <1/100ths of a second>
7445 display the next image after pausing
7446
7447 -density <width>x<height>
7448 horizontal and vertical resolution in pixels of the image
7449
7450 -depth <value>
7451 depth of the image
7452
7453 -descend
7454 obtain image by descending window hierarchy
7455
7456 -display <host:display[.screen]>
7457 specifies the X server to contact
7458
7459 -dispose <method>
7460 GIF disposal method
7461
7462 -dither
7463 apply Floyd/Steinberg error diffusion to the image
7464
7465 -encoding <type>
7466 specify the text encoding
7467
7468 -endian <type>
7469 specify endianness (MSB, LSB, or Native) of image
7470
7471 -frame include the X window frame in the imported image
7472
7473 -geometry <width>x<height>{+-}<x>{+-}<y>{%}{@}{!}{^}{<}{>}
7474 preferred size and location of the Image window.
7475
7476 -help print usage instructions
7477
7478 -interlace <type>
7479 the type of interlacing scheme
7480
7481 -label <name>
7482 assign a label to an image
7483
7484 -limit <type> <value>
7485 Disk, File, Map, Memory, Pixels, or Threads resource limit
7486
7487 -log <string>
7488 Specify format for debug log
7489
7490 -monitor
7491 show progress indication
7492
7493 -monochrome
7494 transform the image to black and white
7495
7496 -negate
7497 replace every pixel with its complementary color
7498
7499 -page <width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}
7500 size and location of an image canvas
7501
7502 -pause <seconds>
7503 pause between snapshots [import]
7504
7505 -ping efficiently determine image characteristics
7506
7507 -pointsize <value>
7508 pointsize of the PostScript, X11, or TrueType font
7509
7510 -quality <value>
7511 JPEG/MIFF/PNG/TIFF compression level
7512
7513 -resize <width>x<height>{%}{@}{!}{<}{>}
7514 resize an image
7515
7516 -rotate <degrees>{<}{>}
7517 rotate the image
7518
7519 -sampling-factor <horizontal_factor>x<vertical_factor>
7520 chroma subsampling factors
7521
7522 -scene <value>
7523 set scene number
7524
7525 -screen
7526 specify the screen to capture
7527
7528 -set <attribute> <value>
7529 set an image attribut
7530
7531 -silent
7532 operate silently
7533
7534 -snaps <value>
7535 number of screen snapshots
7536
7537 -thumbnail <width>x<height>{%}{@}{!}{<}{>}
7538 resize an image (quickly)
7539
7540 -transparent <color>
7541 make this color transparent within the image
7542
7543 -trim trim an image
7544
7545 -verbose
7546 print detailed information about the image
7547
7548 -version
7549 print GraphicsMagick version string
7550
7551 For a more detailed description of each option, see Options,
7552 above.
7553
7554
7556 Mogrify transforms an image or a sequence of images. These transforms
7557 include image scaling, image rotation, color reduction, and others.
7558 Each transmogrified image overwrites the corresponding original image,
7559 unless an option such as -format causes the output filename to be dif‐
7560 ferent from the input filename.
7561
7562 The graphics formats supported by mogrify are listed in GraphicsMag‐
7563 ick(1).
7564
7566 To convert all the TIFF files in a particular directory to JPEG, use:
7567
7568 gm mogrify -format jpeg *.tiff
7569
7570 To convert a directory full of JPEG images to thumbnails, use:
7571
7572 gm mogrify -size 120x120 *.jpg -resize 120x120 +profile "*"
7573
7574 In this example, '-size 120x120' gives a hint to the JPEG decoder that
7575 the images are going to be downscaled to 120x120, allowing it to run
7576 faster by avoiding returning full-resolution images to GraphicsMagick
7577 for the subsequent resizing operation. The ´-resize 120x120' specifies
7578 the desired dimensions of the output images. It will be scaled so its
7579 largest dimension is 120 pixels. The ´+profile "*"' removes any ICM,
7580 EXIF, IPTC, or other profiles that might be present in the input and
7581 aren't needed in the thumbnails.
7582
7583 To scale an image of a cockatoo to exactly 640 pixels in width and 480
7584 pixels in height, use:
7585
7586 gm mogrify -resize 640x480! cockatoo.miff
7587
7589 Options are processed in command line order. Any option you specify on
7590 the command line remains in effect for the set of images that follows,
7591 until the set is terminated by the appearance of any option or -noop.
7592
7593 For a more detailed description of each option, see Options, above.
7594
7595
7596 -affine <matrix>
7597 drawing transform matrix
7598
7599 -antialias
7600 remove pixel aliasing
7601
7602 -asc-cdl <spec>
7603 apply ASC CDL color transform
7604
7605 -authenticate <string>
7606 decrypt image with this password
7607
7608 -background <color>
7609 the background color
7610
7611 -black-threshold red[,green][,blue][,opacity]
7612 pixels below the threshold become black
7613
7614 -blue-primary <x>,<y>
7615 blue chromaticity primary point
7616
7617 -blur <radius>{x<sigma>}
7618 blur the image with a Gaussian operator
7619
7620 -border <width>x<height>
7621 surround the image with a border of color
7622
7623 -bordercolor <color>
7624 the border color
7625
7626 -channel <type>
7627 the type of channel
7628
7629 -charcoal <factor>
7630 simulate a charcoal drawing
7631
7632 -colorize <value>
7633 colorize the image with the pen color
7634
7635 -colors <value>
7636 preferred number of colors in the image
7637
7638 -colorspace <value>
7639 the type of colorspace
7640
7641 -comment <string>
7642 annotate an image with a comment
7643
7644 -compose <operator>
7645 the type of image composition
7646
7647 -compress <type>
7648 the type of image compression
7649
7650 -contrast
7651 enhance or reduce the image contrast
7652
7653 -convolve <kernel>
7654 convolve image with the specified convolution kernel
7655
7656 -create-directories
7657 create output directory if required
7658
7659 -crop <width>x<height>{+-}<x>{+-}<y>{%}
7660 preferred size and location of the cropped image
7661
7662 -cycle <amount>
7663 displace image colormap by amount
7664
7665 -debug <events>
7666 enable debug printout
7667
7668 -define <key>{=<value>},...
7669 add coder/decoder specific options
7670
7671 -delay <1/100ths of a second>
7672 display the next image after pausing
7673
7674 -density <width>x<height>
7675 horizontal and vertical resolution in pixels of the image
7676
7677 -depth <value>
7678 depth of the image
7679
7680 -despeckle
7681 reduce the speckles within an image
7682
7683 -display <host:display[.screen]>
7684 specifies the X server to contact
7685
7686 -dispose <method>
7687 GIF disposal method
7688
7689 -dither
7690 apply Floyd/Steinberg error diffusion to the image
7691
7692 -draw <string>
7693 annotate an image with one or more graphic primitives
7694
7695 -edge <radius>
7696 detect edges within an image
7697
7698 -emboss <radius>
7699 emboss an image
7700
7701 -encoding <type>
7702 specify the text encoding
7703
7704 -endian <type>
7705 specify endianness (MSB, LSB, or Native) of image
7706
7707 -enhance
7708 apply a digital filter to enhance a noisy image
7709
7710 -equalize
7711 perform histogram equalization to the image
7712
7713 -extent <width>x<height>{+-}<x>{+-}<y>
7714 composite image on background color canvas image
7715
7716 -fill <color>
7717 color to use when filling a graphic primitive
7718
7719 -filter <type>
7720 use this type of filter when resizing an image
7721
7722 -flip create a "mirror image"
7723
7724 -flop create a "mirror image"
7725
7726 -font <name>
7727 use this font when annotating the image with text
7728
7729 -format <type>
7730 the image format type
7731
7732 -frame <width>x<height>+<outer bevel width>+<inner bevel width>
7733 surround the image with an ornamental border
7734
7735 -fuzz <distance>{%}
7736 colors within this Euclidean distance are considered equal
7737
7738 -gamma <value>
7739 level of gamma correction
7740
7741 -gaussian <radius>{x<sigma>}
7742 blur the image with a Gaussian operator
7743
7744 -geometry <width>x<height>{+-}<x>{+-}<y>{%}{@}{!}{^}{<}{>}
7745 preferred size and location of the Image window.
7746
7747 -gravity <type>
7748 direction primitive gravitates to when annotating the image.
7749
7750 -green-primary <x>,<y>
7751 green chromaticity primary point
7752
7753 -hald-clut <clut>
7754 apply a Hald CLUT to the image
7755
7756 -help print usage instructions
7757
7758 -implode <factor>
7759 implode image pixels about the center
7760
7761 -interlace <type>
7762 the type of interlacing scheme
7763
7764 -label <name>
7765 assign a label to an image
7766
7767 -lat <width>x<height>{+-}<offset>{%}
7768 perform local adaptive thresholding
7769
7770 -level <black_point>{,<gamma>}{,<white_point>}{%}
7771 adjust the level of image contrast
7772
7773 -limit <type> <value>
7774 Disk, File, Map, Memory, Pixels, or Threads resource limit
7775
7776 -linewidth
7777 the line width for subsequent draw operations
7778
7779 -list <type>
7780 the type of list
7781
7782 -log <string>
7783 Specify format for debug log
7784
7785 -loop <iterations>
7786 add Netscape loop extension to your GIF animation
7787
7788 -magnify
7789 magnify the image
7790
7791 -map <filename>
7792 choose a particular set of colors from this image
7793
7794 -mask <filename>
7795 Specify a clipping mask
7796
7797 -matte store matte channel if the image has one
7798
7799 -mattecolor <color>
7800 specify the color to be used with the -frame option
7801
7802 -median <radius>
7803 apply a median filter to the image
7804
7805 -minify <factor>
7806 minify the image
7807
7808 -modulate brightness[,saturation[,hue]]
7809 vary the brightness, saturation, and hue of an image
7810
7811 -monitor
7812 show progress indication
7813
7814 -monochrome
7815 transform the image to black and white
7816
7817 -motion-blur <radius>{x<sigma>}{+angle}
7818 Simulate motion blur
7819
7820 -negate
7821 replace every pixel with its complementary color
7822
7823 -noise <radius|type>
7824 add or reduce noise in an image
7825
7826 -noop NOOP (no option)
7827
7828 -normalize
7829 transform image to span the full range of color values
7830
7831 -opaque <color>
7832 change this color to the pen color within the image
7833
7834 -operator channel operator rvalue[%]
7835 apply a mathematical, bitwise, or value operator to an image
7836 channel
7837
7838 -ordered-dither <channeltype> <NxN>
7839 ordered dither the image
7840
7841 -output-directory <directory>
7842 output files to directory
7843
7844 -page <width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}
7845 size and location of an image canvas
7846
7847 -paint <radius>
7848 simulate an oil painting
7849
7850 -pen <color>
7851 (This option has been replaced by the -fill option)
7852
7853 -pointsize <value>
7854 pointsize of the PostScript, X11, or TrueType font
7855
7856 -profile <filename>
7857 add ICM, IPTC, or generic profile to image
7858
7859 -quality <value>
7860 JPEG/MIFF/PNG/TIFF compression level
7861
7862 -raise <width>x<height>
7863 lighten or darken image edges
7864
7865 -random-threshold <channeltype> <LOWxHIGH>
7866 random threshold the image
7867
7868 -recolor <matrix>
7869 apply a color translation matrix to image channels
7870
7871 -red-primary <x>,<y>
7872 red chromaticity primary point
7873
7874 -region <width>x<height>{+-}<x>{+-}<y>
7875 apply options to a portion of the image
7876
7877 -render
7878 render vector operations
7879
7880 -resample <horizontal>x<vertical>
7881 Resample image to specified horizontal and vertical resolution
7882
7883 -resize <width>x<height>{%}{@}{!}{<}{>}
7884 resize an image
7885
7886 -roll {+-}<x>{+-}<y>
7887 roll an image vertically or horizontally
7888
7889 -rotate <degrees>{<}{>}
7890 rotate the image
7891
7892 -sample <geometry>
7893 scale image using pixel sampling
7894
7895 -sampling-factor <horizontal_factor>x<vertical_factor>
7896 chroma subsampling factors
7897
7898 -scale <geometry>
7899 scale the image.
7900
7901 -scene <value>
7902 set scene number
7903
7904 -set <attribute> <value>
7905 set an image attribut
7906
7907 -segment <cluster threshold>x<smoothing threshold>
7908 segment an image
7909
7910 -shade <azimuth>x<elevation>
7911 shade the image using a distant light source
7912
7913 -sharpen <radius>{x<sigma>}
7914 sharpen the image
7915
7916 -shave <width>x<height>{%}
7917 shave pixels from the image edges
7918
7919 -shear <x degrees>x<y degrees>
7920 shear the image along the X or Y axis
7921
7922 -size <width>x<height>{+offset}
7923 width and height of the image
7924
7925 -solarize <factor>
7926 negate all pixels above the threshold level
7927
7928 -spread <amount>
7929 displace image pixels by a random amount
7930
7931 -stroke <color>
7932 color to use when stroking a graphic primitive
7933
7934 -strokewidth <value>
7935 set the stroke width
7936
7937 -swirl <degrees>
7938 swirl image pixels about the center
7939
7940 -texture <filename>
7941 name of texture to tile onto the image background
7942
7943 -threshold <value>{%}
7944 threshold the image
7945
7946 -thumbnail <width>x<height>{%}{@}{!}{<}{>}
7947 resize an image (quickly)
7948
7949 -tile <filename>
7950 tile image when filling a graphic primitive
7951
7952 -transform
7953 transform the image
7954
7955 -transparent <color>
7956 make this color transparent within the image
7957
7958 -treedepth <value>
7959 tree depth for the color reduction algorithm
7960
7961 -trim trim an image
7962
7963 -type <type>
7964 the image type
7965
7966 -units <type>
7967 the units of image resolution
7968
7969 -unsharp <radius>{x<sigma>}{+<amount>}{+<threshold>}
7970 sharpen the image with an unsharp mask operator
7971
7972 -verbose
7973 print detailed information about the image
7974
7975 -version
7976 print GraphicsMagick version string
7977
7978 -view <string>
7979 FlashPix viewing parameters
7980
7981 -virtual-pixel <method>
7982 specify contents of "virtual pixels"
7983
7984 -wave <amplitude>x<wavelength>
7985 alter an image along a sine wave
7986
7987 -white-point <x>,<y>
7988 chromaticity white point
7989
7990 -white-threshold red[,green][,blue][,opacity]
7991 pixels above the threshold become white
7992
7993 For a more detailed description of each option, see Options,
7994 above.
7995
7996
7998 montage creates a composite image by combining several separate images.
7999 The images are tiled on the composite image with the name of the image
8000 optionally appearing just below the individual tile.
8001
8002 The composite image is constructed in the following manner. First, each
8003 image specified on the command line, except for the last, is scaled to
8004 fit the maximum tile size. The maximum tile size by default is 120x120.
8005 It can be modified with the -geometry command line argument or X
8006 resource. See Options for more information on command line arguments.
8007 See X(1) for more information on X resources. Note that the maximum
8008 tile size need not be a square.
8009
8010 Next the composite image is initialized with the color specified by the
8011 -background command line argument or X resource. The width and height
8012 of the composite image is determined by the title specified, the maxi‐
8013 mum tile size, the number of tiles per row, the tile border width and
8014 height, the image border width, and the label height. The number of
8015 tiles per row specifies how many images are to appear in each row of
8016 the composite image. The default is to have 5 tiles in each row and 4
8017 tiles in each column of the composite. A specific value is specified
8018 with -tile. The tile border width and height, and the image border
8019 width defaults to the value of the X resource -borderwidth. It can be
8020 changed with the -borderwidth or -geometry command line argument or X
8021 resource. The label height is determined by the font you specify with
8022 the -font command line argument or X resource. If you do not specify a
8023 font, a font is chosen that allows the name of the image to fit the
8024 maximum width of a tiled area. The label colors is determined by the
8025 -background and -fill command line argument or X resource. Note, that
8026 if the background and pen colors are the same, labels will not appear.
8027
8028 Initially, the composite image title is placed at the top if one is
8029 specified (refer to -fill). Next, each image is set onto the composite
8030 image, surrounded by its border color, with its name centered just
8031 below it. The individual images are left-justified within the width of
8032 the tiled area. The order of the images is the same as they appear on
8033 the command line unless the images have a scene keyword. If a scene
8034 number is specified in each image, then the images are tiled onto the
8035 composite in the order of their scene number. Finally, the last argu‐
8036 ment on the command line is the name assigned to the composite image.
8037 By default, the image is written in the MIFF format and can be viewed
8038 or printed with display(1).
8039
8040
8041 Note, that if the number of tiles exceeds the default number of 20 (5
8042 per row, 4 per column), more than one composite image is created. To
8043 ensure a single image is produced, use -tile to increase the number of
8044 tiles to meet or exceed the number of input images.
8045
8046 Finally, to create one or more empty spaces in the sequence of tiles,
8047 use the "NULL:" image format.
8048
8049 Note, a composite MIFF image displayed to an X server with display
8050 behaves differently than other images. You can think of the composite
8051 as a visual image directory. Choose a particular tile of the composite
8052 and press a button to display it. See display(1) and miff(5)
8053
8055 To create a montage of a cockatoo, a parrot, and a hummingbird and
8056 write it to a file called birds, use:
8057
8058 gm montage cockatoo.miff parrot.miff hummingbird.miff
8059 birds.miff
8060
8061 To tile several bird images so that they are at most 256 pixels in
8062 width and 192 pixels in height, surrounded by a red border, and sepa‐
8063 rated by 10 pixels of background color, use:
8064
8065 gm montage -geometry 256x192+10+10 -bordercolor red
8066 birds.* montage.miff
8067
8068 To create an unlabeled parrot image, 640 by 480 pixels, and surrounded
8069 by a border of black, use:
8070
8071 gm montage -geometry 640x480 -bordercolor black
8072 -label "" parrot.miff bird.miff
8073
8074 To create an image of an eagle with a textured background, use:
8075
8076 gm montage -texture bumps.jpg eagle.jpg eagle.png
8077
8078 To join several GIF images together without any extraneous graphics
8079 (e.g. no label, no shadowing, no surrounding tile frame), use:
8080
8081 gm montage +frame +shadow +label -tile 5x1
8082 -geometry 50x50+0+0 *.png joined.png
8083
8085 Any option you specify on the command line remains in effect for the
8086 group of images following it, until the group is terminated by the
8087 appearance of any option or -noop. For example, to make a montage of
8088 three images, the first with 32 colors, the second with an unlimited
8089 number of colors, and the third with only 16 colors, use:
8090
8091
8092 gm montage -colors 32 cockatoo.1 -noop cockatoo.2
8093 -colors 16 cockatoo.3 cockatoos.miff
8094
8095 For a more detailed description of each option, see Options, above.
8096
8097
8098 -adjoin
8099 join images into a single multi-image file
8100
8101 -affine <matrix>
8102 drawing transform matrix
8103
8104 -authenticate <string>
8105 decrypt image with this password
8106
8107 -background <color>
8108 the background color
8109
8110 -blue-primary <x>,<y>
8111 blue chromaticity primary point
8112
8113 -blur <radius>{x<sigma>}
8114 blur the image with a Gaussian operator
8115
8116 -bordercolor <color>
8117 the border color
8118
8119 -borderwidth <geometry>
8120 the border width
8121
8122 -chop <width>x<height>{+-}<x>{+-}<y>{%}
8123 remove pixels from the interior of an image
8124
8125 -colors <value>
8126 preferred number of colors in the image
8127
8128 -colorspace <value>
8129 the type of colorspace
8130
8131 -comment <string>
8132 annotate an image with a comment
8133
8134 -compose <operator>
8135 the type of image composition
8136
8137 -compress <type>
8138 the type of image compression
8139
8140 -crop <width>x<height>{+-}<x>{+-}<y>{%}
8141 preferred size and location of the cropped image
8142
8143 -debug <events>
8144 enable debug printout
8145
8146 -define <key>{=<value>},...
8147 add coder/decoder specific options
8148
8149 -density <width>x<height>
8150 horizontal and vertical resolution in pixels of the image
8151
8152 -depth <value>
8153 depth of the image
8154
8155 -display <host:display[.screen]>
8156 specifies the X server to contact
8157
8158 -dispose <method>
8159 GIF disposal method
8160
8161 -dither
8162 apply Floyd/Steinberg error diffusion to the image
8163
8164 -draw <string>
8165 annotate an image with one or more graphic primitives
8166
8167 -encoding <type>
8168 specify the text encoding
8169
8170 -endian <type>
8171 specify endianness (MSB, LSB, or Native) of image
8172
8173 -fill <color>
8174 color to use when filling a graphic primitive
8175
8176 -filter <type>
8177 use this type of filter when resizing an image
8178
8179 -font <name>
8180 use this font when annotating the image with text
8181
8182 -frame <width>x<height>+<outer bevel width>+<inner bevel width>
8183 surround the image with an ornamental border
8184
8185 -gamma <value>
8186 level of gamma correction
8187
8188 -geometry <width>x<height>{+-}<x>{+-}<y>{%}{@}{!}{^}{<}{>}
8189 preferred size and location of the Image window.
8190
8191 -gravity <type>
8192 direction primitive gravitates to when annotating the image.
8193
8194 -green-primary <x>,<y>
8195 green chromaticity primary point
8196
8197 -help print usage instructions
8198
8199 -interlace <type>
8200 the type of interlacing scheme
8201
8202 -label <name>
8203 assign a label to an image
8204
8205 -limit <type> <value>
8206 Disk, File, Map, Memory, Pixels, or Threads resource limit
8207
8208 -log <string>
8209 Specify format for debug log
8210
8211 -matte store matte channel if the image has one
8212
8213 -mattecolor <color>
8214 specify the color to be used with the -frame option
8215
8216 -mode <value>
8217 mode of operation
8218
8219 -monitor
8220 show progress indication
8221
8222 -monochrome
8223 transform the image to black and white
8224
8225 -noop NOOP (no option)
8226
8227 -page <width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}
8228 size and location of an image canvas
8229
8230 -pen <color>
8231 (This option has been replaced by the -fill option)
8232
8233 -pointsize <value>
8234 pointsize of the PostScript, X11, or TrueType font
8235
8236 -quality <value>
8237 JPEG/MIFF/PNG/TIFF compression level
8238
8239 -red-primary <x>,<y>
8240 red chromaticity primary point
8241
8242 -render
8243 render vector operations
8244
8245 -resize <width>x<height>{%}{@}{!}{<}{>}
8246 resize an image
8247
8248 -rotate <degrees>{<}{>}
8249 rotate the image
8250
8251 -sampling-factor <horizontal_factor>x<vertical_factor>
8252 chroma subsampling factors
8253
8254 -scenes <value-value>
8255 range of image scene numbers to read
8256
8257 -shadow <radius>{x<sigma>}
8258 shadow the montage
8259
8260 -sharpen <radius>{x<sigma>}
8261 sharpen the image
8262
8263 -size <width>x<height>{+offset}
8264 width and height of the image
8265
8266 -stroke <color>
8267 color to use when stroking a graphic primitive
8268
8269 -strokewidth <value>
8270 set the stroke width
8271
8272 -texture <filename>
8273 name of texture to tile onto the image background
8274
8275 -thumbnail <width>x<height>{%}{@}{!}{<}{>}
8276 resize an image (quickly)
8277
8278 -tile <geometry>
8279 layout of images [montage]
8280
8281 -title <string>
8282 assign title to displayed image [animate, display, montage]
8283
8284 -transform
8285 transform the image
8286
8287 -transparent <color>
8288 make this color transparent within the image
8289
8290 -treedepth <value>
8291 tree depth for the color reduction algorithm
8292
8293 -trim trim an image
8294
8295 -type <type>
8296 the image type
8297
8298 -verbose
8299 print detailed information about the image
8300
8301 -version
8302 print GraphicsMagick version string
8303
8304 -white-point <x>,<y>
8305 chromaticity white point
8306
8307 For a more detailed description of each option, see Options,
8308 above.
8309
8310
8312 Montage options can appear on the command line or in your X resource
8313 file. Options on the command line supersede values specified in your X
8314 resource file. See X(1) for more information on X resources.
8315
8316 All montage options have a corresponding X resource. In addition, mon‐
8317 tage uses the following X resources:
8318
8319 background (class Background)
8320 background color
8321
8322 Specifies the preferred color to use for the composite image
8323 background. The default is #ccc.
8324
8325 borderColor (class BorderColor)
8326 border color
8327
8328 Specifies the preferred color to use for the composite image
8329 border. The default is #ccc.
8330
8331 borderWidth (class BorderWidth)
8332 border width
8333
8334 Specifies the width in pixels of the composite image border. The
8335 default is 2.
8336
8337 font (class Font)
8338 font to use
8339
8340 Specifies the name of the preferred font to use when displaying
8341 text within the composite image. The default is 9x15, fixed, or
8342 5x8 determined by the composite image size.
8343
8344 matteColor (class MatteColor)
8345 color of the frame
8346
8347 Specify the color of an image frame. A 3D effect is achieved by
8348 using highlight and shadow colors derived from this color. The
8349 default value is #697B8F.
8350
8351 pen (class Pen)
8352 text color
8353
8354 Specifies the preferred color to use for text within the compos‐
8355 ite image. The default is black.
8356
8357 title (class Title)
8358 composite image title
8359
8360 This resource specifies the title to be placed at the top of the
8361 composite image. The default is not to place a title at the top
8362 of the composite image.
8363
8365 COLUMNS
8366 Output screen width. Used when formatting text for the screen.
8367 Many Unix systems keep this shell variable up to date, but it
8368 may need to be explicitly exported in order for GraphicsMagick
8369 to see it.
8370
8371 DISPLAY
8372 X11 display ID (host, display number, and screen in the form
8373 hostname:display.screen).
8374
8375 HOME Location of user's home directory. GraphicsMagick searches for
8376 configuration files in $HOME/.magick if the directory exists.
8377 See MAGICK_CODER_MODULE_PATH, MAGICK_CONFIGURE_PATH, and MAG‐
8378 ICK_FILTER_MODULE_PATH if more flexibility is needed.
8379
8380 MAGICK_CODER_STABILITY
8381 The minimum coder stability level before it will be used. The
8382 available levels are PRIMARY, STABLE, and UNSTABLE. The default
8383 minimum level is UNSTABLE, which means that all available coders
8384 will be used. The purpose of this option is to reduce the secu‐
8385 rity exposure (or apparent complexity) due to the huge number of
8386 formats supported. Coders at the PRIMARY level are commonly used
8387 formats with very well maintained implementations. Coders at the
8388 STABLE level are reasonably well maintained but represent less
8389 used formats. Coders at the UNSTABLE level either have weak
8390 implementations, the file format itself is weak, or the proba‐
8391 bility the coder will be needed is vanishingly small.
8392
8393 MAGICK_CODER_MODULE_PATH
8394 Search path to use when searching for image format coder mod‐
8395 ules. This path allows the user to arbitrarily extend the image
8396 formats supported by GraphicsMagick by adding loadable modules
8397 to an arbitrary location rather than copying them into the
8398 GraphicsMagick installation directory. The formatting of the
8399 search path is similar to operating system search paths (i.e.
8400 colon delimited for Unix, and semi-colon delimited for Microsoft
8401 Windows). This user specified search path is used before trying
8402 the default search path.
8403
8404 MAGICK_CONFIGURE_PATH
8405 Search path to use when searching for configuration (.mgk)
8406 files. The formatting of the search path is similar to operat‐
8407 ing system search paths (i.e. colon delimited for Unix, and
8408 semi-colon delimited for Microsoft Windows). This user specified
8409 search path is used before trying the default search path.
8410
8411 MAGICK_DEBUG
8412 Debug options (see -debug for details)
8413
8414 MAGICK_FILTER_MODULE_PATH
8415 Search path to use when searching for filter process modules
8416 (invoked via -process). This path allows the user to arbitrarily
8417 extend GraphicsMagick's image processing functionality by adding
8418 loadable modules to an arbitrary location rather than copying
8419 them into the GraphicsMagick installation directory. The format‐
8420 ting of the search path is similar to operating system search
8421 paths (i.e. colon delimited for Unix, and semi-colon delimited
8422 for Microsoft Windows). This user specified search path is used
8423 before trying the default search path.
8424
8425 MAGICK_HOME
8426 Path to top of GraphicsMagick installation directory. Only
8427 observed by "uninstalled" builds of GraphicsMagick which do not
8428 have their location hard-coded or set by an installer.
8429
8430 MAGICK_MMAP_READ
8431 If MAGICK_MMAP_READ is set to TRUE, GraphicsMagick will attempt
8432 to memory-map the input file for reading. This usually substan‐
8433 tially improves read performance if the file has recently been
8434 read. However, testing shows that performance may be reduced for
8435 files accessed for the first time via a network since some oper‐
8436 ating systems failed to do read-ahead over network mounts for
8437 memory mapped files.
8438
8439 MAGICK_MMAP_WRITE
8440 If MAGICK_MMAP_WRITE is set to TRUE, GraphicsMagick will attempt
8441 to memory-map the output file for writing. This is an experimen‐
8442 tal feature (which is currently broken). Write performance is
8443 usually somewhat worse when using this approach rather than the
8444 default one.
8445
8446 MAGICK_IO_FSYNC
8447 If MAGICK_IO_FSYNC is set to TRUE, then GraphicsMagick will
8448 request that the output file is fully flushed and synchronized
8449 to disk when it is closed. This incurs a performance penalty,
8450 but has the benefit that if the power fails or the system
8451 crashes, the file should be valid on disk. If image files are
8452 referenced from a database, then this option helps assure that
8453 the files referenced by the database are valid.
8454
8455 MAGICK_IOBUF_SIZE
8456 The amount of I/O buffering (in bytes) to use when reading and
8457 writing encoded files. The default is 16384, which is observed
8458 to work well for many cases. The best value for a local filesys‐
8459 tem is usually the the native filesystem block size (e.g. 4096,
8460 8192, or even 131,072 for ZFS) in order to minimize the number
8461 of physical disk I/O operations. I/O performance to files
8462 accessed over a network may benefit significantly by tuning this
8463 option. Larger values are not necessarily better (they may be
8464 slower!), and there is rarely any benefit from using values
8465 larger than 32768. Use convert's -verbose option in order to
8466 evaluate read and write rates in pixels per second while keeping
8467 in mind that the operating system will try to cache files in
8468 RAM.
8469
8470 MAGICK_LIMIT_DISK
8471 Maximum amount of disk space allowed for use by the pixel cache.
8472
8473 MAGICK_LIMIT_FILES
8474 Maximum number of open files.
8475
8476 MAGICK_LIMIT_MAP
8477 Maximum size of a memory map.
8478
8479 MAGICK_LIMIT_MEMORY
8480 Maximum amount of memory to allocate from the heap.
8481
8482 MAGICK_TMPDIR
8483 Path to directory where GraphicsMagick should write temporary
8484 files. The default is to use the system default, or the location
8485 set by TMPDIR.
8486
8487 TMPDIR For POSIX-compatible systems (Unix-compatible), the path to the
8488 directory where all applications should write temporary files.
8489 Overridden by MAGICK_TMPDIR if it is set.
8490
8491 TMP or TEMP
8492 For Microsoft Windows, the path to the directory where applica‐
8493 tions should write temporary files. Overridden by MAGICK_TMPDIR
8494 if it is set.
8495
8496 OMP_NUM_THREADS
8497 As per the OpenMP standard, this specifies the number of threads
8498 to use in parallel regions. Some compilers default the number of
8499 threads to use to the number of processor cores available while
8500 others default to just one thread. See the OpenMP specification
8501 for other standard adjustments and your compiler's manual for
8502 vendor-specific settings.
8503
8505 GraphicsMagick uses a number of XML format configuration files:
8506
8507 colors.mgk
8508 colors configuration file
8509
8510 <?xml version="1.0"?>
8511 <colormap>
8512 <color name="AliceBlue" red="240" green="248" blue="255"
8513 compliance="SVG, X11, XPM" />
8514 </colormap>
8515
8516 delegates.mgk
8517 delegates configuration file
8518
8519 log.mgk
8520 logging configuration file
8521
8522 <?xml version="1.0"?>
8523 <magicklog>
8524 <log events="None" />
8525 <log output="stdout" />
8526 <log filename="Magick-%d.log" />
8527 <log generations="3" />
8528 <log limit="2000" />
8529 <log format="%t %r %u %p %m/%f/%l/%d:\n %e" />
8530 </magicklog>
8531
8532 modules.mgk
8533 loadable modules configuration file
8534
8535 <?xml version="1.0"?>
8536 <modulemap>
8537 <module magick="8BIM" name="META" />
8538 </modulemap>
8539
8540 type.mgk
8541 master type (fonts) configuration file
8542
8543 <?xml version="1.0"?>
8544 <typemap>
8545 <include file="type-windows.mgk" />
8546 <type
8547 name="AvantGarde-Book"
8548 fullname="AvantGarde Book"
8549 family="AvantGarde"
8550 foundry="URW"
8551 weight="400"
8552 style="normal"
8553 stretch="normal"
8554 format="type1"
8555 metrics="/usr/local/share/ghostscript/fonts/a010013l.afm"
8556 glyphs="/usr/local/share/ghostscript/fonts/a010013l.pfb"
8557 />
8558 </typemap>
8559
8561 The MIT X Consortium for making network transparent graphics a reality.
8562
8563
8564 Michael Halle, Spatial Imaging Group at MIT, for the initial implemen‐
8565 tation of Alan Paeth's image rotation algorithm.
8566
8567
8568 David Pensak, E. I. du Pont de Nemours and Company, for providing a
8569 computing environment that made this program possible.
8570
8571
8572 Peder Langlo, Hewlett Packard, Norway, made hundreds of suggestions and
8573 bug reports. Without Peder, this software would not be nearly as useful
8574 as it is today.
8575
8576 Rod Bogart and John W. Peterson, University of Utah. Image compositing
8577 is loosely based on rlecomp of the Utah Raster Toolkit.
8578
8579 Paul Heckbert, Carnegie Mellon University. Image resizing is based on
8580 his Zoom program.
8581
8582 Paul Raveling, USC Information Sciences Institute. The spatial subdivi‐
8583 sion color reduction algorithm is based on his Img software.
8584
8586 Copyright (C) 2002 - 2010 GraphicsMagick Group, an organization dedi‐
8587 cated to making software imaging solutions freely available.
8588
8589 Permission is hereby granted, free of charge, to any person obtaining a
8590 copy of this software and associated documentation files ("GraphicsMag‐
8591 ick"), to deal in GraphicsMagick without restriction, including without
8592 limitation the rights to use, copy, modify, merge, publish, distribute,
8593 sublicense, and/or sell copies of GraphicsMagick, and to permit persons
8594 to whom GraphicsMagick is furnished to do so, subject to the following
8595 conditions:
8596
8597 The above copyright notice and this permission notice shall be included
8598 in all copies or substantial portions of GraphicsMagick.
8599
8600 The software is provided "as is", without warranty of any kind, express
8601 or implied, including but not limited to the warranties of mer‐
8602 chantability, fitness for a particular purpose and noninfringement. In
8603 no event shall GraphicsMagick Group be liable for any claim, damages or
8604 other liability, whether in an action of contract, tort or otherwise,
8605 arising from, out of or in connection with GraphicsMagick or the use or
8606 other dealings in GraphicsMagick.
8607
8608 Except as contained in this notice, the name of the GraphicsMagick
8609 Group shall not be used in advertising or otherwise to promote the
8610 sale, use or other dealings in GraphicsMagick without prior written
8611 authorization from the GraphicsMagick Group.
8612
8613 Additional copyrights and licenses apply to this software. You should
8614 have received a copy of Copyright.txt with this package, which
8615 describes additional copyrights and licenses which apply to this soft‐
8616 ware; otherwise see http://www.graphicsmagick.org/Copyright.html.
8617
8618
8619
8620GraphicsMagick 2010/03/07 gm(1)