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