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