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