]> granicus.if.org Git - imagemagick/blob - www/command-line-options.html
Revised comments about interpretation of the -quality value in coders/png.c
[imagemagick] / www / command-line-options.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="-//W3C//DTD XHTML 1.1//EN" xml:lang="en" xsi:schemaLocation="http://www.w3.org/1999/xhtml                           http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">
3 <head>
4   <meta http-equiv="content-type" content="text/html; charset=UTF-8"></meta>
5   <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4"></meta>
6   <title>ImageMagick: Command-line Options</title>
7   <meta http-equiv="content-language" content="en-US"></meta>
8   <meta http-equiv="content-type" content="text/html; charset=utf-8"></meta>
9   <meta http-equiv="reply-to" content="magick-users@imagemagick.org"></meta>
10   <meta name="application-name" content="ImageMagick"></meta>
11   <meta name="description" content="Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats.  In addition, resize, rotate, shear, distort or transform images automagically."></meta>
12   <meta name="application-url" content="http://www.imagemagick.org"></meta>
13   <meta name="generator" content="PHP"></meta>
14   <meta name="keywords" content="command-line, options, ImageMagick, PerlMagick, image processing, OpenMP, software development library, image, photo, software, Magick++, MagickWand"></meta>
15   <meta name="rating" content="GENERAL"></meta>
16   <meta name="robots" content="INDEX, FOLLOW"></meta>
17   <meta name="generator" content="ImageMagick Studio LLC"></meta>
18   <meta name="author" content="ImageMagick Studio LLC"></meta>
19   <meta name="revisit-after" content="2 DAYS"></meta>
20   <meta name="resource-type" content="document"></meta>
21   <meta name="copyright" content="Copyright (c) 1999-2012 ImageMagick Studio LLC"></meta>
22   <meta name="distribution" content="Global"></meta>
23   <link rel="icon" href="../images/wand.png"></link>
24   <link rel="shortcut icon" href="../images/wand.ico" type="images/x-icon"></link>
25   <link rel="canonical" href="../index.html"></link>
26   <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"></link>
27
28   <!-- Add jQuery library -->
29   <script type="text/javascript" src="http://localhost/ajax/libs/jquery/1.7/jquery.min.js"></script>
30   
31   <!-- Add mousewheel plugin (this is optional) -->
32   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>
33   
34   <!-- Add fancyBox -->
35   <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/jquery.fancybox.css?v=2.0.6" type="text/css" media="screen"></link>
36   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/jquery.fancybox.pack.js?v=2.0.6"></script>
37   
38   <!-- Optionally add helpers - button, thumbnail and/or media -->
39   <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.2" type="text/css" media="screen"></link>
40   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.2"></script>
41   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.0"></script>
42   
43   <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-thumbs.css?v=2.0.6" type="text/css" media="screen"></link>
44   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-thumbs.js?v=2.0.6"></script>
45   
46   <script type="text/javascript">
47         $(document).ready(function() {
48                 $(".fancybox").fancybox();
49         });
50   </script>
51
52   <!-- ImageMagick style -->
53   <style type="text/css" media="all">
54     @import url("../www/magick.css");
55   </style>
56 </head>
57
58 <body id="www-imagemagick-org">
59
60
61
62 <div class="titlebar">
63 <div style="margin: 17px auto; float: left;">
64   <script type="text/javascript">
65   <!--
66     google_ad_client = "pub-3129977114552745";
67     google_ad_slot = "5439289906";
68     google_ad_width = 728;
69     google_ad_height = 90;
70   //-->
71   </script>
72   
73 </div>
74 <a href="../discourse-server">
75   <img src="../images/logo.jpg" alt="ImageMagick Logo" style="width: 123px; height: 118px; border: 0px; float: right;"></img></a>
76 <a href="../index.html">
77   <img src="../images/sprite.jpg" alt="ImageMagick Sprite" style="width: 114px; height: 118px; border: 0px; float: right;"></img></a>
78 </div>
79
80 <div class="westbar">
81
82 <div class="menu">
83   <a title="About ImageMagick" href="../index.html">About ImageMagick</a>
84 </div>
85 <div class="menu">
86   <a title="Binary Releases" href="binary-releases.html">Binary Releases</a>
87 </div>
88 <div class="sub">
89     <a title="Binary Release: Unix" href="binary-releases.html#unix">Unix</a>
90 </div>
91 <div class="sub">
92     <a title="Binary Release: MacOS X" href="binary-releases.html#macosx">Mac OS X</a>
93 </div>
94 <div class="sub">
95     <a title="Binary Release: iOS" href="binary-releases.html#iOS">iOS</a>
96 </div>
97 <div class="sub">
98     <a title="Binary Release: Windows" href="binary-releases.html#windows">Windows</a>
99 </div>
100 <div class="sep"></div>
101 <div class="menu">
102   <a title="Command-line Tools" href="command-line-tools.html">Command-line Tools</a>
103 </div>
104 <div class="sub">
105     <a title="Command-line Tools: Processing" href="command-line-processing.html">Processing</a>
106 </div>
107 <div class="sub">
108     <a title="Command-line Tools: Options" href="command-line-options.html">Options</a>
109 </div>
110 <div class="sub">
111     <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
112 </div>
113 <div class="menu">
114   <a title="Program Interfaces" href="api.html">Program Interfaces</a>
115 </div>
116 <div class="sub">
117     <a title="Program Interface: MagickWand" href="magick-wand.html">MagickWand</a>
118 </div>
119 <div class="sub">
120     <a title="Program Interface: MagickCore" href="magick-core.html">MagickCore</a>
121 </div>
122 <div class="sub">
123     <a title="Program Interface: PerlMagick" href="perl-magick.html">PerlMagick</a>
124 </div>
125 <div class="sub">
126     <a title="Program Interface: Magick++" href="magick++.html">Magick++</a>
127 </div>
128 <div class="sep"></div>
129 <div class="menu">
130    <a title="Install from Source" href="install-source.html">Install from Source</a>
131 </div>
132 <div class="sub">
133     <a title="Install from Source: Unix" href="install-source.html#unix">Unix</a>
134 </div>
135 <div class="sub">
136     <a title="Install from Source: Windows" href="install-source.html#windows">Windows</a>
137  </div>
138 <div class="menu">
139   <a title="Resources" href="resources.html">Resources</a>
140 </div>
141 <div class="menu">
142   <a title="Architecture" href="architecture.html">Architecture</a>
143 </div>
144 <div class="menu">
145   <a title="Download" href="download.html">Download</a>
146 </div>
147 <div class="sep"></div>
148 <div class="menu">
149   <a title="Search" href="search.html">Search</a>
150 </div>
151 <div class="sep"></div>
152 <div class="menu">
153   <a title="Site Map" href="sitemap.html">Site Map</a>
154 </div>
155 <div class="sub">
156   <a title="Site Map: Links" href="links.html">Links</a>
157 </div>
158 <div class="sep"></div>
159 <div class="menu">
160   <a title="Support ImageMagick Development" href="support.html">Support ImageMagick Development</a>
161 </div>
162 </div>
163
164 <div class="eastbar">
165   
166   <div> <a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="../index.html"></a></div>
167   <noscript>
168     <a href="http://flattr.com/thing/947300/Convert-Edit-And-Compose-Images" target="_blank">
169     <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" width="93" height="20" border="0"></img></a>
170   </noscript>
171     
172     
173 </div>
174
175 <div class="main">
176
177 <h1>Command-line Options</h1>
178 <p class="navigation-index">
179 [ <a href="command-line-options.html#adaptive-blur">‑adaptive‑blur</a> <span class="bull"> • </span> <a href="command-line-options.html#adaptive-resize">‑adaptive‑resize</a> <span class="bull"> • </span> <a href="command-line-options.html#adaptive-sharpen">‑adaptive‑sharpen</a> <span class="bull"> • </span> <a href="command-line-options.html#adjoin">‑adjoin</a> <span class="bull"> • </span> <a href="command-line-options.html#affine">‑affine</a> <span class="bull"> • </span> <a href="command-line-options.html#alpha">‑alpha</a> <span class="bull"> • </span> <a href="command-line-options.html#annotate">‑annotate</a> <span class="bull"> • </span> <a href="command-line-options.html#antialias">‑antialias</a> <span class="bull"> • </span> <a href="command-line-options.html#append">‑append</a> <span class="bull"> • </span> <a href="command-line-options.html#attenuate">‑attenuate</a> <span class="bull"> • </span> <a href="command-line-options.html#authenticate">‑authenticate</a> <span class="bull"> • </span> <a href="command-line-options.html#auto-gamma">‑auto‑gamma</a> <span class="bull"> • </span> <a href="command-line-options.html#auto-level">‑auto‑level</a> <span class="bull"> • </span> <a href="command-line-options.html#auto-orient">‑auto‑orient</a> <span class="bull"> • </span> <a href="command-line-options.html#backdrop">‑backdrop</a> <span class="bull"> • </span> <a href="command-line-options.html#background">‑background</a> <span class="bull"> • </span> <a href="command-line-options.html#bench">‑bench</a> <span class="bull"> • </span> <a href="command-line-options.html#bias">‑bias</a> <span class="bull"> • </span> <a href="command-line-options.html#black-point-compensation">‑black‑point‑compensation</a> <span class="bull"> • </span> <a href="command-line-options.html#black-threshold">‑black‑threshold</a> <span class="bull"> • </span> <a href="command-line-options.html#blend">‑blend</a> <span class="bull"> • </span> <a href="command-line-options.html#blue-primary">‑blue‑primary</a> <span class="bull"> • </span> <a href="command-line-options.html#blue-shift">‑blue‑shift</a> <span class="bull"> • </span> <a href="command-line-options.html#blur">‑blur</a> <span class="bull"> • </span> <a href="command-line-options.html#border">‑border</a> <span class="bull"> • </span> <a href="command-line-options.html#bordercolor">‑bordercolor</a> <span class="bull"> • </span> <a href="command-line-options.html#borderwidth">‑borderwidth</a> <span class="bull"> • </span> <a href="command-line-options.html#brightness-contrast">‑brightness‑contrast</a> <span class="bull"> • </span> <a href="command-line-options.html#cache">‑cache</a> <span class="bull"> • </span> <a href="command-line-options.html#caption">‑caption</a> <span class="bull"> • </span> <a href="command-line-options.html#cdl">‑cdl</a> <span class="bull"> • </span> <a href="command-line-options.html#channel">‑channel</a> <span class="bull"> • </span> <a href="command-line-options.html#charcoal">‑charcoal</a> <span class="bull"> • </span> <a href="command-line-options.html#chop">‑chop</a> <span class="bull"> • </span> <a href="command-line-options.html#clamp">‑clamp</a> <span class="bull"> • </span> <a href="command-line-options.html#clip">‑clip</a> <span class="bull"> • </span> <a href="command-line-options.html#clip-mask">‑clip‑mask</a> <span class="bull"> • </span> <a href="command-line-options.html#clip-path">‑clip‑path</a> <span class="bull"> • </span> <a href="command-line-options.html#clone">‑clone</a> <span class="bull"> • </span> <a href="command-line-options.html#clut">‑clut</a> <span class="bull"> • </span> <a href="command-line-options.html#coalesce">‑coalesce</a> <span class="bull"> • </span> <a href="command-line-options.html#colorize">‑colorize</a> <span class="bull"> • </span> <a href="command-line-options.html#colormap">‑colormap</a> <span class="bull"> • </span> <a href="command-line-options.html#color-matrix">‑color‑matrix</a> <span class="bull"> • </span> <a href="command-line-options.html#colors">‑colors</a> <span class="bull"> • </span> <a href="command-line-options.html#colorspace">‑colorspace</a> <span class="bull"> • </span> <a href="command-line-options.html#combine">‑combine</a> <span class="bull"> • </span> <a href="command-line-options.html#comment">‑comment</a> <span class="bull"> • </span> <a href="command-line-options.html#compose">‑compose</a> <span class="bull"> • </span> <a href="command-line-options.html#composite">‑composite</a> <span class="bull"> • </span> <a href="command-line-options.html#compress">‑compress</a> <span class="bull"> • </span> <a href="command-line-options.html#contrast">‑contrast</a> <span class="bull"> • </span> <a href="command-line-options.html#contrast-stretch">‑contrast‑stretch</a> <span class="bull"> • </span> <a href="command-line-options.html#convolve">‑convolve</a> <span class="bull"> • </span> <a href="command-line-options.html#crop">‑crop</a> <span class="bull"> • </span> <a href="command-line-options.html#cycle">‑cycle</a> <span class="bull"> • </span> <a href="command-line-options.html#debug">‑debug</a> <span class="bull"> • </span> <a href="command-line-options.html#decipher">‑decipher</a> <span class="bull"> • </span> <a href="command-line-options.html#deconstruct">‑deconstruct</a> <span class="bull"> • </span> <a href="command-line-options.html#define">‑define</a> <span class="bull"> • </span> <a href="command-line-options.html#delay">‑delay</a> <span class="bull"> • </span> <a href="command-line-options.html#delete">‑delete</a> <span class="bull"> • </span> <a href="command-line-options.html#density">‑density</a> <span class="bull"> • </span> <a href="command-line-options.html#depth">‑depth</a> <span class="bull"> • </span> <a href="command-line-options.html#descend">‑descend</a> <span class="bull"> • </span> <a href="command-line-options.html#deskew">‑deskew</a> <span class="bull"> • </span> <a href="command-line-options.html#despeckle">‑despeckle</a> <span class="bull"> • </span> <a href="command-line-options.html#direction">‑direction</a> <span class="bull"> • </span> <a href="command-line-options.html#displace">‑displace</a> <span class="bull"> • </span> <a href="command-line-options.html#display">‑display</a> <span class="bull"> • </span> <a href="command-line-options.html#dispose">‑dispose</a> <span class="bull"> • </span> <a href="command-line-options.html#dissimilarity-threshold">‑dissimilarity‑threshold</a> <span class="bull"> • </span> <a href="command-line-options.html#dissolve">‑dissolve</a> <span class="bull"> • </span> <a href="command-line-options.html#distort">‑distort</a> <span class="bull"> • </span> <a href="command-line-options.html#distribute-cache">‑distribute‑cache</a> <span class="bull"> • </span> <a href="command-line-options.html#dither">‑dither</a> <span class="bull"> • </span> <a href="command-line-options.html#draw">‑draw</a> <span class="bull"> • </span> <a href="command-line-options.html#duplicate">‑duplicate</a> <span class="bull"> • </span> <a href="command-line-options.html#edge">‑edge</a> <span class="bull"> • </span> <a href="command-line-options.html#emboss">‑emboss</a> <span class="bull"> • </span> <a href="command-line-options.html#encipher">‑encipher</a> <span class="bull"> • </span> <a href="command-line-options.html#encoding">‑encoding</a> <span class="bull"> • </span> <a href="command-line-options.html#endian">‑endian</a> <span class="bull"> • </span> <a href="command-line-options.html#enhance">‑enhance</a> <span class="bull"> • </span> <a href="command-line-options.html#equalize">‑equalize</a> <span class="bull"> • </span> <a href="command-line-options.html#evaluate">‑evaluate</a> <span class="bull"> • </span> <a href="command-line-options.html#evaluate-sequence">‑evaluate‑sequence</a> <span class="bull"> • </span> <a href="command-line-options.html#extent">‑extent</a> <span class="bull"> • </span> <a href="command-line-options.html#extract">‑extract</a> <span class="bull"> • </span> <a href="command-line-options.html#family">‑family</a> <span class="bull"> • </span> <a href="command-line-options.html#features">‑features</a> <span class="bull"> • </span> <a href="command-line-options.html#fft">‑fft</a> <span class="bull"> • </span> <a href="command-line-options.html#fill">‑fill</a> <span class="bull"> • </span> <a href="command-line-options.html#filter">‑filter</a> <span class="bull"> • </span> <a href="command-line-options.html#flatten">‑flatten</a> <span class="bull"> • </span> <a href="command-line-options.html#flip">‑flip</a> <span class="bull"> • </span> <a href="command-line-options.html#floodfill">‑floodfill</a> <span class="bull"> • </span> <a href="command-line-options.html#flop">‑flop</a> <span class="bull"> • </span> <a href="command-line-options.html#font">‑font</a> <span class="bull"> • </span> <a href="command-line-options.html#foreground">‑foreground</a> <span class="bull"> • </span> <a href="command-line-options.html#format">‑format</a> <span class="bull"> • </span> <a href="command-line-options.html#format_identify_">‑format[identify]</a> <span class="bull"> • </span> <a href="command-line-options.html#frame">‑frame</a> <span class="bull"> • </span> <a href="command-line-options.html#frame_import_">‑frame[import]</a> <span class="bull"> • </span> <a href="command-line-options.html#function">‑function</a> <span class="bull"> • </span> <a href="command-line-options.html#fuzz">‑fuzz</a> <span class="bull"> • </span> <a href="command-line-options.html#fx">‑fx</a> <span class="bull"> • </span> <a href="command-line-options.html#gamma">‑gamma</a> <span class="bull"> • </span> <a href="command-line-options.html#gaussian-blur">‑gaussian‑blur</a> <span class="bull"> • </span> <a href="command-line-options.html#geometry">‑geometry</a> <span class="bull"> • </span> <a href="command-line-options.html#gravity">‑gravity</a> <span class="bull"> • </span> <a href="command-line-options.html#grayscale">‑grayscale</a> <span class="bull"> • </span> <a href="command-line-options.html#green-primary">‑green‑primary</a> <span class="bull"> • </span> <a href="command-line-options.html#hald-clut">‑hald‑clut</a> <span class="bull"> • </span> <a href="command-line-options.html#help">‑help</a> <span class="bull"> • </span> <a href="command-line-options.html#highlight-color">‑highlight‑color</a> <span class="bull"> • </span> <a href="command-line-options.html#iconGeometry">‑iconGeometry</a> <span class="bull"> • </span> <a href="command-line-options.html#iconic">‑iconic</a> <span class="bull"> • </span> <a href="command-line-options.html#identify">‑identify</a> <span class="bull"> • </span> <a href="command-line-options.html#ift">‑ift</a> <span class="bull"> • </span> <a href="command-line-options.html#immutable">‑immutable</a> <span class="bull"> • </span> <a href="command-line-options.html#implode">‑implode</a> <span class="bull"> • </span> <a href="command-line-options.html#insert">‑insert</a> <span class="bull"> • </span> <a href="command-line-options.html#intensity">‑intensity</a> <span class="bull"> • </span> <a href="command-line-options.html#intent">‑intent</a> <span class="bull"> • </span> <a href="command-line-options.html#interlace">‑interlace</a> <span class="bull"> • </span> <a href="command-line-options.html#interpolate">‑interpolate</a> <span class="bull"> • </span> <a href="command-line-options.html#interline-spacing">‑interline‑spacing</a> <span class="bull"> • </span> <a href="command-line-options.html#interword-spacing">‑interword‑spacing</a> <span class="bull"> • </span> <a href="command-line-options.html#kerning">‑kerning</a> <span class="bull"> • </span> <a href="command-line-options.html#label">‑label</a> <span class="bull"> • </span> <a href="command-line-options.html#lat">‑lat</a> <span class="bull"> • </span> <a href="command-line-options.html#layers">‑layers</a> <span class="bull"> • </span> <a href="command-line-options.html#level">‑level</a> <span class="bull"> • </span> <a href="command-line-options.html#level-colors">‑level‑colors</a> <span class="bull"> • </span> <a href="command-line-options.html#limit">‑limit</a> <span class="bull"> • </span> <a href="command-line-options.html#linear-stretch">‑linear‑stretch</a> <span class="bull"> • </span> <a href="command-line-options.html#linewidth">‑linewidth</a> <span class="bull"> • </span> <a href="command-line-options.html#liquid-rescale">‑liquid‑rescale</a> <span class="bull"> • </span> <a href="command-line-options.html#list">‑list</a> <span class="bull"> • </span> <a href="command-line-options.html#log">‑log</a> <span class="bull"> • </span> <a href="command-line-options.html#loop">‑loop</a> <span class="bull"> • </span> <a href="command-line-options.html#lowlight-color">‑lowlight‑color</a> <span class="bull"> • </span> <a href="command-line-options.html#magnify">‑magnify</a> <span class="bull"> • </span> <a href="command-line-options.html#map">‑map</a> <span class="bull"> • </span> <a href="command-line-options.html#map_stream_">‑map[stream]</a> <span class="bull"> • </span> <a href="command-line-options.html#mask">‑mask</a> <span class="bull"> • </span> <a href="command-line-options.html#mattecolor">‑mattecolor</a> <span class="bull"> • </span> <a href="command-line-options.html#median">‑median</a> <span class="bull"> • </span> <a href="command-line-options.html#metric">‑metric</a> <span class="bull"> • </span> <a href="command-line-options.html#mode">‑mode</a> <span class="bull"> • </span> <a href="command-line-options.html#modulate">‑modulate</a> <span class="bull"> • </span> <a href="command-line-options.html#monitor">‑monitor</a> <span class="bull"> • </span> <a href="command-line-options.html#monochrome">‑monochrome</a> <span class="bull"> • </span> <a href="command-line-options.html#morph">‑morph</a> <span class="bull"> • </span> <a href="command-line-options.html#morphology">‑morphology</a> <span class="bull"> • </span> <a href="command-line-options.html#mosaic">‑mosaic</a> <span class="bull"> • </span> <a href="command-line-options.html#motion-blur">‑motion‑blur</a> <span class="bull"> • </span> <a href="command-line-options.html#name">‑name</a> <span class="bull"> • </span> <a href="command-line-options.html#negate">‑negate</a> <span class="bull"> • </span> <a href="command-line-options.html#noise">‑noise</a> <span class="bull"> • </span> <a href="command-line-options.html#normalize">‑normalize</a> <span class="bull"> • </span> <a href="command-line-options.html#opaque">‑opaque</a> <span class="bull"> • </span> <a href="command-line-options.html#ordered-dither">‑ordered‑dither</a> <span class="bull"> • </span> <a href="command-line-options.html#orient">‑orient</a> <span class="bull"> • </span> <a href="command-line-options.html#page">‑page</a> <span class="bull"> • </span> <a href="command-line-options.html#paint">‑paint</a> <span class="bull"> • </span> <a href="command-line-options.html#path">‑path</a> <span class="bull"> • </span> <a href="command-line-options.html#pause_animate_">‑pause[animate]</a> <span class="bull"> • </span> <a href="command-line-options.html#pause_import_">‑pause[import]</a> <span class="bull"> • </span> <a href="command-line-options.html#pen">‑pen</a> <span class="bull"> • </span> <a href="command-line-options.html#perceptible">‑perceptible</a> <span class="bull"> • </span> <a href="command-line-options.html#ping">‑ping</a> <span class="bull"> • </span> <a href="command-line-options.html#pointsize">‑pointsize</a> <span class="bull"> • </span> <a href="command-line-options.html#polaroid">‑polaroid</a> <span class="bull"> • </span> <a href="command-line-options.html#poly">‑poly</a> <span class="bull"> • </span> <a href="command-line-options.html#posterize">‑posterize</a> <span class="bull"> • </span> <a href="command-line-options.html#precision">‑precision</a> <span class="bull"> • </span> <a href="command-line-options.html#preview">‑preview</a> <span class="bull"> • </span> <a href="command-line-options.html#print">‑print</a> <span class="bull"> • </span> <a href="command-line-options.html#process">‑process</a> <span class="bull"> • </span> <a href="command-line-options.html#profile">‑profile</a> <span class="bull"> • </span> <a href="command-line-options.html#quality">‑quality</a> <span class="bull"> • </span> <a href="command-line-options.html#quantize">‑quantize</a> <span class="bull"> • </span> <a href="command-line-options.html#quiet">‑quiet</a> <span class="bull"> • </span> <a href="command-line-options.html#radial-blur">‑radial‑blur</a> <span class="bull"> • </span> <a href="command-line-options.html#raise">‑raise</a> <span class="bull"> • </span> <a href="command-line-options.html#random-threshold">‑random‑threshold</a> <span class="bull"> • </span> <a href="command-line-options.html#red-primary">‑red‑primary</a> <span class="bull"> • </span> <a href="command-line-options.html#regard-warnings">‑regard‑warnings</a> <span class="bull"> • </span> <a href="command-line-options.html#region">‑region</a> <span class="bull"> • </span> <a href="command-line-options.html#remap">‑remap</a> <span class="bull"> • </span> <a href="command-line-options.html#remote">‑remote</a> <span class="bull"> • </span> <a href="command-line-options.html#render">‑render</a> <span class="bull"> • </span> <a href="command-line-options.html#repage">‑repage</a> <span class="bull"> • </span> <a href="command-line-options.html#resample">‑resample</a> <span class="bull"> • </span> <a href="command-line-options.html#resize">‑resize</a> <span class="bull"> • </span> <a href="command-line-options.html#respect-parentheses">‑respect‑parentheses</a> <span class="bull"> • </span> <a href="command-line-options.html#reverse">‑reverse</a> <span class="bull"> • </span> <a href="command-line-options.html#roll">‑roll</a> <span class="bull"> • </span> <a href="command-line-options.html#rotate">‑rotate</a> <span class="bull"> • </span> <a href="command-line-options.html#sample">‑sample</a> <span class="bull"> • </span> <a href="command-line-options.html#sampling-factor">‑sampling‑factor</a> <span class="bull"> • </span> <a href="command-line-options.html#scale">‑scale</a> <span class="bull"> • </span> <a href="command-line-options.html#scene">‑scene</a> <span class="bull"> • </span> <a href="command-line-options.html#screen">‑screen</a> <span class="bull"> • </span> <a href="command-line-options.html#seed">‑seed</a> <span class="bull"> • </span> <a href="command-line-options.html#segment">‑segment</a> <span class="bull"> • </span> <a href="command-line-options.html#selective-blur">‑selective‑blur</a> <span class="bull"> • </span> <a href="command-line-options.html#separate">‑separate</a> <span class="bull"> • </span> <a href="command-line-options.html#sepia-tone">‑sepia‑tone</a> <span class="bull"> • </span> <a href="command-line-options.html#set">‑set</a> <span class="bull"> • </span> <a href="command-line-options.html#shade">‑shade</a> <span class="bull"> • </span> <a href="command-line-options.html#shadow">‑shadow</a> <span class="bull"> • </span> <a href="command-line-options.html#shared-memory">‑shared‑memory</a> <span class="bull"> • </span> <a href="command-line-options.html#sharpen">‑sharpen</a> <span class="bull"> • </span> <a href="command-line-options.html#shave">‑shave</a> <span class="bull"> • </span> <a href="command-line-options.html#shear">‑shear</a> <span class="bull"> • </span> <a href="command-line-options.html#sigmoidal-contrast">‑sigmoidal‑contrast</a> <span class="bull"> • </span> <a href="command-line-options.html#silent">‑silent</a> <span class="bull"> • </span> <a href="command-line-options.html#similarity-threshold">‑similarity‑threshold</a> <span class="bull"> • </span> <a href="command-line-options.html#size">‑size</a> <span class="bull"> • </span> <a href="command-line-options.html#sketch">‑sketch</a> <span class="bull"> • </span> <a href="command-line-options.html#smush">‑smush</a> <span class="bull"> • </span> <a href="command-line-options.html#snaps">‑snaps</a> <span class="bull"> • </span> <a href="command-line-options.html#solarize">‑solarize</a> <span class="bull"> • </span> <a href="command-line-options.html#sparse-color">‑sparse‑color</a> <span class="bull"> • </span> <a href="command-line-options.html#splice">‑splice</a> <span class="bull"> • </span> <a href="command-line-options.html#spread">‑spread</a> <span class="bull"> • </span> <a href="command-line-options.html#statistic">‑statistic</a> <span class="bull"> • </span> <a href="command-line-options.html#stegano">‑stegano</a> <span class="bull"> • </span> <a href="command-line-options.html#stereo">‑stereo</a> <span class="bull"> • </span> <a href="command-line-options.html#stretch">‑stretch</a> <span class="bull"> • </span> <a href="command-line-options.html#strip">‑strip</a> <span class="bull"> • </span> <a href="command-line-options.html#stroke">‑stroke</a> <span class="bull"> • </span> <a href="command-line-options.html#strokewidth">‑strokewidth</a> <span class="bull"> • </span> <a href="command-line-options.html#style">‑style</a> <span class="bull"> • </span> <a href="command-line-options.html#subimage-search">‑subimage‑search</a> <span class="bull"> • </span> <a href="command-line-options.html#swap">‑swap</a> <span class="bull"> • </span> <a href="command-line-options.html#swirl">‑swirl</a> <span class="bull"> • </span> <a href="command-line-options.html#synchronize">‑synchronize</a> <span class="bull"> • </span> <a href="command-line-options.html#taint">‑taint</a> <span class="bull"> • </span> <a href="command-line-options.html#text-font">‑text‑font</a> <span class="bull"> • </span> <a href="command-line-options.html#texture">‑texture</a> <span class="bull"> • </span> <a href="command-line-options.html#threshold">‑threshold</a> <span class="bull"> • </span> <a href="command-line-options.html#thumbnail">‑thumbnail</a> <span class="bull"> • </span> <a href="command-line-options.html#tile">‑tile</a> <span class="bull"> • </span> <a href="command-line-options.html#tile-offset">‑tile‑offset</a> <span class="bull"> • </span> <a href="command-line-options.html#tint">‑tint</a> <span class="bull"> • </span> <a href="command-line-options.html#title">‑title</a> <span class="bull"> • </span> <a href="command-line-options.html#transform">‑transform</a> <span class="bull"> • </span> <a href="command-line-options.html#transparent">‑transparent</a> <span class="bull"> • </span> <a href="command-line-options.html#transparent-color">‑transparent‑color</a> <span class="bull"> • </span> <a href="command-line-options.html#transpose">‑transpose</a> <span class="bull"> • </span> <a href="command-line-options.html#transverse">‑transverse</a> <span class="bull"> • </span> <a href="command-line-options.html#treedepth">‑treedepth</a> <span class="bull"> • </span> <a href="command-line-options.html#trim">‑trim</a> <span class="bull"> • </span> <a href="command-line-options.html#type">‑type</a> <span class="bull"> • </span> <a href="command-line-options.html#undercolor">‑undercolor</a> <span class="bull"> • </span> <a href="command-line-options.html#unique-colors">‑unique‑colors</a> <span class="bull"> • </span> <a href="command-line-options.html#units">‑units</a> <span class="bull"> • </span> <a href="command-line-options.html#unsharp">‑unsharp</a> <span class="bull"> • </span> <a href="command-line-options.html#update">‑update</a> <span class="bull"> • </span> <a href="command-line-options.html#verbose">‑verbose</a> <span class="bull"> • </span> <a href="command-line-options.html#version">‑version</a> <span class="bull"> • </span> <a href="command-line-options.html#view">‑view</a> <span class="bull"> • </span> <a href="command-line-options.html#vignette">‑vignette</a> <span class="bull"> • </span> <a href="command-line-options.html#virtual-pixel">‑virtual‑pixel</a> <span class="bull"> • </span> <a href="command-line-options.html#visual">‑visual</a> <span class="bull"> • </span> <a href="command-line-options.html#watermark">‑watermark</a> <span class="bull"> • </span> <a href="command-line-options.html#wave">‑wave</a> <span class="bull"> • </span> <a href="command-line-options.html#weight">‑weight</a> <span class="bull"> • </span> <a href="command-line-options.html#white-point">‑white‑point</a> <span class="bull"> • </span> <a href="command-line-options.html#white-threshold">‑white‑threshold</a> <span class="bull"> • </span> <a href="command-line-options.html#window">‑window</a> <span class="bull"> • </span> <a href="command-line-options.html#window-group">‑window‑group</a> <span class="bull"> • </span> <a href="command-line-options.html#write">‑write</a>  ] </p>
180
181 <div class="doc-section">
182
183 <p>Below is list of command-line options recognized by the ImageMagick <a href="command-line-tools.html">command-line
184 tools</a>. If you want a description of a particular option, click on the
185 option name in the navigation bar above and you will go right to it. Unless
186 otherwise noted, each option is recognized by the commands <a href="convert.html">convert</a>, <a href="mogrify.html">mogrify</a>.</p>
187
188 <div style="margin: auto;">
189   <h4><a id="adaptive-blur"></a>-adaptive-blur <em class="arg">radius</em>[x<em class="arg">sigma</em>]</h4>
190 </div>
191
192 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Adaptively blur pixels, with decreasing effect near edges.</td><td style="text-align:right;"></td></tr></table>
193
194 <p>A Gaussian operator of the given radius and standard deviation (<em class="arg">sigma</em>) is used. If <em class="arg">sigma</em> is not given it
195 defaults to 1.</p>
196
197 <div style="margin: auto;">
198   <h4><a id="adaptive-resize"></a>-adaptive-resize <em class="arg">geometry</em></h4>
199 </div>
200
201 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Resize the image using data-dependent triangulation.</td><td style="text-align:right;"></td></tr></table>
202
203 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument. The <a href="command-line-options.html#adaptive-resize">-adaptive-resize</a>
204 option defaults to data-dependent triangulation.  Use the <a href="command-line-options.html#filter">-filter</a> to choose a different resampling algorithm.
205 Offsets, if present in the geometry string, are ignored, and the <a href="command-line-options.html#gravity">-gravity</a> option has no effect.</p>
206
207 <div style="margin: auto;">
208   <h4><a id="adaptive-sharpen"></a>-adaptive-sharpen <em class="arg">radius</em>[x<em class="arg">sigma</em>]</h4>
209 </div>
210
211 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Adaptively sharpen pixels, with increasing effect near edges.</td><td style="text-align:right;"></td></tr></table>
212
213 <p>A Gaussian operator of the given radius and standard deviation (<em class="arg">sigma</em>) is used. If <em class="arg">sigma</em> is not given it
214 defaults to 1.</p>
215
216 <div style="margin: auto;">
217   <h4><a id="adjoin"></a>-adjoin</h4>
218 </div>
219
220 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Join images into a single multi-image file.</td><td style="text-align:right;"></td></tr></table>
221
222 <p>This option is enabled by default. An attempt is made to save all images of
223 an image sequence into the given output file.  However, some formats, such as
224 JPEG and PNG, do not support more than one image per file, and in that case
225 ImageMagick is forced to write each image as a separate file.  As such, if
226 more than one image needs to be written, the filename given is modified by
227 adding a <a href="command-line-options.html#scene">-scene</a> number before the suffix, in order to
228 make distinct names for each image. </p>
229
230 <p>Use <a href="command-line-options.html#adjoin">+adjoin</a> to force each image to be written to
231 separate files, whether or not the file format allows multiple images per file
232 (for example, GIF, MIFF, and TIFF). </p>
233
234 <p>Including a C-style integer format string in the output filename will
235 automagically enable <a href="command-line-options.html#adjoin">+adjoin</a> and are used to specify
236 where the <a href="command-line-options.html#scene">-scene</a> number is placed in the filenames. These
237 strings, such as '<code>%d</code>' or '<code>%03d</code>', are familiar to those
238 who have used the standard <code>printf()</code>' C-library function. As an
239 example, the command</p>
240
241 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert logo: rose: -morph 15 my%02dmorph.jpg</span></p>
242 <p>will create a sequence of 17 images (the two given plus 15 more created by
243 <a href="command-line-options.html#morph">-morph</a>), named: my00morph.jpg, my01morph.jpg,
244 my02morph.jpg, ..., my16morph.jpg.  </p>
245
246 <p>In summary, ImageMagick tries to write all images to one file, but will
247 save to multiple files, if any of the following conditions exist...</p>
248 <ol>
249 <li>the output image's file format does not allow multi-image files,</li>
250 <li>the <a href="command-line-options.html#adjoin">+adjoin</a> option is given, or</li>
251 <li>a printf() integer format string (eg: "%d") is present in the output
252  filename.</li>
253 </ol>
254
255
256 <div style="margin: auto;">
257   <h4><a id="affine"></a>-affine
258   <em class="arg">s<sub>x</sub></em>,<em class="arg">r<sub>x</sub></em>,<em class="arg">r<sub>y</sub></em>,<em class="arg">s<sub>y</sub></em>[,<em class="arg">t<sub>x</sub></em>,<em class="arg">t<sub>y</sub></em>]</h4>
259 </div>
260
261 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set the drawing transformation matrix for combined rotating and scaling.</td><td style="text-align:right;"></td></tr></table>
262
263 <p>This option sets a transformation matrix, for use by subsequent <a href="command-line-options.html#draw">-draw</a> or <a href="command-line-options.html#transform">-transform</a> options. </p>
264
265 <p>The matrix entries are entered as comma-separated numeric values either in
266 quotes or without spaces. </p>
267
268 <p>Internally, the transformation matrix has 3x3 elements, but three of them
269 are omitted from the input because they are constant. The new (transformed)
270 coordinates (<em class="arg">x'</em>, <em class="arg">y'</em>) of a pixel at
271 position (<em class="arg">x</em>, <em class="arg">y</em>) in the original
272 image are calculated using the following matrix equation.</p>
273
274 <div class="eqn">
275 <img alt="affine transformation" src="../images/affine.png"></img>
276 </div>
277
278 <p> The size of the resulting image is that of the smallest rectangle that
279 contains the transformed source image.  The parameters <em class="arg">t<sub>x</sub></em> and <em class="arg">t<sub>y</sub></em>
280 subsequently shift the image pixels so that those that are moved out of the
281 image area are cut off.</p>
282
283 <p>The transformation matrix complies with the left-handed pixel coordinate
284 system: positive <em class="arg">x</em> and <em class="arg">y</em> directions
285 are rightward and downward, resp.; positive rotation is clockwise.</p>
286
287 <p> If the translation coefficients <em class="arg">t<sub>x</sub></em> and <em class="arg">t<sub>y</sub></em> are omitted they default to 0,0. Therefore,
288 four parameters suffice for rotation and scaling without translation.</p>
289
290 <p>Scaling by the factors <em class="arg">s<sub>x</sub></em> and <em class="arg">s<sub>y</sub></em> in the <em>x</em> and <em>y</em> directions,
291 respectively, is accomplished with the following.</p>
292
293 <p>See <a href="command-line-options.html#transform">-transform</a>, and the <a href="command-line-options.html#distort">-distort</a> method '<code>Affineprojection</code> for more
294 information </p>
295
296
297 <p class="crtsnip"> -affine <em class="arg">s<sub>x</sub></em>,0,0,<em class="arg">s<sub>y</sub></em> </p>
298
299 <p>Translation by a displacement (<em class="arg">t<sub>x</sub></em>, <em class="arg">t<sub>y</sub></em>) is accomplished like so:</p>
300
301 <p class="crtsnip">
302   -affine 1,0,0,1,<em class="arg">t<sub>x</sub></em>,<em class="arg">t<sub>y</sub></em>
303 </p>
304
305 <p>Rotate clockwise about the origin (the upper left-hand corner) by an angle
306 <em>a</em> by letting <em>c</em> = cos(<em>a</em>), <em>s</em>
307 = sin(<em>a</em>), and using the following.</p>
308
309 <p class="crtsnip">
310   -affine <em>c</em>,<em>s</em>,-<em>s</em>,<em>c</em>
311 </p>
312
313 <p>The cumulative effect of a sequence of <a href="command-line-options.html#affine">-affine</a>
314 transformations can be accomplished by instead by a single <a href="command-line-options.html#affine">-affine</a> operation using the matrix equal to the product of the matrices
315 of the individual transformations.</p>
316
317 <p>An attempt is made to detect near-singular transformation matrices. If the
318 matrix determinant has a sufficiently small absolute value it is rejected.</p>
319
320 <div style="margin: auto;">
321   <h4><a id="alpha"></a>-alpha <em class="arg">type</em></h4>
322 </div>
323
324 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Gives control of the alpha/matte channel of an image.</td><td style="text-align:right;"></td></tr></table>
325
326 <p>Used to set a flag on an image indicating whether or not to use existing alpha
327 channel data, to create an alpha channel, or to perform other operations on the alpha channel.  Choose the argument <em class="arg">type</em> from the list below.</p>
328
329
330 <table class="doc">
331   <tbody>
332   <tr valign="top">
333     <th align="left" style="width: 8%">type</th>
334     <th align="left">Description</th>
335   </tr>
336
337   <tr valign="top">
338     <td valign="top"><code>Activate</code> or <code>On</code></td>
339     <td valign="top">
340        Enable the image's transparency channel. Note normally <code>Set</code>
341        should be used instead of this, unless you specifically need to
342        preserve existing (but specifically turned <code>Off</code>) transparency
343        channel. </td></tr>
344
345   <tr valign="top">
346     <td valign="top"><code>Deactivate</code> or <code>Off</code></td>
347     <td valign="top">
348        Disables the image's transparency channel. Does not delete or change the
349        existing data, just turns off the use of that data.</td></tr>
350
351   <tr valign="top">
352     <td valign="top"><code>Set</code></td>
353     <td valign="top">
354        Activates the alpha/matte channel. If it was previously turned off
355        then it also resets the channel to opaque.  If the image already had
356        the alpha channel turned on, it will have no effect.</td></tr>
357
358   <tr valign="top">
359     <td valign="top"><code>Opaque</code></td>
360     <td valign="top">
361        Enables the alpha/matte channel and forces it to be fully opaque.
362        </td></tr>
363
364   <tr valign="top">
365     <td valign="top"><code>Transparent</code></td>
366     <td valign="top">
367        Activates the alpha/matte channel and forces it to be fully
368        transparent. This effectively creates a fully transparent image the
369        same size as the original and with all its original RGB data still
370        intact, but fully transparent. </td></tr>
371
372   <tr valign="top">
373     <td valign="top"><code>Extract</code></td>
374     <td valign="top">
375        Copies the alpha channel values into all the color channels and turns
376        '<code>Off</code>' the the image's transparency, so as to generate
377        a gray-scale mask of the image's shape. The alpha channel data is left
378        intact just deactivated.  This is the inverse of '<code>Copy</code>'.
379        </td></tr>
380
381   <tr valign="top">
382     <td valign="top"><code>Copy</code></td>
383     <td valign="top">
384        Turns '<code>On</code>' the alpha/matte channel, then copies the
385        gray-scale intensity of the image, into the alpha channel, converting
386        a gray-scale mask into a transparent shaped mask ready to be colored
387        appropriately. The color channels are not modified.  </td></tr>
388
389   <tr valign="top">
390     <td valign="top"><code>Shape</code></td>
391     <td valign="top">
392        As per '<code>Copy</code>' but also colors the resulting shape mask with
393        the current background color.  That is the RGB color channels is
394        replaced, with appropriate alpha shape.
395        </td></tr>
396
397   <tr valign="top">
398     <td valign="top"><code>Remove</code></td>
399     <td valign="top">
400        Composite the image over the background color.
401        </td></tr>
402
403   <tr valign="top">
404     <td valign="top"><code>Background</code></td>
405     <td valign="top">
406        Set any fully-transparent pixel to the background color, while leaving
407        it fully-transparent.  This can make some image file formats, such as
408        PNG, smaller as the RGB values of transparent pixels are more uniform,
409        and thus can compress better.
410        </td></tr>
411   </tbody>
412 </table>
413
414 <p>Note that while the obsolete <code>+matte</code> operation was the
415 same as "<code><a href="command-line-options.html#alpha">-alpha</a> Off</code>", the <code>
416 &gt;-matte</code> operation was the same as "<code><a href="command-line-options.html#alpha">-alpha</a>
417 Set</code>" and not "<code><a href="command-line-options.html#alpha">-alpha</a> On</code>".  </p>
418
419
420 <div style="margin: auto;">
421  <h4><a id="annotate"></a>
422  -annotate <em class="arg">degrees</em> <em class="arg">text</em><br></br>
423  -annotate <em class="arg">Xdegrees</em>x<em class="arg">Ydegrees</em> <em class="arg">text</em><br></br> -annotate <em class="arg">Xdegrees</em>x<em class="arg">Ydegrees</em> {+-}<em class="arg">t<sub>x</sub></em>{+-}<em class="arg">t<sub>y</sub></em> <em class="arg">text</em></h4>
424 </div>
425
426 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Annotate an image with text.</td><td style="text-align:right;"></td></tr></table>
427
428 <p>This is a convenience for annotating an image with text. For more precise
429 control over text annotations, use <a href="command-line-options.html#draw">-draw</a>.</p>
430
431
432 <p>The values <em class="arg">Xdegrees</em> and <em class="arg">Ydegrees</em>
433 control the shears with respect to the , respectively, applied to the text,
434 while <em class="arg">t<sub>x</sub></em> and <em class="arg">t<sub>y</sub></em> are offsets that give the location of the text
435 relative to the upper left corner of the image.</p>
436
437 <p>Using <a href="command-line-options.html#annotate">-annotate</a> <em class="arg">degrees</em>
438 or <a href="command-line-options.html#annotate">-annotate</a> <em class="arg">degrees</em>x<em class="arg">degrees</em> produces an unsheared rotation of the text. The
439 direction of the rotation is positive, which means a clockwise rotation if <em class="arg">degrees</em> is positive. (This conforms to the usual mathematical
440 convention once it is realized that the positive <em>y</em>–direction is
441 conventionally considered to be <em>downward</em> for images.)</p>
442
443 <p>The new (transformed) coordinates (<em class="arg">x'</em>, <em class="arg">y'</em>) of a pixel at position (<em class="arg">x</em>, <em class="arg">y</em>) in the image are calculated using the following matrix
444 equation.</p> <div class="eqn"><img alt="annotate transformation" src="../images/annotate.png"></img></div>
445
446 <p>If <em class="arg">t<sub>x</sub></em> and <em class="arg">t<sub>y</sub></em> are omitted, they default to 0. This makes the
447 bottom-left of the text becomes the upper-left corner of the image, which is
448 probably undesirable. Adding a <a href="command-line-options.html#gravity">-gravity</a> option in this
449 case leads to nice results.</p>
450
451 <p>Text is any UTF-8 encoded character sequence.  If <em class="arg">text</em>
452 is of the form '@mytext.txt', the text is read from the file
453 <code>mytext.txt</code>.  Text  in a file is taken literally; no embedded
454 formatting characters are recognized.</p>
455
456 <div style="margin: auto;">
457   <h4><a id="antialias"></a>-antialias</h4>
458 </div>
459
460 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Enable/Disable of the rendering of anti-aliasing pixels when
461 drawing fonts and lines.</td><td style="text-align:right;"></td></tr></table>
462
463 <p>By default, objects (e.g. text, lines, polygons, etc.) are antialiased when
464 drawn.  Use <a href="command-line-options.html#antialias">+antialias</a> to disable the addition of
465 antialiasing edge pixels.  This will then reduce the number of colors added to
466 an image to just the colors being directly drawn.  That is, no mixed colors
467 are added when drawing such objects. </p>
468
469 <div style="margin: auto;">
470   <h4><a id="append"></a>-append</h4>
471 </div>
472
473 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Join current images vertically or horizontally.</td><td style="text-align:right;"></td></tr></table>
474
475 <p>This option creates a single longer image image, by joining all the current
476 images in sequence top-to-bottom. Use <a href="command-line-options.html#append">+append</a> to
477 stack images left-to-right. </p>
478
479 <p>If they are not of the same width, narrower images are padded with the
480 current <a href="command-line-options.html#background">-background</a> color setting, and their
481 position relative to each other can be controlled by the current <a href="command-line-options.html#gravity">-gravity</a> setting. </p>
482
483
484 <div style="margin: auto;">
485   <h4><a id="attenuate"></a>-attenuate <em class="arg">value</em></h4>
486 </div>
487
488 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Lessen (or intensify) when adding noise to an image.</td><td style="text-align:right;"></td></tr></table>
489
490 <p>If unset the value is equivelent to 1.0, or a maximum noise addition</p>
491
492 <div style="margin: auto;">
493   <h4><a id="authenticate"></a>-authenticate <em class="arg">password</em></h4>
494 </div>
495
496 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Decrypt a PDF with a password.</td><td style="text-align:right;"></td></tr></table>
497
498 <p>Use this option to supply a <em class="arg">password</em> for decrypting
499 a PDF that has been encrypted using Microsoft Crypto API (MSC API). The
500 encrypting using the MSC API is not supported.</p>
501
502 <p>For a different encryption method, see <a href="command-line-options.html#encipher">-encipher</a>
503 and <a href="command-line-options.html#decipher">-decipher</a>. </p>
504
505
506
507 <div style="margin: auto;">
508   <h4><a id="auto-gamma"></a>-auto-gamma</h4>
509 </div>
510
511 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Automagically adjust gamma level of image.</td><td style="text-align:right;"></td></tr></table>
512
513 <p>This calculates the mean values of an image, then applies a calculated  <a href="command-line-options.html#gamma">-gamma</a> adjustment so that is the mean color exists in the
514 image it will get a have a value of 50%. </p>
515
516 <p>This means that any solid 'gray' image becomes 50% gray. </p>
517
518 <p>This works well for real-life images with little or no extreme dark and
519 light areas, but tend to fail for images with large amounts of bright sky or
520 dark shadows. It also does not work well for diagrams or cartoon like images.
521 </p>
522
523 <p>It uses the <a href="command-line-options.html#channel">-channel</a> setting, (including the
524 '<em>sync</em>' flag for channel synchronization), to determine which color
525 values is used and modified. As the default <a href="command-line-options.html#channel">-channel</a> setting is '<em>RGB,sync</em>', channels are modified
526 together by the same gamma value, preserving colors. </p>
527
528
529
530 <div style="margin: auto;">
531   <h4><a id="auto-level"></a>-auto-level</h4>
532 </div>
533
534 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Automagically adjust color levels of image.</td><td style="text-align:right;"></td></tr></table>
535
536 <p>This is a 'perfect' image normalization operator.  It finds the exact
537 minimum and maximum color values in the image and then applies a <a href="command-line-options.html#level">-level</a> operator to stretch the values to the full range of
538 values. </p>
539
540 <p>The operator is not typically used for real-life images, image scans, or
541 JPEG format images, as a single 'out-rider' pixel can set a bad min/max values
542 for the <a href="command-line-options.html#level">-level</a> operation.  On the other hand it is the
543 right operator to use for color stretching gradient images being used to
544 generate Color lookup tables, distortion maps, or other 'mathematically'
545 defined images.  </p>
546
547 <p>The operator is very similar to the <a href="command-line-options.html#normalize">-normalize</a>, <a href="command-line-options.html#contrast-stretch">-contrast-stretch</a>, and <a href="command-line-options.html#linear-stretch">-linear-stretch</a> operators, but without 'histogram binning' or 'clipping'
548 problems that these operators may have. That is <a href="command-line-options.html#auto-level">-auto-level</a> is the perfect or ideal version these operators. </p>
549
550 <p>It uses the <a href="command-line-options.html#channel">-channel</a> setting, (including the
551 special '<em>sync</em>' flag for channel synchronization), to determine
552 which color values are used and modified. As the default <a href="command-line-options.html#channel">+channel</a> setting is '<em>RGB,sync</em>', the
553 '<em>sync</em>' ensures that the color channels will are modified
554 together by the same gamma value, preserving colors, and ignoring
555 transparency. </p>
556
557
558 <div style="margin: auto;">
559   <h4><a id="auto-orient"></a>-auto-orient</h4>
560 </div>
561
562 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">adjusts an image so that its orientation is suitable for viewing (i.e. top-left orientation).</td><td style="text-align:right;"></td></tr></table>
563
564 <p>This operator reads and resets the EXIF image profile setting 'Orientation'
565 and then performs the appropriate 90 degree rotation on the image to orient
566 the image, for correct viewing. </p>
567
568 <p>This EXIF profile setting is usually set using a gravity sensor in digital
569 camera, however photos taken directly downward or upward may not have an
570 appropriate value.  Also images that have been orientation 'corrected' without
571 reseting this setting, may be 'corrected' again resulting in a incorrect
572 result.  If the EXIF profile was previously stripped, the  <a href="command-line-options.html#auto-orient">-auto-orient</a> operator will do nothing. </p>
573
574
575 <div style="margin: auto;">
576   <h4><a id="average"></a>-average</h4>
577 </div>
578
579 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Average a set of images.</td><td style="text-align:right;"></td></tr></table>
580
581 <p>An error results if the images are not identically sized.</p>
582
583
584 <div style="margin: auto;">
585   <h4><a id="backdrop"></a>-backdrop</h4>
586 </div>
587
588 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Display the image centered on a backdrop.</td><td style="text-align:right;">[<a href="animate.html">animate</a>, <a href="display.html">display</a>]</td></tr></table>
589
590 <p>This backdrop covers the entire workstation screen and is useful for hiding
591 other X window activity while viewing the image. The color of the backdrop is
592 specified as the background color. The color is specified using the format
593 described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
594
595 <div style="margin: auto;">
596   <h4><a id="background"></a>-background <em class="arg">color</em></h4>
597 </div>
598
599 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set the background color.</td><td style="text-align:right;"></td></tr></table>
600
601 <p>The color is specified using the format described under the <a href="command-line-options.html#fill">-fill</a> option. The default background color (if none is
602 specified or found in the image) is white.</p>
603
604 <div style="margin: auto;">
605   <h4><a id="bench"></a>-bench <em class="arg">iterations</em></h4>
606 </div>
607
608 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Measure performance.</td><td style="text-align:right;"></td></tr></table>
609
610 <p>Repeat the entire command for the given number of <em class="arg">iterations</em> and report the user-time and elapsed time. For instance,
611 consider the following command and its output.  Modify the benchmark with the
612 -duration to run the benchmark for a fixed number of seconds and -concurrent
613 to run the benchmark in parallel (requires the OpenMP feature).</p>
614
615 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert logo: -resize 1000% -bench 5 logo.png</span><span class="crtout">Performance[4]: 5i 0.875657ips 6.880u 0:05.710</span></p>
616 <p>In this example, 5 iterations were completed at 0.875657 iterations per
617 second, using 4 threads and 6.88 seconds of the user's allotted time, for
618 a total elapsed time of 5.71 seconds.</p>
619
620 <div style="margin: auto;">
621   <h4><a id="bias"></a>-bias <em class="arg">value</em>{<em class="arg">%</em>}</h4>
622 </div>
623
624 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Add bias when convolving an image.</td><td style="text-align:right;"></td></tr></table>
625
626 <p>This option shifts the output of <a href="command-line-options.html#convolve">‑convolve</a>  so that
627 positive and negative results are relative to the specified bias value. </p>
628
629 <p>This is important for non-HDRI compilations of ImageMagick when dealing
630 with convolutions that contain negative as well as positive values. This is
631 especially the case with convolutions involving high pass filters or edge
632 detection. Without an output bias, the negative values are clipped at
633 zero.</p>
634
635 <p>When using an ImageMagick with the HDRI compile-time setting, <a href="command-line-options.html#bias">‑bias</a> is not needed, as ImageMagick is able to store/handle any
636 negative results without clipping to the color value range
637 (0..QuantumRange).</p>
638
639 <p>See the discussion on HDRI implementations of ImageMagick on the page <a href="high-dynamic-range.html">High Dynamic-Range Images</a>. For more
640 about HDRI go the ImageMagick <a href="http://www.imagemagick.org/Usage/basics/#hdri">Usage</a> pages or this
641 <a href="http://en.wikipedia.org/wiki/High_dynamic_range_imaging">Wikipedia</a>
642 entry.  </p>
643
644 <div style="margin: auto;">
645   <h4><a id="black-point-compensation"></a>-black-point-compensation</h4>
646 </div>
647
648 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Use black point compensation.</td><td style="text-align:right;"></td></tr></table>
649
650 <div style="margin: auto;">
651   <h4><a id="black-threshold"></a>-black-threshold <em class="arg">value</em>{<em class="arg">%</em>}</h4>
652 </div>
653
654 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Force to black all pixels below the threshold while leaving all pixels at or above the threshold unchanged.</td><td style="text-align:right;"></td></tr></table>
655
656 <p> The threshold value can be given as a percentage or as an absolute integer
657 value within [0, <em class="QR">QuantumRange</em>] corresponding to the
658 desired <a href="command-line-options.html#channel">‑channel</a> value. See <a href="command-line-options.html#threshold">‑threshold</a>for more details on thresholds and resulting values.  </p>
659
660
661 <div style="margin: auto;">
662   <h4><a id="blend"></a>-blend <em class="arg">geometry</em></h4>
663 </div>
664
665 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">blend an image into another by the given absolute value or percent.</td><td style="text-align:right;">[<a href="composite.html">composite</a>]</td></tr></table>
666
667 <p>Blend will average the images together ('plus') according to the
668 percentages given and each pixels transparency.  If only a single percentage
669 value is given it sets the weight of the composite or 'source' image, while
670 the background image is weighted by the exact opposite amount. That is a
671 <code>-blend 30%</code> merges 30% of the 'source' image with 70% of the
672 'destination' image.  Thus it is equivalent to <code>-blend 30x70%</code>.</p>
673
674
675 <div style="margin: auto;">
676   <h4><a id="blue-primary"></a>-blue-primary <em class="arg">x</em>,<em class="arg">y</em></h4>
677 </div>
678
679 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set the blue chromaticity primary point.</td><td style="text-align:right;"></td></tr></table>
680
681 <div style="margin: auto;">
682   <h4><a id="blue-shift"></a>-blue-shift <em class="arg">factor</em></h4>
683 </div>
684
685 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">simulate a scene at nighttime in the moonlight.  Start with a factor of 1.5</td><td style="text-align:right;"></td></tr></table>
686
687 <div style="margin: auto;">
688
689 <div style="margin: auto;">
690   <h4><a id="blur"></a>-blur <em class="arg">radius</em><br></br>-blur <em class="arg">radius</em>x<em class="arg">sigma</em></h4>
691 </div>
692
693 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Reduce image noise and reduce detail levels.</td><td style="text-align:right;"></td></tr></table>
694
695 <p>Convolve the image with a Gaussian or normal distribution using the given
696 <em class="arg">Sigma</em> value.  The formula is:</p>
697
698 <div class="eqn"><img alt="gaussian distribution" width="243px" height="42px" src="../images/gaussian-blur.png"></img>
699 </div>
700
701 <p>The <em class="arg">Sigma</em> value is the important argument, and
702 determines the actual amount of blurring that will take place. </p>
703
704 <p>The <em class="arg">Radius</em> is only used to determine the size of the
705 array which will hold the calculated Gaussian distribution. It should be an
706 integer.  If not given, or set to zero, IM will calculate the largest possible
707 radius that will provide meaningful results for the Gaussian distribution.
708 </p>
709
710 <p>The larger the <em class="arg">Radius</em> the slower the
711 operation is. However too small a <em class="arg">Radius</em>, and sever
712 aliasing effects may result.  As a guideline, <em class="arg">Radius</em>
713 should be at least twice the <em class="arg">Sigma</em> value, though three
714 times will produce a more accurate result. </p>
715
716 <p>This option differs from <a href="command-line-options.html#gaussian-blur">-gaussian-blur</a> simply
717 by taking advantage of the separability properties of the distribution.  Here
718 we apply a single-dimensional Gaussian matrix in the horizontal direction,
719 then repeat the process in the vertical direction.</p>
720
721 <p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
722 pixels which are outside the image proper are blurred into the final result.
723 </p>
724
725
726 <div style="margin: auto;">
727   <h4>-blur <em class="arg">Width</em>[x<em class="arg">Height</em>[+<em class="arg">Angle</em>]]</h4>
728 </div>
729
730 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Variably blur and image according to the overlay mapping.</td><td style="text-align:right;">[<a href="composite.html">composite</a>]</td></tr></table>
731
732 <p>Each pixel in the overlaid region is replaced with an Elliptical Weighted
733 Average (EWA) of the source image, scaled according to the grayscale
734 mapping. </p>
735
736 <p>The ellipse is weighted with sigma set to the given <em class="arg">Width</em> and <em class="arg">Height</em>. The <em class="arg">Height</em>
737 defaults to the <em class="arg">Width</em> for a normal circular Gaussian
738 weighting.  The <em class="arg">Angle</em> will rotate the ellipse from
739 horizontal clock-wise.  </p>
740
741 <p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
742 pixels which are outside the image proper are blurred into the final result.
743 </p>
744
745
746 <div style="margin: auto;">
747   <h4><a id="border"></a>-border <em class="arg">geometry</em></h4>
748 </div>
749
750 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Surround the image with a border of color. </td><td style="text-align:right;"></td></tr></table>
751
752 <p>Set the width and height using the <em class="arg">size</em> portion of the
753 <em class="arg">geometry</em> argument.  See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument. Offsets are
754 ignored. </p>
755
756 <p>As of IM 6.7.8-8, the <em class="arg">geometry</em> arguments behave as follows:</p>
757
758 <table id="borderTable" class="doc">
759   <col width="20%"></col> <col width="80%"></col>
760   <thead>
761   <tr valign="top">
762     <th style="text-align:center"><em class="arg">size</em></th>
763     <th>General description</th>
764   </tr>
765   </thead>
766   <tbody>
767   <tr valign="top">
768     <td><em class="arg">value</em></td>
769     <td>value is added to both left/right and top/bottom</td>
770   </tr>
771   <tr valign="top">
772     <td><em class="arg">value-x</em>x</td>
773     <td>value-x is added only to left/right and top/bottom are unchanged</td>
774   </tr>
775   <tr valign="top">
776     <td>x<em class="arg">value-y</em></td>
777     <td>value-y is added only to top/bottom and left/right are unchanged</td>
778   </tr>
779   <tr valign="top">
780     <td><em class="arg">value-x</em>x<em class="arg">value-y</em></td>
781     <td>value-x is added to left/right and value-y added to top/bottom</td>
782   </tr>
783   <tr valign="top">
784     <td><em class="arg">value-x</em>x<code>0</code></td>
785     <td>value-x is added only to left/right and top/bottom are unchanged</td>
786   </tr>
787   <tr valign="top">
788     <td><code>0</code>x<em class="arg">value-y</em></td>
789     <td>value-y is added only to top/bottom and left/right are unchanged</td>
790   </tr>
791   <tr valign="top">
792     <td> </td>
793     <td> </td>
794   </tr>
795   <tr valign="top">
796     <td><em class="arg">value</em>%</td>
797     <td>value % of width is added to left/right and value % of height is added                  to top/bottom</td>
798   </tr>
799   <tr valign="top">
800     <td><em class="arg">value-x</em>x%</td>
801     <td>value-x % of width is added to left/right and to top/bottom</td>
802   </tr>
803   <tr valign="top">
804     <td>x<em class="arg">value-y</em>%</td>
805     <td>value-y % of height is added to top/bottom and to left/right</td>
806   </tr>
807   <tr valign="top">
808     <td><em class="arg">value-x</em>%x<em class="arg">value-y</em>%</td>
809     <td>value-x % of width is added to left/right and value-y % of height is added to top/bottom</td>
810   </tr>
811   <tr valign="top">
812     <td><em class="arg">value-x</em>%x<code>0</code>%</td>
813     <td>value-x % of width is added to left/right and top/bottom are unchanged</td>
814   </tr>
815   <tr valign="top">
816     <td><code>0</code>%x<em class="arg">value-y</em>%</td>
817     <td>value-y % of height is added to top/bottom and left/right are unchanged</td>
818   </tr>
819   </tbody>
820   </table>
821
822
823 <p>Set the border color by preceding with the <a href="command-line-options.html#bordercolor">-bordercolor</a> setting.</p>
824
825 <p>The <a href="command-line-options.html#border">-border</a> operation is affected by the current <a href="command-line-options.html#compose">-compose</a> setting and assumes that this is using the default
826 '<code>Over</code>' composition method.  It generates an image of the appropriate
827 size colors by the current <a href="command-line-options.html#bordercolor">-bordercolor</a> before
828 overlaying the original image in the center of this net image.  This means that
829 with the default compose method of '<code>Over</code>' any transparent parts may
830 be replaced by the current <a href="command-line-options.html#bordercolor">-bordercolor</a> setting.</p>
831 <p>See also the <a href="command-line-options.html#frame">-frame</a> option, which has more
832 functionality.</p>
833
834 <div style="margin: auto;">
835   <h4><a id="bordercolor"></a>-bordercolor <em class="arg">color</em></h4>
836 </div>
837
838 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set the border color.</td><td style="text-align:right;"></td></tr></table>
839
840 <p>The color is specified using the format described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
841
842 <p>The default border color is <code>#DFDFDF</code>, <span style="background-color: #dfdfdf;">this shade of gray</span>.</p>
843
844 <div style="margin: auto;">
845   <h4><a id="borderwidth"></a>-borderwidth <em class="arg">geometry</em> </h4>
846 </div>
847
848 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set the border width.</td><td style="text-align:right;">[<a href="animate.html">animate</a>, <a href="display.html">display</a>]</td></tr></table>
849
850 <div style="margin: auto;">
851   <h4><a id="brightness-contrast"></a>-brightness-contrast <em class="arg">brightness</em><br></br>-brightness-contrast <em class="arg">brightness</em>{x<em class="arg">contrast</em>}{<em class="arg">%</em>}}</h4>
852 </div>
853
854 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Adjust the brightness and/or contrast of the image.</td><td style="text-align:right;"></td></tr></table>
855
856 <p>Brightness and Contrast values apply changes to the input image. They are
857 not absolute settings. A brightness or contrast value of zero means no change.
858 The range of values is -100 to +100 on each. Positive values increase the
859 brightness or contrast and negative values decrease the brightness or contrast.
860 To control only contrast, set the brightness=0. To control only brightness,
861 set contrast=0 or just leave it off.</p>
862
863 <p>You may also use <a href="command-line-options.html#fill">-channel</a> to control which channels to
864 apply the brightness and/or contrast change. The default is to apply the same
865 transformation to all channels.</p>
866
867 <p>Brightness and Contrast arguments are converted to offset and slope of a
868 linear transform and applied
869 using <a href="command-line-options.html#fill">-function polynomial "slope,offset"</a>.</p>
870
871 <p>The slope varies from 0 at contrast=-100 to almost vertical at
872 contrast=+100. For brightness=0 and contrast=-100, the result are totally
873 midgray. For brightness=0 and contrast=+100, the result will approach but
874 not quite reach a threshold at midgray; that is the linear transformation
875 is a very steep vertical line at mid gray.</p>
876
877 <p>Negative slopes, i.e. negating the image, are not possible with this
878 function. All achievable slopes are zero or positive.</p>
879
880 <p>The offset varies from -0.5 at brightness=-100 to 0 at brightness=0 to +0.5
881 at brightness=+100. Thus, when contrast=0 and brightness=100, the result is
882 totally white. Similarly, when contrast=0 and brightness=-100, the result is
883 totally black.</p>
884
885 <p>As the range of values for the arguments are -100 to +100, adding the '%'
886 symbol is no different than leaving it off.</p>
887
888 <div style="margin: auto;">
889   <h4><a id="cache"></a>-cache <em class="arg">threshold</em></h4>
890 </div>
891
892 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">(This option has been replaced by the <a href="command-line-options.html#limit">-limit</a> option.)</td><td style="text-align:right;"></td></tr></table>
893
894 <div style="margin: auto;">
895   <h4><a id="caption"></a>-caption <em class="arg">string</em></h4>
896 </div>
897
898 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Assign a caption to an image.</td><td style="text-align:right;"></td></tr></table>
899
900 <p>This option sets the caption meta-data of an image read in after this
901 option has been given.  To modify a caption of images already in memory use
902 "<code><a href="command-line-options.html#set">-set</a> caption</code>". </p>
903
904 <p>The caption can contain special format characters listed in the <a href="escape.html">Format and
905 Print Image Properties</a>. These attributes are expanded when the caption
906 is finally assigned to the individual images. </p>
907
908 <p>If the first character of <em class="arg">string</em> is <em class="arg">@</em>, the image caption is read from a file titled by the
909 remaining characters in the string.  Comments read in from a file are literal;
910 no embedded formatting characters are recognized.</p>
911
912 <p>Caption meta-data is not visible on the image itself. To do that use the
913 <a href="command-line-options.html#annotate">-annotate</a> or <a href="command-line-options.html#draw">-draw</a> options
914 instead.</p>
915
916 <p>For example,</p>
917
918 <p class="crtsnip">
919      -caption "%m:%f %wx%h"  bird.miff
920 </p>
921
922 <p>produces an image caption of <code>MIFF:bird.miff 512x480</code> (assuming
923 that the image <code>bird.miff</code> has a width of 512 and a height of
924 480.</p>
925
926
927 <div style="margin: auto;">
928   <h4><a id="cdl"></a>-cdl <em class="arg">filename</em></h4>
929 </div>
930
931 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">color correct with a color decision list.</td><td style="text-align:right;"></td></tr></table>
932
933 <p>Here is an example color correction collection:</p>
934
935 <pre class="text">
936 &lt;?xml version="1.0" encoding="UTF-8"?&gt;
937 &lt;ColorCorrectionCollection xmlns="urn:ASC:CDL:v1.2"&gt;
938   &lt;ColorCorrection id="cc06668"&gt;
939     &lt;SOPNode&gt;
940       &lt;Slope&gt; 0.9 1.2 0.5 &lt;/Slope&gt;
941       &lt;Offset&gt; 0.4 -0.5 0.6 &lt;/Offset&gt;
942       &lt;Power&gt; 1.0 0.8 1.5 &lt;/Power&gt;
943     &lt;/SOPNode&gt;
944     &lt;SATNode&gt;
945       &lt;Saturation&gt; 0.85 &lt;/Saturation&gt;
946     &lt;/SATNode&gt;
947   &lt;/ColorCorrection&gt;
948 &lt;/ColorCorrectionCollection&gt;
949 </pre>
950
951 <div style="margin: auto;">
952   <h4><a id="channel"></a>-channel <em class="arg">type</em></h4>
953 </div>
954
955 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Specify those image color channels to which subsequent operators are limited.</td><td style="text-align:right;"></td></tr></table>
956
957 <p>Choose from: <code>Red</code>, <code>Green</code>, <code>Blue</code>,
958 <code>Alpha</code>, <code>Cyan</code>, <code>Magenta</code>, <code>Yellow</code>,
959 <code>Black</code>, <code>Opacity</code>, <code>Index</code>, <code>RGB</code>,
960 <code>RGBA</code>, <code>CMYK</code>, or <code>CMYKA</code>.</p>
961
962 <p>The channels above can also be specified as a comma-separated list or can be
963 abbreviated as a concatenation of the letters '<code>R</code>', '<code>G</code>',
964 '<code>B</code>', '<code>A</code>', '<code>O</code>', '<code>C</code>',
965 '<code>M</code>', '<code>Y</code>', '<code>K</code>'.
966
967 For example, to only select the <code>Red</code> and <code>Blue</code> channels
968 you can either use </p>
969 <p class="crtsnip">
970     -channel Red,Blue
971 </p>
972 <p>or you can use the short hand form</p>
973 <p class="crtsnip">
974     -channel RB
975 </p>
976
977 <p>All the channels that are present in an image can be specified using the
978 special channel type <code>All</code>. Not all operators are 'channel capable',
979 but generally any operators that are generally 'grey-scale' image operators,
980 will understand this setting.  See individual operator documentation. </p>
981
982 <br></br>
983
984 <p>On top of the normal channel selection an extra flag can be specified,
985 '<code>Sync</code>'.  This is turned on by default and if set means that
986 operators that understand this flag should perform: cross-channel
987 synchronization of the channels. If not specified, then most grey-scale
988 operators will apply their image processing operations to each individual
989 channel (as specified by the rest of the <a href="command-line-options.html#channel">-channel</a>
990 setting) completely independently from each other. </p>
991
992 <p>For example for operators such as <a href="command-line-options.html#auto-level">-auto-level</a> and
993 <a href="command-line-options.html#auto-gamma">-auto-gamma</a> the color channels are modified
994 together in exactly the same way so that colors will remain in-sync. Without
995 it being set, then each channel is modified separately and
996 independently, which may produce color distortion. </p>
997
998 <p>The <a href="command-line-options.html#morphology">-morphology</a> '<code>Convolve</code>' method
999 and the <a href="command-line-options.html#compose">-compose</a> mathematical methods, also understands
1000 the '<code>Sync</code>' flag to modify the behaviour of pixel colors according
1001 to the alpha channel (if present). That is to say it will modify the image
1002 processing with the understanding that fully-transparent colors should not
1003 contribute to the final result. </p>
1004
1005 <p>Basically, by default, operators work with color channels in synchronous, and
1006 treats transparency as special, unless the <a href="command-line-options.html#channel">-channel</a>
1007 setting is modified so as to remove the effect of the '<code>Sync</code>' flag.
1008 How each operator does this depends on that operators current implementation.
1009 Not all operators understands this flag at this time, but that is changing.
1010 </p>
1011
1012 <p>To print a complete list of channel types, use <a href="command-line-options.html#list">-list
1013 channel</a>.</p>
1014
1015 <br></br>
1016
1017 <p>By default, ImageMagick sets <a href="command-line-options.html#channel">-channel</a> to the value
1018 '<code>RGBK,sync</code>', which specifies that operators act on all color
1019 channels except the transparency channel, and that all the color channels are
1020 to be modified in exactly the same way, with an understanding of transparency
1021 (depending on the operation being applied).  The 'plus' form <a href="command-line-options.html#channel">+channel</a> will reset the value back to this default. </p>
1022
1023 <p>Options that are affected by the <a href="command-line-options.html#channel">-channel</a> setting
1024 include the following.
1025
1026 <a href="command-line-options.html#auto-gamma">-auto-gamma</a>,
1027 <a href="command-line-options.html#auto-level">-auto-level</a>,
1028 <a href="command-line-options.html#black-threshold">-black-threshold</a>,
1029 <a href="command-line-options.html#blur">-blur</a>,
1030 <a href="command-line-options.html#clamp">-clamp</a>,
1031 <a href="command-line-options.html#clut">-clut</a>,
1032 <a href="command-line-options.html#combine">-combine</a>,
1033 <a href="command-line-options.html#composite">-composite</a> (Mathematical compose methods only),
1034 <a href="command-line-options.html#convolve">-convolve</a>,
1035 <a href="command-line-options.html#contrast-stretch">-contrast-stretch</a>,
1036 <a href="command-line-options.html#evaluate">-evaluate</a>,
1037 <a href="command-line-options.html#function">-function</a>,
1038 <a href="command-line-options.html#fx">-fx</a>,
1039 <a href="command-line-options.html#gaussian-blur">-gaussian-blur</a>,
1040 <a href="command-line-options.html#hald-clut">-hald-clut</a>,
1041 <a href="command-line-options.html#motion-blur">-motion-blur</a>,
1042 <a href="command-line-options.html#morphology">-morphology</a>,
1043 <a href="command-line-options.html#negate">-negate</a>,
1044 <a href="command-line-options.html#normalize">-normalize</a>,
1045 <a href="command-line-options.html#ordered-dither">-ordered-dither</a>,
1046 <a href="command-line-options.html#radial-blur">-radial-blur</a>,
1047 <a href="command-line-options.html#random-threshold">-random-threshold</a>,
1048 <a href="command-line-options.html#separate">-separate</a>,
1049 <a href="command-line-options.html#threshold">-threshold</a>, and
1050 <a href="command-line-options.html#white-threshold">-white-threshold</a>.
1051 </p>
1052
1053 <p>Warning, some operators behave differently when the <a href="command-line-options.html#channel">+channel</a> default setting is in effect, verses ANY user defined <a href="command-line-options.html#channel">-channel</a> setting (including the equivalent of the
1054 default). These operators have yet to be made to understand the newer 'Sync'
1055 flag. </p>
1056
1057 <p>For example <a href="command-line-options.html#threshold">-threshold</a> will by default gray-scale
1058 the image before thresholding, if no <a href="command-line-options.html#channel">-channel</a> setting
1059 has been defined. This is not 'Sync flag controlled, yet. </p>
1060
1061 <p>Also some operators such as <a href="command-line-options.html#blur">-blur</a>, <a href="command-line-options.html#gaussian-blur">-gaussian-blur</a>, will modify their handling of the
1062 color channels if the '<code>alpha</code>' channel is also enabled by <a href="command-line-options.html#channel">-channel</a>.  Generally this done to ensure that
1063 fully-transparent colors are treated as being fully-transparent, and thus any
1064 underlying 'hidden' color has no effect on the final results.  Typically
1065 resulting in 'halo' effects. The newer <a href="command-line-options.html#morphology">-morphology</a>
1066 convolution equivalents however does have a understanding of the 'Sync' flag
1067 and will thus handle transparency correctly by default. </p>
1068
1069 <p>As a alpha channel is optional within images, some operators will read the
1070 color channels of an image as a greyscale alpha mask, when the image has no
1071 alpha channel present, and the <a href="command-line-options.html#channel">-channel</a> setting tells
1072 the operator to apply the operation using alpha channels. The <a href="command-line-options.html#clut">-clut</a> operator is a good example of this. </p>
1073
1074
1075
1076 <div style="margin: auto;">
1077   <h4><a id="charcoal"></a>-charcoal <em class="arg">factor</em></h4>
1078 </div>
1079
1080 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Simulate a charcoal drawing.</td><td style="text-align:right;"></td></tr></table>
1081
1082 <div style="margin: auto;">
1083   <h4><a id="chop"></a>-chop <em class="arg">geometry</em></h4>
1084 </div>
1085
1086 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Remove pixels from the interior of an image.</td><td style="text-align:right;"></td></tr></table>
1087
1088 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument. The <em class="arg">width</em>
1089 and <em class="arg">height</em> given in the of the <em class="arg">size</em>
1090 portion of the <em class="arg">geometry</em> argument give the number of
1091 columns and rows to remove. The <em class="arg">offset</em> portion of
1092 the <em class="arg">geometry</em> argument is influenced by
1093 a <a href="command-line-options.html#gravity">-gravity</a> setting, if present.</p>
1094
1095 <p>The <a href="command-line-options.html#chop">-chop</a> option removes entire rows and columns,
1096 and moves the remaining corner blocks leftward and upward to close the gaps.</p>
1097
1098 <p>While it can remove internal rows and columns of pixels, it is more
1099 typically used with as <a href="command-line-options.html#gravity">-gravity</a> setting and zero
1100 offsets so as to remove a single edge from an image.  Compare this to <a href="command-line-options.html#shave">-shave</a> which removes equal numbers of pixels from oppisite
1101 sides of the image.  </p>
1102
1103 <p>Using <a href="command-line-options.html#chop">-chop</a> effectively undoes the results of a <a href="command-line-options.html#splice">-splice</a> that was given the same <em class="arg">geometry</em> and <a href="command-line-options.html#gravity">-gravity</a> settings. </p>
1104
1105 <div style="margin: auto;">
1106   <h4><a id="clamp"></a>-clamp</h4>
1107 </div>
1108
1109 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">set each pixel whose value is below zero to zero and any the pixel whose value is above the quantum range to the quantum range (e.g. 65535) otherwise the pixel value remains unchanged.</td><td style="text-align:right;"></td></tr></table>
1110
1111 <div style="margin: auto;">
1112   <h4><a id="clip"></a>-clip</h4>
1113 </div>
1114
1115 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Apply the clipping path if one is present.</td><td style="text-align:right;"></td></tr></table>
1116
1117 <p>If a clipping path is present, it is applied to subsequent operations.</p>
1118
1119 <p>For example, in the command</p>
1120
1121 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert cockatoo.tif -clip -negate negated.tif</span></p>
1122 <p>only the pixels within the clipping path are negated.</p>
1123
1124 <p>The <a href="command-line-options.html#clip">-clip</a> feature requires SVG support. If the SVG
1125 delegate library is not present, the option is ignored.</p>
1126
1127 <p>Use <a href="command-line-options.html#clip">+clip</a> to disable clipping for subsequent operations.</p>
1128
1129 <div style="margin: auto;">
1130   <h4><a id="clip-mask"></a>-clip-mask</h4>
1131 </div>
1132
1133 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Clip the image as defined by this mask.</td><td style="text-align:right;"></td></tr></table>
1134
1135 <p>Use the alpha channel of the current image as a mask.  Any areas that is
1136 white is not modified by any of the 'image processing operators' that follow,
1137 until the mask is removed. Pixels in the black areas of the clip mask are
1138 modified per the requirements of the operator. </p>
1139
1140 <p>In some ways this is similar to (though not the same) as defining
1141 a rectangular <a href="command-line-options.html#region">-region</a>, or using the negative of the
1142 mask (third) image in a three image <a href="command-line-options.html#composite">-composite</a>,
1143 operation. </p>
1144
1145 <p>Use <a href="command-line-options.html#clip-mask">+clip-mask</a> to disable clipping for subsequent operations.</p>
1146
1147 <div style="margin: auto;">
1148   <h4><a id="clip-path"></a>-clip-path <em class="arg">id</em></h4>
1149 </div>
1150
1151 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Clip along a named path from the 8BIM profile.</td><td style="text-align:right;"></td></tr></table>
1152
1153 <p>This is identical to <a href="command-line-options.html#clip">-clip</a> except choose a specific clip path in the event the image has more than one path available. </p>
1154
1155 <p>Use <a href="command-line-options.html#clip-path">+clip-path</a> to disable clipping for subsequent operations.</p>
1156
1157 <div style="margin: auto;">
1158   <h4><a id="clone"></a>-clone <em class="arg">index(s)</em></h4>
1159 </div>
1160
1161 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">make a clone of an image (or images).</td><td style="text-align:right;"></td></tr></table>
1162
1163 <p>Inside parenthesis (where the operator is normally used) it will make a
1164 clone of the images from the last 'pushed' image sequence, and adds them to
1165 the end of the current image sequence. Outside parenthesis
1166 (not recommended) it clones the images from the current image sequence. </p>
1167
1168 <p>Specify the image by its index in the sequence.  The first image is index
1169 0.  Negative indexes are relative to the end of the sequence; for
1170 example, <code>−1</code>
1171 represents the last image of the sequence.  Specify a range of images with a
1172 dash (e.g. <code>0−4</code>).  Separate multiple indexes with commas but no
1173 spaces (e.g. <code>0,2,5</code>).  A value of '<code>0−−1</code> will
1174 effectively clone all the images. </p>
1175
1176 <p>The <a href="command-line-options.html#clone">+clone</a> will simply make a copy of the last image
1177 in the image sequence, and is thus equivalent to using a argument of
1178 '<code>−1</code>'. </p>
1179
1180 <div style="margin: auto;">
1181   <h4><a id="clut"></a>-clut</h4>
1182 </div>
1183
1184 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Replace the channel values in the first image using each
1185 corresponding channel in the second image as a <b>c</b>olor
1186 <b>l</b>ook<b>u</b>p <b>t</b>able.</td><td style="text-align:right;"></td></tr></table>
1187
1188 <p>The second (LUT) image is ordinarily a gradient image containing the
1189 histogram mapping of how each channel should be modified. Typically it is a
1190 either a single row or column image of replacement color values. If larger
1191 than a single row or column, values are taken from a diagonal line from
1192 top-left to bottom-right corners.</p>
1193
1194 <p>The lookup is further controlled by the <a href="command-line-options.html#interpolate">-interpolate</a> setting, which is especially handy for an
1195 LUT which is not the full length needed by the ImageMagick installed Quality
1196 (Q) level. Good settings for this are the '<code>bilinear</code>' and
1197 '<code>bicubic</code>' interpolation settings, which give smooth color
1198 gradients, and the '<code>integer</code>' setting for a direct, unsmoothed
1199 lookup of color values. </p>
1200
1201 <p>This operator is especially suited to replacing a grayscale image with a
1202 specific color gradient from the CLUT image. </p>
1203
1204 <p>Only the channel values defined by the <a href="command-line-options.html#channel">-channel</a>
1205 setting will have their values replaced. In particular, since the default <a href="command-line-options.html#channel">-channel</a> setting is <code>RGB</code>, this means that
1206 transparency (alpha/matte channel) is not affected, unless the <a href="command-line-options.html#channel">-channel</a> setting is modified. When the alpha channel is
1207 set, it is treated by the <a href="command-line-options.html#clut">-clut</a> operator in the same way
1208 as the other channels, implying that alpha/matte values are replaced using the
1209 alpha/matte values of the original image. </p>
1210
1211 <p>If either the image being modified, or the lookup image, contains no
1212 transparency (i.e. <a href="command-line-options.html#alpha">-alpha</a> is turned 'off') but the <a href="command-line-options.html#channel">-channel</a> setting includes alpha replacement, then it is
1213 assumed that image represents a gray-scale gradient which is used for the
1214 replacement alpha values.  That is you can use a gray-scale CLUT image to
1215 adjust a existing images alpha channel, or you can color a gray-scale image
1216 using colors form CLUT containing the desired colors, including transparency.
1217 </p>
1218
1219 <p>See also <a href="command-line-options.html#hald-clut">-hald-clut</a> which replaces colors
1220 according to the lookup of the full color RGB value from a 2D representation
1221 of a 3D color cube. </p>
1222
1223
1224 <div style="margin: auto;">
1225   <h4><a id="coalesce"></a>-coalesce</h4>
1226 </div>
1227
1228 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Fully define the look of each frame of an GIF animation sequence, to form a 'film strip' animation.</td><td style="text-align:right;"></td></tr></table>
1229
1230 <p>Overlay each image in an image sequence according to
1231 its <a href="command-line-options.html#dispose">-dispose</a> meta-data, to reproduce the look of
1232 an animation at each point in the animation sequence. All images should be
1233 the same size, and are assigned appropriate GIF disposal settings for the
1234 animation to continue working as expected as a GIF animation.  Such frames
1235 are more easily viewed and processed than the highly optimized GIF overlay
1236 images.  </p>
1237
1238 <p>The animation can be re-optimized after processing using
1239 the <a href="command-line-options.html#layers">-layers</a> method '<code>optimize</code>', although
1240 there is no guarantee that the restored GIF animation optimization is
1241 better than the original. </p>
1242
1243
1244 <div style="margin: auto;">
1245   <h4><a id="colorize"></a>-colorize <em class="arg">value</em></h4>
1246 </div>
1247
1248 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Colorize the image by an amount specified by <em class="arg">value</em> using the color specified by the most recent <a href="command-line-options.html#fill">-fill</a> setting.</td><td style="text-align:right;"></td></tr></table>
1249
1250 <p>Specify the amount of colorization as a percentage. Separate colorization
1251 values can be applied to the red, green, and blue channels of the image with
1252 a comma-delimited list of colorization
1253 values (e.g., <code>-colorize 0,0,50</code>).</p>
1254
1255 <div style="margin: auto;">
1256   <h4><a id="colormap"></a>-colormap <em class="arg">type</em></h4>
1257 </div>
1258
1259 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Define the colormap type.</td><td style="text-align:right;">[<a href="animate.html">animate</a>, <a href="display.html">display</a>]</td></tr></table>
1260
1261 <p>The <em class="arg">type</em> can be  <code>shared</code> or <code>private</code>.</p>
1262
1263 <p>This option only applies when the default X server visual
1264 is <code>PseudoColor</code> or <code>GrayScale</code>. Refer
1265 to <a href="command-line-options.html#visual">-visual</a> for more details. By default,
1266 a shared colormap is allocated. The image shares colors with
1267 other X clients. Some image colors could be approximated,
1268 therefore your image may look very different than intended.
1269 If <code>private</code> is chosen, the image colors appear exactly
1270 as they are defined. However, other clients may go <em>technicolor</em>
1271 when the image colormap is installed.</p>
1272
1273 <div style="margin: auto;">
1274   <h4><a id="colors"></a>-colors <em class="arg">value</em></h4>
1275 </div>
1276
1277 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set the preferred number of colors in the image.</td><td style="text-align:right;"></td></tr></table>
1278
1279 <p>The actual number of colors in the image may be less than your request,
1280 but never more. Note that this a color reduction option. Images with fewer
1281 unique colors than specified by <em class="arg">value</em> will have any
1282 duplicate or unused colors removed.  The ordering of an existing color
1283 palette may be altered. When converting an image from color to grayscale,
1284 it is more efficient to convert the image to the gray colorspace before
1285 reducing the number of colors. Refer to
1286 the <a href="quantize.html">
1287 color reduction algorithm</a> for more details.</p>
1288
1289 <div style="margin: auto;">
1290   <h4><a id="color-matrix"></a>-color-matrix <em class="arg">matrix</em></h4>
1291 </div>
1292
1293 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">apply color correction to the image.</td><td style="text-align:right;"></td></tr></table>
1294
1295 <p>This option permits saturation changes, hue rotation, luminance to alpha,
1296 and various other effects.  Although variable-sized transformation matrices
1297 can be used, typically one uses a 5x5 matrix for an RGBA image and a 6x6
1298 for CMYKA (or RGBA with offsets).  The matrix is similar to those used by
1299 Adobe Flash except offsets are in column 6 rather than 5 (in support of
1300 CMYKA images) and offsets are normalized (divide Flash offset by 255).</p>
1301
1302 <p>As an example, to add contrast to an image with offsets, try this command:</p>
1303
1304 <pre class="text">
1305    convert kittens.jpg -color-matrix \
1306      " 1.5 0.0 0.0 0.0, 0.0, -0.157 \
1307        0.0 1.5 0.0 0.0, 0.0, -0.157 \
1308        0.0 0.0 1.5 0.0, 0.0, -0.157 \
1309        0.0 0.0 0.0 1.0, 0.0,  0.0 \
1310        0.0 0.0 0.0 0.0, 1.0,  0.0 \
1311        0.0 0.0 0.0 0.0, 0.0,  1.0" kittens.png
1312 </pre>
1313 <div style="margin: auto;">
1314   <h4><a id="colorspace"></a>-colorspace <em class="arg">value</em></h4>
1315 </div>
1316
1317 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set the image colorspace.</td><td style="text-align:right;"></td></tr></table>
1318
1319 <p>Choices are:</p>
1320
1321 <pre class="text">
1322    CMY          CMYK         Gray         HCL
1323    HCLp         HSB          HSI          HSL
1324    HSV          HWB          Lab          LCHab
1325    LCHuv        LMS          Log          Luv
1326    OHTA         Rec601YCbCr  Rec709YCbCr  RGB
1327    scRGB        sRGB         Transparent  XYZ
1328    YCbCr        YCC          YDbDr        YIQ
1329    YPbPr        YUV
1330 </pre>
1331
1332 <p>To print a complete list of colorspaces, use <a href="command-line-options.html#list">-list colorspace</a>.</p>
1333
1334 <p>For a more accurate color conversion to or from the linear RGB, CMYK, or grayscale colorspaces, use the <a href="command-line-options.html#profile">-profile</a> option.  Note, ImageMagick assumes the sRGB colorspace if the image format does not indicate otherwise.  For colorspace conversion, the gamma function is first removed to produce linear RGB.</p>
1335
1336 <table class="doc">
1337         <caption>Conversion of RGB to Other Color Spaces</caption>
1338         <tr><th align="left" valign="middle">CMY</th></tr>
1339         <tr><td align="left" valign="middle">C=<em class="QR">QuantumRange</em>−R</td></tr>
1340         <tr><td align="left" valign="middle">M=<em class="QR">QuantumRange</em>−G</td></tr>
1341         <tr><td align="left" valign="middle">Y=<em class="QR">QuantumRange</em>−B</td></tr>
1342         <tr><th align="left" valign="middle">CMYK — starts with CMY from above</th></tr>
1343         <tr><td align="left" valign="middle">K=min(C,Y,M)</td></tr>
1344         <tr><td align="left" valign="middle">C=<em class="QR">QuantumRange</em>*(C−K)/(<em class="QR">QuantumRange</em>−K)</td></tr>
1345         <tr><td align="left" valign="middle">M=<em class="QR">QuantumRange</em>*(M−K)/(<em class="QR">QuantumRange</em>−K)</td></tr>
1346         <tr><td align="left" valign="middle">Y=<em class="QR">QuantumRange</em>*(Y−K)/(<em class="QR">QuantumRange</em>−K)</td></tr>
1347
1348         <tr><th align="left" valign="middle">Gray</th></tr>
1349         <tr><td align="left" valign="middle">Gray = 0.298839*R+0.586811*G+0.114350*B</td></tr>
1350
1351         <tr><th align="left" valign="middle">HSB — Hue, Saturation, Brightness; like a cone peak downward</th></tr>
1352         <tr><td align="left" valign="middle">H=angle around perimeter (0 to 360 deg); H=0 is red; increasing angles toward green</td></tr>
1353         <tr><td align="left" valign="middle">S=distance from axis outward</td></tr>
1354         <tr><td align="left" valign="middle">B=distance along axis from bottom upward; B=max(R,G,B); <em>intensity-like</em></td></tr>
1355
1356         <tr><th align="left" valign="middle">HSL — Hue, Saturation, Lightness; like a double cone end-to-end with peaks at very top and bottom</th></tr>
1357         <tr><td align="left" valign="middle">H=angle around perimeter (0 to 360 deg); H=0 is red; increasing angles toward green</td></tr>
1358         <tr><td align="left" valign="middle">S=distance from axis outward</td></tr>
1359         <tr><td align="left" valign="middle">L=distance along axis from bottom upward; L=0.5*max(R,G,B) + 0.5*min(R,G,B); <em>intensity-like</em></td></tr>
1360
1361         <tr><th align="left" valign="middle">HWB — Hue, Whiteness, Blackness</th></tr>
1362         <tr><td align="left" valign="middle">Hue (complicated equation)</td></tr>
1363         <tr><td align="left" valign="middle">Whiteness (complicated equation)</td></tr>
1364         <tr><td align="left" valign="middle">Blackness (complicated equation)</td></tr>
1365
1366         <tr><th align="left" valign="middle">LAB</th></tr>
1367         <tr><td align="left" valign="middle">L (complicated equation relating X,Y,Z)</td></tr>
1368         <tr><td align="left" valign="middle">A (complicated equation relating X,Y,Z)</td></tr>
1369         <tr><td align="left" valign="middle">B (complicated equation relating X,Y,Z)</td></tr>
1370
1371         <tr><th align="left" valign="middle">LOG</th></tr>
1372         <tr><td align="left" valign="middle">I1 (complicated equation involving logarithm of R)</td></tr>
1373         <tr><td align="left" valign="middle">I2 (complicated equation involving logarithm of G)</td></tr>
1374         <tr><td align="left" valign="middle">I3 (complicated equation involving logarithm of B)</td></tr>
1375
1376         <tr><th align="left" valign="middle">OHTA — approximates principal components transformation</th></tr>
1377         <tr><td align="left" valign="middle">I1=0.33333*R+0.33334*G+0.33333*B; <em>intensity-like</em></td></tr>
1378         <tr><td align="left" valign="middle">I2=(0.50000*R+0.00000*G−0.50000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1379         <tr><td align="left" valign="middle">I3=(−0.25000*R+0.50000*G−0.25000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1380
1381         <tr><th align="left" valign="middle">Rec601Luma</th></tr>
1382         <tr><td align="left" valign="middle">Gray = 0.298839*R+0.586811*G+0.114350*B</td></tr>
1383
1384         <tr><th align="left" valign="middle">Rec601YCbCr</th></tr>
1385         <tr><td align="left" valign="middle">Y=0.2988390*R+0.5868110*G+0.1143500*B; <em>intensity-like</em></td></tr>
1386         <tr><td align="left" valign="middle">Cb=(−0.168736*R-0.331264*G+0.500000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1387         <tr><td align="left" valign="middle">Cr=(0.500000*R−0.418688*G−0.081312*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1388
1389         <tr><th align="left" valign="middle">Rec709Luma</th></tr>
1390         <tr><td align="left" valign="middle">Gray=0.212656*R+0.715158*G+0.072186*B</td></tr>
1391
1392         <tr><th align="left" valign="middle">Rec709YCbCr</th></tr>
1393         <tr><td align="left" valign="middle">Y=0.212656*R+0.715158*G+0.072186*B; <em>intensity-like</em></td></tr>
1394         <tr><td align="left" valign="middle">Cb=(−0.114572*R−0.385428*G+0.500000*B)+(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1395         <tr><td align="left" valign="middle">Cr=(0.500000*R−0.454153*G−0.045847*B)+(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1396
1397         <tr><th align="left" valign="middle">sRGB</th></tr>
1398         <tr><td align="left" valign="middle">if R ≤ .0.0031308 then Rs=R/12.92 else Rs=1.055 R ^ (1.0 / 2.4) ? 0.055</td></tr>
1399         <tr><td align="left" valign="middle">if G ≤ .0.0031308 then Gs=B/12.92 else Gs=1.055 R ^ (1.0 / 2.4) ? 0.055</td></tr>
1400         <tr><td align="left" valign="middle">if B ≤ .0.0031308 then Bs=B/12.92 else Bs=1.055 R ^ (1.0 / 2.4) ? 0.055</td></tr>
1401
1402         <tr><th align="left" valign="middle">XYZ</th></tr>
1403         <tr><td align="left" valign="middle">X=0.4124240*R+0.3575790*G+0.1804640*B</td></tr>
1404         <tr><td align="left" valign="middle">Y=0.212656*R+0.715158*G+0.0721856*B</td></tr>
1405         <tr><td align="left" valign="middle">Z=0.0193324*R+0.1191930*G+0.9504440*B</td></tr>
1406
1407         <tr><th align="left" valign="middle">YCC</th></tr>
1408         <tr><td align="left" valign="middle">Y=(0.298839*R+0.586811*G+0.114350*B) (with complicated scaling); <em>intensity-like</em></td></tr>
1409         <tr><td align="left" valign="middle">C1=(−0.298839*R−0.586811*G+0.88600*B) (with complicated scaling)</td></tr>
1410         <tr><td align="left" valign="middle">C2=(0.70100*R−0.586811*G−0.114350*B) (with complicated scaling)</td></tr>
1411
1412         <tr><th align="left" valign="middle">YCbCr</th></tr>
1413         <tr><td align="left" valign="middle">Y=0.2988390*R+0.5868110*G+0.1143500*B; <em>intensity-like</em></td></tr>
1414         <tr><td align="left" valign="middle">Cb=(−0.168736*R−0.331264*G+0.500000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1415         <tr><td align="left" valign="middle">Cr=(0.500000*R−0.418688*G−0.081312*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1416
1417         <tr><th align="left" valign="middle">YIQ</th></tr>
1418         <tr><td align="left" valign="middle">Y=0.298839*R+0.586811*G+0.114350*B; <em>intensity-like</em></td></tr>
1419         <tr><td align="left" valign="middle">I=(0.59600*R−0.27400*G−0.32200*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1420         <tr><td align="left" valign="middle">Q=(0.21100*R−0.52300*G+0.31200*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1421
1422         <tr><th align="left" valign="middle">YPbPr</th></tr>
1423         <tr><td align="left" valign="middle">Y=0.2988390*R+0.5868110*G+0.1143500*B; <em>intensity-like</em></td></tr>
1424         <tr><td align="left" valign="middle">Pb=(−0.168736*R−0.331264*G+0.500000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1425         <tr><td align="left" valign="middle">Pr=(0.500000*R−0.418688*G−0.081312*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1426
1427         <tr><th align="left" valign="middle">YUV</th></tr>
1428         <tr><td align="left" valign="middle">Y=0.298839*R+0.586811*G+0.114350*B; <em>intensity-like</em></td></tr>
1429         <tr><td align="left" valign="middle">U=(−0.14740*R−0.28950*G+0.43690*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1430         <tr><td align="left" valign="middle">V=(0.61500*R−0.51500*G−0.10000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1431 </table>
1432
1433 <p>Note the scRGB colorspace requires HDRI support otherwise it behaves just like linear RGB.</p>
1434
1435 <div style="margin: auto;">
1436   <h4><a id="combine"></a>-combine</h4>
1437 </div>
1438
1439 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Combine one or more images into a single image.</td><td style="text-align:right;"></td></tr></table>
1440
1441 <p>The channels (previously set by <a href="command-line-options.html#channel">-channel</a>) of the
1442 combined image are taken from the grayscale values of each image in the
1443 sequence, in order. For the default -channel setting of <code>RGB</code>, this
1444 means the first image  is assigned to the <code>Red</code> channel, the second
1445 to the <code>Green</code> channel, the third to the <code>Blue</code>.</p>
1446
1447 <p>This option can be thought of as the inverse to <a href="command-line-options.html#separate">-separate</a>, so long as the channel settings are the same.
1448 Thus, in the following example, the final image should be a copy of the
1449 original.  </p>
1450
1451 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert original.png -channel RGB -separate sepimage.png</span><span class="crtout"></span><span class="crtprompt"> $ </span><span class="crtin">convert sepimage-0.png sepimage-1.png sepimage-2.png -channel RGB \ <br></br> -combine imagecopy.png</span></p>
1452 <div style="margin: auto;">
1453   <h4><a id="comment"></a>-comment <em class="arg">string</em></h4>
1454 </div>
1455
1456 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Embed a comment in an image.</td><td style="text-align:right;"></td></tr></table>
1457
1458 <p>This option sets the comment meta-data of an image read in after this
1459 option has been given.  To modify a comment of images already in memory use
1460 "<code><a href="command-line-options.html#set">-set</a> comment</code>". </p>
1461
1462 <p>The comment can contain special format characters listed in the <a href="escape.html">Format and
1463 Print Image Properties</a>. These attributes are expanded when the comment
1464 is finally assigned to the individual images. </p>
1465
1466 <p>If the first character of <em class="arg">string</em> is <em class="arg">@</em>, the image comment is read from a file titled by the
1467 remaining characters in the string.  Comments read in from a file are literal;
1468 no embedded formatting characters are recognized.</p>
1469
1470 <p>Comment meta-data are not visible on the image itself. To do that use the
1471 <a href="command-line-options.html#annotate">-annotate</a> or <a href="command-line-options.html#draw">-draw</a> options
1472 instead.</p>
1473
1474 <p>For example,</p>
1475
1476 <p class="crtsnip">
1477      -comment "%m:%f %wx%h"  bird.miff
1478 </p>
1479
1480 <p>produces an image comment of <code>MIFF:bird.miff 512x480</code> (assuming
1481 that the image <code>bird.miff</code> has a width of 512 and a height of
1482 480.</p>
1483
1484 <div style="margin: auto;">
1485   <h4><a id="compose"></a>-compose <em class="arg">operator</em></h4>
1486 </div>
1487
1488 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set the type of image composition.</td><td style="text-align:right;"></td></tr></table>
1489
1490 <p>See <a href="compose.html">Alpha Compositing</a> for
1491 a detailed discussion of alpha compositing.</p>
1492
1493 <p>This setting effects image processing operators that merge two (or more)
1494 images together in some way.  This includes the operators,
1495 <a href="command-line-options.html#composite">-composite</a>,
1496 <a href="command-line-options.html#layers">-layers</a> composite,
1497 <a href="command-line-options.html#flatten">-flatten</a>,
1498 <a href="command-line-options.html#mosaic">-mosaic</a>,
1499 <a href="command-line-options.html#layers">-layers</a> merge,
1500 <a href="command-line-options.html#border">-border</a>,
1501 <a href="command-line-options.html#frame">-frame</a>,
1502 and <a href="command-line-options.html#extent">-extent</a>. </p>
1503
1504 <p>It is also one of the primary options for the "<code>composite</code>"
1505 command.  </p>
1506
1507
1508 <div style="margin: auto;">
1509   <h4><a id="composite"></a>-composite</h4>
1510 </div>
1511
1512 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Perform alpha composition on two images and an optional mask</td><td style="text-align:right;"></td></tr></table>
1513
1514 <p>Take the first image 'destination' and overlay the second 'source' image
1515 according to the current <a href="command-line-options.html#compose">-compose</a> setting. The location
1516 of the 'source' or 'overlay' image is controlled according to <a href="command-line-options.html#geometry">-geometry</a>, and <a href="command-line-options.html#geometry">-geometry</a>
1517 settings. </p>
1518
1519 <p>If a third image is given this is treated as a gray-scale 'mask' image
1520 relative to the first 'destination' image. This mask will limit what parts of
1521 the destination can be modified by the image composition.  However for the
1522 '<code>displace</code>' compose method, the mask is used to provide a separate
1523 Y-displacement image instead. </p>
1524
1525 <p>If a <a href="command-line-options.html#compose">-compose</a> method requires extra numerical
1526 arguments or flags these can be provided by setting the  <a href="command-line-options.html#set">-set</a> '<code class="arg">option:compose:args</code>'
1527 appropriately for the compose method. </p>
1528
1529 <p>Some <a href="command-line-options.html#compose">-compose</a> methods can modify the 'destination'
1530 image outside the overlay area. You can disable this by setting the special <a href="command-line-options.html#set">-set</a> '<code class="arg">option:compose:outside-overlay</code>'
1531 to '<code>false</code>'.  </p>
1532
1533
1534 <div style="margin: auto;">
1535   <h4><a id="compress"></a>-compress <em class="arg">type</em></h4>
1536 </div>
1537
1538 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Use pixel compression specified by <em class="arg">type</em> when writing the image.</td><td style="text-align:right;"></td></tr></table>
1539
1540 <p>Choices are: <code class="arg">None</code>, <code class="arg">BZip</code>, <code class="arg">Fax</code>, <code class="arg">Group4</code>, <code class="arg">JPEG</code>,  <code class="arg">JPEG2000</code>, <code class="arg">Lossless</code>, <code class="arg">LZW</code>, <code class="arg">RLE</code> or <code class="arg">Zip</code>.</p>
1541
1542 <p>To print a complete list of compression types, use <a href="command-line-options.html#list">-list
1543 compress</a>.</p>
1544
1545 <p>Specify <a href="command-line-options.html#compress">+compress</a> to store the binary image in an
1546 uncompressed format. The default is the compression type of the specified
1547 image file.</p>
1548
1549 <p>If <code>LZW</code> compression is specified but LZW compression has not been
1550 enabled, the image data is written in an uncompressed LZW format that can be
1551 read by LZW decoders. This may result in larger-than-expected GIF files.</p>
1552
1553 <p><code>Lossless</code> refers to lossless JPEG, which is only available if the
1554 JPEG library has been patched to support it. Use of lossless JPEG is generally
1555 not recommended.</p>
1556
1557 <p>
1558 When writing an ICO file, you may request that the images be encoded in
1559 PNG format, by specifying <code>Zip</code> compression.</p>
1560
1561 <p>
1562 When writing a JNG file, specify <code>Zip</code> compression to request that
1563 the alpha channel be encoded in PNG "IDAT" format, or <code>JPEG</code>
1564 to request that it be encoded in JPG "JDAA" format.</p>
1565
1566 <p>Use the <a href="command-line-options.html#quality">-quality</a> option to set the compression level
1567 to be used by JPEG, PNG, MIFF, and MPEG encoders.
1568 Use the <a href="command-line-options.html#sampling-factor">-sampling-factor</a> option to set the
1569 sampling factor to be used by JPEG, MPEG, and YUV encoders for down-sampling
1570 the chroma channels.</p>
1571
1572 <div style="margin: auto;">
1573   <h4><a id="contrast"></a>-contrast</h4>
1574 </div>
1575
1576 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Enhance or reduce the image contrast.</td><td style="text-align:right;"></td></tr></table>
1577
1578 <p>This option enhances the intensity differences between the lighter and
1579 darker elements of the image. Use <a href="command-line-options.html#contrast">-contrast</a> to enhance
1580 the image or <a href="command-line-options.html#contrast">+contrast</a> to reduce the image
1581 contrast.</p>
1582
1583 <p>For a more pronounced effect you can repeat the option:</p>
1584
1585 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert rose: -contrast -contrast rose_c2.png</span></p>
1586 <div style="margin: auto;">
1587   <h4><a id="contrast-stretch"></a>-contrast-stretch <em class="arg">black-point</em><br></br>-contrast-stretch <em class="arg">black-point</em>{x<em class="arg">white-point</em>}{<em class="arg">%</em>}}</h4>
1588 </div>
1589
1590 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Increase the contrast in an image by <em>stretching</em> the range of intensity values.</td><td style="text-align:right;"></td></tr></table>
1591
1592 <p>While performing the stretch, black-out at most <em class="arg">black-point</em> pixels and white-out at most <em class="arg">white-point</em> pixels. Or, if percent is used, black-out at most
1593 <em class="arg">black-point %</em> pixels and white-out at most <em class="arg">white-point %</em> pixels.</p>
1594
1595 <p>Prior to ImageMagick 6.4.7-0, <a href="command-line-options.html#contrast-stretch">-contrast-stretch</a> will black-out at most <em class="arg">black-point</em> pixels and white-out at most <em class="arg">total pixels
1596 minus white-point</em> pixels. Or, if percent is used, black-out at most <em class="arg">black-point %</em> pixels and white-out at most <em class="arg">100% minus white-point %</em> pixels.</p>
1597
1598 <p>Note that <code>-contrast-stretch 0</code> will modify the image such that
1599 the image's min and max values are stretched to 0 and <em class="QR">QuantumRange</em>, respectively, without any loss of data due to burn-out or
1600 clipping at either end. This is not the same as <a href="command-line-options.html#normalize">-normalize</a>, which is equivalent to <code>-contrast-stretch 0.15x0.05%</code> (or
1601 prior to ImageMagick 6.4.7-0, <code>-contrast-stretch 2%x99%</code>).</p>
1602
1603 <p>Internally operator works by creating a histogram bin, and then uses that
1604 bin to modify the image. As such some colors may be merged together when they
1605 originally fell into the same 'bin'. </p>
1606
1607 <p>All the channels are normalized in concert by the came amount so as to
1608 preserve color integrity, when the default <a href="command-line-options.html#channel">+channel</a>
1609 setting is in use.  Specifying any other <a href="command-line-options.html#channel">-channel</a>
1610 setting will normalize the RGB channels independently.</p>
1611
1612 <p>See also  <a href="command-line-options.html#auto-level">-auto-level</a> for a 'perfect'
1613 normalization of mathematical images. </p>
1614
1615 <p>This operator is under review for re-development. </p>
1616
1617
1618 <div style="margin: auto;">
1619   <h4><a id="convolve"></a>-convolve <em class="arg">kernel</em></h4>
1620 </div>
1621
1622 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Convolve an image with a user-supplied convolution kernel.</td><td style="text-align:right;"></td></tr></table>
1623
1624 <p>The <em class="arg">kernel</em> is a matrix specified as
1625 a comma-separated list of integers (with no spaces), ordered left-to right,
1626 starting with the top row. Presently, only odd-dimensioned kernels are
1627 supported, and therefore the number of entries in the specified <em class="arg">kernel</em> must be 3<sup>2</sup>=9, 5<sup>2</sup>=25,
1628 7<sup>2</sup>=49, etc. </p>
1629
1630 <p>Note that the <a href="command-line-options.html#convolve">‑convolve</a> operator supports the <a href="command-line-options.html#bias">‑bias</a> setting. This option shifts the convolution so that
1631 positive and negative results are relative to a user-specified bias value.
1632 This is important for non-HDRI compilations of ImageMagick when dealing with
1633 convolutions that contain negative as well as positive values. This is
1634 especially the case with convolutions involving high pass filters or edge
1635 detection. Without an output bias, the negative values is clipped at zero.
1636 </p>
1637
1638 <p>When using an ImageMagick with the HDRI compile-time setting, <a href="command-line-options.html#bias">‑bias</a> is not needed, as ImageMagick is able to store/handle any
1639 negative results without clipping to the color value range (0..QuantumRange).
1640 See the discussion on HDRI implementations of ImageMagick on the page <a href="high-dynamic-range.html">High
1641 Dynamic-Range Images</a>. For more about HDRI go the ImageMagick <a href="http://www.imagemagick.org/Usage/basics/#hdri">Usage</a> pages or this
1642 <a href="http://en.wikipedia.org/wiki/High_dynamic_range_imaging">Wikipedia</a>
1643 entry.  </p>
1644
1645
1646 <div style="margin: auto;">
1647   <h4><a id="crop"></a>-crop <em class="arg">geometry</em>{<em class="arg">@</em>}{<em class="arg">!</em>}</h4>
1648 </div>
1649
1650 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Cut out one or more rectangular regions of the image.</td><td style="text-align:right;"></td></tr></table>
1651
1652 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
1653
1654 <p>The <em class="arg">width</em> and <em class="arg">height</em> of the <em class="arg">geometry</em> argument give the size of the image that remains
1655 after cropping, and <em class="arg">x</em> and <em class="arg">y</em> in the
1656 <em class="arg">offset</em> (if present) gives the location of the top left
1657 corner of the cropped image with respect to the original image. To specify the
1658 amount to be removed, use <a href="command-line-options.html#shave">-shave</a> instead.</p>
1659
1660 <p>If the <em class="arg">x</em> and <em class="arg">y</em> offsets are
1661 present, a single image is generated, consisting of the pixels from the
1662 cropping region. The offsets specify the location of the upper left corner of
1663 the cropping region measured downward and rightward with respect to the upper
1664 left corner of the image. If the <a href="command-line-options.html#gravity">-gravity</a> option is
1665 present with <code>NorthEast</code>, <code>East</code>, or <code>SouthEast</code>
1666 gravity, it gives the distance leftward from the right edge of the image to
1667 the right edge of the cropping region. Similarly, if the <a href="command-line-options.html#gravity">-gravity</a> option is present with <code>SouthWest</code>,
1668 <code>South</code>, or <code>SouthEast</code> gravity, the distance is measured
1669 upward between the bottom edges.</p>
1670
1671 <p>If the <em class="arg">x</em> and <em class="arg">y</em> offsets are
1672 omitted, a set of tiles of the specified geometry, covering the entire input
1673 image, is generated. The rightmost tiles and the bottom tiles are smaller if
1674 the specified geometry extends beyond the dimensions of the input image.</p>
1675
1676 <p>You can add the <em class="arg">@</em> to the geometry argument to equally divide the image into the number of tiles generated.</p>
1677
1678 <p>By adding a exclamation character flag to the geometry argument, the
1679 cropped images virtual canvas page size and offset is set as if the
1680 geometry argument was a viewport or window. This means the canvas page size
1681 is set to exactly the same size you specified, the image offset set
1682 relative top left corner of the region cropped. </p>
1683
1684 <p>If the cropped image 'missed' the actual image on its virtual canvas, a
1685 special single pixel transparent 'missed' image is returned, and a 'crop
1686 missed' warning given. </p>
1687
1688 <p>It might be necessary to <a href="command-line-options.html#repage">+repage</a> the image prior to
1689 cropping the image to ensure the crop coordinate frame is relocated to the
1690 upper-left corner of the visible image.
1691
1692 Similarly you may want to use <a href="command-line-options.html#repage">+repage</a> after cropping to
1693 remove the page offset that will be left behind. This is especially true when
1694 you are going to write to an image format such as PNG that supports an image
1695 offset.</p>
1696
1697 <div style="margin: auto;">
1698   <h4><a id="cycle"></a>-cycle <em class="arg">amount</em></h4>
1699 </div>
1700
1701 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">displace image colormap by amount.</td><td style="text-align:right;"></td></tr></table>
1702
1703 <p><em class="arg">Amount</em> defines the number of positions each
1704 colormap entry is shifted.</p>
1705
1706
1707 <div style="margin: auto;">
1708   <h4><a id="debug"></a>-debug <em class="arg">events</em></h4>
1709 </div>
1710
1711 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">enable debug printout.</td><td style="text-align:right;"></td></tr></table>
1712
1713 <p>The <code>events</code> parameter specifies which events are to be logged. It
1714 can be either <code>None</code>, <code>All</code>, <code>Trace</code>, or
1715 a comma-separated list consisting of one or more of the following domains:
1716 <code>Accelerate</code>, <code>Annotate</code>, <code>Blob</code>, <code>Cache</code>,
1717 <code>Coder</code>, <code>Configure</code>, <code>Deprecate</code>,
1718 <code>Exception</code>, <code>Locale</code>, <code>Render</code>,
1719 <code>Resource</code>, <code>Security</code>, <code>TemporaryFile</code>,
1720 <code>Transform</code>, <code>X11</code>, or <code>User</code>. </p>
1721
1722
1723 <p>For example, to log cache and blob events, use.</p>
1724
1725 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert -debug "Cache,Blob" rose: rose.png</span></p>
1726 <p>The <code>User</code> domain is normally empty, but developers can log user
1727 events in their private copy of ImageMagick.</p>
1728
1729 <p>To print the complete list of debug methods, use <a href="command-line-options.html#list">-list
1730 debug</a>.</p>
1731
1732 <p>Use the <a href="command-line-options.html#log">-log</a> option to specify the format for debugging
1733 output.</p>
1734
1735 <p>Use <a href="command-line-options.html#debug">+debug</a> to turn off all logging.</p>
1736
1737 <p>Debugging may also be set using the <code>MAGICK_DEBUG</code> <a href="resources.html#environment">environment variable</a>.  The allowed values for the <code>MAGICK_DEBUG</code>
1738 environment variable are the same as for the <a href="command-line-options.html#debug">-debug</a>
1739 option.</p>
1740
1741
1742 <div style="margin: auto;">
1743   <h4><a id="decipher"></a>-decipher <em class="arg">filename</em></h4>
1744 </div>
1745
1746 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Decipher and restore pixels that were previously transformed by
1747 <a href="command-line-options.html#encipher">-encipher</a>.</td><td style="text-align:right;"></td></tr></table>
1748
1749 <p>Get the passphrase from the file specified by <em class="arg">filename</em>.</p>
1750
1751 <p>For more information, see the webpage, <a href="../www/cipher.html">ImageMagick: Encipher or
1752 Decipher an Image</a>.</p>
1753
1754
1755 <div style="margin: auto;">
1756   <h4><a id="deconstruct"></a>-deconstruct</h4>
1757 </div>
1758
1759 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">find areas that has changed between images </td><td style="text-align:right;"></td></tr></table>
1760
1761 <p>Given a sequence of images all the same size, such as produced by <a href="command-line-options.html#coalesce">-coalesce</a>, replace the second and later images, with
1762 a smaller image of just the area that changed relative to the previous image.
1763 </p>
1764
1765 <p>The resulting sequence of images can be used to optimize an animation
1766 sequence, though will not work correctly for GIF animations when parts of the
1767 animation can go from opaque to transparent. </p>
1768
1769 <p>This option is actually equivalent to the  <a href="command-line-options.html#layers">-layers</a>
1770 method '<code>compare-any</code>'. </p>
1771
1772
1773 <div style="margin: auto;">
1774   <h4><a id="define"></a>-define <em class="arg">key</em>{<em class="arg">=value</em>}<em class="arg">...</em></h4>
1775 </div>
1776
1777 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">add specific global settings generally used to control
1778 coders and image processing operations.</td><td style="text-align:right;"></td></tr></table>
1779
1780 <p>This option creates one or more definitions for coders and decoders to use
1781 while reading and writing image data.  Definitions are generally used to
1782 control image file format coder modules, and image processing operations,
1783 beyond what is provided by normal means.  Defined settings are listed in <a href="command-line-options.html#verbose">-verbose</a> information ("<code>info:</code>" output format)
1784 as "Artifacts". </p>
1785
1786 <p>If <em class="arg">value</em> is missing for a definition, an empty-valued
1787 definition of a flag is created with that name. This used to control on/off
1788 options.  Use <a href="command-line-options.html#define">+define key</a> to remove definitions
1789 previously created.  Use <a href="command-line-options.html#define">+define "*"</a> to remove all
1790 existing definitions.</p>
1791
1792 <p>The same 'artifact' settings can also be defined using the <a href="command-line-options.html#set">-set "option:<em class="arg">key</em>" "<em class="arg">value</em>"</a> option, which also allows the use of <a href="escape.html">Format and Print Image
1793 Properties</a> in the defined value. </p>
1794
1795 <p>The <em>option</em> and <em>key</em> are case-independent (they are
1796 converted to lowercase for use within the decoders) while the <em>value</em>
1797 is case-dependent.</p>
1798
1799 <p>Such settings are global in scope, and affect all images and operations. </p>
1800
1801 <p>The following definitions are just some of the artifacts that are
1802 available:</p>
1803
1804 <dl>
1805
1806 <dt>compose:args=<em class="arg">arguments</em></dt>
1807 <dd>Sets certain compose argument values when using convert ... -compose ...
1808     -composite. See <a href="compose.html">Image Composition</a></dd>
1809
1810 <dt>distort:scale=<em class="arg">value</em></dt>
1811    <dd>Sets the output scaling factor for use with <a href="command-line-options.html#distort">-distort</a></dd>
1812
1813 <dt>distort:viewport=WxH+X+Y</dt>
1814    <dd>Sets the viewport for use with <a href="command-line-options.html#distort">-distort</a></dd>
1815
1816 <dt>dcm:display-range=reset</dt>
1817 <dd>Set the display range to the minimum and maximum pixel values for the
1818     DCM image format.</dd>
1819
1820 <dt>dot:layout-engine=<em class="arg">value</em></dt>
1821 <dd>Set the specify the layout engine for the DOT image format (e.g.
1822     <code>neato</code>).</dd>
1823
1824 <dt>jpeg:colors=<em class="arg">value</em></dt>
1825 <dd>Set the desired number of colors and let the JPEG encoder do the
1826     quantizing.</dd>
1827
1828 <dt>jpeg:block-smoothing=<em class="arg">on|off</em></dt>
1829
1830 <dt>jpeg:dct-method=<em class="arg">value</em></dt>
1831 <dd>Choose from <code>default</code>, <code>fastest</code>, <code>float</code>,
1832     <code>ifast</code>, and <code>islow</code>.</dd>
1833
1834 <dt>jpeg:extent=<em class="arg">value</em></dt>
1835 <dd>Restrict the maximum JPEG file size, for example <code>-define
1836     jpeg:extent=400kb</code>.  The JPEG encoder will search for the highest
1837     compression quality level that results in an output file that does not
1838     exceed the value. The <code>-quality</code> option is ignored if it
1839     is also present.</dd>
1840
1841 <dt>jpeg:fancy-upsampling=<em class="arg">on|off</em></dt>
1842
1843 <dt>jpeg:optimize-coding=<em class="arg">on|off</em></dt>
1844
1845 <dt>jpeg:q-table=<em class="arg">table</em></dt>
1846
1847 <dt>jpeg:sampling-factor=<em class="arg">sampling-factor-string</em></dt>
1848
1849 <dt>jpeg:size=<em class="arg">geometry</em></dt>
1850 <dd>Set the size hint of a JPEG image, for
1851     example, <code>-define jpeg:size=128x128</code>.
1852     It is most useful for increasing performance and reducing the memory
1853     requirements when reducing the size of a large JPEG image.</dd>
1854
1855 <dt>jp2:rate=<em class="arg">value</em></dt>
1856 <dd>Specify the compression factor to use while writing JPEG-2000 files. The
1857     compression factor is the reciprocal of the compression ratio. The valid
1858     range is 0.0 to 1.0, with 1.0 indicating lossless compression. If defined,
1859     this value overrides the -quality setting.  A quality setting of 75
1860     results in a rate value of 0.06641.</dd>
1861
1862 <dt>mng:need-cacheoff</dt>
1863   <dd>turn playback caching off for streaming MNG.</dd>
1864
1865 <dt>png:bit-depth=<em class="arg">value</em></dt>
1866 <dt>png:color-type=<em class="arg">value</em></dt>
1867 <dd>desired bit-depth and color-type for PNG output.  You can force the PNG
1868     encoder to use a different bit-depth and color-type than it would have
1869     normally selected, but only if this does not cause any loss of image
1870     quality. Any attempt to reduce image quality is treated as an error and no
1871     PNG file is written.  E.g., if you have a 1-bit black-and-white image, you
1872     can use these "defines" to cause it to be written as an 8-bit grayscale,
1873     indexed, or even a 64-bit RGBA.  But if you have a 16-million color image,
1874     you cannot force it to be written as a grayscale or indexed PNG.  If you
1875     wish to do this, you must use the appropriate <a href="command-line-options.html#depth">-depth</a>,
1876     <a href="command-line-options.html#colors">-colors</a>, or <a href="command-line-options.html#type">-type</a> directives to
1877     reduce the image quality prior to using the PNG encoder. Note that in
1878     indexed PNG files, "bit-depth" refers to the number of bits per index,
1879     which can be 1, 2, 4, or 8.  In such files, the color samples always have
1880     8-bit depth.</dd>
1881
1882 <dt>png:compression-filter=<em class="arg">value</em></dt>
1883    <dd> valid values are 0 through 7. 0-4 are the corresponding PNG filters,
1884    5 means adaptive filtering except for images with a colormap, 6 means
1885    adaptive filtering for all images, 7 means MNG "loco" compression.</dd>
1886
1887 <dt>png:compression-level=<em class="arg">value</em></dt>
1888    <dd> valid values are 0 through 9, with 0 providing the least but fastest
1889        compression and 9 usually providing the best and always the slowest.</dd>
1890
1891 <dt>png:compression-strategy=<em class="arg">value</em></dt>
1892    <dd> valid values are 0 through 4, meaning default, filtered, huffman_only,
1893    rle, and fixed ZLIB compression strategy. If you are using an old zlib
1894    that does not support Z_RLE (before 1.2.0) or Z_FIXED (before 1.2.2.2),
1895    values 3 and 4, respectively, will use the zlib default strategy
1896    instead.</dd>
1897
1898 <dt>png:format=<em class="arg">value</em></dt>
1899    <dd> valid values are <em class="arg">png8</em>, <em class="arg">png24</em>,
1900    <em class="arg">png32</em>, <em class="arg">png48</em>,
1901    <em class="arg">png64</em>, and <em class="arg">png00</em>.
1902    This property can be useful for specifying
1903    the specific PNG format to be used, when the usual method of prepending the
1904    format name to the output filename is inconvenient, such as when writing
1905    a PNG-encoded ICO file.
1906    Value = <em class="arg">png8</em> reduces the number of colors to 256,
1907    only one of which may be fully transparent, if necessary.  The other
1908    values do not force any reduction of quality; it is an error to request
1909    a format that cannot represent the image data without loss (except that
1910    it is allowed to reduce the bit-depth from 16 to 8 for all formats).
1911    Value = <em class="arg">png24</em> and <em class="arg">png48</em>
1912    allow transparency, only if a single color is fully transparent and that
1913    color does not also appear in an opaque pixel; such transparency is
1914    written in a PNG <code>tRNS</code> chunk.
1915    Value = <em class="arg">png00</em> causes the image to inherit its
1916    color-type and bit-depth from the input image, if the input was also
1917    a PNG.</dd>
1918
1919 <dt>png:exclude-chunk=<em class="arg">value</em></dt>
1920 <dt>png:include-chunk=<em class="arg">value</em></dt>
1921 <dd>ancillary chunks to be excluded from or included in PNG output.
1922
1923     <p>The <em class="arg">value</em> can be the name of a PNG chunk-type such
1924     as <em class="arg">bKGD</em>, a comma-separated list of chunk-types,
1925     or the word <em class="arg">all</em> or
1926     the word <em class="arg">none</em>.  There must be no spaces in the
1927     list.  Although PNG chunk-names are case-dependent, you can use
1928     all lowercase names if you prefer.</p>
1929
1930     <p>The "include-chunk" and "exclude-chunk" lists only affect the behavior
1931     of the PNG encoder and have no effect on the PNG decoder.</p>
1932
1933     <p>As a special case, if the <code>sRGB</code> chunk is excluded and
1934     the <code>gAMA</code> chunk is included, the <code>gAMA</code> chunk will
1935     only be written if gamma is not 1/2.2, since most decoders assume
1936     sRGB and gamma=1/2.2 when no colorspace information is included in
1937     the PNG file.  Because the list is processed from left to right, you
1938     can achieve this with a single define:</p>
1939
1940 <pre class="text">
1941    -define png:include-chunk=none,gAMA
1942 </pre>
1943
1944     <p>As a special case, if the <code>sRGB</code> chunk is not excluded and
1945     the PNG encoder recognizes that the image contains the sRGB ICC profile,
1946     the PNG encoder will write the <code>sRGB</code> chunk instead of the entire
1947     3144-byte ICC profile.  To force the PNG encoder to write the sRGB
1948     profile as an <code>iCCP</code> chunk in the output PNG instead of the
1949     <code>sRGB</code> chunk, exclude the <code>sRGB</code> chunk.</p>
1950
1951     <p>The critical PNG chunks <code>IHDR</code>, <code>PLTE</code>,
1952     <code>IDAT</code>, and <code>IEND</code> cannot be excluded.  Any such
1953     entries appearing in the list will be ignored.</p>
1954
1955     <p>If the ancillary PNG <code>tRNS</code> chunk is excluded and the
1956     image has transparency, the PNG colortype is forced to be 4 or 6
1957     (GRAY_ALPHA or RGBA).  If the image is not transparent, then the
1958     <code>tRNS</code> chunk isn't written anyhow, and there is no effect
1959     on the PNG colortype of the output image.</p>
1960
1961     <p>The <a href="command-line-options.html#strip">-strip</a> option does the equivalent of the
1962     following for PNG output:</p>
1963
1964 <pre class="text">
1965    -define png:include-chunk=none,trns,gama
1966 </pre>
1967
1968     <p>The default behavior is to include all known PNG ancillary chunks
1969     plus ImageMagick's private <code>vpAg</code> ("virtual page") chunk,
1970     and to exclude all PNG chunks that are unknown to ImageMagick,
1971     regardless of their PNG "copy-safe" status as described in the
1972     PNG specification.</p>
1973
1974     <p>Any chunk names that are not known to ImageMagick are ignored
1975     if they appear in either the "include-chunk" or "exclude-chunk" list.
1976     The ancillary chunks currently known to ImageMagick are
1977     <code>bKGD</code>, <code>cHRM</code>, <code>gAMA</code>, <code>iCCP</code>,
1978     <code>oFFs</code>, <code>pHYs</code>, <code>sRGB</code>, <code>tEXt</code>,
1979     <code>tRNS</code>, <code>vpAg</code>, and <code>zTXt</code>.</p>
1980
1981     <p>You can also put <code>date</code> in the list to include or exclude
1982     the "Date:create" and "Date:modify" text chunks that ImageMagick normally
1983     inserts in the output PNG.</p>
1984
1985 </dd>
1986
1987 <dt>png:preserve-colormap</dt>
1988   <dd>Use the existing image-&gt;colormap. Normally the PNG encoder will
1989       try to optimize the palette, eliminating unused entries and putting
1990       the transparent colors first.  If this flag is set, that behavior
1991       is suppressed.</dd>
1992
1993 <dt>png:preserve-iCCP</dt>
1994    <dd>By default, the PNG decoder and encoder examine any ICC profile
1995        that is present, either from an <code>iCCP</code> chunk in the PNG
1996        input or supplied via an option, and if the profile is recognized
1997        to be the sRGB profile, converts it to the <code>sRGB</code> chunk.
1998        You can use <code>-define png:preserve-iCCP</code> to prevent
1999        this from happening; in such cases the <code>iCCP</code> chunk
2000        will be read or written and no <code>sRGB</code> chunk will be
2001        written.  There are some ICC profiles that claim to be sRGB but
2002        have various errors that cause them to be rejected by libpng16; such
2003        profiles are recognized anyhow and converted to the <code>sRGB</code>
2004        chunk, but are rejected if the <code>-define png:preserve-iCCP</code>
2005        is present. Note that not all "sRGB" ICC profiles are recognized
2006        yet; we will add them to the list as we encounter them.</dd>
2007
2008 <dt>ps:imagemask</dt>
2009 <dd>If the ps:imagemask flag is defined, the PS3 and EPS3 coders will create
2010     Postscript files that render bilevel images with the Postscript imagemask
2011     operator instead of the image operator.</dd>
2012
2013 <dt>quantum:format=<em class="arg">type</em></dt>
2014 <dd>Set the type to <code>floating-point</code> to specify a floating-point
2015     format for raw files (e.g. GRAY:) or for MIFF and TIFF images in HDRI mode
2016     to preserve negative values. If <a href="command-line-options.html#depth">-depth</a> 16 is
2017     included, the result is a single precision floating point format.
2018     If <a href="command-line-options.html#depth">-depth</a> 32 is included, the result is
2019     double precision floating point format.</dd>
2020
2021 <dt>quantum:polarity=<em class="arg">photometric-interpretation</em></dt>
2022 <dd>Set the photometric-interpretation of an image (typically for TIFF image
2023     file format) to either <code>min-is-black</code> (default) or
2024     <code>min-is-white</code>.</dd>
2025
2026 <dt>sample:offset=<em class="arg">geometry</em></dt>
2027 <dd>Location of the sampling point within the sub-region being sampled,
2028 expressed as percentages (see <a href="command-line-options.html#sample">-sample</a>).</dd>
2029
2030 <dt>showkernel=<em class="arg">1</em></dt>
2031 <dd>Outputs (to 'standard error') all the information about a generated <a href="command-line-options.html#morphology">-morphology</a> kernel.</dd>
2032
2033 <dt>tiff:rows-per-strip=<em class="arg">value</em></dt>
2034    <dd>Sets the number of rows per strip</dd>
2035
2036 <dt>tiff:tile-geometry=<em class="arg">WxH</em></dt>
2037 <dd>Sets the tile size for pyramid tiffs. Requires the suffix PTIF: before the
2038     outputname</dd>
2039 </dl>
2040
2041 <p>For example, to create a postscript file that will render only the black
2042 pixels of a bilevel image, use:</p>
2043
2044 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert bilevel.tif -define ps:imagemask eps3:stencil.ps</span></p>
2045 <p>Set attributes of the image registry by prefixing the value with
2046 <code>registry:</code>.  For example, to set a temporary path to put work files,
2047 use:</p>
2048
2049 <p class="crtsnip">
2050 -define registry:temporary-path=/data/tmp
2051 </p>
2052
2053 <p>If you want to keep the temporary files ImageMagick creates private, overwrite them with zeros or random data before they are removed.  On the first pass, the file is zeroed.  For subsequent passes, random data is written.  For example, to specify two passes:</p>
2054
2055 <p class="crtsnip">
2056 -define registry:shred-passes=2
2057 </p>
2058
2059 <div style="margin: auto;">
2060   <h4><a id="delay"></a>-delay <em class="arg">ticks</em> <br></br>-delay <em class="arg">ticks</em>x<em class="arg">ticks-per-second</em> {<em class="arg">&lt;</em>} {<em class="arg">&gt;</em>}</h4>
2061 </div>
2062
2063 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">display the next image after pausing.</td><td style="text-align:right;"></td></tr></table>
2064
2065 <p>This option is useful for regulating the animation of image sequences
2066 <em>ticks/ticks-per-second</em> seconds must expire before the display of the
2067 next image. The default is no delay between each showing of the image
2068 sequence.  The default ticks-per-second is 100.</p>
2069
2070 <p>Use <code>&gt;</code> to change the image delay <em>only</em> if its current
2071 value exceeds the given delay. <code>&lt;</code> changes the image delay
2072 <em>only</em> if current value is less than the given delay.  For example, if
2073 you specify <code>30&gt;</code> and the image delay is 20, the image delay does
2074 not change. However, if the image delay is 40 or 50, the delay it is changed
2075 to 30. Enclose the given delay in quotation marks to prevent the
2076 <code>&lt;</code> or <code>&gt;</code> from being interpreted by your shell as
2077 a file redirection.</p>
2078
2079
2080 <div style="margin: auto;">
2081   <h4><a id="delete"></a>-delete <em class="arg">indexes</em></h4>
2082 </div>
2083
2084 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">delete the images specified by index, from the image sequence.</td><td style="text-align:right;"></td></tr></table>
2085
2086 <p>Specify the image by its index in the sequence.  The first image is index
2087 0.  Negative indexes are relative to the end of the sequence, for example, -1
2088 represents the last image of the sequence.  Specify a range of images with
2089 a dash (e.g. 0-4).  Separate indexes with a comma (e.g. 0,2).  Use
2090 <code>+delete</code> to delete the last image in the current image sequence.</p>
2091
2092
2093 <div style="margin: auto;">
2094   <h4><a id="density"></a>-density <em class="arg">width</em><br></br>-density <em class="arg">width</em>x<em class="arg">height</em></h4>
2095 </div>
2096
2097 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set the horizontal and vertical resolution of an image for
2098 rendering to devices.</td><td style="text-align:right;"></td></tr></table>
2099
2100 <p>This option specifies the image resolution to store while encoding a raster
2101 image or the canvas resolution while rendering (reading) vector formats such
2102 as Postscript, PDF, WMF, and SVG into a raster image. Image resolution
2103 provides the unit of measure to apply when rendering to an output device or
2104 raster image. The default unit of measure is in dots per inch (DPI). The <a href="command-line-options.html#units">-units</a> option may be used to select dots per centimeter
2105 instead.</p>
2106
2107 <p>The default resolution is 72 dots per inch, which is equivalent to one
2108 point per pixel (Macintosh and Postscript standard). Computer screens are
2109 normally 72 or 96 dots per inch, while printers typically support 150, 300,
2110 600, or 1200 dots per inch. To determine the resolution of your display, use
2111 a ruler to measure the width of your screen in inches, and divide by the
2112 number of horizontal pixels (1024 on a 1024x768 display).</p>
2113
2114 <p>If the file format supports it, this option may be used to update the
2115 stored image resolution. Note that Photoshop stores and obtains image
2116 resolution from a proprietary embedded profile. If this profile is not
2117 stripped from the image, then Photoshop will continue to treat the image using
2118 its former resolution, ignoring the image resolution specified in the standard
2119 file header.</p>
2120
2121 <p>The <a href="command-line-options.html#density">-density</a> option sets an <em>attribute</em> and
2122 does not alter the underlying raster image. It may be used to adjust the
2123 rendered size for desktop publishing purposes by adjusting the scale applied
2124 to the pixels. To resize the image so that it is the same size at a different
2125 resolution, use the <a href="command-line-options.html#resample">-resample</a> option.</p>
2126
2127 <div style="margin: auto;">
2128   <h4><a id="depth"></a>-depth <em class="arg">value</em></h4>
2129 </div>
2130
2131 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">depth of the image.</td><td style="text-align:right;"></td></tr></table>
2132
2133 <p>This the number of bits in a color sample within a pixel.  Use this option
2134 to specify the depth of raw images whose depth is unknown such as GRAY, RGB,
2135 or CMYK, or to change the depth of any image after it has been read.</p>
2136
2137 <div style="margin: auto;">
2138   <h4><a id="descend"></a>-descend</h4>
2139 </div>
2140
2141 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">obtain image by descending window hierarchy.</td><td style="text-align:right;"></td></tr></table>
2142
2143 <div style="margin: auto;">
2144   <h4><a id="deskew"></a>-deskew <em class="arg">threshold</em></h4>
2145 </div>
2146
2147 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">straighten an image.  A threshold of 40% works for most images.</td><td style="text-align:right;"></td></tr></table>
2148
2149 <p>Use <a href="command-line-options.html#set">-set</a> <code>option:deskew:auto-crop
2150 <em>width</em></code> to auto crop the image.  The set argument is the pixel
2151 width of the image background (e.g 40).</p>
2152
2153 <div style="margin: auto;">
2154   <h4><a id="despeckle"></a>-despeckle</h4>
2155 </div>
2156
2157 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">reduce the speckles within an image.</td><td style="text-align:right;"></td></tr></table>
2158
2159 <div style="margin: auto;">
2160   <h4><a id="direction"></a>-direction <em class="arg">type</em></h4>
2161 </div>
2162
2163 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">render text right-to-left or left-to-right.</td><td style="text-align:right;"></td></tr></table>
2164
2165 <div style="margin: auto;">
2166   <h4><a id="displace"></a>-displace <em class="arg">horizontal-scale</em><br></br>-displace <em class="arg">horizontal-scale</em>x<em class="arg">vertical-scale</em></h4>
2167 </div>
2168
2169 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">shift image pixels as defined by a displacement map.</td><td style="text-align:right;">[<a href="composite.html">composite</a>]</td></tr></table>
2170
2171 <p>With this option, the 'overlay' image, and optionally the 'mask' image,
2172 is used as a displacement map, which is used to displace the lookup of
2173 what part of the 'background' image is seen at each point of the overlaid
2174 area.  Much like the displacement map is a 'lens' that redirects light shining
2175 through it so as to present a distorted view the original 'background' image
2176 behind it. </p>
2177
2178 <p>Any perfect grey areas of the displacement map produce a zero
2179 displacement of the image. Black areas produce the given maximum negative
2180 displacement of the lookup point, while white produce a maximum positive
2181 displacement of the lookup. </p>
2182
2183 <p>Note that it is the lookup of the 'background' that is displaced, not a
2184 displacement of the image itself. As such an area of the displacement map
2185 containing 'white' will have the lookup point 'shifted' by a positive amount,
2186 and thus generating a copy of the destination image to the right/downward from
2187 the correct position.  That is the image will look like it may have been
2188 'shifted' in a negative left/upward direction.  Understanding this is a very
2189 important in understanding how displacement maps work.  </p>
2190
2191 <p>The given arguments define the maximum amount of displacement in pixels
2192 that a particular map can produce. If the displacement scale is large enough
2193 it is also possible to lookup parts of the 'background' image that lie well
2194 outside the bounds of the displacement map itself.  That is you could very
2195 easily copy a section of the original image from outside the overlay area
2196 into the overlay area. </p>
2197
2198 <p>The '%' flag makes the displacement scale relative to the size of the
2199 overlay image (100% = half width/height of image). Using '!' switches
2200 percentage arguments to refer to the destination image size instead.
2201 these flags were added as of IM v6.5.3-5.</p>
2202
2203 <p>Normally a single grayscale displacement map is provided, which with the
2204 given scaling values will determine a single direction (vector) in which
2205 displacements can occur (positively or negatively).  However, if you also
2206 specify a third image which is normally used as a <em class="arg">mask</em>,
2207 the <em class="arg">composite image</em> is used for horizontal X
2208 displacement, while the <em class="arg">mask image</em> is used for vertical Y
2209 displacement.  This allows you to define completely different displacement
2210 values for the X and Y directions, and allowing you to lookup any point within
2211 the  <em class="arg">scale</em> bounds.  In other words each pixel can lookup
2212 any other nearby pixel, producing complex 2 dimensional displacements, rather
2213 than a simple 1 dimensional vector displacements. </p>
2214
2215 <p>Alternatively rather than supplying two separate images, as of IM v6.4.4-0,
2216 you can use the 'red' channel of the overlay image to specify the horizontal
2217 or X displacement, and the 'green' channel for the vertical or Y displacement.
2218 </p>
2219
2220 <p>As of IM v6.5.3-5 any alpha channel in the overlay image is used as a
2221 mask the transparency of the destination image. However areas outside the
2222 overlaid areas will not be effected. </p>
2223
2224
2225 <div style="margin: auto;">
2226   <h4><a id="display"></a>-display <em class="arg">host:display[.screen]</em></h4>
2227 </div>
2228
2229 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Specifies the X server to contact.</td><td style="text-align:right;">[<a href="animate.html">animate</a>, <a href="display.html">display</a>]</td></tr></table>
2230
2231 <p>This option is used with convert for obtaining image or font from this
2232 X server. See <em class="arg">X(1)</em>.</p>
2233
2234 <div style="margin: auto;">
2235   <h4><a id="dispose"></a>-dispose <em class="arg">method</em></h4>
2236 </div>
2237
2238 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">define the GIF disposal image setting for images that are being created or read in. </td><td style="text-align:right;"></td></tr></table>
2239
2240 <p>The layer disposal method defines the way each the displayed image is to be
2241 modified after the current 'frame' of an animation has finished being
2242 displayed (after its 'delay' period), but before the next frame on an
2243 animation is to be overlaid onto the display. </p>
2244
2245 <p>Here are the valid methods:</p>
2246
2247 <pre class="text">
2248    Undefined   0  No disposal specified (equivalent to '<code>none</code>').
2249    None        1  Do not dispose, just overlay next frame image.
2250    Background  2  Clear the frame area with the background color.
2251    Previous    3  Clear to the image prior to this frames overlay.
2252 </pre>
2253
2254 <p>You can also use the numbers given above, which is what the GIF format
2255 uses internally to represent the above settings. </p>
2256
2257 <p>To print a complete list of dispose methods, use <a href="command-line-options.html#list">-list dispose</a>.</p>
2258
2259 <p>Use <a href="command-line-options.html#dispose">+dispose</a>, turn off the setting and prevent
2260 resetting the layer disposal methods of images being read in. </p>
2261
2262 <p>Use <a href="command-line-options.html#set">-set</a> '<code>dispose</code>' method to set the image
2263 disposal method for images already in memory.</p>
2264
2265 <div style="margin: auto;">
2266   <h4><a id="dissimilarity-threshold"></a>-dissimilarity-threshold <em class="arg">value</em></h4>
2267 </div>
2268
2269 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">maximum RMSE for subimage match (default 0.2).</td><td style="text-align:right;">[<a href="compare.html">compare</a>]</td></tr></table>
2270
2271
2272 <div style="margin: auto;">
2273   <h4><a id="dissolve"></a>-dissolve <em class="arg">src_percent</em>[x<em class="arg">dst_percent</em>]</h4>
2274 </div>
2275
2276 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">dissolve an image into another by the given percent.</td><td style="text-align:right;">[<a href="composite.html">composite</a>]</td></tr></table>
2277
2278 <p>The opacity of the composite image is multiplied by the given percent, then
2279 it is composited 'over' the main image.  If <em class="arg">src_percent</em>
2280 is greater than 100, start dissolving the main image so it becomes
2281 transparent at a value of '<code class="arg">200</code>'.  If both percentages
2282 are given, each image are dissolved to the percentages given. </p>
2283
2284 <p>Note that dissolve percentages do not add, two opaque images dissolved
2285 '50,50', produce a 75% transparency. For a 50% + 50% blending of the two
2286 images, you would need to use dissolve values of '50,100'.  </p>
2287
2288 <div style="margin: auto;">
2289   <h4><a id="distort"></a>-distort <em class="arg">method arguments</em></h4>
2290 </div>
2291
2292 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">distort an image, using the given <em class="arg">method</em> and its required <em class="arg">arguments</em>.</td><td style="text-align:right;"></td></tr></table>
2293
2294 <p>The <em class="arg">arguments</em> is a single string containing a list
2295 of floating point numbers separated by commas or spaces.  The number of
2296 and meaning of the floating point values depends on the distortion <em class="arg">method</em> being used. </p>
2297
2298 <p>Choose from these distortion types:</p>
2299
2300 <table class="doc">
2301   <tr valign="top">
2302     <th align="left" style="width: 8%">Method</th>
2303     <th align="left">Description</th>
2304   </tr>
2305
2306   <tr valign="top">
2307     <td valign="top"><code>ScaleRotateTranslate</code>  
2308     <br></br>or   <code>SRT</code></td>
2309     <td valign="top">
2310        Distort image by first scaling and rotating about a given 'center',
2311        before translating that 'center' to the new location, in that order. It
2312        is an alternative method of specifying a '<code>Affine</code>' type of
2313        distortion, but without shearing effects.  It also provides a good way
2314        of rotating and displacing a smaller image for tiling onto a larger
2315        background (IE 2-dimensional animations). <br></br>
2316
2317        The number of arguments determine the specific meaning of each
2318        argument for the scales, rotation, and translation operations. <br></br>
2319
2320        <table style="margin-left:auto; margin-right:auto;">
2321        <tr><td>#  </td><td>arguments meaning</td></tr>
2322        <tr><td>1:</td><td><em>Angle_of_Rotation</em></td></tr>
2323        <tr><td>2:</td><td><em>Scale   Angle</em></td></tr>
2324        <tr><td>3:</td><td><em>X,Y     Angle</em></td></tr>
2325        <tr><td>4:</td><td><em>X,Y   Scale   Angle</em></td></tr>
2326        <tr><td>5:</td>
2327            <td><em>X,Y   ScaleX,ScaleY   Angle</em></td></tr>
2328        <tr><td>6:</td>
2329            <td><em>X,Y   Scale   Angle   NewX,NewY</em></td></tr>
2330        <tr><td>7:</td>
2331            <td><em>X,Y   ScaleX,ScaleY   Angle
2332                      NewX,NewY</em></td></tr>
2333        </table>
2334
2335        This is actually an alternative way of specifying a 2 dimensional linear
2336        '<code>Affine</code>' or '<code>AffineProjection</code>' distortion.  </td> </tr>
2337
2338   <tr valign="top">
2339     <td valign="top"><code>Affine</code></td>
2340     <td valign="top">
2341        Distort the image linearly by moving a list of at least 3 or more sets
2342        of control points (as defined below).  Ideally 3 sets or 12 floating
2343        point values are given allowing the image to be linearly scaled,
2344        rotated, sheared, and translated, according to those three points. See
2345        also the related '<code>AffineProjection</code>' and '<code>SRT</code>'
2346        distortions. <br></br>
2347
2348        More than 3 sets given control point pairs (12 numbers) is least
2349        squares fitted to best match a linear affine distortion. If only 2
2350        control point pairs (8 numbers) are given a two point image translation
2351        rotation and scaling is performed, without any possible  shearing,
2352        flipping or changes in aspect ratio to the resulting image. If only one
2353        control point pair is provides the image is only translated, (which may
2354        be a floating point non-integer translation). <br></br>
2355
2356        This distortion does not include any form of perspective distortion.
2357        </td>
2358
2359   </tr>
2360
2361   <tr valign="top">
2362     <td valign="top"><code>AffineProjection</code></td>
2363     <td valign="top">
2364        Linearly distort an image using the given Affine Matrix of 6
2365        pre-calculated coefficients forming a set of Affine Equations to map
2366        the source image to the destination image.
2367
2368        <div style="text-align: center"><em>
2369        s<sub>x</sub>, r<sub>x</sub>,
2370        r<sub>y</sub>, s<sub>y</sub>,
2371        t<sub>x</sub>, t<sub>y</sub>
2372        </em></div>
2373
2374        See <a href="command-line-options.html#affine">-affine</a> setting for more detail, and
2375        meanings of these coefficients. <br></br>
2376
2377        The distortions '<code>Affine</code>' and '<code>SRT</code>' provide
2378        alternative methods of defining this distortion, with ImageMagick doing
2379        the calculations needed to generate the required coefficients. You can
2380        see the internally generated coefficients, by using a <a href="command-line-options.html#verbose">-verbose</a> setting with those other variants.  </td>
2381
2382   </tr>
2383
2384   <tr valign="top">
2385     <td valign="top"><code>BilinearForward</code><br></br>
2386     <code>BilinearReverse</code></td>
2387     <td valign="top">
2388        Bilinear Distortion, given a minimum of 4 sets of coordinate pairs, or
2389        16 values (see below). Not that lines may not appear straight after
2390        distortion, though the distance between coordinates will remain
2391        consistent. <br></br>
2392
2393        The '<code>BilinearForward</code>' is used to map rectangles to any
2394        quadrilateral, while the '<code>BilinearReverse</code>' form maps any
2395        quadrilateral to a rectangle, while preserving the straight line edges
2396        in each case.  <br></br>
2397
2398        Note that '<code>BilinearForward</code>' can generate invalid pixels
2399        which will be colored using the <a href="command-line-options.html#mattecolor">-mattecolor</a>
2400        color setting.  Also if the quadrilateral becomes 'flipped' the image
2401        may disappear. <br></br>
2402
2403        There are future plans to produce a true Bilinear distortion that will
2404        attempt to map any quadrilateral to any other quadrilateral, while
2405        preserving edges (and edge distance ratios).
2406
2407        </td>
2408   </tr>
2409
2410   <tr valign="top">
2411     <td valign="top"><code>Perspective</code></td>
2412     <td valign="top">
2413        Perspective distort the images, using a list of 4 or more sets of
2414        control points (as defined below).  More that 4 sets (16 numbers) of
2415        control points provide least squares fitting for more accurate
2416        distortions (for the purposes of image registration and panorama
2417        effects).  Less than 4 sets will fall back to a '<code>Affine</code>'
2418        linear distortion.  <br></br>
2419
2420        Perspective Distorted images ensures that straight lines remain
2421        straight, but the scale of the distorted image will vary. The horizon
2422        is anti-aliased, and the 'sky' color may be set using the
2423        <a href="command-line-options.html#mattecolor">-mattecolor</a> setting. </td>
2424   </tr>
2425
2426   <tr valign="top">
2427     <td valign="top"><code>PerspectiveProjection</code>  </td>
2428     <td valign="top">
2429        Do a '<code>Perspective</code>' distortion biased on a set of 8
2430        pre-calculated coefficients. You can get these coefficients by looking
2431        at the <a href="command-line-options.html#verbose">-verbose</a> output of a
2432        '<code>Perspective</code>' distortion, or by calculating them yourself.
2433        If the last two perspective scaling coefficients are zero, the
2434        remaining 6 represents a transposed 'Affine Matrix'. </td>
2435
2436   </tr>
2437
2438   <tr valign="top">
2439     <td valign="top"><code>Arc</code></td>
2440     <td valign="top">
2441        Arc the image (variation of polar mapping) over the angle given around
2442        a circle. <br></br>
2443        <table width="90%" style="margin-left: auto; margin-right: auto;">
2444        <tr valign="top"><td>Argument</td>
2445            <td>Meaning</td></tr>
2446        <tr valign="top"><td><em>arc_angle</em></td>
2447            <td>The angle over which to arc the image side-to-side</td></tr>
2448        <tr valign="top"><td><em>rotate_angle</em></td>
2449            <td>Angle to rotate resulting image from vertical center</td></tr>
2450        <tr valign="top"><td><em>top_radius</em></td>
2451            <td>Set top edge of source image at this radius</td></tr>
2452        <tr valign="top"><td><em>bottom_radius</em> </td>
2453            <td>Set bottom edge to this radius (radial scaling)</td></tr>
2454        </table>
2455
2456        The resulting image is always resized to best fit the resulting image,
2457        (as if using <a href="command-line-options.html#distort">+distort</a>) while attempting to
2458        preserve scale and aspect ratio of the original image as much as
2459        possible with the arguments given by the user. All four arguments will
2460        be needed to change the overall aspect ratio of an 'Arc'ed image. <br></br>
2461
2462        This a variation of a polar distortion designed to try to preserve the
2463        aspect ratio of the image rather than direct Cartesian to Polar
2464        conversion. </td>
2465   </tr>
2466
2467   <tr valign="top">
2468     <td valign="top"><code>Polar</code></td>
2469     <td valign="top">
2470        Like '<code>Arc</code>' but do a complete Cartesian to Polar mapping of
2471        the image. that is the height of the input image is mapped to the
2472        radius limits, while the width is wrapped around between the
2473        angle limits. <br></br>
2474
2475        Arguments: <em>Rmax,Rmin CenterX,CenterY, start,end_angle</em> <br></br>
2476
2477        All arguments are optional. With <em>Rmin</em> defaulting to zero, the
2478        center to the center of the image, and the angles going from -180 (top)
2479        to +180 (top).  If <em>Rmax</em> is given the special value of
2480        '<code>0</code>', the the distance from the center to the nearest edge
2481        is used for the radius of the output image, which will ensure the whole
2482        image is visible (though scaled smaller).  However a special value of
2483        '<code>-1</code>' will use the distance from the center to the furthest
2484        corner,  This may 'clip' the corners from the input rectangular image,
2485        but will generate the exact reverse of a '<code>DePolar</code>' with
2486        the same arguments. <br></br>
2487
2488        If the plus form of distort (<a href="command-line-options.html#distort">+distort</a>) is used
2489        output image center will default to <code>0,0</code> of the virtual
2490        canvas, and the image size adjusted to ensure the whole input image is
2491        made visible in the output image on the virtual canvas. </td>
2492
2493   </tr>
2494
2495   <tr valign="top">
2496     <td valign="top"><code>DePolar</code></td>
2497     <td valign="top">
2498        Uses the same arguments and meanings as a '<code>Polar</code>' distortion
2499        but generates the reverse Polar to Cartesian distortion. <br></br>
2500
2501        The special <em>Rmax</em> setting of '<code>0</code>' may however clip
2502        the corners of the input image.  However using the special
2503        <em>Rmax</em> setting of '<code>-1</code>' (maximum center to corner
2504        distance) will ensure the whole distorted image is preserved in the
2505        generated result, so that the same argument to '<code>Polar</code>' will
2506        reverse the distortion re-producing the original.
2507
2508        Note that as this distortion requires the area resampling of a circular
2509        arc, which can not be handled by the builtin EWA resampling function.
2510        As such the normal EWA filters are turned off. It is recommended some
2511        form of 'super-sampling' image processing technique be used to produce
2512        a high quality result. </td>
2513
2514   </tr>
2515
2516   <tr valign="top">
2517     <td valign="top"><code>Barrel</code></td>
2518     <td valign="top">
2519        Given the four coefficients (A,B,C,D) as defined by <a href="http://wiki.panotools.org/Lens_correction_model">Helmut
2520        Dersch</a>, perform a barrel or pin-cushion distortion appropriate to
2521        correct radial lens distortions.  That is in photographs, make straight
2522        lines straight again. <br></br>
2523
2524        Arguments: <em>A   B   C</em>   [ <em>D</em>   [
2525        <em>X</em> , <em>Y</em> ] ] <br></br>
2526        or <em>A<sub>x</sub> B<sub>x</sub> C<sub>x</sub> D<sub>x</sub>  
2527        A<sub>y</sub> B<sub>y</sub> C<sub>y</sub> D<sub>y</sub></em>  
2528        [ <em>X</em> , <em>Y</em> ] <br></br>
2529        So that it forms the function <br></br>
2530           Rsrc = r * ( <em>A</em>*r<sup>3</sup> + <em>B</em>*r<sup>2</sup> +
2531                                <em>C</em>*r + <em>D</em> )<br></br>
2532
2533        Where <em>X</em>,<em>Y</em> is the optional center of the distortion
2534        (defaulting to the center of the image). <br></br>
2535        The second form is typically used to distort images, rather than
2536        correct lens distortions. <br></br>
2537        </td>
2538
2539   </tr>
2540
2541   <tr valign="top">
2542     <td valign="top"><code>BarrelInverse</code></td>
2543     <td valign="top">
2544        This is very similar to '<code>Barrel</code>' with the same set of
2545        arguments, and argument handling.  However it uses the inverse
2546        of the radial polynomial,
2547        so that it forms the function <br></br>
2548           Rsrc = r / ( <em>A</em>*r<sup>3</sup> + <em>B</em>*r<sup>2</sup> +
2549                                <em>C</em>*r + <em>D</em> )<br></br>
2550        Note that this is not the reverse of the '<code>Barrel</code>'
2551        distortion, just a different barrel-like radial distortion method.
2552
2553        </td>
2554   </tr>
2555
2556   <tr valign="top">
2557     <td valign="top"><code>Shepards</code></td>
2558     <td valign="top">
2559        Distort the given list control points (any number) using an Inverse
2560        Squared Distance Interpolation Method (<a href="http://en.wikipedia.org/wiki/Shepard%27s_method">Shepards
2561        Method</a>). The control points in effect do 'localized' displacement
2562        of the image around the given control point (preserving the look and
2563        the rotation of the area near the control points.  For best results
2564        extra control points should be added to 'lock' the positions of the
2565        corners, edges and other unchanging parts of the image, to prevent
2566        their movement. <br></br>
2567
2568        The distortion has been likened to 'taffy pulling' using nails, or
2569        pins' stuck in a block of 'jelly' which is then moved to the new
2570        position, distorting the surface of the jelly. <br></br>
2571
2572        Internally it is equivalent to generating a displacement map (see <a href="command-line-options.html#displace">-displace</a>) for source image color look-up using
2573        the <a href="command-line-options.html#sparse-color">-sparse-color</a> method of the same name.
2574
2575        </td>
2576   </tr>
2577
2578 </table>
2579
2580 <p>To print a complete list of distortion methods, use <a href="command-line-options.html#list">-list
2581 distort</a>.</p>
2582
2583 <p>Many of the above distortion methods such as '<code>Affine</code>',
2584 '<code>Perspective</code>', and '<code>Shepards</code>' use a list control points
2585 defining how these points in the given image should be distorted in the
2586 destination image. Each set of four floating point values represent a source
2587 image coordinate, followed immediately by the destination image coordinate.
2588 This produces a list of values such as...</p>
2589 <div style="text-align: center"><em>
2590       U<sub>1</sub>,V<sub>1</sub> X<sub>1</sub>,Y<sub>1</sub>  
2591       U<sub>2</sub>,V<sub>2</sub> X<sub>2</sub>,Y<sub>2</sub>  
2592       U<sub>3</sub>,V<sub>3</sub> X<sub>3</sub>,Y<sub>3</sub>  
2593       ...  
2594       U<sub>n</sub>,V<sub>n</sub> X<sub>n</sub>,Y<sub>n</sub>  
2595 </em></div>
2596 <p>where <em>U,V</em> on the source image is mapped to <em>X,Y</em> on the
2597 destination image. </p>
2598
2599 <p>For example, to warp an image using '<code>perspective</code>' distortion,
2600 needs a list of at least 4 sets of coordinates, or 16 numbers.  Here is the
2601 perspective distortion of the built-in "rose:" image. Note how spaces were
2602 used to group the 4 sets of coordinate pairs, to make it easier to read and
2603 understand.</p>
2604
2605 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">
2606 convert rose:  -virtual-pixel black \<br></br>
2607      -distort Perspective '0,0,0,0  0,45,0,45  69,0,60,10  69,45,60,35' \<br></br>
2608      rose_3d_rotated.gif</span></p>
2609 <p>If more that the required number of coordinate pairs are given for
2610 a distortion, the distortion method is 'least squares' fitted to produce the
2611 best result for all the coordinate pairs given. If less than the ideal number
2612 of points are given, the distort will generally fall back to a simpler form of
2613 distortion that can handles the smaller number of coordinates (usually a linear
2614 '<code>Affine</code>' distortion). </p>
2615
2616 <p>By using more coordinates you can make use of image registration tool to
2617 find matching coordinate pairs in overlapping images, so as to improve the
2618 'fit' of the distortion. Of course a bad coordinate pair can also make the
2619 'fit' worse. Caution is always advised. </p>
2620
2621 <p>Colors are acquired from the source image according to a cylindrical
2622 resampling <a href="command-line-options.html#filter">-filter</a>, using a special technique known as
2623 EWA resampling. This produces very high quality results, especially when
2624 images become smaller (minified) in the output, which is very common when
2625 using '<code>perspective</code>' distortion. For example here we view
2626 a infinitely tiled 'plane' all the way to the horizon. </p>
2627
2628 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">
2629 convert -size 90x90 pattern:checkerboard -normalize -virtual-pixel tile \<br></br>
2630      -distort perspective  '0,0,5,45  89,0,45,46  0,89,0,89  89,89,89,89' \<br></br>
2631      checks_tiled.jpg</span></p>
2632 <p>Note that a infinitely tiled perspective images involving the horizon can
2633 be very slow, because of the number of pixels that are compressed to generate
2634 each individual pixel close to the 'horizon'.  You can turn off EWA
2635 resampling, by specifing the special <a href="command-line-options.html#filter">-filter</a> setting of
2636 '<code>point</code>' (recommended if you plan to use super-sampling instead).
2637 </p>
2638
2639 <p>If an image generates <i>invalid pixels</i>, such as the 'sky' in the last
2640 example, <a href="command-line-options.html#distort">-distort</a> will use the current <a href="command-line-options.html#mattecolor">-mattecolor</a> setting for these pixels. If you do not
2641 what these pixels to be visible, set the color to match the rest of the
2642 ground. </p>
2643
2644 <p>The output image size will by default be the same as the input image.  This
2645 means that if the part of the distorted image falls outside the viewed area of
2646 the 'distorted space', those parts is clipped and lost.  However if you use
2647 the plus form of the operator (<a href="command-line-options.html#distort">+distort</a>) the operator
2648 will attempt (if possible) to show the whole of the distorted image, while
2649 retaining a correct 'virtual canvas' offset, for image layering. This offset
2650 may need to be removed using <a href="command-line-options.html#repage">+repage</a>, to remove if it
2651 is unwanted. </p>
2652
2653 <p>Setting <a href="command-line-options.html#verbose">-verbose</a> setting, will cause <a href="command-line-options.html#distort">-distort</a> to attempt to output the internal coefficients,
2654 and the <a href="command-line-options.html#fx">-fx</a> equivalent to the distortion, for expert study,
2655 and debugging purposes. This many not be available for all distorts. </p>
2656
2657 <p>You can alternatively specify a special "<code><a href="command-line-options.html#define">-define</a> distort:viewport={geometry_string}</code>" setting which will
2658 specify the size and the offset of the generated 'viewport' image of the
2659 distorted image space.</p>
2660
2661 <p>Setting a "<code><a href="command-line-options.html#define">-define</a>
2662 distort:scale={scale_factor}</code>" will scale the output image (viewport or
2663 otherwise) by that factor without changing the viewed contents of the
2664 distorted image. This can be used either for 'super-sampling' the image for
2665 a higher quality result, or for panning and zooming around the image (with
2666 appropriate viewport changes, or post-distort cropping and resizing). </p>
2667
2668 <p>Setting "<code><a href="command-line-options.html#define">-define</a> resample:verbose=1</code>"
2669 will output the cylindrical filter lookup table created by the EWA (Elliptical
2670 Weighted Average) resampling algorithm. Note this table uses a squared radius
2671 lookup value. This is typically only used for debugging EWA resampling. </p>
2672
2673
2674 <div style="margin: auto;">
2675   <h4><a id="distribute-cache"></a>-distribute-cache <em class="arg">port</em></h4>
2676 </div>
2677
2678 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">launch a distributed pixel cache server. </td><td style="text-align:right;"></td></tr></table>
2679
2680 <div style="margin: auto;">
2681   <h4><a id="dither"></a>-dither <em class="arg">method</em></h4>
2682 </div>
2683
2684 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Apply a Riemersma or Floyd-Steinberg error diffusion dither to
2685 images when general color reduction is applied via an option, or automagically
2686 when saving to specific formats. This enabled by default. </td><td style="text-align:right;"></td></tr></table>
2687
2688 <p>Dithering places two or more colors in neighboring pixels so that to the
2689 eye a closer approximation of the images original color is reproduced. This
2690 reduces the number of colors needed to reproduce the image but at the cost of
2691 a lower level pattern of colors. Error diffusion dithers can use any set of
2692 colors (generated or user defined) to an image.  </p>
2693
2694 <p>Dithering is turned on by default, to turn it off use the plus form of the
2695 setting, <a href="command-line-options.html#dither">+dither</a>. This will also also render PostScript
2696 without text or graphic aliasing. Disabling dithering often (but not always)
2697 leads to faster process, a smaller number of colors, but more cartoon like
2698 image coloring.  Generally resulting in 'color banding' effects in areas with
2699 color gradients. </p>
2700
2701 <p>The color reduction operators <a href="command-line-options.html#colors">-colors</a>, <a href="command-line-options.html#monochrome">-monochrome</a>, <a href="command-line-options.html#remap ">-remap</a>, and <a href="command-line-options.html#posterize">-posterize</a>, apply dithering to images using the reduced
2702 color set they created. These operators are also used as part of automatic
2703 color reduction when saving images to formats with limited color support, such
2704 as <code>GIF:</code>, <code>XBM:</code>, and others, so dithering may also be used
2705 in these cases. </p>
2706
2707 <p>Alternatively you can use <a href="command-line-options.html#random-threshold">-random-threshold</a>
2708 to generate purely random dither. Or use <a href="command-line-options.html#ordered-dither">-ordered-dither</a> to apply threshold mapped dither
2709 patterns, using uniform color maps, rather than specific color maps. </p>
2710
2711
2712 <div style="margin: auto;">
2713   <h4><a id="draw"></a>-draw <em class="arg">string</em></h4>
2714 </div>
2715
2716 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Annotate an image with one or more graphic primitives.</td><td style="text-align:right;"></td></tr></table>
2717
2718 <p>Use this option to annotate or decorate an image with one or more graphic
2719 primitives. The primitives include shapes, text, transformations, and pixel
2720 operations.</p>
2721
2722 <p>The shape primitives:</p>
2723
2724 <pre class="text">
2725    point           x,y
2726    line            x0,y0 x1,y1
2727    rectangle       x0,y0 x1,y1
2728    roundRectangle  x0,y0 x1,y1 wc,hc
2729    arc             x0,y0 x1,y1 a0,a1
2730    ellipse         x0,y0 rx,ry a0,a1
2731    circle          x0,y0 x1,y1
2732    polyline        x0,y0  ...  xn,yn
2733    polygon         x0,y0  ...  xn,yn
2734    bezier          x0,y0  ...  xn,yn
2735    path            path specification
2736    image           operator x0,y0 w,h filename
2737 </pre>
2738
2739 <p>The text primitive:</p>
2740
2741 <pre class="text">
2742    text            x0,y0 string
2743 </pre>
2744 <p>The text gravity primitive:</p>
2745
2746 <pre class="text">
2747    gravity         NorthWest, North, NorthEast, West, Center,
2748                    East, SouthWest, South, or SouthEast
2749 </pre>
2750
2751 <p>The text gravity primitive only affects the placement of text and does not
2752 interact with the other primitives.  It is equivalent to using the <a href="command-line-options.html#gravity">-gravity</a> command-line option, except that it is limited in
2753 scope to the <a href="command-line-options.html#draw">-draw</a> option in which it appears.</p>
2754
2755 <p>The transformation primitives:</p>
2756
2757 <pre class="text">
2758    rotate     degrees
2759    translate  dx,dy
2760    scale      sx,sy
2761    skewX      degrees
2762    skewY      degrees
2763 </pre>
2764
2765 <p>The pixel operation primitives:</p>
2766
2767 <pre class="text">
2768    color  x0,y0 method
2769    matte  x0,y0 method
2770 </pre>
2771
2772 <p>The shape primitives are drawn in the color specified by the preceding <a href="command-line-options.html#fill">-fill</a> setting.  For unfilled shapes, use <a href="command-line-options.html#fill">-fill none</a>.  You can optionally control the stroke (the
2773 "outline" of a shape) with the <a href="command-line-options.html#stroke">-stroke</a> and <a href="command-line-options.html#strokewidth">-strokewidth</a> settings.</p>
2774
2775 <p>A <code>point</code> primitive is specified by a single <em>point</em> in the
2776 pixel plane, that is, by an ordered pair of integer coordinates,
2777 <em>x</em>,<em>y</em>. (As it involves only a single pixel, a <code>point</code>
2778 primitive is not affected by <a href="command-line-options.html#stroke">-stroke</a> or <a href="command-line-options.html#strokewidth">-strokewidth</a>.)</p>
2779
2780 <p>A <code>line</code> primitive requires a start point and end point.</p>
2781
2782 <p>A <code>rectangle</code> primitive is specified by the pair of points at the
2783 upper left and lower right corners.</p>
2784
2785 <p>A <code>roundRectangle</code> primitive takes the same corner points as
2786 a <code>rectangle</code> followed by the width and height of the rounded corners
2787 to be removed.</p>
2788
2789 <p>The <code>circle</code> primitive makes a disk (filled) or circle (unfilled).
2790 Give the center and any point on the perimeter (boundary).</p>
2791
2792 <p>The <code>arc</code> primitive is used to inscribe an elliptical segment in
2793 to a given rectangle. An <code>arc</code> requires the two corners used for
2794 <code>rectangle</code> (see above) followed by the start and end angles of the
2795 arc of the segment segment (e.g. 130,30 200,100 45,90). The start and end
2796 points produced are then joined with a line segment and the resulting segment
2797 of an ellipse is filled.</p>
2798
2799 <p>Use <code>ellipse</code> to draw a partial (or whole) ellipse. Give the
2800 center point, the horizontal and vertical "radii" (the <em>semi-axes</em> of
2801 the ellipse) and start and end angles in degrees (e.g. 100,100 100,150
2802 0,360).</p>
2803
2804 <p>The <code>polyline</code> and <code>polygon</code> primitives require three or
2805 more points to define their perimeters. A <code>polyline</code> is simply
2806 a <code>polygon</code> in which the final point is not stroked to the start
2807 point. When unfilled, this is a <em>polygonal line</em>. If the <a href="command-line-options.html#stroke">-stroke</a> setting is <code>none</code> (the default), then
2808 a <code>polyline</code> is identical to a <code>polygon</code>.  </p>
2809
2810 <p>A <em>coordinate</em> is a pair of integers separated by a space or
2811 optional comma. </p>
2812
2813 <p>As an example, to define a circle centered at 100,100 that extends to
2814 150,150 use:</p>
2815
2816 <p class="crtsnip">
2817    -draw 'circle 100,100 150,150'
2818 </p>
2819
2820 <p>The <code>Bezier</code> primitive creates a spline curve and requires three
2821 or points to define its shape. The first and last points are the
2822 <em>knots</em> and these points are attained by the curve, while any
2823 intermediate coordinates are <em>control points</em>. If two control points
2824 are specified, the line between each end knot and its sequentially respective
2825 control point determines the tangent direction of the curve at that end. If
2826 one control point is specified, the lines from the end knots to the one
2827 control point determines the tangent directions of the curve at each end. If
2828 more than two control points are specified, then the additional control points
2829 act in combination to determine the intermediate shape of the curve. In order
2830 to draw complex curves, it is highly recommended either to use the
2831 <code>path</code> primitive or to draw multiple four-point bezier segments with
2832 the start and end knots of each successive segment repeated. For example:</p>
2833
2834 <p class="crtsnip">
2835    -draw 'bezier 20,50 45,100 45,0 70,50'
2836 </p>
2837 <p class="crtsnip">
2838    -draw 'bezier 70,50 95,100 95,0 120,50'
2839 </p>
2840
2841
2842 <p>A <code>path</code> represents an outline of an object, defined in terms of
2843 moveto (set a new current point), lineto (draw a straight line), curveto (draw
2844 a Bezier curve), arc (elliptical or circular arc) and closepath (close the
2845 current shape by drawing a line to the last moveto) elements. Compound paths
2846 (i.e., a path with subpaths, each consisting of a single moveto followed by
2847 one or more line or curve operations) are possible to allow effects such as
2848 <em>donut holes</em> in objects. (See <a href="http://www.w3.org/TR/SVG/paths.html">Paths</a>.)</p>
2849
2850 <p>Use <code>image</code> to composite an image with another image. Follow the
2851 image keyword with the composite operator, image location, image size, and
2852 filename:</p>
2853
2854 <p class="crtsnip">
2855    -draw 'image SrcOver 100,100 225,225 image.jpg'
2856 </p>
2857
2858 <p>You can use 0,0 for the image size, which means to use the actual
2859 dimensions found in the image header. Otherwise, it is scaled to the given
2860 dimensions. See <a href="compose.html">Alpha Compositing</a> for
2861 a detailed discussion of alpha composition methods that are available. </p>
2862
2863 <p>The "special augmented compose operators" such as "dissolve" that require
2864 arguments cannot be used at present with the <code>-draw image</code> option.
2865  </p>
2866
2867 <p>Use <code>text</code> to annotate an image with text. Follow the text
2868 coordinates with a string. If the string has embedded spaces, enclose it in
2869 single or double quotes.</p>
2870
2871 <p>For example, the following annotates the image with <code>Works like
2872 magick!</code> for an image titled <code>bird.miff</code>. </p>
2873
2874 <p class="crtsnip">
2875    -draw "text 100,100 'Works like magick!' "
2876 </p>
2877
2878 <p>See the <a href="command-line-options.html#annotate">-annotate</a> option for another convenient way
2879 to annotate an image with text.</p>
2880
2881 <p>The <code>rotate</code> primitive rotates subsequent shape primitives and
2882 text primitives about the origin of the main image. If the <a href="command-line-options.html#region">-region</a> option precedes the <a href="command-line-options.html#draw">-draw</a>
2883 option, the origin for transformations is the upper left corner of the
2884 region.</p>
2885
2886 <p>The <code>translate</code> primitive translates subsequent shape and text
2887 primitives.</p>
2888
2889 <p>The <code>scale</code> primitive scales them.</p>
2890
2891 <p>The <code>skewX</code> and <code>skewY</code> primitives skew them with respect
2892 to the origin of the main image or the region.</p>
2893
2894 <p>The transformations modify the current affine matrix, which is initialized
2895 from the initial affine matrix defined by the <a href="command-line-options.html#affine">-affine</a>
2896 option. Transformations are cumulative within the <a href="command-line-options.html#draw">-draw</a>
2897 option. The initial affine matrix is not affected; that matrix is only changed
2898 by the appearance of another <a href="command-line-options.html#affine">-affine</a> option. If another
2899 <a href="command-line-options.html#draw">-draw</a> option appears, the current affine matrix is
2900 reinitialized from the initial affine matrix.</p>
2901
2902 <p>Use the <code>color</code> primitive to change the color of a pixel to the
2903 fill color (see <a href="command-line-options.html#fill">-fill</a>). Follow the pixel coordinate with
2904 a method:</p>
2905
2906 <pre class="text">
2907    point
2908    replace
2909    floodfill
2910    filltoborder
2911    reset
2912 </pre>
2913
2914 <p>Consider the target pixel as that specified by your coordinate. The
2915 <code>point</code> method recolors the target pixel. The <code>replace</code>
2916 method recolors any pixel that matches the color of the target pixel.
2917 <code>Floodfill</code> recolors any pixel that matches the color of the target
2918 pixel and is a neighbor, whereas <code>filltoborder</code> recolors any neighbor
2919 pixel that is not the border color. Finally, <code>reset</code> recolors all
2920 pixels.</p>
2921
2922 <p>Use <code>matte</code> to the change the pixel matte value to transparent.
2923 Follow the pixel coordinate with a method (see the <code>color</code> primitive
2924 for a description of methods). The <code>point</code> method changes the matte
2925 value of the target pixel. The <code>replace</code> method changes the matte
2926 value of any pixel that matches the color of the target pixel.
2927 <code>Floodfill</code> changes the matte value of any pixel that matches the
2928 color of the target pixel and is a neighbor, whereas <code>filltoborder</code>
2929 changes the matte value of any neighbor pixel that is not the border color (<a href="command-line-options.html#bordercolor">-bordercolor</a>). Finally <code>reset</code> changes the
2930 matte value of all pixels.</p>
2931
2932 <p>You can set the primitive color, font, and font bounding box color with <a href="command-line-options.html#fill">-fill</a>, <a href="command-line-options.html#font">-font</a>, and <a href="command-line-options.html#box">-box</a>
2933 respectively.  Options are processed in command line order so be sure to use
2934 these options <em>before</em> the <a href="command-line-options.html#draw">-draw</a> option.</p>
2935
2936 <p>Strings that begin with a number must be quoted (e.g. use '1.png' rather
2937 than 1.png).</p>
2938
2939 <p>Drawing primitives conform to the <a href="magick-vector-graphics.html">Magick
2940 Vector Graphics</a> format.</p>
2941
2942
2943 <div style="margin: auto;">
2944   <h4><a id="duplicate"></a>-duplicate <em class="arg">count,indexes</em></h4>
2945 </div>
2946
2947 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">duplicate an image one or more times.</td><td style="text-align:right;"></td></tr></table>
2948
2949 <p>Specify the count and the image to duplicate by its index in the sequence.
2950 The first image is index 0.  Negative indexes are relative to the end of the
2951 sequence, for example, -1 represents the last image of the sequence.  Specify
2952 a range of images with a dash (e.g. 0-4).  Separate indexes with a comma (e.g.
2953 0,2).  Use <code>+duplicate</code> to duplicate the last image in the current
2954 image sequence.</p>
2955
2956 <div style="margin: auto;">
2957   <h4><a id="edge"></a>-edge <em class="arg">radius</em></h4>
2958 </div>
2959
2960 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">detect edges within an image.</td><td style="text-align:right;"></td></tr></table>
2961
2962 <div style="margin: auto;">
2963   <h4><a id="emboss"></a>-emboss <em class="arg">radius</em></h4>
2964 </div>
2965
2966 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">emboss an image.</td><td style="text-align:right;"></td></tr></table>
2967
2968 <div style="margin: auto;">
2969   <h4><a id="encipher"></a>-encipher <em class="arg">filename</em></h4>
2970 </div>
2971
2972 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Encipher pixels for later deciphering by <a href="command-line-options.html#decipher">-decipher</a>.</td><td style="text-align:right;"></td></tr></table>
2973
2974 <p>Get the passphrase from the file specified by <em class="arg">filename</em>.</p>
2975
2976 <p>For more information, see the webpage, <a href="../www/cipher.html">ImageMagick: Encipher or
2977 Decipher an Image</a>.</p>
2978
2979
2980
2981 <div style="margin: auto;">
2982   <h4><a id="encoding"></a>-encoding <em class="arg">type</em></h4>
2983 </div>
2984
2985 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">specify the text encoding.</td><td style="text-align:right;"></td></tr></table>
2986
2987 <p>Choose from <code>AdobeCustom</code>, <code>AdobeExpert</code>,
2988 <code>AdobeStandard</code>, <code>AppleRoman</code>, <code>BIG5</code>,
2989 <code>GB2312</code>, <code>Latin 2</code>, <code>None</code>, <code>SJIScode</code>,
2990 <code>Symbol</code>, <code>Unicode</code>, <code>Wansung</code>.</p>
2991
2992 <div style="margin: auto;">
2993   <h4><a id="endian"></a>-endian <em class="arg">type</em></h4>
2994 </div>
2995
2996 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Specify endianness (<code>MSB</code> or <code>LSB</code>) of the image.</td><td style="text-align:right;"></td></tr></table>
2997
2998 <p>To print a complete list of endian types, use the <a href="command-line-options.html#list">-list endian</a> option.</p>
2999
3000 <p>Use <a href="command-line-options.html#endian">+endian</a> to revert to unspecified endianness.</p>
3001
3002
3003 <div style="margin: auto;">
3004   <h4><a id="enhance"></a>-enhance</h4>
3005 </div>
3006
3007 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Apply a digital filter to enhance a noisy image.</td><td style="text-align:right;"></td></tr></table>
3008
3009
3010 <div style="margin: auto;">
3011   <h4><a id="equalize"></a>-equalize</h4>
3012 </div>
3013
3014 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">perform histogram equalization on the image channel-by-channel.</td><td style="text-align:right;"></td></tr></table>
3015
3016 <p>To perform histogram equalization on all channels in concert, transform the
3017 image into some other color space, such as HSL, OHTA, YIQ or YUV, then
3018 equalize the appropriate intensity-like channel, then convert back to RGB.</p>
3019
3020 <p>For example using HSL, we have: ... <code>-colorspace HSL -channel lightness
3021 -equalize -colorspace RGB</code> ...</p>
3022
3023 <p>For YIQ, YUV and OHTA use the red channel. For example, OHTA is a principal
3024 components transformation that puts most of the information in the first
3025 channel. Here we have ... <code>-colorspace OHTA -channel red -equalize
3026 -colorspace RGB</code> ...</p>
3027
3028 <div style="margin: auto;">
3029   <h4><a id="evaluate"></a>-evaluate <em class="arg">operator value</em></h4>
3030 </div>
3031
3032 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Alter channel pixels by evaluating an arithmetic, relational, or logical expression.</td><td style="text-align:right;"></td></tr></table>
3033
3034 <p>(See the <a href="command-line-options.html#function">-function</a> operator for some
3035 multi-parameter functions. See the <a href="command-line-options.html#fx">-fx</a> operator if more
3036 elaborate calculations are needed.)</p>
3037
3038 <p>The behaviors of each <em class="arg">operator</em> are summarized in the
3039 following list. For brevity, the numerical value of a "pixel" referred to
3040 below is the value of the corresponding channel of that pixel, while
3041 a "normalized pixel" is that number divided by the maximum
3042 (installation-dependent) value <em class="QR">QuantumRange</em>. (If
3043 normalized pixels are used, they are restored, following the other
3044 calculations, to the full range by multiplying by <em class="QR">QuantumRange</em>.)</p>
3045
3046 <table class="doc">
3047   <col width="25%"></col>
3048   <col width="75%"></col>
3049   <thead>
3050   <tr>
3051   <th><em class="arg">operator</em></th>
3052   <th>Summary (see further below for details)</th>
3053   </tr>
3054   </thead>
3055   <tbody>
3056
3057     <tr><td>Abs </td>             <td>Add <em class="arg">value</em> to pixels and return absolute value. </td></tr>
3058     <tr><td>Add </td>             <td>Add <em class="arg">value</em> to pixels. </td></tr>
3059     <tr><td>AddModulus </td>      <td>Add <em class="arg">value</em> to pixels modulo <em class="QR">QuantumRange</em>.</td></tr>
3060     <tr><td>And  </td>            <td>Binary AND of pixels with <em class="arg">value</em>.</td></tr>
3061     <tr><td>Cos, Cosine </td>             <td>Apply cosine to pixels with frequency <em class="arg">value</em> with 50% bias added.</td></tr>
3062     <tr><td>Divide  </td>         <td>Divide pixels by <em class="arg">value</em>.</td></tr>
3063     <tr><td>Exp  </td>            <td>base-e exponential function</td></tr>
3064     <tr><td>Exponential  </td>            <td>base-e exponential function</td></tr>
3065     <tr><td>LeftShift </td>       <td>Shift the pixel values left by <em class="arg">value</em> bits (i.e., multiply pixels by 2<sup><em class="arg">value</em></sup>).</td></tr>
3066     <tr><td>Log  </td>            <td>Apply scaled logarithm to normalized pixels.</td></tr>
3067     <tr><td>Max  </td>            <td>Clip pixels at lower bound <em class="arg">value</em>.</td></tr>
3068     <tr><td>Mean  </td>            <td>Add the <em class="arg">value</em> and divide by 2.</td></tr>
3069     <tr><td>Median  </td>          <td>Choose the median value from an image sequence.</td></tr>
3070     <tr><td>Min  </td>            <td>Clip pixels at upper bound <em class="arg">value</em>.</td></tr>
3071     <tr><td>Multiply </td>        <td>Multiply pixels by <em class="arg">value</em>.</td></tr>
3072     <tr><td>Or  </td>             <td>Binary OR of pixels with <em class="arg">value</em>.</td></tr>
3073     <tr><td>Pow </td>             <td>Raise normalized pixels to the power <em class="arg">value</em>.</td></tr>
3074     <tr><td>RightShift </td>      <td>Shift the pixel values right by <em class="arg">value</em> bits (i.e., divide pixels by 2<sup><em class="arg">value</em></sup>).</td></tr>
3075     <tr><td>Set </td>             <td>Set pixel equal to <em class="arg">value</em>.</td></tr>
3076     <tr><td>Sin, Sine </td>             <td>Apply sine to pixels with frequency <em class="arg">value</em> with 50% bias added.</td></tr>
3077     <tr><td>Subtract </td>        <td>Subtract <em class="arg">value</em> from pixels.</td></tr>
3078     <tr><td>Xor </td>             <td>Binary XOR of pixels with <em class="arg">value.</em></td></tr>
3079
3080     <tr><td> </td></tr>
3081
3082    <tr><td>Gaussian-noise</td></tr>
3083    <tr><td>Impulse-noise</td></tr>
3084    <tr><td>Laplacian-noise</td></tr>
3085    <tr><td>Multiplicative-noise</td>      <td>(These are equivalent to the corresponding <a href="command-line-options.html#noise">-noise</a> operators.)</td></tr>
3086    <tr><td>PoissonNoise</td></tr>
3087    <tr><td>Uniform-noise</td></tr>
3088
3089    <tr><td> </td></tr>
3090
3091    <tr><td>Threshold </td>       <td>Threshold pixels larger than <em class="arg">value</em>.</td></tr>
3092    <tr><td>ThresholdBlack </td>  <td>Threshold pixels to zero values equal to or below <em class="arg">value</em>.</td></tr>
3093    <tr><td>ThresholdWhite </td>  <td>Threshold pixels to maximum values above <em class="arg">value</em>.  </td></tr>
3094  </tbody>
3095  </table>
3096
3097 <p>The specified functions are applied only to each previously set <a href="command-line-options.html#channel">-channel</a> in the image. If necessary, the results of the
3098 calculations are truncated (clipped) to fit in the interval [0, <em class="QR">QuantumRange</em>].  The transparency channel of the image is
3099 represented as a 'alpha' values (0 = fully transparent), so, for example, a
3100 <code>Divide</code> by 2 of the alpha channel will make the image
3101 semi-transparent.  Append the percent symbol '<code>%</code>' to specify a value
3102 as a percentage of the <em class="QR">QuantumRange</em>.</p>
3103
3104 <p>To print a complete list of <a href="command-line-options.html#evaluate">-evaluate</a> operators, use
3105 <a href="command-line-options.html#list">-list evaluate</a>.</p>
3106
3107 <p>The results of the <code>Add</code>, <code>Subtract</code> and
3108 <code>Multiply</code> methods can also be achieved using either the <a href="command-line-options.html#level">-level</a> or the <a href="command-line-options.html#level">+level</a> operator, with
3109 appropriate argument, to linearly modify the overall range of color values.
3110 Please note, however, that <a href="command-line-options.html#level">-level</a> treats transparency as
3111 'matte' values (0 = opaque), while <a href="command-line-options.html#level">-evaluate</a> works with
3112 'alpha' values.</p>
3113
3114 <p><code>AddModulus</code> has been added as of ImageMagick 6.4.8-4 and provides
3115 addition modulo the <em class="QR">QuantumRange</em>. It is therefore
3116 equivalent to <code>Add</code> unless the resulting pixel value is outside the
3117 interval [0, <em class="QR">QuantumRange</em>]. </p>
3118
3119 <p><code>Exp or Exponential</code> has been added as of ImageMagick 6.6.5-1 and
3120 works on normalized pixel values. The <em class="arg">value</em> used with
3121 <code>Exp</code> should be negative so as to produce a decaying exponential
3122 function. Non-negative values will always produce results larger unity and
3123 thus outside the interval [0, <em class="QR">QuantumRange</em>]. The
3124 formula is expressed below. </p>
3125
3126         <div style="text-align:center;">
3127         exp(<em class="arg">value</em> × <b><em>u</em></b>)
3128         </div>
3129
3130 <p> If the input image is squared, for example, using <a href="command-line-options.html#-function">-function polynomial "2 0 0"</a>, then a decaying Gaussian function will be
3131 the result.</p>
3132
3133 <p><code>Log</code> has been added as of ImageMagick 6.4.2-1 and works on
3134 normalized pixel values. This a <em>scaled</em> log function. The <em class="arg">value</em> used with <code>Log</code> provides a <em>scaling
3135 factor</em> that adjusts the curvature in the graph of the log function. The
3136 formula applied to a normalized value <b><em>u</em></b> is below. </p>
3137
3138         <div style="text-align:center;">
3139         log(<em class="arg">value</em> × <b><em>u</em></b> + 1) / log(<em class="arg">value</em> + 1)
3140         </div>
3141
3142 <p><code>Pow</code> has been added as of ImageMagick 6.4.1-9, and works on
3143 normalized pixel values. Note that <code>Pow</code> is related to the <a href="command-line-options.html#gamma">-gamma</a> operator. For example, <b>-gamma 2</b> is equivalent
3144 to <b>-evaluate pow 0.5</b>, i.e., a 'square root' function. The value used
3145 with <a href="command-line-options.html#gamma">-gamma</a> is simply the reciprocal of the value used
3146 with <code>Pow</code>.</p>
3147
3148 <p><code>Cosine</code> and <code>Sine</code> was added as of IM v6.4.8-8 and
3149 converts the image values into a value according to a (co)sine wave function.
3150 The  synonyms <code>Cos</code> and <code>Sin</code> may also be used.  The output
3151 is biased 50% and normalized by 50% so as to fit in the respective color value
3152 range.  The <em class="arg">value</em> scaling of the <em>period</em> of the
3153 function (its frequency), and thus determines the number of 'waves' that will
3154 be generated over the input color range.  For example, if the <em class="arg">value</em> is 1, the effective period is simply the <em class="QR">QuantumRange</em>; but if the <em class="arg">value</em> is 2,
3155 then the effective period is the <em>half</em> the <em class="QR">QuantumRange</em>.</p>
3156
3157         <div style="text-align:center;">
3158         0.5 + 0.5 × cos(2 π <b><em>u</em></b> × <em class="arg">value</em>).
3159         </div>
3160
3161 <p>See also the <a href="command-line-options.html#function">-function</a> operator, which is a
3162 multi-value version of evaluate. </p>
3163
3164 <div style="margin: auto;">
3165   <h4><a id="evaluate-sequence"></a>-evaluate-sequence <em class="arg">operator</em></h4>
3166 </div>
3167
3168 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Alter channel pixels by evaluating an arithmetic, relational, or
3169 logical expression over a sequence of images.</td><td style="text-align:right;"></td></tr></table>
3170
3171 <p>To print a complete list of <a href="command-line-options.html#evaluate-sequence">-evaluate-sequence</a> operators, use <a href="command-line-options.html#list">-list evaluate</a>.</p>
3172
3173 <div style="margin: auto;">
3174   <h4><a id="extent"></a>-extent <em class="arg">geometry</em></h4>
3175 </div>
3176
3177 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set the image size and offset.</td><td style="text-align:right;"></td></tr></table>
3178
3179 <p>If the image is enlarged, unfilled areas are set to the background color.
3180 To position the image, use offsets in the <em class="arg">geometry</em>
3181 specification or precede with a <a href="command-line-options.html#gravity">-gravity</a> setting.  To
3182 specify how to compose the image with the background, use <a href="command-line-options.html#compose">-compose</a>.</p>
3183
3184 <p>This command reduces or expands a JPEG image to fit on an 800x600
3185 display.  If the aspect ratio of the input image isn't exactly 4:3, then the
3186 image is centered on an 800x600 black canvas: </p>
3187
3188 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert input.jpg -resize 800x600 -background black -compose Copy \ <br></br>  -gravity center -extent 800x600 -quality 92 output.jpg</span></p>
3189
3190
3191 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
3192
3193 <div style="margin: auto;">
3194   <h4><a id="extract"></a>-extract <em class="arg">geometry</em></h4>
3195 </div>
3196
3197 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Extract the specified area from image.</td><td style="text-align:right;"></td></tr></table>
3198
3199 <p>This option is most useful for extracting a subregion of a very large raw
3200 image.  Note that these two commands are equivalent:</p>
3201
3202 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert -size 16000x16000 -depth 8 -extract 640x480+1280+960 \ <br></br> image.rgb image.png</span><span class="crtout"></span><span class="crtprompt"> $ </span><span class="crtin">convert -size 16000x16000 -depth 8 'image.rgb[640x480+1280+960]' \ <br></br> image.rgb image.png</span></p><p>If you omit the offsets, as in</p>
3203
3204 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert -size 16000x16000 -depth 8 -extract 640x480 \ <br></br> image.rgb image.png</span></p>
3205 <p>the image is <em>resized</em> to the specified dimensions instead,
3206 equivalent to:</p>
3207
3208 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert -size 16000x16000 -depth 8 -resize 640x480 image.rgb image.png</span></p>
3209 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
3210
3211 <div style="margin: auto;">
3212   <h4><a id="family"></a>-family <em class="arg">fontFamily</em></h4>
3213 </div>
3214
3215 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set a font family for text.</td><td style="text-align:right;"></td></tr></table>
3216
3217 <p>This setting suggests a font family that ImageMagick should try to use for
3218 rendering text. If the family can be found it is used; if not, a default font
3219 (e.g., "Arial") or a family known to be similar is substituted (e.g.,
3220 "Courier" might be used if "System" is requested but not found).  </p>
3221
3222 <p>For other settings that affect fonts, see the options <a href="command-line-options.html#font">-font</a>, <a href="command-line-options.html#stretch">-stretch</a>, <a href="command-line-options.html#style">-style</a>, and <a href="command-line-options.html#weight">-weight</a>.  </p>
3223
3224 <div style="margin: auto;">
3225   <h4><a id="features"></a>-features <em class="arg">distance</em></h4>
3226 </div>
3227
3228 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">display (cooccurrence matrix) texture measure features for each channel in the image in each of four directions (horizontal, vertical, left and right diagonals) for the specified distance.</td><td style="text-align:right;">[<a href="identify.html">identify</a>]</td></tr></table>
3229
3230 <pre class="text">
3231       Angular Second Moment
3232       Contrast
3233       Correlation
3234       Sum of Squares Variance
3235       Inverse Difference Moment
3236       Sum Average
3237       Sum Variance
3238       Sum Entropy
3239       Entropy
3240       Difference Variance
3241       Difference Entropy
3242       Information Measure of Correlation 1
3243       Information Measure of Correlation 2
3244       Maximum Correlation Coefficient
3245 </pre>
3246
3247
3248 <div style="margin: auto;">
3249   <h4><a id="fft"></a>-fft</h4>
3250 </div>
3251
3252 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">implements the forward discrete Fourier transform (DFT).</td><td style="text-align:right;"></td></tr></table>
3253
3254 <p>This option is new as of ImageMagick 6.5.4-3 (and now working for Windows
3255 users in ImageMagick 6.6.0-9). It transforms an image from the normal
3256 (spatial) domain to the frequency domain. In the frequency domain, an image is
3257 represented as a superposition of complex sinusoidal waves of varying
3258 amplitudes. The image x and y coordinates are the possible frequencies along
3259 the x and y directions, respectively, and the pixel intensity values are
3260 complex numbers that correspond to the sinusoidal wave amplitudes. See for
3261 example, <a href="http://en.wikipedia.org/wiki/Fourier_transform">Fourier
3262 Transform</a>, <a href="http://en.wikipedia.org/wiki/DFT">Discrete Fourier
3263 Transform</a> and <a href="http://en.wikipedia.org/wiki/FFT">Fast Fourier
3264 Transform</a>.</p>
3265
3266 <p>A single image name is provided as output for this option. However, the
3267 output result will have two components. It is either a two-frame image or two
3268 separate images, depending upon whether the image format specified supports
3269 multi-frame images. The reason that we get a dual output result is because the
3270 frequency domain represents an image using complex numbers, which cannot be
3271 visualized directly. Therefore, the complex values are automagically separated
3272 into a two-component image representation. The first component is the
3273 magnitude of the complex number and the second is the phase of the complex
3274 number. See for example, <a href="http://en.wikipedia.org/wiki/Complex_numbers">Complex Numbers</a>.</p>
3275
3276 <p>The magnitude and phase component images must be specified using image
3277 formats that do not limit the color or compress the image. Thus, MIFF, TIF,
3278 PFM, EXR and PNG are the recommended image formats to use. All of these
3279 formats, except PNG support multi-frame images. So for example,</p>
3280
3281 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert image.png -fft fft_image.miff</span></p>
3282 <p>generates a magnitude image as <code>fft_image.miff[0]</code> and a phase
3283 image as <code>fft_image.miff[1]</code>. Similarly,</p>
3284
3285 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert image.png -fft fft_image.png</span></p>
3286 <p>generates a magnitude image as <code>fft_image-0.png</code> and a phase image
3287 as <code>fft_image-1.png</code>. If you prefer this representation, then you can
3288 force any of the other formats to produce two output images by including <a href="command-line-options.html#adjoin">+adjoin</a> following -fft in the command line.</p>
3289
3290 <p>The input image can be any size, but if not square and even-dimensioned, it
3291 is padded automagically to the larger of the width or height of the input
3292 image and to an even number of pixels. The padding will occur at the bottom
3293 and/or right sides of the input image. The resulting output magnitude and
3294 phase images is square at this size. The kind of padding relies on the <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting.</p>
3295
3296 <p>Both output components will have dynamic ranges that fit within
3297 [0, <em class="QR">QuantumRange</em>], so that HDRI need not be enabled.
3298 Phase values nominally range from 0 to 2*π, but is scaled to span the full
3299 dynamic range.  (The first few releases had non-HDRI scaled but HDRI not
3300 scaled). The magnitude image is not scaled and thus generally will contain
3301 very small values. As such, the image normally will appear totally black. In
3302 order to view any detail, the magnitude image typically is enhanced with a log
3303 function into what is usually called the spectrum. A log function is used to
3304 enhance the darker values more in comparison to the lighter values. This can
3305 be done, for example, as follows:</p>
3306
3307 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert fft_image.miff[0] -contrast-stretch 0 \ <br></br>
3308                 -evaluate log 1000 fft_image_spectrum.png</span></p>
3309 <p>where either <a href="command-line-options.html#contrast-stretch">-contrast-stretch</a> 0 or <a href="command-line-options.html#auto-level">-auto-level</a> is used to scale the image to full dynamic
3310 range, first. The argument to the <a href="command-line-options.html#evaluate">-evaluate</a> log
3311 typically is specified between 100 and 10,000, depending upon the amount of
3312 detail that one wants to bring out in the spectrum. Larger values produce more
3313 visible detail. Too much detail, however, may hide the important features.</p>
3314
3315 <p>The <a href="http://www.fftw.org/">FFTW</a> delegate library is required to
3316 use <a href="command-line-options.html#fft">-fft</a>.</p>
3317
3318 <p>Use <a href="command-line-options.html#fft">+fft</a> to produce two output images that are the real
3319 and imaginary components of the complex valued Fourier transform.</p>
3320
3321 <p>However, as the real and imaginary components can contain negative values,
3322 this requires that IM be configured with HDRI enabled. In this case, you must
3323 use either MIFF, TIF, PFM or MPC formats for the real and imaginary component
3324 results, since they are formats that preserve both negative and fractional
3325 values without clipping them or truncating the fractional part. With either
3326 MIFF or TIF, one should add -define quantum:format=32, to allow those image
3327 types to work properly in HDRI mode without clipping.</p>
3328
3329 <p>The real and imaginary component images resulting from <a href="command-line-options.html#fft">+fft</a> are also square, even dimensioned images due to the same
3330 padding that was discussed above for the magnitude and phase component
3331 images.</p>
3332
3333 <p>See the discussion on HDRI implementations of ImageMagick on the page <a href="high-dynamic-range.html">High Dynamic-Range Images</a>. For more
3334 about HDRI go the ImageMagick <a href="http://www.imagemagick.org/Usage/basics/#hdri">Usage</a> pages, <a href="http://www.fmwconcepts.com/imagemagick/fourier_transforms/fourier.html">Fred's Fourier Processing With ImageMagick page</a> or this <a href="http://en.wikipedia.org/wiki/High_dynamic_range_imaging">Wikipedia</a>
3335  entry.  </p>
3336
3337
3338 <div style="margin: auto;">
3339   <h4><a id="fill"></a>-fill <em class="arg">color</em></h4>
3340 </div>
3341
3342 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">color to use when filling a graphic primitive.</td><td style="text-align:right;"></td></tr></table>
3343
3344 <p>This option accepts a color name, a hex color, or a numerical RGB, RGBA,
3345 HSL, HSLA, CMYK, or CMYKA specification.  See <a href="color.html">Color Names</a> for
3346 a description of how to properly specify the color argument.</p>
3347
3348 <p>Enclose the color specification in quotation marks to prevent the "#" or
3349 the parentheses from being interpreted by your shell.</p>
3350
3351 <p>For example,</p>
3352
3353 <p class="crtsnip">
3354   -fill blue
3355 </p>
3356 <p class="crtsnip">
3357   -fill "#ddddff"
3358 </p>
3359 <p class="crtsnip">
3360   -fill "rgb(255,255,255)"
3361 </p>
3362
3363 <p>See <a href="command-line-options.html#draw">-draw</a> for further details.</p>
3364
3365 <p>To print a complete list of color names, use the <a href="command-line-options.html#list">-list color</a> option.</p>
3366
3367 <div style="margin: auto;">
3368   <h4><a id="filter"></a>-filter <em class="arg">type</em></h4>
3369 </div>
3370
3371 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Use this <em class="arg">type</em> of filter when resizing or
3372 distorting an image.</td><td style="text-align:right;"></td></tr></table>
3373
3374 <p>Use this option to affect the resizing operation of an image during
3375 operations such as <a href="command-line-options.html#resize">-resize</a> and <a href="command-line-options.html#distort">-distort</a>. For example you can use a simple resize filter such as:</p>
3376
3377 <pre class="text">
3378    Point       Hermite       Cubic
3379    Box         Gaussian      Catrom
3380    Triangle    Quadratic     Mitchell
3381 </pre>
3382
3383 <p>The <code>Bessel</code> and <code>Sinc</code> filter is also provided (as well
3384 as a faster <code>SincFast</code> equivalent form).  However these filters are
3385 generally useless on their own as they are infinite filters that are being
3386 clipped to the filters support size. Their direct use is not recommended
3387 except via expert settings (see below). </p>
3388
3389 <p>Instead these special filter functions are typically windowed by a windowing
3390 function that the <a href="command-line-options.html#filter">-filter</a> setting defines.   That is
3391 using these functions will define a 'Windowed' filter, appropriate to the
3392 operator involved.  Windowed filters include: </p>
3393
3394 <pre class="text">
3395    Lanczos       Hamming       Parzen
3396    Blackman      Kaiser        Welsh
3397    Hanning       Bartlett      Bohman
3398 </pre>
3399
3400 <p>Also one special self-windowing filter is also provided
3401 <code>Lagrange</code>, which will automagically re-adjust its function depending
3402 on the current 'support' or 'lobes' expert settings (see below).</p>
3403
3404 <p>If you do not select a filter with this option, the filter defaults to
3405 <code>Mitchell</code> for a colormapped image, an image with a matte channel, or
3406 if the image is enlarged.  Otherwise the filter default to
3407 <code>Lanczos</code>.</p>
3408
3409 <p>To print a complete list of resize filters, use the <a href="command-line-options.html#list">-list
3410 filter</a> option.</p>
3411
3412 <p>You can modify how the filter behaves as it scales your image through the
3413 use of these expert settings (see also <a href="command-line-options.html#define">-define</a> and <a href="command-line-options.html#set">-set</a>):-</p>
3414
3415 <dl class="doc">
3416 <dt>-define filter:blur=<em>factor</em></dt>
3417 <dd>Scale the X axis of the filter (and its window). Use &gt; 1.0 for
3418     blurry or &lt; 1.0 for sharp. This should only be used with Gaussian and
3419     Gaussian-like filters simple filters, or you may not get the expected
3420     results. </dd>
3421
3422 <dt>-define filter:support=<em>radius</em></dt>
3423 <dd>Set the filter support radius. Defines how large the filter should be and
3424     thus directly defines how slow the filtered resampling process is. All
3425     filters have a default 'prefered' support size. Some filters like
3426     <code>Lagrange</code> and windowed filters adjust themselves depending on
3427     this value.  With simple filters this value either does nothing (but slow
3428     the resampling), or will clip the filter function in a detrimental way.
3429     </dd>
3430
3431 <dt>-define filter:lobes=<em>count</em></dt>
3432 <dd>Set the number of lobes to use for the Sinc/Bessel filter. This an
3433     alternative way of specifying the 'support' range of the filter, that is
3434     designed to be more suited to windowed filters, especially when used for
3435     image distorts.</dd>
3436
3437 <dt>-define filter:sigma=<em>value</em></dt>
3438 <dd>The 'sigma' value used to define the <code>Gaussian</code> filter.  Default
3439     sigma value is '<code>0.5</code>'.  It only effects <code>Gaussian</code> but
3440     does not shrink (but may enlarge) the filter's 'support'.  It can be used
3441     to generate very small blurs but without the filter 'missing' pixels due
3442     to using a small support setting. A larger value of '<code>0.707</code>'
3443     (a value of '1/sqrt(2)') is another common setting. </dd>
3444
3445 <dt>-define filter:b=<em>b-spline_factor</em></dt>
3446 <dt>-define filter:c=<em>keys_alpha_factor</em></dt>
3447 <dd>Redefine the values used for cubic filters such as <code>Cubic</code>,
3448     <code>Catrom</code>, <code>Mitchel</code>, and <code>Hermite</code>, as well as
3449     the <code>Parzen</code> cubic windowing function. If only one of the values
3450     are defined, the other is set so as to generate a 'Cubic-Keys' filter.
3451     The values meaning was defined by a research paper by
3452     Mitchell-Netravali.</dd>
3453
3454 <dt>-define filter:kaiser-beta=<em>value</em></dt>
3455 <dd>The 'alpha' value used to as part of the Kaiser Windowing function.
3456     Default value is '6.5'.  It only effects Kaiser windowing function, and
3457     does not effect any other attributes.</dd>
3458
3459 <dd>Before IM v6.7.6-10, this option was known as "filter:alpha", (an
3460     inheritance from the very old "zoom" program). It was changed to bring the
3461     function in line with more modern academic research usage, and better
3462     assign it be more definitive.  </dd>
3463
3464 <dt>-define filter:kaiser-alpha=<em>value</em></dt>
3465 <dd>This value when multiplied by 'PI' is equivelent to "kaiser-beta", and
3466     will override that setting.  It only effects Kaiser windowing function,
3467     and does not effect any other attributes. </dd>
3468
3469 <dt>-define filter:filter=<em>filter_function</em></dt>
3470 <dd>Use this function directly as the weighting filter.  This will allow
3471     you to directly use a windowing function such as <code>Blackman</code>,
3472     as a resampling filter, rather than as its normal usage as a windowing
3473     function. </dd>
3474
3475 <dd>If defined, no windowing function also defined, the window function is set
3476     to <code>Box</code>). Directly specifying <code>Sinc</code> or <code>Jinc</code>
3477     as a filter will also do this. </dd>
3478
3479 <dt>-define filter:window=<em>filter_function</em></dt>
3480 <dd>The IIR (infinite impulse response) filters <code>Sinc</code> and
3481     <code>Jinc</code> are windowed (brought down to zero over the defined
3482     support range) with the given filter. This allows you to specify a filter
3483     function to be used as a windowing function for these IIR filters. </dd>
3484
3485 <dd>Many of the defined filters are actually windowing functions for these IIR
3486     filters.  A typical choices is <code>Box</code>, (which effectively turns
3487     off the windowing function).  </dd>
3488
3489 <dt>-define filter:win-support=<em>radius</em></dt>
3490 <dd>Scale windowing function to this size instead.  This causes the windowing
3491     (or self-windowing Lagrange filter) to act is if the support window is
3492     larger than what is actually supplied to the calling operator.  The filter
3493     however is still clipped to the real support size given.  If unset this
3494     will equal the normal filter support size. </dd>
3495
3496 <dt>-define filter:verbose=<em>1</em></dt>
3497 <dd>This causes IM to print information on the final internal filter
3498     selection to standard output.  This includes a commented header on the
3499     filter settings being used, and data allowing the filter weights to be
3500     easily graphed. </dd>
3501
3502 <dd>Note however that some filters are internally defined in terms of other
3503     filters.  The <code>Lanczos</code> filter for example is defined in terms of
3504     a <code>SincFast</code> windowed <code>SincFast</code> filter, while
3505     <code>Mitchell</code> is defined as a general <code>Cubic</code> family filter
3506     with specific 'B' and 'C' settings. </dd>
3507
3508 </dl>
3509
3510 <p>For example, to get a 8 lobe jinc windowed sinc filter (Genseng filter?):</p>
3511
3512 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert image.png \<br></br>
3513           -filter sinc \<br></br>
3514           -set filter:window=jinc \<br></br>
3515           -set filter:lobes=8 \<br></br>
3516           -resize 150%   image.jpg</span></p>
3517 <p>Or a raw un-windowed Sinc filter with 4 lobes:</p>
3518
3519 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert image.png \<br></br>
3520           -set filter:filter=sinc \<br></br>
3521           -set filter:lobes=4 \<br></br>
3522           -resize 150%   image.jpg</span></p>
3523 <p>To extract the data for a raw windowing function, combine it with
3524 a '<code>Box</code>' filter.  For example the '<code>Welch</code> parabolic
3525 windowing function. </p>
3526
3527 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert null: -define filter:filter=Box \<br></br>
3528                  -define filter:window=Welch \<br></br>
3529                  -define filter:support=1.0 \<br></br>
3530                  -define filter:verbose=1 \<br></br>
3531                  -resize 2 null:  &gt; window_welch.dat<br></br>
3532   gnuplot<br></br>
3533      set grid<br></br>
3534      plot "window_welch.dat" with lines</span></p>
3535 <p>Note that the use of expert options is provided for image processing experts
3536 who have studied and understand how resize filters work. Without this
3537 knowledge, and an understanding of the definition of the actual filters
3538 involved, using expert settings are more likely to be detrimental to your image
3539 resizing.</p>
3540
3541
3542 <div style="margin: auto;">
3543   <h4><a id="flatten"></a>-flatten</h4>
3544 </div>
3545
3546 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">This is a simple alias for the <a href="command-line-options.html#layers">-layers</a> method "flatten".</td><td style="text-align:right;"></td></tr></table>
3547
3548
3549 <div style="margin: auto;">
3550   <h4><a id="flip"></a>-flip</h4>
3551 </div>
3552
3553 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">create a <em>mirror image</em>.</td><td style="text-align:right;"></td></tr></table>
3554
3555 <p>reflect the scanlines in the vertical direction. The image will be mirrored
3556 upside-down. </p>
3557
3558
3559 <div style="margin: auto;">
3560   <h4><a id="floodfill"></a>-floodfill {<em class="arg">+-</em>}<em class="arg">x</em>{<em class="arg">+-</em>}<em class="arg">y</em> <em class="arg">color</em></h4>
3561 </div>
3562
3563 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">floodfill the image with color at the specified offset.</td><td style="text-align:right;"></td></tr></table>
3564
3565 <p>Flood fill starts from the given 'seed point' which is not gravity effected.
3566 Any color that matches within <a href="command-line-options.html#fuzz">-fuzz</a> color distance of the
3567 given <em class="arg">color</em>  argument, connected to that 'seed point'
3568 will be replaced with the current <a href="command-line-options.html#fill">-fill</a> color. </p>
3569
3570 <p>Note that if the pixel at the 'seed point' does not itself match the given
3571 <em class="arg">color</em> (according to <a href="command-line-options.html#fuzz">-fuzz</a>), then no
3572 action will be taken. </p>
3573
3574 <p>This operator works more like the <a href="command-line-options.html#opaque">-opaque</a> option, than
3575 a more general flood fill that reads the matching color directly at the 'seed
3576 point'. For this form of flood fill, look at <a href="command-line-options.html#draw">-draw</a>  and
3577 its 'color floodfill' drawing method.  </p>
3578
3579
3580 <div style="margin: auto;">
3581   <h4><a id="flop"></a>-flop</h4>
3582 </div>
3583
3584 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">create a <em>mirror image</em>.</td><td style="text-align:right;"></td></tr></table>
3585
3586 <p>Reflect the scanlines in the horizontal direction, just like the image in
3587 a vertical mirror. </p>
3588
3589
3590 <div style="margin: auto;">
3591   <h4><a id="font"></a>-font <em class="arg">name</em></h4>
3592 </div>
3593
3594 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">set the font to use when annotating images with text, or creating labels.</td><td style="text-align:right;"></td></tr></table>
3595
3596 <p>To print a complete list of fonts, use the <a href="command-line-options.html#list">-list font</a>
3597 option (for versions prior to 6.3.6, use 'type' instead of 'font').</p>
3598
3599 <p>In addition to the fonts specified by the above pre-defined list, you can
3600 also specify a font from a specific source.  For example <code>Arial.ttf</code>
3601 is a TrueType font file, <code>ps:helvetica</code> is PostScript font, and
3602 <code>x:fixed</code> is X11 font.</p>
3603
3604 <p>For other settings that affect fonts, see the options <a href="command-line-options.html#family">-family</a>, <a href="command-line-options.html#stretch">-stretch</a>, <a href="command-line-options.html#style">-style</a>, and <a href="command-line-options.html#weight">-weight</a>. </p>
3605
3606
3607 <div style="margin: auto;">
3608   <h4><a id="foreground"></a>-foreground <em class="arg">color</em></h4>
3609 </div>
3610
3611 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Define the foreground color for menus.</td><td style="text-align:right;">[<a href="display.html">display</a>]</td></tr></table>
3612
3613 <p>The color is specified using the format described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
3614
3615 <p>The default foreground color is black.</p>
3616
3617 <div style="margin: auto;">
3618   <h4><a id="format"></a>-format <em class="arg">type</em></h4>
3619 </div>
3620
3621 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">the image format type.</td><td style="text-align:right;"></td></tr></table>
3622
3623 <p>When used with the <code>mogrify</code> utility, this option converts any
3624 image to the image <a href="formats.html">format</a> you specify.
3625 For a list of image format types supported by ImageMagick, use <a href="command-line-options.html#list">-list format</a>.</p>
3626
3627 <p>By default the file is written to its original name. However, if the
3628 filename extension matches a supported format, the extension is replaced with
3629 the image format type specified with <a href="command-line-options.html#format">-format</a>. For
3630 example, if you specify <em class="arg">tiff</em> as the format type and the
3631 input image filename is <em class="arg">image.gif</em>, the output image
3632 filename becomes <em class="arg">image.tiff</em>.</p>
3633
3634 <div style="margin: auto;">
3635   <h4><a id="format_identify_"></a>-format <em class="arg">string</em></h4>
3636 </div>
3637
3638 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">output formatted image characteristics.</td><td style="text-align:right;">[<a href="identify.html">identify</a>]</td></tr></table>
3639
3640 <p>See <a href="escape.html">Format and Print Image
3641 Properties</a> for an explanation on how to specify the argument to this
3642 option.</p>
3643
3644 <div style="margin: auto;">
3645   <h4><a id="frame"></a>-frame <em class="arg">geometry</em></h4>
3646 </div>
3647
3648 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Surround the image with a border or beveled frame.</td><td style="text-align:right;"></td></tr></table>
3649
3650 <p>The color of the border is specified with the <a href="command-line-options.html#mattecolor">-mattecolor</a> command line option. </p>
3651
3652 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument. The <em class="arg">size</em> portion of the <em class="arg">geometry</em> argument indicates the amount of extra width and
3653 height that is added to the dimensions of the image. If no offsets are given
3654 in the <em class="arg">geometry</em> argument, then the border added is
3655 a solid color.  Offsets <em>x</em> and <em>y</em>, if present, specify that
3656 the width and height of the border is partitioned to form an outer bevel of
3657 thickness <em>x</em> pixels and an inner bevel of thickness
3658 <em>y</em> pixels. Negative offsets make no sense as frame arguments.
3659 </p>
3660
3661 <p>The <a href="command-line-options.html#frame">-frame</a> option is affected by the current <a href="command-line-options.html#compose">-compose</a> setting and assumes that this is using the default
3662 '<code>Over</code>' composition method.  It generates an image of the appropriate
3663 size with the current <a href="command-line-options.html#bordercolor">-bordercolor</a> setting, and then
3664 draws the frame of four distinct colors close to the current <a href="command-line-options.html#mattecolor">-mattecolor</a>.  The original image is then overlaid onto
3665 center of this image.  This means that with the default compose method of
3666 '<code>Over</code>' any transparent parts may be replaced by the current <a href="command-line-options.html#bordercolor">-bordercolor</a> setting.</p>
3667
3668 <p>The image composition is not
3669 affected by the <a href="command-line-options.html#gravity">-gravity</a> option.</p>
3670
3671
3672 <div style="margin: auto;">
3673   <h4><a id="frame_import_"></a>-frame</h4>
3674 </div>
3675
3676 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">include the X window frame in the imported image.</td><td style="text-align:right;">[<a href="import.html">import</a>]</td></tr></table>
3677
3678 <div style="margin: auto;">
3679   <h4><a id="function"></a>-function <em class="arg">function</em> <em class="arg">parameters</em></h4>
3680 </div>
3681
3682 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Apply a function to channel values.</td><td style="text-align:right;"></td></tr></table>
3683
3684 <p>This operator performs calculations based on the given arguments to modify
3685 each of the color values for each previously set <a href="command-line-options.html#channel">-channel</a> in the image. See <a href="command-line-options.html#evaluate">-evaluate</a> for details concerning how the results of the
3686 calculations are handled.</p>
3687
3688 <p>This is can be considered a multi-argument version of the <a href="command-line-options.html#evaluate">-evaluate</a> operator. (Added in
3689 ImageMagick 6.4.8−8.)</p>
3690
3691 <p>Here,  <em class="arg">parameters</em> is a comma-separated list of
3692 numerical values. The number of values varies depending on which <em class="arg">function</em> is selected. Choose the <em class="arg">function</em> from:</p>
3693
3694 <pre class="text">
3695    Polynomial
3696    Sinusoid
3697    Arcsin
3698    Arctan
3699 </pre>
3700
3701 <p>To print a complete list of <a href="command-line-options.html#function">-function</a> operators,
3702 use <a href="command-line-options.html#list">-list function</a>. Descriptions follow.</p>
3703
3704 <dl class="doc">
3705 <dt><code>Polynomial</code></dt>
3706 <dd>
3707
3708 <p>The <code>Polynomial</code> function takes an arbitrary number of parameters,
3709 these being the coefficients of a polynomial, in decreasing order of degree.
3710 That is, entering</p>
3711
3712 <div style="text-align: center">
3713    -function Polynomial <em>a</em><sub><em>n</em></sub>,<em>a</em><sub><em>n</em>-1</sub>,...<em>a</em><sub>1</sub>,<em>a</em><sub>0</sub>
3714 </div>
3715
3716 <p>will invoke a polynomial function given by</p>
3717
3718 <div style="text-align: center">
3719    <em>a</em><sub><em>n</em></sub> <b><em>u</em></b><sup><em>n</em></sup> +
3720    <em>a</em><sub><em>n</em>-1</sub> <b><em>u</em></b><sup><em>n</em>-1</sup> +
3721    ··· <em>a</em><sub>1</sub> <b><em>u</em></b> + <em>a</em><sub>0</sub>,
3722 </div>
3723
3724 <p>where <b><em>u</em></b> is pixel's original normalized channel value.</p>
3725
3726 <p>The <code>Polynomial</code> function can be used in place of <code>Set</code>
3727 (the <em>constant</em> polynomial) and <code>Add</code>, <code>Divide</code>,
3728 <code>Multiply</code>, and <code>Subtract</code> (some <em>linear</em>
3729 polynomials) of the <a href="command-line-options.html#evaluate">-evaluate</a> operator. The <a href="command-line-options.html#level">-level</a> operator also affects channels linearly. Some
3730 correspondences follow.</p>
3731
3732 <table class="doc">
3733   <col width="35%"></col>
3734   <col width="35%"></col>
3735   <col width="30%"></col>
3736   <tr>
3737         <td>-evaluate Set <em class="arg">value</em> </td>
3738         <td>-function Polynomial <em class="arg">value</em></td>
3739         <td>(Constant functions; set <em class="arg">value</em>×100% gray when channels are RGB.)</td>
3740   </tr>
3741   <tr>
3742         <td>-evaluate Add <em class="arg">value</em> </td>
3743         <td>-function Polynomial 1,<em class="arg">value</em></td>
3744   </tr>
3745   <tr>
3746         <td>-evaluate Subtract <em class="arg">value</em> </td>
3747         <td>-function Polynomial 1,−<em class="arg">value</em></td>
3748   </tr>
3749   <tr>
3750         <td>-evaluate Multiply <em class="arg">value</em> </td>
3751         <td>-function Polynomial <em class="arg">value</em>,0</td>
3752   </tr>
3753   <tr>
3754         <td>+level  black% x white%</td>
3755         <td>-function Polynomial  A,B</td>
3756         <td>(Reduce contrast. Here, A=(white-black)/100 and  B=black/100.)</td>
3757   </tr>
3758 </table>
3759
3760 <p>The <code>Polynomial</code> function gives great versatility, since
3761 polynomials can be used to fit any continuous curve to any degree of accuracy
3762 desired.</p>
3763
3764 </dd>
3765
3766 <dt><code>Sinusoid</code></dt>
3767 <dd>
3768 <p>The <code>Sinusoid</code> function can be used to vary the channel values
3769 sinusoidally by setting frequency, phase shift, amplitude, and a bias. These
3770 values are given as one to four parameters, as follows,</p>
3771
3772 <div style="text-align: center">
3773    -function <code>Sinusoid</code> <em class="arg">freq</em>,[<em class="arg">phase</em>,[<em class="arg">amp</em>,[<em class="arg">bias</em>]]]
3774 </div>
3775
3776 <p>where <em>phase</em> is in degrees. (The domain [0,1] of the function
3777 corresponds to 0 through <em class="arg">freq</em>×360 degrees.)
3778 The result is that if a pixel's normalized channel value is originally
3779 <b><em>u</em></b>, its resulting normalized value is given by </p>
3780
3781 <div style="text-align: center">
3782 <em class="arg">amp</em> * sin(2*π* (<em class="arg">freq</em> * <b><em>u</em></b> + <em class="arg">phase</em> / 360)) + <em class="arg">bias</em>
3783 </div>
3784
3785 <p> For example, the following generates a curve that starts and ends at 0.9
3786 (when <b><em>u</em></b>=0 and 1, resp.), oscillating three times between
3787 .7−.2=.5 and .7+.2=.9. </p>
3788
3789 <p class="crtsnip">
3790    -function Sinusoid 3,-90,.2,.7
3791 </p>
3792
3793 <p>The default values of <em class="arg">amp</em> and <em class="arg">bias</em> are both .5. The default for <em class="arg">phase</em>
3794 is 0.</p>
3795
3796 <p>The <code>Sinusoid</code> function generalizes <code>Sin</code> and
3797 <code>Cos</code> of the <a href="command-line-options.html#evaluate">-evaluate</a> operator by allowing
3798 varying amplitude, phase and bias. The correspondence is as follows.</p>
3799
3800 <table class="doc">
3801   <tr>
3802         <td>-evaluate Sin <em class="arg">freq</em> </td>
3803         <td>-function Sinusoid <em class="arg">freq</em>,0 </td>
3804   </tr>
3805   <tr>
3806         <td>-evaluate Cos <em class="arg">freq</em> </td>
3807         <td>-function Sinusoid <em class="arg">freq</em>,90 </td>
3808   </tr>
3809 </table>
3810 </dd>
3811
3812 <dt><code>ArcSin</code></dt>
3813 <dd>
3814 <p>The <code>ArcSin</code> function generates the inverse curve of a Sinusoid,
3815 and can be used to generate cylindrical distortion and displacement maps.
3816 The curve can be adjusted relative to both the input values and output range
3817 of values.</p>
3818
3819 <p style="text-align: center">
3820    -function <code>ArcSin</code> <em class="arg">width</em>,[<em class="arg">center</em>,[<em class="arg">range</em>,[<em class="arg">bias</em>]]]
3821 </p>
3822
3823 <p>with all values given in terms of normalized color values (0.0 for black,
3824 1.0 for white). Defaulting to values covering the full range from 0.0 to 1.0
3825 for bout input (<em class="arg">width</em>), and output (<em class="arg">width</em>) values. '<code>1.0,0.5,1.0,0.5</code>' </p>
3826
3827 <p style="text-align: center">
3828 <em class="arg">range</em>/π * asin( 2/<em class="arg">width</em> * ( <b><em>u</em></b> - <em class="arg">center</em> ) ) + <em class="arg">bias</em>
3829 </p>
3830
3831 </dd>
3832
3833 <dt><code>ArcTan</code></dt>
3834 <dd>
3835 <p>The <code>ArcTan</code> function generates a curve that smooth crosses from
3836 limit values at infinities, though a center using the given slope value.
3837 All these values can be adjusted via the arguments.</p>
3838
3839 <p style="text-align: center">
3840    -function <code>ArcTan</code> <em class="arg">slope</em>,[<em class="arg">center</em>,[<em class="arg">range</em>,[<em class="arg">bias</em>]]]
3841 </p>
3842
3843 <p>Defaulting to '<code>1.0,0.5,1.0,0.5</code>'.
3844 </p>
3845
3846 <p style="text-align: center">
3847 <em class="arg">range</em>/π * atan( <em class="arg">slope</em>*π * ( <b><em>u</em></b> - <em class="arg">center</em> ) ) + <em class="arg">bias</em>
3848 </p>
3849
3850 </dd>
3851
3852 </dl>
3853
3854
3855 <div style="margin: auto;">
3856   <h4><a id="fuzz"></a>-fuzz <em class="arg">distance</em>{<em class="arg">%</em>}</h4>
3857 </div>
3858
3859 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Colors within this <em class="arg">distance</em> are considered equal.</td><td style="text-align:right;"></td></tr></table>
3860
3861 <p>A number of algorithms search for a target color. By default the color must
3862 be exact. Use this option to match colors that are close to the target color
3863 in RGB space. For example, if you want to automagically trim the edges of an
3864 image with <a href="command-line-options.html#trim">-trim</a> but the image was scanned and the target
3865 background color may differ by a small amount. This option can account for
3866 these differences.</p>
3867
3868 <p>The <em class="arg">distance</em> can be in absolute intensity units or, by
3869 appending <code>%</code> as a percentage of the maximum possible intensity (255,
3870 65535, or 4294967295).</p>
3871
3872
3873 <div style="margin: auto;">
3874   <h4><a id="fx"></a>-fx <em class="arg">expression</em></h4>
3875 </div>
3876
3877 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">apply a mathematical expression to an image or image channels.</td><td style="text-align:right;"></td></tr></table>
3878
3879 <p>If the first character of <em class="arg">expression</em> is <code>@</code>,
3880 the expression is read from a file titled by the remaining characters in the
3881 string.</p>
3882
3883 <p>See <a href="fx.html">FX,
3884 The Special Effects Image Operator</a> for a detailed discussion of this
3885 option.</p>
3886
3887
3888 <div style="margin: auto;">
3889   <h4><a id="gamma"></a>-gamma <em class="arg">value</em></h4>
3890 </div>
3891
3892 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">level of gamma correction.</td><td style="text-align:right;"></td></tr></table>
3893
3894 <p>The same color image displayed on two different workstations may look
3895 different due to differences in the display monitor. Use gamma correction to
3896 adjust for this color difference.  Reasonable values extend from
3897 <code>0.8</code> to <code>2.3</code>. Gamma less than 1.0 darkens the image and
3898 gamma greater than 1.0 lightens it. Large adjustments to image gamma may
3899 result in the loss of some image information if the pixel quantum size is only
3900 eight bits (quantum range 0 to 255).</p>
3901
3902 <p>Gamma adjusts the image's channel values pixel-by-pixel according to
3903 a power law, namely, pow(pixel,1/gamma) or pixel^(1/gamma), where pixel is the
3904 normalized or 0 to 1 color value. For example, using a value of gamma=2 is the
3905 same as taking the square root of the image.</p>
3906
3907 <p>You can apply separate gamma values to the red, green, and blue channels of
3908 the image with a gamma value list delimited with commas (e.g.,
3909 <code>1.7,2.3,1.2</code>).</p>
3910
3911 <p>Use <a href="command-line-options.html#gamma">+gamma <em class="arg">value</em></a> to set the
3912 image gamma level without actually adjusting the image pixels. This option
3913 is useful if the image is of a known gamma but not set as an image attribute
3914 (e.g. PNG images).  Write the "file gamma" which is the reciprocal of the
3915 display gamma; e.g., if your image is sRGB and you want to write a PNG gAMA
3916 chunk, use</p>
3917 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert input.png +gamma .45455 output.png</span></p><p>(0.45455 is 1/2.2)</p>
3918
3919 <p>Note that gamma adjustments are also available via the <a href="command-line-options.html#level">-level</a> operator.</p>
3920
3921 <div style="margin: auto;">
3922   <h4><a id="gaussian-blur"></a>-gaussian-blur <em class="arg">radius</em><br></br>-gaussian-blur <em class="arg">radius</em>x<em class="arg">sigma</em>+<em class="arg">bias</em></h4>
3923 </div>
3924
3925 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Blur the image with a Gaussian operator.</td><td style="text-align:right;"></td></tr></table>
3926
3927 <p>Convolve the image with a Gaussian or normal distribution using the given
3928 <em class="arg">Sigma</em> value.  The formula is:</p>
3929
3930 <div class="eqn"><img alt="gaussian distribution" width="243px" height="42px" src="../images/gaussian-blur.png"></img>
3931 </div>
3932
3933 <p>The <em class="arg">Sigma</em> value is the important argument, and
3934 determines the actual amount of blurring that will take place. </p>
3935
3936 <p>The <em class="arg">Radius</em> is only used to determine the size of the
3937 array which will hold the calculated Gaussian distribution. It should be an
3938 integer.  If not given, or set to zero, IM will calculate the largest possible
3939 radius that will provide meaningful results for the Gaussian distribution.
3940 </p>
3941
3942 <p>The larger the <em class="arg">Radius</em> the radius the slower the
3943 operation is. However too small a <em class="arg">Radius</em>, and sever
3944 aliasing effects may result.  As a guideline, <em class="arg">Radius</em>
3945 should be at least twice the <em class="arg">Sigma</em> value, though three
3946 times will produce a more accurate result. </p>
3947
3948 <p>This differs from the faster <a href="command-line-options.html#blur">-blur</a> operator in that a
3949 full 2-dimensional convolution is used to generate the weighted average of the
3950 neighboring pixels. </p>
3951
3952 <p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
3953 pixels which are outside the image proper are blurred into the final result.
3954 </p>
3955
3956
3957 <div style="margin: auto;">
3958   <h4><a id="geometry"></a>-geometry <em class="arg">geometry</em></h4>
3959 </div>
3960
3961 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set the preferred size and location of the image.</td><td style="text-align:right;"></td></tr></table>
3962
3963 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
3964
3965 <div style="margin: auto;">
3966   <h4><a id="gravity"></a>-gravity <em class="arg">type</em></h4>
3967 </div>
3968
3969 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Sets the current gravity suggestion for various other settings and options.</td><td style="text-align:right;"></td></tr></table>
3970
3971 <p>Choices include: <code>NorthWest</code>, <code>North</code>,
3972 <code>NorthEast</code>, <code>West</code>, <code>Center</code>, <code>East</code>,
3973 <code>SouthWest</code>, <code>South</code>, <code>SouthEast</code>.  Use <a href="command-line-options.html#list">-list gravity</a> to get a complete list of <a href="command-line-options.html#gravity">-gravity</a> settings available in your ImageMagick
3974 installation.</p>
3975
3976 <p>The direction you choose specifies where to position text or subimages. For
3977 example, a gravity of <code>Center</code> forces the text to be centered within
3978 the image. By default, the image gravity is <code>NorthWest</code>. See <a href="command-line-options.html#draw">-draw</a> for more details about graphic primitives.  Only the
3979 text primitive of <a href="command-line-options.html#draw">-draw</a> is affected by the <a href="command-line-options.html#gravity">-gravity</a> option.</p>
3980
3981 <p>The <a href="command-line-options.html#gravity">-gravity</a> option is also used in concert with the
3982 <a href="command-line-options.html#geometry">-geometry</a> setting and other settings or options that
3983 take <em class="arg">geometry</em> as an argument, such as the <a href="command-line-options.html#crop">-crop</a> option. </p>
3984
3985 <p>If a <a href="command-line-options.html#gravity">-gravity</a> setting occurs before another option
3986 or setting having a <em class="arg">geometry</em> argument that specifies an
3987 offset, the offset is usually applied to the point within the image suggested
3988 by the <a href="command-line-options.html#gravity">-gravity</a> argument.  Thus, in the following
3989 command, for example, suppose the file <code>image.png</code> has dimensions
3990 200x100. The offset specified by the argument to <a href="command-line-options.html#region">-region</a>
3991 is (−40,+20). The argument to <a href="command-line-options.html#gravity">-gravity</a> is
3992 <code>Center</code>, which suggests the midpoint of the image, at the point
3993 (100,50). The offset (−40,20) is applied to that point, giving
3994 (100−40,50+20)=(60,70), so the specified 10x10 region is located at
3995 that point. (In addition, the <a href="command-line-options.html#gravity">-gravity</a> affects the
3996 region itself, which is <em>centered</em> at the pixel
3997 coordinate (60,70). (See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.)</p>
3998
3999 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert image.png -gravity Center -region 10x10-40+20 \ <br></br> -negate output.png</span></p>
4000 <p>When used as an option to <a href="composite.html">composite</a>, <a href="command-line-options.html#gravity">-gravity</a> gives the direction that the image gravitates
4001 within the composite.</p>
4002
4003 <p>When used as an option to <a href="montage.html">montage</a>, <a href="command-line-options.html#gravity">-gravity</a> gives the direction that an image gravitates
4004 within a tile. The default gravity is <code>Center</code> for this purpose.</p>
4005
4006
4007 <div style="margin: auto;">
4008   <h4><a id="grayscale"></a>-grayscale <em class="arg">method</em></h4>
4009 </div>
4010
4011 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">convert image to grayscale.</td><td style="text-align:right;"></td></tr></table>
4012
4013 <p>This will use one of the <a href="command-line-options.html#intensity">-intensity</a> methods to
4014 convert the given image into a linear-grayscale image. </p>
4015
4016 <p>For example, to convert an image to (linear) Rec709Luminance grayscale,  type:</p>
4017
4018 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert in.png -grayscale Rec709Luminance out.png</span></p>
4019 <p>which is equivalent to:</p>
4020
4021 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert in.png -colorspace gray out.png</span></p>
4022 <p>Similarly, to convert an image to (non-linear) Rec709Luma grayscale,  type:</p>
4023
4024 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert in.png -grayscale Rec709Luma out.png</span></p>
4025 <p>which is equivalent to:</p>
4026
4027 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert in.png -set colorspace RGB -colorspace gray out.png</span></p>
4028 <p>Note that a 'colorspace' intensity method will produce the same result
4029 regardless of the current colorpsace of the image. But a 'mathematical'
4030 intensity method will depend on the current colorspace the image is currently
4031 using. </p>
4032
4033 <p>While this operation uses an <a href="command-line-options.html#intensity">-intensity</a> method, 
4034 it does not use or set the <a href="command-line-options.html#intensity">-intensity</a> setting, so
4035 will not effect other operations that may use that setting.</p>
4036
4037
4038 <div style="margin: auto;">
4039   <h4><a id="green-primary"></a>-green-primary <em class="arg">x,y</em></h4>
4040 </div>
4041
4042 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">green chromaticity primary point.</td><td style="text-align:right;"></td></tr></table>
4043
4044
4045 <div style="margin: auto;">
4046   <h4><a id="hald-clut"></a>-hald-clut</h4>
4047 </div>
4048
4049 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">apply a Hald color lookup table to the image.</td><td style="text-align:right;"></td></tr></table>
4050
4051 <p>A Hald color lookup table is a 3-dimensional color cube mapped to 2
4052 dimensions.  Create it with the <code>HALD:</code> prefix (e.g. HALD:8).  You
4053 can apply any color transformation to the Hald image and then use this option
4054 to apply the transform to the image. </p>
4055
4056 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert image.png hald.png -hald-clut transform.png</span></p>
4057 <p>This option provides a convenient method for you to use Gimp or Photoshop
4058 to make color corrections to the Hald CLUT image and subsequently apply them
4059 to multiple images using an ImageMagick script. </p>
4060
4061 <p>Note that the representation is only of the normal RGB color space and that
4062 the whole color value triplet is used for the interpolated lookup of the
4063 represented Hald color cube image.  Because of this the operation is not <a href="command-line-options.html#channel">-channel</a> setting effected, nor can it adjust or modify an
4064 images transparency or alpha/matte channel.</p>
4065
4066 <p>See also <a href="command-line-options.html#clut">-clut</a> which provides color value replacement
4067 of the individual color channels, usually involving a simpler gray-scale
4068 image. E.g:  gray-scale to color replacement, or modification by a histogram
4069 mapping. </p>
4070
4071
4072 <div style="margin: auto;">
4073   <h4><a id="help"></a>-help</h4>
4074 </div>
4075
4076 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">print usage instructions.</td><td style="text-align:right;"></td></tr></table>
4077
4078 <div style="margin: auto;">
4079   <h4><a id="highlight-color"></a>-highlight-color <em class="arg">color</em></h4>
4080 </div>
4081
4082 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">when comparing images, emphasize pixel differences with this color.</td><td style="text-align:right;"></td></tr></table>
4083
4084 <div style="margin: auto;">
4085   <h4><a id="iconGeometry"></a>-iconGeometry <em class="arg">geometry</em></h4>
4086 </div>
4087
4088 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">specify the icon geometry.</td><td style="text-align:right;"></td></tr></table>
4089
4090 <p>Offsets, if present in the geometry specification, are handled in the same
4091 manner as the <a href="command-line-options.html#geometry">-geometry</a> option, using X11 style to
4092 handle negative offsets.</p>
4093
4094 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
4095
4096 <div style="margin: auto;">
4097   <h4><a id="iconic"></a>-iconic</h4>
4098 </div>
4099
4100 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">start in icon mode in X Windows</td><td style="text-align:right;">[<a href="animate.html">animate</a>, <a href="display.html">display</a>]</td></tr></table>
4101
4102 <div style="margin: auto;">
4103   <h4><a id="identify"></a>-identify</h4>
4104 </div>
4105
4106 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">identify the format and characteristics of the image.</td><td style="text-align:right;"></td></tr></table>
4107
4108 <p>This information is printed: image scene number; image name; image size;
4109 the image class (<em class="arg">DirectClass</em> or <em class="arg">PseudoClass</em>); the total number of unique colors; and the
4110 number of seconds to read and transform the image. Refer to <a href="miff.html">MIFF</a> for
4111 a description of the image class.</p>
4112
4113 <p>If <a href="command-line-options.html#colors">-colors</a> is also specified, the total unique colors
4114 in the image and color reduction error values are printed. Refer to <a href="quantize.html">color
4115 reduction algorithm</a> for a description of these values.</p>
4116
4117 <p>If <a href="command-line-options.html#verbose">-verbose</a> precedes this option, copious
4118 amounts of image properties are displayed including image statistics, profiles,
4119 image histogram, and others.</p>
4120
4121 <div style="margin: auto;">
4122   <h4><a id="ift"></a>-ift</h4>
4123 </div>
4124
4125 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">implements the inverse discrete Fourier transform (DFT).</td><td style="text-align:right;"></td></tr></table>
4126
4127 <p>This option is new as of ImageMagick 6.5.4-3 (and now working for Windows
4128 users in ImageMagick 6.6.0-9). It transforms a pair of magnitude and phase
4129 images from the frequency domain to a single image in the normal or spatial
4130 domain. See for example, <a href="http://en.wikipedia.org/wiki/Fourier_transform">Fourier Transform</a>,
4131 <a href="http://en.wikipedia.org/wiki/DFT">Discrete Fourier Transform</a> and
4132 <a href="http://en.wikipedia.org/wiki/FFT">Fast Fourier Transform</a>.</p>
4133
4134 <p>For example, depending upon the image format used to store the result of
4135 the <a href="command-line-options.html#fft">-fft</a>, one would use either</p>
4136
4137 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert fft_image.miff -ift fft_image_ift.png</span></p>
4138 <p>or</p>
4139
4140 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert fft_image-0.png fft_image-1.png -ift fft_image_ift.png</span></p>
4141
4142 <p>The resulting image may need to be cropped due to padding introduced when
4143 the original image, prior to the <a href="command-line-options.html#fft">-fft</a> or <a href="command-line-options.html#fft">+fft</a>, was not square or even dimensioned. Any padding is at
4144 the right and/or bottom sides of the image.</p>
4145
4146 <p>The <a href="http://www.fftw.org/">FFTW</a> delegate library is required to
4147 use <a href="command-line-options.html#ift">-ift</a>.</p>
4148
4149 <p>Use <a href="command-line-options.html#ift">+ift</a> (with HDRI enabled) to transform a pair of real
4150 and imaginary images from the frequency domain to a single image in the normal
4151 (spatial) domain.</p>
4152
4153 <div style="margin: auto;">
4154   <h4><a id="immutable"></a>-immutable</h4>
4155 </div>
4156
4157 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">make image immutable.</td><td style="text-align:right;"></td></tr></table>
4158
4159 <div style="margin: auto;">
4160   <h4><a id="implode"></a>-implode <em class="arg">factor</em></h4>
4161 </div>
4162
4163 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">implode image pixels about the center.</td><td style="text-align:right;"></td></tr></table>
4164
4165 <div style="margin: auto;">
4166   <h4><a id="insert"></a>-insert <em class="arg">index</em></h4>
4167 </div>
4168
4169 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">insert the last image into the image sequence.</td><td style="text-align:right;"></td></tr></table>
4170
4171 <p>This option takes last image in the current image sequence and inserts it
4172 at the given index. If a negative index is used, the insert position is
4173 calculated before the last image is removed from the sequence. As such
4174 <code>-insert -1</code> will result in no change to the image sequence.</p>
4175
4176 <p>The <code>+insert</code> option is equivalent to <code>-insert -1</code>. In
4177 other words, insert the last image, at the end of the current image sequence.
4178 Consequently this has no effect on the image sequence order.</p>
4179
4180 <div style="margin: auto;">
4181   <h4><a id="intensity"></a>-intensity <em class="arg">method</em></h4>
4182 </div>
4183
4184 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">method to generate intensity value from pixel.</td><td style="text-align:right;"></td></tr></table>
4185
4186 <p>ImageMagick provides a number of methods used in situations where an
4187 operatory needs to determine a single grayscale value for some purpose, from
4188 an image with red, green, and blue pixel components. Typically the linear
4189 <code>Rec709Luminance</code> formula is used, which is the same formula used when 
4190 converting images to <code>-colorspace gray</code>. </p>
4191
4192 <p>The following formulas are currently provided, and will first convert
4193 the pixel values to linear-RGB or non-linear sRGB colorspace before
4194 being applied to calulate the final greyscale value. </p>
4195
4196 <pre class="text">
4197    Rec601Luma        0.298839R' + 0.586811G'+ 0.114350B'
4198    Rec601Luminance   0.298839R + 0.586811G + 0.114350B
4199    Rec709Luma        0.212656R' + 0.715158G' + 0.072186B'
4200    Rec709Luminance   0.212656R + 0.715158G + 0.072186B
4201    Brightness        max(R', G', B')
4202    Lightness         (min(R', G', B') + max(R', G', B')) / 2.0
4203 </pre>
4204 <p>Note that the above R,G,B values is the image's linear-RGB values, while
4205 R',G',B' are sRGB non-linear values. </p>
4206
4207 <p>These intensity methods are mathematical in nature and will use the
4208 current value in the images respective R,G,B channel regardless of
4209 what that is, or what colorspace the image is currently using.</p>
4210
4211 <pre class="text">
4212    Average           (R + G + B) / 3.0
4213    MS                (R^2 + G^2 + B^2) / 3.0
4214    RMS               sqrt( (R^2 + G^2 + B^2) / 3.0 )
4215 </pre>
4216
4217 <p>These methods are often used for other purposes, such as generating a
4218 grayscale difference image between two color images (using <a href="command-line-options.html#compose">-compose</a> '<code>Difference</code>' composition. </p>
4219
4220 <p> For example The 'MS' (Mean Squared) setting is good for minimizing color
4221 error comparisions.  While...  The method 'RMS' (Root Mean Squared) for
4222 example is appropriate for calculating color vector distance, from a color
4223 difference image.  This is equivelent to the color only component of the <a href="command-line-options.html#fuzz">-fuzz</a> factor color compare setting.  </p>
4224
4225 <p>See also <a href="command-line-options.html#grayscale">-grayscale</a> which applies one of the above
4226 grayscaling formula directly to an image without setting the <a href="command-line-options.html#intensity">-intensity</a> setting.</p>
4227
4228 <p>The <a href="command-line-options.html#colorspace">-colorspace gray</a> image conversion also uses
4229 the current intensity setting, but will always convert the image to the
4230 appropriate sRGB or linear-RGB colorspace before appling the above
4231 function.</p>
4232
4233 <p>To print a complete list of posible pixel intensity setting methods, use <a href="command-line-options.html#list">-list intensity</a>.</p>
4234
4235 <p>Operators affected by the <a href="command-line-options.html#intensity">-intensity</a> setting include:</p>
4236
4237 <pre class="text">
4238 -adaptive-blur
4239 -adaptive-sharpen
4240 -black-threshold
4241 -clut (when mapping greyscale CLUT image to alpha channel if set by -channels)
4242 -colors for gray colorspace
4243 -compose {LightenIntensity, DarkenIntensity, CopyOpacity, CopyBlack}
4244 -contrast-stretch
4245 -distort {ErodeIntensity, DilateIntensity}
4246 -normalize
4247 -random-threshold
4248 -selective-blur
4249 -shade
4250 -threshold
4251 -tint
4252 -white-threshold
4253 </pre>
4254
4255 <div style="margin: auto;">
4256   <h4><a id="intent"></a>-intent <em class="arg">type</em></h4>
4257 </div>
4258
4259 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">use this type of rendering intent when managing the image color.</td><td style="text-align:right;"></td></tr></table>
4260
4261 <p>Use this option to affect the color management operation of an image (see
4262 <a href="command-line-options.html#profile">-profile</a>).  Choose from these intents: <code>Absolute,
4263 Perceptual, Relative, Saturation</code>.</p>
4264
4265 <p>The default intent is Perceptual for the sRGB colorspace and undefined for the RGB and gray colorspaces.</p>
4266
4267 <p>To print a complete list of rendering intents, use <a href="command-line-options.html#list">-list intent</a>.</p>
4268
4269 <div style="margin: auto;">
4270   <h4><a id="interlace"></a>-interlace <em class="arg">type</em></h4>
4271 </div>
4272
4273 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">the type of interlacing scheme.</td><td style="text-align:right;"></td></tr></table>
4274
4275 <p>Choose from:</p>
4276
4277 <pre class="text">
4278    none
4279    line
4280    plane
4281    partition
4282    JPEG
4283    GIF
4284    PNG
4285 </pre>
4286
4287 <p>This option is used to specify the type of interlacing scheme for raw image
4288 formats such as <code>RGB</code> or <code>YUV</code>.</p>
4289
4290 <p><code>None</code> means do not interlace (RGBRGBRGBRGBRGBRGB...),</p>
4291
4292 <p><code>Line</code> uses scanline interlacing (RRR...GGG...BBB...RRR...GGG...BBB...), and.</p>
4293
4294 <p><code>Plane</code> uses plane interlacing (RRRRRR...GGGGGG...BBBBBB...).</p>
4295
4296 <p><code>Partition</code> is like plane except the different planes are saved to
4297 individual files (e.g. image.R, image.G, and image.B).</p>
4298
4299 <p>Use <code>Line</code> or <code>Plane</code> to create an <code>interlaced
4300 PNG</code> or <code>GIF</code> or <code>progressive JPEG</code> image.</p>
4301
4302 <p>To print a complete list of interlacing schemes, use <a href="command-line-options.html#list">-list
4303 interlace</a>.</p>
4304
4305 <div style="margin: auto;">
4306   <h4><a id="interpolate"></a>-interpolate <em class="arg">type</em></h4>
4307 </div>
4308
4309 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set the pixel color interpolation method to use when looking up a color based on a floating point or real value.</td><td style="text-align:right;"></td></tr></table>
4310
4311 <p>When looking up the color of a pixel using a non-integer floating point
4312 value, you typically fall in between the pixel colors defined by the source
4313 image. This setting determines how the color is determined from the colors of
4314 the pixels surrounding that point.  That is how to determine the color of a
4315 point that falls between two, or even four different colored pixels. </p>
4316
4317 <pre class="text">
4318    integer           The color of the top-left pixel (floor function)
4319    nearest-neighbor  The nearest pixel to the lookup point (rounded function)
4320    average           The average color of the surrounding four pixels
4321    bilinear          A double linear interpolation of pixels (the default)
4322    mesh              Divide area into two flat triangular interpolations
4323    bicubic           Fitted bicubic-spines of surrounding 16 pixels
4324    spline            Direct spline curves (colors are blurred)
4325    filter            Use resize <a href="command-line-options.html#filter">-filter</a> settings
4326 </pre>
4327
4328 <p>This most important for distortion operators such as <a href="command-line-options.html#distort">-distort</a>, <a href="command-line-options.html#implode">-implode</a>, <a href="command-line-options.html#transform">-transform</a> and <a href="command-line-options.html#fx">-fx</a>. </p>
4329
4330 <p>To print a complete list of interpolation methods, use <a href="command-line-options.html#list">-list interpolate</a>.</p>
4331
4332 <p>See also <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a>, for control of the
4333 lookup for positions outside the boundaries of the image. </p>
4334
4335
4336 <div style="margin: auto;">
4337   <h4><a id="interline-spacing"></a>-interline-spacing <em class="arg">value</em></h4>
4338 </div>
4339
4340 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">the space between two text lines.</td><td style="text-align:right;"></td></tr></table>
4341
4342 <div style="margin: auto;">
4343   <h4><a id="interword-spacing"></a>-interword-spacing <em class="arg">value</em></h4>
4344 </div>
4345
4346 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">the space between two words.</td><td style="text-align:right;"></td></tr></table>
4347
4348 <div style="margin: auto;">
4349   <h4><a id="kerning"></a>-kerning <em class="arg">value</em></h4>
4350 </div>
4351
4352 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">the space between two letters.</td><td style="text-align:right;"></td></tr></table>
4353
4354 <div style="margin: auto;">
4355   <h4><a id="label"></a>-label <em class="arg">name</em></h4>
4356 </div>
4357
4358 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">assign a label to an image.</td><td style="text-align:right;"></td></tr></table>
4359
4360 <p>Use this option to assign a specific label to the image, as it is read in
4361 or created.  You can use the <a href="command-line-options.html#set">-set</a> operation to re-assign
4362 a the labels of images already read in.  Image formats such as TIFF, PNG,
4363 MIFF, supports saving the label information with the image.</p>
4364
4365 <p>When saving an image to a <em class="arg">PostScript</em> file, any label
4366 assigned to an image is used as a header string to print above the postscript
4367 image. </p>
4368
4369 <p>You can include the image filename, type, width, height, or other image
4370 attribute by embedding special format character.  See <a href="escape.html">Format and Print Image
4371 Properties</a> for details of the percent escape codes.</p>
4372
4373 <p>For example,</p>
4374
4375 <p class="crtsnip">
4376   -label "%m:%f %wx%h"  bird.miff
4377 </p>
4378
4379 <p>assigns an image label of <code>MIFF:bird.miff 512x480</code> to the
4380 "<code>bird.miff</code>" image and whose width is 512 and height is 480, as it
4381 is read in.  If a  <a href="command-line-options.html#label">+label</a> option was used instead, any
4382 existing label present in the image would be used.  You can remove all labels
4383 from an image by assigning the empty string. </p>
4384
4385 <p>A label is not drawn on the image, but is embedded in the image datastream
4386 via <em>Label</em> tag or similar mechanism. If you want the label to be
4387 visible on the image itself, use the <a href="command-line-options.html#draw">-draw</a> option, or
4388 during the final processing in the creation of an image montage.</p>
4389
4390 <p>If the first character of <em class="arg">string</em> is <em class="arg">@</em>, the image label is read from a file titled by the
4391 remaining characters in the string. Labels in a file are literal, no embedded
4392 formatting characters are recognized.</p>
4393
4394
4395 <div style="margin: auto;">
4396   <h4><a id="lat"></a>-lat <em class="arg">width</em><br></br>-lat <em class="arg">width</em>x<em class="arg">height</em>{<em class="arg">+-</em>}<em class="arg">offset</em>{<em class="arg">%</em>}</h4>
4397 </div>
4398
4399 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">perform local adaptive threshold.</td><td style="text-align:right;"></td></tr></table>
4400
4401 <p>Adaptively threshold each pixel based on the value of pixels in a
4402 surrounding window.  If the current pixel is lighter than this average plus
4403 the optional <code>offset</code>, then it is made white, otherwise it is made
4404 black.  Small variations in pixel values such as found in scanned documents
4405 can be ignored if offset is positive. A negative offset will make it more
4406 sensitive to those small variations. </p>
4407
4408 <p>This is commonly used to threshold images with an uneven background.  It is
4409 based on the assumption that average color of the small window is the
4410 the local background color, from which to separate the foreground color. </p>
4411
4412
4413 <div style="margin: auto;">
4414   <h4><a id="layers"></a>-layers <em class="arg">method</em></h4>
4415 </div>
4416
4417 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">handle multiple images forming a set of image layers or animation frames.</td><td style="text-align:right;"></td></tr></table>
4418
4419 <p>Perform various image operation methods to a ordered sequence of images
4420 which may represent either a set of overlaid 'image layers', a GIF disposal
4421 animation, or a fully-'coalesced' animation sequence. </p>
4422
4423 <table class="doc">
4424   <tbody>
4425   <tr valign="top">
4426     <th align="left" style="width: 8%">Method</th>
4427     <th align="left">Description</th>
4428   </tr>
4429
4430   <tr valign="top">
4431     <td valign="top">compare-any</td>
4432     <td valign="top">Crop the second and later frames to the smallest rectangle
4433         that contains all the differences between the two images.  No GIF <a href="command-line-options.html#dispose">-dispose</a> methods are taken into account. </td>
4434   </tr>
4435
4436   <tr><td></td><td>This exactly the same as the <a href="command-line-options.html#deconstruct">-deconstruct</a> operator, and does not preserve animations normal
4437         working, especially when animation used layer disposal methods such as
4438         '<code>Previous</code>' or '<code>Background</code>'. </td>
4439   </tr>
4440
4441   <tr valign="top">
4442     <td valign="top">compare-clear</td>
4443     <td valign="top">As '<code>compare-any</code>' but crop to the bounds of any
4444        opaque pixels which become transparent in the second frame. That is the
4445        smallest image needed to mask or erase pixels for the next frame. </td>
4446   </tr>
4447
4448   <tr valign="top">
4449     <td valign="top">compare-overlay</td>
4450     <td valign="top">As '<code>compare-any</code>' but crop to pixels that add
4451        extra color to the next image, as a result of overlaying color pixels.
4452        That is the smallest single overlaid image to add or change colors. </td>
4453    </tr>
4454
4455    <tr><td></td><td>This can be used with the <a href="command-line-options.html#compose">-compose</a> alpha
4456        composition method '<code>change-mask</code>', to reduce the image to
4457        just the pixels that need to be overlaid. </td>
4458    </tr>
4459
4460   <tr valign="top">
4461     <td valign="top">coalesce</td>
4462     <td valign="top">Equivalent to a call to the <a href="command-line-options.html#coalesce">-coalesce</a> operator.  Apply the layer disposal methods set in the
4463         current image sequence to form a fully defined animation sequence, as
4464         it should be displayed.  Effectively converting a GIF animation into a
4465         'film strip'-like animation.  </td>
4466   </tr>
4467
4468   <tr valign="top">
4469     <td valign="top">composite</td>
4470     <td valign="top">Alpha Composition of two image lists, separated by a
4471         "<code>null:</code>" image, with the destination image list first, and
4472         the source images last.  An image from each list are composited
4473         together until one list is finished. The separator image and source
4474         image lists are removed. </td>
4475   </tr>
4476
4477
4478   <tr><td></td>
4479     <td>The <a href="command-line-options.html#geometry">-geometry</a> offset is adjusted according
4480         to <a href="command-line-options.html#gravity">-gravity</a> in accordance of the virtual
4481         canvas size of the first image in each list. Unlike a normal <a href="command-line-options.html#composite">-composite</a> operation, the canvas offset is also
4482         added to the final composite positioning of each image. </td> </tr>
4483
4484   <tr><td></td>
4485     <td>If one of the image lists only contains one image, that image is
4486         applied to all the images in the other image list, regardless of which
4487         list it is. In this case it is the image meta-data of the list which
4488         preserved.  </td>
4489   </tr>
4490
4491
4492   <tr valign="top">
4493     <td valign="top">dispose</td>
4494     <td valign="top">This like '<code>coalesce</code>' but shows the look of
4495         the animation after the layer disposal method has been applied, before
4496         the next sub-frame image is overlaid. That is the 'dispose' image that
4497         results from the application of the GIF <a href="command-line-options.html#dispose">-dispose</a> method.  This allows you to check what
4498         is going wrong with a particular animation you may be developing.
4499         </td>
4500   </tr>
4501
4502   <tr valign="top">
4503     <td valign="top">flatten</td>
4504     <td valign="top">Create a canvas the size of the first images virtual
4505         canvas using the current <a href="command-line-options.html#background">-background</a> color,
4506         and <a href="command-line-options.html#compose">-compose</a> each image in turn onto that
4507         canvas.  Images falling outside that canvas is clipped. Final
4508         image will have a zero virtual canvas offset. </td>
4509   </tr>
4510
4511   <tr><td></td>
4512     <td>This usually used as one of the final 'image layering' operations
4513         overlaying all the prepared image layers into a final image. </td>
4514   </tr>
4515
4516   <tr><td></td>
4517     <td>For a single image this method can also be used to fillout a virtual
4518         canvas with real pixels, or to underlay an opaque color to remove
4519         transparency from an image.</td>
4520   </tr>
4521
4522
4523   <tr valign="top">
4524     <td valign="top">merge</td>
4525     <td valign="top">As 'flatten' method but merging all the given image
4526         layers to create a new layer image just large enough to hold all the
4527         image without clipping or extra space. The new images virtual offset
4528         will preserve the position of the new layer, even if this offset is
4529         negative.  The virtual canvas size of the first image is preserved.
4530         </td>
4531   </tr>
4532
4533   <tr><td></td><td>Caution is advised when handling image layers with
4534         negative offsets as few image file formats handle them correctly.
4535         Following this operation method with <a href="command-line-options.html#repage">+repage</a>
4536         will remove the layer offset, and create an image in which all the
4537         overlaid image positions relative to each other is preserved, though
4538         not necessarily exactly where you specified them.
4539         </td>
4540   </tr>
4541
4542   <tr><td></td><td>See also 'trim-bounds' below which is closely related but
4543         without  doing the'flatten' to merge the images together. </td>
4544   </tr>
4545
4546   <tr valign="top">
4547     <td valign="top">mosaic</td>
4548     <td valign="top">As 'flatten' method but expanding the initial canvas size
4549         of the first image in a positive direction only so as to hold all the
4550         image layers.  However as a virtual canvas is 'locked' to the origin,
4551         by its own definition, image layers with a negative offsets will still
4552         become clipped by the top and left edges. See 'merge' or 'trim-bounds'
4553         if this could be a problem. </td>
4554
4555   </tr>
4556
4557   <tr><td></td><td>This method is commonly used to layout individual image
4558         using various offset but without knowing the final canvas size. The
4559         resulting image will, like 'flatten' not have any virtual offset, so
4560         can be saved to any image file format. </td>
4561   </tr>
4562
4563
4564   <tr valign="top">
4565     <td valign="top">optimize</td>
4566     <td valign="top">Optimize a coalesced animation, into GIF animation using
4567         a number of general techniques.  This currently a short cut to
4568         apply both the '<code>optimize-frame</code>', and
4569         '<code>optimize-transparency</code>' methods but may be expanded to
4570         include other optimization methods as they are developed. </td>
4571   </tr>
4572
4573   <tr valign="top">
4574     <td valign="top">optimize-frame</td>
4575     <td valign="top">Optimize a coalesced animation, into GIF animation by
4576         reducing the number of pixels per frame as much as possible by
4577         attempting to pick the best layer disposal method to use, while ensuring
4578         the result will continue to animate properly. </td>
4579   </tr>
4580
4581   <tr><td></td><td> There is no guarantee that the best optimization is found.
4582         But then no reasonably fast GIF optimization algorithm can do this.
4583         However this does seem to do better than most other GIF frame
4584         optimizers seen. </td>
4585   </tr>
4586
4587   <tr valign="top">
4588     <td valign="top">optimize-plus</td>
4589     <td valign="top">As '<code>optimize-frame</code>' but attempt to improve the
4590         overall optimization by adding extra frames to the animation, without
4591         changing the final look or timing of the animation.  The frames are
4592         added to attempt to separate the clearing of pixels from the
4593         overlaying of new additional pixels from one animation frame to the
4594         next.  If this does not improve the optimization (for the next frame
4595         only), it will fall back to the results of the previous normal
4596         '<code>optimize-frame</code>' technique. </td>
4597   </tr>
4598
4599   <tr><td></td><td>There is the possibility that the change in the disposal
4600         style will result in a worsening in the optimization of later frames,
4601         though this is unlikely. In other words there no guarantee that it is
4602         better than the normal '<code>optimize-frame</code>' technique. For some
4603         animations however you can get a vast improvement in the final
4604         animation size. </td>
4605   </tr>
4606
4607   <tr valign="top">
4608     <td valign="top">optimize-transparency</td>
4609     <td valign="top">Given a GIF animation, replace any pixel in the sub-frame
4610         overlay images with transparency, if it does not change the resulting
4611         animation by more than the current <a href="command-line-options.html#fuzz">-fuzz</a> factor.
4612         </td>
4613   </tr>
4614
4615   <tr><td></td><td>This should allow a existing frame optimized GIF animation
4616         to compress into a smaller file size due to larger areas of one
4617         (transparent) color rather than a pattern of multiple colors repeating
4618         the current disposed image of the last frame. </td>
4619   </tr>
4620
4621   <tr valign="top">
4622     <td valign="top">remove-dups</td>
4623     <td valign="top">Remove (and merge time delays) of duplicate consecutive
4624         images, so as to simplify layer overlays of coalesced animations.
4625         </td>
4626   </tr>
4627
4628    <tr><td></td><td>Usually this a result of using a constant time delay
4629         across the whole animation, or after a larger animation was split into
4630         smaller sub-animations.  The duplicate frames could also have been
4631         used as part of some frame optimization methods. </td>
4632   </tr>
4633
4634   <tr valign="top">
4635     <td valign="top">remove-zero</td>
4636     <td valign="top">Remove any image with a zero time delay, unless ALL the
4637         images have a zero time delay (and is not a proper timed animation, a
4638         warning is then issued). </td>
4639   </tr>
4640
4641   <tr><td></td><td>In a GIF animation, such images are usually frames which
4642         provide partial intermediary updates between the frames that are
4643         actually displayed to users.  These frames are usually added for
4644         improved frame optimization in GIF animations. </td>
4645   </tr>
4646
4647   <tr valign="top">
4648     <td valign="top">trim-bounds</td>
4649     <td valign="top">Find the bounds of all the images in the current
4650         image sequence, then adjust the offsets so all images are contained on
4651         a minimal positive canvas. None of the image data is modified or
4652         merged, only the individual image virtual canvas size and offset.
4653         All the images is given the same canvas size, and and will have
4654         a positive offset, but will remain in the same position relative to
4655         each other. As a result of the minimal canvas size at least one image
4656         will touch every edge of that canvas.  The image data touching those
4657         edges however may be transparent.  </td>
4658   </tr>
4659
4660   <tr><td></td><td>The result is much like if you used 'merge' followed by a
4661         <a href="command-line-options.html#repage">+repage</a> option, except that all the images
4662         have been kept separate.  If 'flatten' is used after using
4663         'trim-bounds' you will get the same result.  </td>
4664   </tr>
4665
4666   </tbody>
4667 </table>
4668
4669 <p>To print a complete list of layer types, use <a href="command-line-options.html#list">-list layers</a>.</p>
4670
4671 <p>The operators <a href="command-line-options.html#coalesce">-coalesce</a>, <a href="command-line-options.html#deconstruct">-deconstruct</a>, <a href="command-line-options.html#flatten">-flatten</a>, and <a href="command-line-options.html#mosaic">-mosaic</a> are only aliases for the above methods and may be depreciated in
4672 the future.  Also see  <a href="command-line-options.html#page">-page</a>,  <a href="command-line-options.html#repage">-repage</a> operators, the <a href="command-line-options.html#compose">-compose</a> setting, and the
4673 GIF <a href="command-line-options.html#dispose">-dispose</a> and  <a href="command-line-options.html#delay">-delay</a>
4674 settings. </p>
4675
4676
4677 <div style="margin: auto;">
4678   <h4><a id="level"></a>-level <em class="arg">black_point</em>{,<em class="arg">white_point</em>}{<em class="arg">%</em>}{,<em class="arg">gamma</em>}</h4>
4679 </div>
4680
4681 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">adjust the level of image channels.</td><td style="text-align:right;"></td></tr></table>
4682
4683 <p>Given one, two or three values delimited with commas: black-point,
4684 white-point, gamma (for example: 10,250,1.0 or 2%,98%,0.5). The black and
4685 white points range from 0 to <em class="QR">QuantumRange</em>, or from 0 to
4686 100%; if the white point is omitted it is set to (<em class="QR">QuantumRange</em> - black_point), so as to center contrast changes.
4687 If a <code>%</code> sign is present anywhere in the string, both black and white
4688 points are percentages of the full color range.  Gamma will do a <a href="command-line-options.html#gamma">-gamma</a> adjustment of the values.  If it is omitted, the
4689 default of 1.0 (no gamma correction) is assumed.</p>
4690
4691 <p>In normal usage (<code>-level</code>) the image values are stretched so that
4692 the given '<code>black_point</code>' value in the original image is set to zero
4693 (or black), while the given '<code>white_point</code>' value is set to <em class="QR">QuantumRange</em> (or white).  This provides you with direct
4694 contrast adjustments to the image.  The '<code>gamma</code>' of the resulting
4695 image will then be adjusted. </p>
4696
4697 <p>From ImageMagick v6.4.1-9 using the plus form of the operator
4698 (<code>+level</code>) or adding the special '!' flag anywhere in the argument
4699 list, will cause the operator to do the reverse of the level adjustment.  That
4700 is a zero, or <em class="QR">QuantumRange</em> value (black, and white, resp.)
4701 in the original image, is adjusted to the given level values, allowing you to
4702 de-contrast, or compress the channel values within the image. The
4703 '<code>gamma</code>' is adjusted before the level adjustment to de-contrast the
4704 image is made. </p>
4705
4706 <p>Only the channels defined by the current <a href="command-line-options.html#channel">-channel</a>
4707 setting are adjusted (defaults to RGB color channels only), allowing you to
4708 limit the effect of this operator. </p>
4709
4710 <p>Please note that the transparency channel is treated as 'matte'
4711 values (0 is opaque) and not as 'alpha' values (0 is transparent).</p>
4712
4713
4714 <div style="margin: auto;">
4715   <h4><a id="level-colors"></a>-level-colors {<em class="arg">black_color</em>}{,}{<em class="arg">white_color</em>}</h4>
4716 </div>
4717
4718 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">adjust the level of an image using the provided dash separated colors.</td><td style="text-align:right;"></td></tr></table>
4719
4720 <p>This function is exactly like <a href="command-line-options.html#level">-level</a>, except that the
4721 value value for each color channel is determined by the
4722 '<code>black_color</code>' and '<code>white_color</code>' colors given (as
4723 described under the <a href="command-line-options.html#fill">-fill</a> option). </p>
4724
4725 <p>This effectually means the colors provided to <code>-level-colors</code>
4726 is mapped to become 'black' and 'white' respectively, with all the other
4727 colors linearly adjusted (or clipped) to match that change. Each channel is
4728 adjusted separately using the channel values of the colors specified. </p>
4729
4730 <p>On the other hand the plus form of the operator (<code>+level-colors</code>)
4731 will map the image color 'black' and 'white' to the given colors
4732 respectively, resulting in a gradient (de-contrasting) tint of the image to
4733 those colors. This can also be used to convert a plain gray-scale image into a
4734 one using the gradient of colors specified. </p>
4735
4736 <p>By supplying a single color with a comma separator either before or after
4737 that color, will just replace the respective 'black' or 'white' point
4738 respectively.  But if no comma separator is provided, the given color is
4739 used for both the black and white color points, making the operator either
4740 threshold the images around that color (- form) or set all colors to that
4741 color (+ form). </p>
4742
4743
4744 <div style="margin: auto;">
4745   <h4><a id="limit"></a>-limit <em class="arg">type value</em></h4>
4746 </div>
4747
4748 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set the pixel cache resource limit.</td><td style="text-align:right;"></td></tr></table>
4749
4750 <p>Choose from: <code>area</code>, <code>disk</code>, <code>file</code>,
4751 <code>map</code>, <code>memory</code>, <code>threads</code>, or <code>time</code>.</p>
4752
4753 <p>The value for <code>file</code> is in number of files. The other limits are
4754 in bytes. Define arguments for the memory, map, area, and disk resource limits
4755 with SI prefixes (.e.g 100MB).</p>
4756
4757 <p>By default the limits are 768 files, 3GB of image area, 1.5GiB memory, 3GiB
4758 memory map, and 18.45EB of disk.  These limits are adjusted relative to the
4759 available resources on your computer if this information is available.   When
4760 any limit is reached, ImageMagick fails in some fashion but attempts to take
4761 compensating actions, if possible. For example, the following limits
4762 memory:</p>
4763
4764 <p class="crtsnip">
4765   -limit memory 32MiB -limit map 64MiB
4766 </p>
4767
4768 <p>Use <a href="command-line-options.html#list">-list resource</a> to list the current limits. For example, our system shows these limits:</p>
4769
4770 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">identify -list resource</span><span class="crtout"></span></p><pre class="text">
4771   File         Area       Memory          Map         Disk   Thread         Time
4772   ------------------------------------------------------------------------------
4773    768     12.404GB    8.6642GiB    23.104GiB  18.446744EB        8    unlimited
4774 </pre>
4775
4776 <p>Requests for pixel storage to keep intermediate images are satisfied by one
4777 of three resource categories: in-memory pool, memory-mapped files pool, and
4778 disk pool (in that order) depending on the <a href="command-line-options.html#limit">‑limit</a> settings
4779 and whether the system honors a resource request. If the total size of
4780 allocated pixel storage in the given pool reaches the corresponding limit, the
4781 request is passed to the next pool. Additionally, requests that exceed the
4782 <code>area</code> limit automagically are allocated on disk.</p>
4783
4784 <p>To illustrate how ImageMagick utilizes resource limits, consider a typical
4785 image resource request.  First, ImageMagick tries to allocate the pixels in
4786 memory.  The request might be denied if the resource request exceeds the
4787 <code>memory</code> limit or if the system does not honor the request.  If
4788 a memory request is not honored, the pixels are allocated to disk and the file
4789 is memory-mapped. However, if the allocation request exceeds the
4790 <code>map</code> limit, the resource allocation goes to disk. In all cases, if
4791 the resource request exceeds the <code>area</code> limit, the pixels are
4792 automagically cached to disk. If the disk has a hard limit, the program
4793 fails.</p>
4794
4795 <p>In most cases you simply do not need to concern yourself with resource
4796 limits.  ImageMagick chooses reasonable defaults and most images do not tax
4797 your computer resources.  Where limits do come in handy is when you process
4798 images that are large or on shared systems where ImageMagick can consume all
4799 or most of the available memory. In this case, the ImageMagick workflow slows
4800 other processes or, in extreme cases, brings the system to a halt.  Under
4801 these circumstances, setting limits give some assurances that the ImageMagick
4802 workflow will not interfere with other concurrent uses of the computer.  For
4803 example, assume you have a web interface that processes images uploaded from
4804 the Internet.  To assure ImageMagick does not exceed 10MiB of memory you can
4805 simply set the area limit to 10MiB:</p>
4806
4807 <p class="crtsnip">
4808 -limit area 10MB
4809 </p>
4810
4811 <p>Now whenever a large image is processed, the pixels are automagically
4812 cached to disk instead of memory.  This of course implies that large images
4813 typically process very slowly, simply because pixel processing in memory can
4814 be an order of magnitude faster than on disk.  Because your web site users
4815 might inadvertently upload a huge image to process, you should set a disk
4816 limit as well:</p>
4817
4818 <p class="crtsnip">
4819 -limit area 10MB -limit disk 500MB
4820 </p>
4821
4822 <p>Here ImageMagick stops processing if an image requires more than 500MB of disk storage.</p>
4823
4824 <p>In addition to command-line resource limit option, resources can be set
4825 with <a href="resources.html#environment">environment variables</a>. Set the
4826 environment variables <code>MAGICK_AREA_LIMIT</code>,
4827 <code>MAGICK_DISK_LIMIT</code>, <code>MAGICK_FILE_LIMIT</code>,
4828 <code>MAGICK_MEMORY_LIMIT</code>, <code>MAGICK_MAP_LIMIT</code>,
4829 <code>MAGICK_THREAD_LIMIT</code>, <code>MAGICK_TIME_LIMIT</code> for limits of
4830 image area, disk space, open files, heap memory, memory map, number of threads
4831 of execution, and maximum elapsed time in seconds respectively.</p>
4832
4833 <p> Inquisitive users can try adding <a href="command-line-options.html#debug">-debug cache</a> to
4834 their commands and then scouring the generated output for references to the
4835 pixel cache, in order to determine how the pixel cache was allocated and how
4836 resources were consumed. Advanced Unix/Linux users can pipe that output
4837 through <code>grep memory|open|destroy|disk</code> for more readable sifting.
4838 </p>
4839
4840 <p>For more about ImageMagick's use of resources, see the section <b>Cache
4841 Storage and Resource Requirements</b> on the <a href="architecture.html#cache ">Architecture</a> page.  </p>
4842
4843 <div style="margin: auto;">
4844   <h4><a id="linear-stretch"></a>-linear-stretch <em class="arg">black-point</em><br></br>-linear-stretch <em class="arg">black-point</em>{x<em class="arg">white-point</em>}{<em class="arg">%</em>}}</h4>
4845 </div>
4846
4847 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Linear with saturation stretch.</td><td style="text-align:right;"></td></tr></table>
4848
4849 <p>This is very similar to <a href="command-line-options.html#contrast-stretch">-contrast-stretch</a>,
4850 and uses a 'histogram bin' to determine the range of color values that needs to
4851 be stretched.  However it then stretches those colors using the <a href="command-line-options.html#level">-level</a> operator.</p>
4852
4853 <p>As such while the initial determination may have 'binning' round off
4854 effects, the image colors are stretched mathematically, rather than using the
4855 histogram bins.  This makes the operator more accurate. </p>
4856
4857 <p>note however that a <a href="command-line-options.html#linear-stretch">-linear-stretch</a> of
4858 '<code>0</code>' does nothing, while a value of '<code>1</code>' does a near
4859 perfect stretch of the color range. </p>
4860
4861 <p>See also <a href="command-line-options.html#auto-level">-auto-level</a> for a 'perfect'
4862 normalization of mathematical images. </p>
4863
4864 <p>This operator is under review for re-development. </p>
4865
4866
4867 <div style="margin: auto;">
4868   <h4><a id="linewidth"></a>-linewidth</h4>
4869 </div>
4870
4871 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">the line width for subsequent draw operations.</td><td style="text-align:right;"></td></tr></table>
4872
4873 <div style="margin: auto;">
4874   <h4><a id="liquid-rescale"></a>-liquid-rescale <em class="arg">geometry</em></h4>
4875 </div>
4876
4877 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">rescale image with seam-carving.</td><td style="text-align:right;"></td></tr></table>
4878
4879 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
4880
4881 <div style="margin: auto;">
4882   <h4><a id="list"></a>-list <em class="arg">type</em></h4>
4883 </div>
4884
4885 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Print a list of supported arguments for various options or settings.  Choose from these list types:</td><td style="text-align:right;"></td></tr></table>
4886
4887 <pre class="text">
4888    Align          Alpha          Boolean        Channel
4889    Class          ClipPath       Coder          Color
4890    Colorspace     Command        Compose        Compress
4891    Configure      DataType       Debug          Decoration
4892    Delegate       Direction      Dispose        Distort
4893    Dither         Endian         Evaluate       FillRule
4894    Filter         Font           Format         Function
4895    Gravity        ImageList      Intent         Interlace
4896    Interpolate    Kernel         Layers         LineCap
4897    LineJoin       List           Locale         LogEvent
4898    Log            Magic          Method         Metric
4899    Mime           Mode           Morphology     Module
4900    Noise          Orientation    Policy         PolicyDomain
4901    PolicyRights   Preview        Primitive      QuantumFormat
4902    Resource       SparseColor    Storage        Stretch
4903    Style          Threshold      Type           Units
4904    Validate       VirtualPixel
4905 </pre>
4906
4907 <p>These lists vary depending on your version of ImageMagick. Use "<code>-list
4908 list</code>" to get a complete listing of all the "<code>-list</code>" arguments
4909 available:</p>
4910
4911 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">identify -list list</span></p>
4912 <div style="margin: auto;">
4913   <h4><a id="log"></a>-log <em class="arg">string</em></h4>
4914 </div>
4915
4916 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Specify format for debug log.</td><td style="text-align:right;"></td></tr></table>
4917
4918 <p>This option specifies the format for the log printed when the <a href="command-line-options.html#debug">-debug</a> option is active.</p>
4919
4920 <p>You can display the following components by embedding special format
4921 characters:</p>
4922
4923 <pre class="text">
4924    %d  domain
4925    %e  event
4926    %f  function
4927    %l  line
4928    %m  module
4929    %p  process ID
4930    %r  real CPU time
4931    %t  wall clock time
4932    %u  user CPU time
4933    %%  percent sign
4934    \n  newline
4935    \r  carriage return
4936 </pre>
4937
4938 <p>For example:</p>
4939
4940 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert -debug coders -log "%u %m:%l %e" in.gif out.png</span></p>
4941 <p>The default behavior is to print all of the components.</p>
4942
4943 <div style="margin: auto;">
4944   <h4><a id="loop"></a>-loop <em class="arg">iterations</em></h4>
4945 </div>
4946
4947 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">add Netscape loop extension to your GIF animation.</td><td style="text-align:right;"></td></tr></table>
4948
4949 <p>Set iterations to zero to repeat the animation an infinite number of times,
4950 otherwise the animation repeats itself up to <em class="arg">iterations</em>
4951 times.</p>
4952
4953 <div style="margin: auto;">
4954   <h4><a id="lowlight-color"></a>-lowlight-color <em class="arg">color</em></h4>
4955 </div>
4956
4957 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">when comparing images, de-emphasize pixel differences with this color.</td><td style="text-align:right;"></td></tr></table>
4958
4959 <div style="margin: auto;">
4960   <h4><a id="magnify"></a>-magnify</h4>
4961 </div>
4962
4963 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">double the size of the image with pixel art scaling.</td><td style="text-align:right;"></td></tr></table>
4964
4965
4966 <div style="margin: auto;">
4967   <h4><a id="map"></a>-map <em class="arg">type</em></h4>
4968 </div>
4969
4970 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Display image using this <em class="arg">type</em>.</td><td style="text-align:right;">[<a href="animate.html">animate</a>, <a href="display.html">display</a>]</td></tr></table>
4971
4972 <p>Choose from these <em class="arg">Standard Colormap</em> types:</p>
4973
4974 <pre class="text">
4975    best
4976    default
4977    gray
4978    red
4979    green
4980    blue
4981 </pre>
4982
4983 <p>The <em class="arg">X server</em> must support the <em class="arg">Standard
4984 Colormap</em> you choose, otherwise an error occurs.  Use <code>list</code> as
4985 the type and <code>display</code> searches the list of colormap types in
4986 <code>top-to-bottom</code> order until one is located. See <em class="arg">xstdcmap(1)</em> for one way of creating Standard Colormaps.</p>
4987
4988
4989 <div style="margin: auto;">
4990   <h4><a id="map_stream_"></a>-map <em class="arg">components</em></h4>
4991 </div>
4992
4993 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">pixel map.</td><td style="text-align:right;">[<a href="stream.html">stream</a>]</td></tr></table>
4994
4995 <p>Here are the valid components of a map:</p>
4996
4997 <pre class="text">
4998    r  red pixel component
4999    g  green pixel component
5000    b  blue pixel component
5001    a  alpha pixel component (0 is transparent)
5002    o  opacity pixel component (0 is opaque)
5003    i  grayscale intensity pixel component
5004    c  cyan pixel component
5005    m  magenta pixel component
5006    y  yellow pixel component
5007    k  black pixel component
5008    p  pad component (always 0)
5009 </pre>
5010
5011 <p>You can specify as many of these components as needed in any order (e.g.
5012 bgr).  The components can repeat as well (e.g. rgbr).</p>
5013
5014
5015 <div style="margin: auto;">
5016   <h4><a id="mask"></a>-mask
5017 <em class="arg">filename</em></h4>
5018 </div>
5019
5020 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Prevent updates to image pixels specified by the mask.</td><td style="text-align:right;"></td></tr></table>
5021
5022 <p>This the same as using a mask used for composite masking operations, with
5023 grayscale values causing blended updates of the image the mask is attached to.
5024 </p>
5025
5026 <p>Use <a href="command-line-options.html#mask">+mask</a> to remove the mask from images.</p>
5027
5028 <p>Also see <a href="command-line-options.html#clip-mask">-clip-mask</a> which work in the same way,
5029 but with strict boolean masking. </p>
5030
5031 <div style="margin: auto;">
5032   <h4><a id="mattecolor"></a>-mattecolor <em class="arg">color</em></h4>
5033 </div>
5034
5035 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Specify the color to be used with the <a href="command-line-options.html#frame">-frame</a> option.</td><td style="text-align:right;"></td></tr></table>
5036
5037 <p>The color is specified using the format described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
5038
5039 <p>The default matte color is <code>#BDBDBD</code>, <span style="background-color: #bdbdbd;">this shade of gray</span>.</p>
5040
5041 <div style="margin: auto;">
5042   <h4><a id="maximum"></a>-maximum</h4>
5043 </div>
5044
5045 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">return the maximum intensity of an image sequence.</td><td style="text-align:right;"></td></tr></table>
5046
5047 <p>Select the 'maximum' value from all the surrounding pixels. </p>
5048
5049 <p>This is legacy option from the <a href="command-line-options.html#statistic">method</a> of the same
5050 name. </p>
5051
5052 <div style="margin: auto;">
5053   <h4><a id="median"></a>-median <em class="arg">geometry</em></h4>
5054 </div>
5055
5056 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">apply a median filter to the image.</td><td style="text-align:right;"></td></tr></table>
5057
5058 <p>Select the 'middle' value from all the surrounding pixels. </p>
5059
5060 <p>This is legacy option from the <a href="command-line-options.html#statistic">method</a> of the same
5061 name. </p>
5062
5063 <div style="margin: auto;">
5064   <h4><a id="metric"></a>-metric <em class="arg">type</em></h4>
5065 </div>
5066
5067 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Output to STDERR a measure of the differences between images according to the <em class="arg">type</em> given metric.</td><td style="text-align:right;"></td></tr></table>
5068
5069 <p>Choose from:</p>
5070
5071 <pre class="text">
5072   AE     absolute error count, number of different pixels (-fuzz effected)
5073   FUZZ   mean color distance
5074   MAE    mean absolute error (normalized), average channel error distance
5075   MEPP   mean error per pixel (normalized mean error, normalized peak error)
5076   MSE    mean error squared, average of the channel error squared
5077   NCC    normalized cross correlation
5078   PAE    peak absolute (normalize peak absolute)
5079   PSNR   peak signal to noise ratio
5080   RMSE   root mean squared (normalized root mean squared)
5081 </pre>
5082
5083 <p>Control the '<code>AE</code>', or absolute count of pixels that are different,
5084 with the <a href="command-line-options.html#fuzz">-fuzz</a> factor (ignore pixels which
5085 only changed by a small amount).  Use '<code>PAE</code>' to find the
5086 size of the <a href="command-line-options.html#fuzz">-fuzz</a> factor needed to make all pixels
5087 'similar', while '<code>MAE</code>' determines the factor needed
5088 for about half the pixels to be similar. </p>
5089
5090 <p>The '<code>MEPP</code>' metric returns three different metrics
5091 ('<code>MAE</code>', '<code>MAE</code>' normalized, and '<code>PAE</code>'
5092 normalized) from a single comparison run. </p>
5093
5094 <p>To print a complete list of metrics, use the <a href="command-line-options.html#list">-list
5095 metric</a> option.</p>
5096
5097
5098 <div style="margin: auto;">
5099   <h4><a id="minimum"></a>-minimum</h4>
5100 </div>
5101
5102 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">return the minimum intensity of an image sequence.</td><td style="text-align:right;"></td></tr></table>
5103
5104 <p>Select the 'minimal' value from all the surrounding pixels. </p>
5105
5106 <p>This is legacy option from the <a href="command-line-options.html#statistic">method</a> of the same
5107 name. </p>
5108
5109
5110
5111 <div style="margin: auto;">
5112   <h4><a id="mode"></a>-mode <em class="arg">geometry</em></h4>
5113 </div>
5114
5115 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">make each pixel the 'predominant color' of the neighborhood.</td><td style="text-align:right;">[<a href="convert.html">convert</a>, <a href="mogrify.html">mogrify</a>]</td></tr></table>
5116
5117 <div style="margin: auto;">
5118   <h4>-mode <em class="arg">value</em></h4>
5119 </div>
5120
5121 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Mode of operation.</td><td style="text-align:right;">[<a href="montage.html">montage</a>]</td></tr></table>
5122
5123 <p>Choose the <em class="arg">value</em> from these styles: <code>Frame,
5124 Unframe, or Concatenate</code></p>
5125
5126 <p>Use the <a href="command-line-options.html#list">-list</a> option with a '<code>Mode</code>' argument
5127 for a list of <a href="command-line-options.html#mode">-mode</a> arguments available in your
5128 ImageMagick installation.</p>
5129
5130
5131 <div style="margin: auto;">
5132   <h4><a id="modulate"></a>-modulate <em class="arg">brightness</em>[,<em class="arg">saturation</em>,<em class="arg">hue</em>]</h4>
5133 </div>
5134
5135 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Vary the <em class="arg">brightness</em>, <em class="arg">saturation</em>, and <em class="arg">hue</em> of an image.</td><td style="text-align:right;"></td></tr></table>
5136
5137 <p>The arguments are given as a percentages of variation. A value of 100 means
5138 no change, and any missing values are taken to mean 100.</p>
5139
5140 <p>The <em class="arg">brightness</em> is a multiplier of the overall
5141 brightness of the image, so 0 means pure black, 50 is half as bright, 200 is
5142 twice as bright. To invert its meaning <a href="command-line-options.html#negate">-negate</a> the image
5143 before and after. </p>
5144
5145 <p>The <em class="arg">saturation</em> controls the amount of color in an
5146 image. For example, 0 produce a grayscale image, while a large value such as
5147 200 produce a very colorful, 'cartoonish' color.</p>
5148
5149 <p>The <em class="arg">hue</em> argument causes a "rotation" of the colors
5150 within the image by the amount specified. For example, 50 results in
5151 a counter-clockwise rotation of 90, mapping red shades to purple, and so on.
5152 A value of either 0 or 200 results in a complete 180 degree rotation of the
5153 image. Using a value of 300 is a 360 degree rotation resulting in no change to
5154 the original image. </p>
5155
5156 <p>For example, to increase the color brightness by 20% and decrease the color
5157 saturation by 10% and leave the hue unchanged, use <a href="command-line-options.html#modulate">-modulate 120,90</a>.</p>
5158
5159 <p>Use <a href="command-line-options.html#set">-set</a> attribute of '<code class="arg">option:modulate:colorspace</code>' to specify which colorspace to
5160 modulate.  Choose from <code>HCL</code>, <code>HCLp</code>, <code>HSB</code>, <code>HSI</code>, <code>HSL</code> (the default), <code>HSV</code>, <code>HWB</code>, or <code>LCH</code> (LCHuv).  For example,</p>
5161
5162 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert image.png -set option:modulate:colorspace hsb -modulate 120,90 modulate.png</span></p>
5163
5164 <div style="margin: auto;">
5165   <h4><a id="monitor"></a>-monitor</h4>
5166 </div>
5167
5168 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">monitor progress.</td><td style="text-align:right;"></td></tr></table>
5169
5170
5171 <div style="margin: auto;">
5172   <h4><a id="monochrome"></a>-monochrome</h4>
5173 </div>
5174
5175 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">transform the image to black and white.</td><td style="text-align:right;"></td></tr></table>
5176
5177 <div style="margin: auto;">
5178   <h4><a id="morph"></a>-morph <em class="arg">frames</em></h4>
5179 </div>
5180
5181 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">morphs an image sequence.</td><td style="text-align:right;"></td></tr></table>
5182
5183 <p>Both the image pixels and size are linearly interpolated to give the
5184 appearance of a metamorphosis from one image to the next, over all the images
5185 in the current image list. The added images are the equivalent of a <a href="command-line-options.html#blend">-blend</a> composition. The <em class="arg">frames</em>
5186 argument determine how many images to interpolate between each image. </p>
5187
5188
5189 <div style="margin: auto;">
5190   <h4><a id="morphology"></a>-morphology</h4>
5191   <h4>-morphology <em class="arg">method</em>  <em class="arg">kernel</em></h4>
5192 </div>
5193
5194 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">apply a morphology method to the image.</td><td style="text-align:right;"></td></tr></table>
5195
5196 <p>Until I get around to writing an option summary for this, see <a href="http://www.imagemagick.org/Usage/morphology/">IM Usage Examples,
5197 Morphology</a>. </p>
5198
5199
5200 <div style="margin: auto;">
5201   <h4><a id="mosaic"></a>-mosaic</h4>
5202 </div>
5203
5204 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">an simple alias for the <a href="command-line-options.html#layers">-layers</a> method "mosaic"</td><td style="text-align:right;"></td></tr></table>
5205
5206
5207 <div style="margin: auto;">
5208   <h4><a id="motion-blur"></a>-motion-blur <em class="arg">radius</em><br></br>-motion-blur <em class="arg">radius</em>x<em class="arg">sigma</em>+<em class="arg">angle</em>+<em class="arg">bias</em></h4>
5209 </div>
5210
5211 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">simulate motion blur.</td><td style="text-align:right;"></td></tr></table>
5212
5213 <p>Blur with the given radius, standard deviation (sigma), and angle.   The
5214 angle given is the angle toward which the image is blurred.  That is the
5215 direction people would consider the object is coming from. </p>
5216
5217 <p>Note that the blur is not uniform distribution, giving the motion a
5218 definite sense of direction of movement. </p>
5219
5220 <p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
5221 pixels which are outside the image proper are blurred into the final result.
5222 </p>
5223
5224 <div style="margin: auto;">
5225   <h4><a id="name"></a>-name</h4>
5226 </div>
5227
5228 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">name an image.</td><td style="text-align:right;"></td></tr></table>
5229 <div style="margin: auto;">
5230   <h4><a id="negate"></a>-negate</h4>
5231 </div>
5232
5233 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">replace each pixel with its complementary color.</td><td style="text-align:right;"></td></tr></table>
5234
5235 <p>The red, green, and blue intensities of an image are negated. White becomes
5236 black, yellow becomes blue, etc.  Use <a href="command-line-options.html#negate">+negate</a> to only
5237 negate the grayscale pixels of the image.</p>
5238
5239 <div style="margin: auto;">
5240   <h4><a id="noise"></a>-noise <em class="arg">geometry</em><br></br>
5241   +noise <em class="arg">type</em></h4>
5242 </div>
5243
5244 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Add or reduce noise in an image.</td><td style="text-align:right;"></td></tr></table>
5245
5246 <p>The principal function of noise peak elimination filter is to smooth the
5247 objects within an image without losing edge information and without creating
5248 undesired structures.  The central idea of the algorithm is to replace a pixel
5249 with its next neighbor in value within a pixel window, if this pixel has been
5250 found to be noise. A pixel is defined as noise if and only if this pixel is
5251 a maximum or minimum within the pixel window.</p>
5252
5253 <p>Use <code><a href="command-line-options.html#noise">-noise</a> <em class="arg">radius</em></code> to
5254 specify the width of the neighborhood when reducing noise.  This is equivelent
5255 to using a <code><a href="command-line-options.html#statistic">-statistic</a> NonPeak</code> operation,
5256 which should be used in preference.</p>
5257
5258 <p>Use <a href="command-line-options.html#noise">+noise</a> followed by a noise <em class="arg">type</em> to add noise to an image. Choose from these noise
5259 types:</p>
5260
5261 <pre class="text">
5262    Gaussian
5263    Impulse
5264    Laplacian
5265    Multiplicative
5266    Poisson
5267    Random
5268    Uniform
5269 </pre>
5270
5271 <p>The amount of noise added can be controled by the <code><a href="command-line-options.html#attunuuate">-attenuate</a></code> setting. If unset the value is
5272 equivelent to 1.0, or a maximum noise addition.</p>
5273
5274 <p>Note that Random will replace the image with noise rather than add noise to the image. Use Uniform, if you wish to add random noise to the image.</p>
5275
5276 <p>To print a complete list of noises, use the <a href="command-line-options.html#list">-list noise</a> option.</p>
5277
5278 <p>Also see the <a href="command-line-options.html#evaluate">-evaluate</a> noise functions that allows
5279 the use of a controlling value to specify the amount of noise that should be
5280 added to an image. </p>
5281
5282
5283 <div style="margin: auto;">
5284   <h4><a id="normalize"></a>-normalize</h4>
5285 </div>
5286
5287 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Increase the contrast in an image by <em>stretching</em> the range of intensity values.</td><td style="text-align:right;"></td></tr></table>
5288
5289 <p>The intensity values are stretched to cover the entire range of possible
5290 values. While doing so, black-out at most <em>2%</em> of the pixels and
5291 white-out at most <em>1%</em> of the pixels.</p>
5292
5293 <p>Note that as of ImageMagick 6.4.7-0, <a href="command-line-options.html#normalize">-normalize</a>
5294 is equivalent to <a href="command-line-options.html#contrast-stretch">-contrast-stretch 2%x1%</a>.
5295 (Before this version, it was equivalent to <a href="command-line-options.html#contrast-stretch">-contrast-stretch 2%x99%</a>).</p>
5296
5297 <p>All the channels are normalized in concert by the came amount so as to
5298 preserve color integrity, when the default <a href="command-line-options.html#channel">+channel</a>
5299 setting is in use.  Specifying any other <a href="command-line-options.html#channel">-channel</a>
5300 setting will normalize the RGB channels independently.</p>
5301
5302 <p>See  <a href="command-line-options.html#contrast-stretch">-contrast-stretch</a> for more details.
5303 Also see <a href="command-line-options.html#auto-level">-auto-level</a> for a 'perfect' normalization
5304 that is better suited to mathematically generated images. </p>
5305
5306 <p>This operator is under review for re-development. </p>
5307
5308
5309 <div style="margin: auto;">
5310   <h4><a id="ordered-dither"></a>-ordered-dither <em class="arg">threshold_map</em>{,<em class="arg">level</em>...}</h4>
5311 </div>
5312
5313 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">dither the image using a pre-defined  ordered dither <em class="arg">threshold map</em> specified, and a uniform color map with the
5314 given number of <em class="arg">levels</em> per color channel .  </td><td style="text-align:right;"></td></tr></table>
5315
5316 <p>You can choose from these standard threshold maps:</p>
5317
5318 <pre class="text">
5319    threshold   1x1   Threshold 1x1 (non-dither)
5320    checks      2x1   Checkerboard 2x1 (dither)
5321    o2x2        2x2   Ordered 2x2 (dispersed)
5322    o3x3        3x3   Ordered 3x3 (dispersed)
5323    o4x4        4x4   Ordered 4x4 (dispersed)
5324    o8x8        8x8   Ordered 8x8 (dispersed)
5325    h4x4a       4x1   Halftone 4x4 (angled)
5326    h6x6a       6x1   Halftone 6x6 (angled)
5327    h8x8a       8x1   Halftone 8x8 (angled)
5328    h4x4o             Halftone 4x4 (orthogonal)
5329    h6x6o             Halftone 6x6 (orthogonal)
5330    h8x8o             Halftone 8x8 (orthogonal)
5331    h16x16o           Halftone 16x16 (orthogonal)
5332    c5x5b       c5x5  Circles 5x5 (black)
5333    c5x5w             Circles 5x5 (white)
5334    c6x6b       c6x6  Circles 6x6 (black)
5335    c6x6w             Circles 6x6 (white)
5336    c7x7b       c7x7  Circles 7x7 (black)
5337    c7x7w             Circles 7x7 (white)
5338 </pre>
5339
5340 <p> The <code>threshold</code> generated a simple 50% threshold of the image.
5341 This could be used with <em class="arg">level</em> to do the equivalent of <a href="command-line-options.html#posterize">-posterize</a> to reduce an image to basic primary colors.
5342 </p>
5343
5344 <p>The <code>checks</code> pattern produces a 3 level checkerboard  dither
5345 pattern. That is a grayscale will become a pattern of solid black, solid
5346 white, and  mid-tone colors into a checkerboard pattern of black and white.
5347 </p>
5348
5349 <p>You can define your own <em class="arg">threshold map</em> for ordered
5350 dithering and halftoning your images, in either personal or system
5351 <code>thresholds.xml</code> XML file. See <a href="resources.html">Resources</a>
5352 for more details of configuration files. </p>
5353
5354 <p>To print a complete list of the thresholds that have been defined, use the
5355 <a href="command-line-options.html#list">-list threshold</a> option.</p>
5356
5357 <p>Note that at this time the same threshold dithering map is used for all
5358 color channels, no attempt is made to offset or rotate the map for different
5359 channels is made, to create an offset printing effect. Also as the maps are
5360 simple threshold levels, the halftone and circle maps will create incomplete
5361 circles along the edges of a colored area. Also all the effects are purely
5362 on/off boolean effects, without anti-aliasing to make the circles smooth
5363 looking. Large dots can be made to look better with a small amount of blurring
5364 after being created. </p>
5365
5366
5367 <div style="margin: auto;">
5368   <h4><a id="opaque"></a>-opaque <em class="arg">color</em></h4>
5369 </div>
5370
5371 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">change this color to the fill color within the image.</td><td style="text-align:right;"></td></tr></table>
5372
5373 <p>The <em class="arg">color</em> argument is defined using the format
5374 described under the <a href="command-line-options.html#fill">-fill</a> option.  The <a href="command-line-options.html#fuzz">-fuzz</a> setting can be used to match and replace colors similar to the one
5375 given.</p>
5376
5377 <p>Use <a href="command-line-options.html#opaque">+opaque</a> to paint any pixel that does not match
5378 the target color. </p>
5379
5380 <p>The <a href="command-line-options.html#transparent">-transparent</a>  operator is exactly the same
5381 as <a href="command-line-options.html#opaque">-opaque</a> but replaces the matching color with
5382 transparency rather than the current <a href="command-line-options.html#fill">-fill</a> color setting.
5383 To ensure that it can do this it also ensures that the image has an alpha
5384 channel enabled, as per "<code><a href="command-line-options.html#alpha">-alpha</a> set</code>", for
5385 the new transparent colors, and does not require you to modify the <a href="command-line-options.html#channel">-channel</a> to enable alpha channel handling. </p>
5386
5387
5388 <div style="margin: auto;">
5389   <h4><a id="orient"></a>-orient <em class="arg">image orientation</em></h4>
5390 </div>
5391
5392 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">specify orientation of a digital camera image.</td><td style="text-align:right;"></td></tr></table>
5393
5394 <p>Choose from these orientations:</p>
5395
5396 <pre class="text">
5397    bottom-left
5398    bottom-right
5399    left-bottom
5400    left-top
5401    right-bottom
5402    right-top
5403    top-left
5404    top-right
5405    undefined
5406 </pre>
5407
5408 <p>To print a complete list of orientations, use the <a href="command-line-options.html#list">-list
5409 orientation</a> option.</p>
5410
5411
5412 <div style="margin: auto;">
5413   <h4><a id="page"></a>-page <em class="arg">geometry</em><br></br>
5414   -page <em class="arg">media</em>[<em class="arg">offset</em>][{<em class="arg">^!&lt;&gt;</em>}]<br></br>
5415   +page
5416   </h4>
5417 </div>
5418
5419 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set the size and location of an image on the larger virtual canvas.</td><td style="text-align:right;"></td></tr></table>
5420
5421 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
5422
5423 <p>For convenience you can specify the page size using <em class="arg">media</em> (see below). Offsets can then be added as with other
5424 <em class="arg">geometry</em> arguments (e.g. <a href="command-line-options.html#page">-page</a> <code>Letter+43+43</code>).</p>
5425
5426 <p>Use <em class="arg">media</em> as shorthand to specify the dimensions (<em class="arg">width</em>x<em class="arg">height</em>) of the <em class="arg">PostScript</em> page in dots per inch or a TEXT page in pixels.
5427 The choices for a PostScript page are:</p>
5428
5429 <table id="geometryTable" cellpadding="2" cellspacing="0" border="1" width="50%" style="margin-left: auto; margin-right: auto;">
5430 <thead>
5431         <tr valign="top">
5432     <th align="center"><em class="arg">media</em></th>
5433     <th align="center"><em class="arg">width</em></th>
5434     <th align="center"><em class="arg">height</em></th>
5435         </tr>
5436 </thead>
5437 <tbody>
5438 <tr><td align="left"> 11x17      </td> <td align="right">  792</td> <td align="right"> 1224</td> </tr>
5439 <tr><td align="left"> Ledger     </td> <td align="right"> 1224</td> <td align="right">  792</td> </tr>
5440 <tr><td align="left"> Legal      </td> <td align="right">  612</td> <td align="right"> 1008</td> </tr>
5441 <tr><td align="left"> Letter     </td> <td align="right">  612</td> <td align="right">  792</td> </tr>
5442 <tr><td align="left"> LetterSmall</td> <td align="right">  612</td> <td align="right">  792</td> </tr>
5443 <tr><td align="left"> ArchE      </td> <td align="right"> 2592</td> <td align="right"> 3456</td> </tr>
5444 <tr><td align="left"> ArchD      </td> <td align="right"> 1728</td> <td align="right"> 2592</td> </tr>
5445 <tr><td align="left"> ArchC      </td> <td align="right"> 1296</td> <td align="right"> 1728</td> </tr>
5446 <tr><td align="left"> ArchB      </td> <td align="right">  864</td> <td align="right"> 1296</td> </tr>
5447 <tr><td align="left"> ArchA      </td> <td align="right">  648</td> <td align="right">  864</td> </tr>
5448 <tr><td align="left"> A0         </td> <td align="right"> 2380</td> <td align="right"> 3368</td> </tr>
5449 <tr><td align="left"> A1         </td> <td align="right"> 1684</td> <td align="right"> 2380</td> </tr>
5450 <tr><td align="left"> A2         </td> <td align="right"> 1190</td> <td align="right"> 1684</td> </tr>
5451 <tr><td align="left"> A3         </td> <td align="right">  842</td> <td align="right"> 1190</td> </tr>
5452 <tr><td align="left"> A4         </td> <td align="right">  595</td> <td align="right">  842</td> </tr>
5453 <tr><td align="left"> A4Small    </td> <td align="right">  595</td> <td align="right">  842</td> </tr>
5454 <tr><td align="left"> A5         </td> <td align="right">  421</td> <td align="right">  595</td> </tr>
5455 <tr><td align="left"> A6         </td> <td align="right">  297</td> <td align="right">  421</td> </tr>
5456 <tr><td align="left"> A7         </td> <td align="right">  210</td> <td align="right">  297</td> </tr>
5457 <tr><td align="left"> A8         </td> <td align="right">  148</td> <td align="right">  210</td> </tr>
5458 <tr><td align="left"> A9         </td> <td align="right">  105</td> <td align="right">  148</td> </tr>
5459 <tr><td align="left"> A10        </td> <td align="right">   74</td> <td align="right">  105</td> </tr>
5460 <tr><td align="left"> B0         </td> <td align="right"> 2836</td> <td align="right"> 4008</td> </tr>
5461 <tr><td align="left"> B1         </td> <td align="right"> 2004</td> <td align="right"> 2836</td> </tr>
5462 <tr><td align="left"> B2         </td> <td align="right"> 1418</td> <td align="right"> 2004</td> </tr>
5463 <tr><td align="left"> B3         </td> <td align="right"> 1002</td> <td align="right"> 1418</td> </tr>
5464 <tr><td align="left"> B4         </td> <td align="right">  709</td> <td align="right"> 1002</td> </tr>
5465 <tr><td align="left"> B5         </td> <td align="right">  501</td> <td align="right">  709</td> </tr>
5466 <tr><td align="left"> C0         </td> <td align="right"> 2600</td> <td align="right"> 3677</td> </tr>
5467 <tr><td align="left"> C1         </td> <td align="right"> 1837</td> <td align="right"> 2600</td> </tr>
5468 <tr><td align="left"> C2         </td> <td align="right"> 1298</td> <td align="right"> 1837</td> </tr>
5469 <tr><td align="left"> C3         </td> <td align="right">  918</td> <td align="right"> 1298</td> </tr>
5470 <tr><td align="left"> C4         </td> <td align="right">  649</td> <td align="right">  918</td> </tr>
5471 <tr><td align="left"> C5         </td> <td align="right">  459</td> <td align="right">  649</td> </tr>
5472 <tr><td align="left"> C6         </td> <td align="right">  323</td> <td align="right">  459</td> </tr>
5473 <tr><td align="left"> Flsa       </td> <td align="right">  612</td> <td align="right">  936</td> </tr>
5474 <tr><td align="left"> Flse       </td> <td align="right">  612</td> <td align="right">  936</td> </tr>
5475 <tr><td align="left"> HalfLetter </td> <td align="right">  396</td> <td align="right">  612</td> </tr>
5476 </tbody>
5477 </table>
5478
5479
5480 <p>This option is also used to place subimages when writing to a multi-image
5481 format that supports offsets, such as GIF89 and MNG. When used for this
5482 purpose the offsets are always measured from the top left corner of the canvas
5483 and are not affected by the <a href="command-line-options.html#gravity">-gravity</a> option. To
5484 position a GIF or MNG image, use <a href="command-line-options.html#page">-page</a><em class="arg">{+-}x{+-}y</em> (e.g.  -page +100+200). When writing to a MNG
5485 file, a <a href="command-line-options.html#page">-page</a> option appearing ahead of the first image in
5486 the sequence with nonzero width and height defines the width and height values
5487 that are written in the <code>MHDR</code> chunk.  Otherwise, the MNG width and
5488 height are computed from the bounding box that contains all images in the
5489 sequence. When writing a GIF89 file, only the bounding box method is used to
5490 determine its dimensions.</p>
5491
5492 <p>For a PostScript page, the image is sized as in <a href="command-line-options.html#geometry">-geometry</a> but positioned relative to the <em>lower
5493 left-hand corner</em> of the page by {+-}<code>x</code><em class="arg">offset</em>{+-}<code>y</code> <em class="arg">offset</em>. Use <a href="command-line-options.html#page">-page 612x792</a>, for example, to center the image within the
5494 page. If the image size exceeds the PostScript page, it is reduced to fit the
5495 page. The default gravity for the <a href="command-line-options.html#page">-page</a> option is <em class="arg">NorthWest</em>, i.e., positive <code>x</code> and <code>y</code> <em class="arg">offset</em> are measured rightward and downward from the top left
5496 corner of the page, unless the <a href="command-line-options.html#gravity">-gravity</a> option is
5497 present with a value other than <em class="arg">NorthWest</em>.</p>
5498
5499 <p>The default page dimensions for a TEXT image is 612x792.</p>
5500
5501 <p>This option is used in concert with <a href="command-line-options.html#density">-density</a>.</p>
5502
5503 <p>Use <a href="command-line-options.html#page">+page</a> to remove the page settings for an image.</p>
5504
5505 <div style="margin: auto;">
5506   <h4><a id="paint"></a>-paint <em class="arg">radius</em></h4>
5507 </div>
5508
5509 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">simulate an oil painting.</td><td style="text-align:right;"></td></tr></table>
5510
5511 <p>Each pixel is replaced by the most frequent color in a circular
5512 neighborhood whose width is specified with <em class="arg">radius</em>.</p>
5513
5514 <div style="margin: auto;">
5515   <h4><a id="path"></a>-path <em class="arg">path</em></h4></div>
5516
5517 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">write images to this path on disk.</td><td style="text-align:right;"></td></tr></table>
5518
5519 <div style="margin: auto;">
5520   <h4><a id="pause_animate_"></a>-pause <em class="arg">seconds</em></h4>
5521 </div>
5522
5523 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Pause between animation loops.</td><td style="text-align:right;">[<a href="animate.html">animate</a>]</td></tr></table>
5524
5525 <p>Pause for the specified number of seconds before repeating the animation.</p>
5526
5527 <div style="margin: auto;">
5528   <h4><a id="pause_import_"></a>-pause <em class="arg">seconds</em></h4>
5529 </div>
5530
5531 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Pause between snapshots.</td><td style="text-align:right;">[<a href="import.html">import</a>]</td></tr></table>
5532
5533 <p>Pause for the specified number of seconds before taking the next snapshot.</p>
5534
5535 <div style="margin: auto;">
5536   <h4><a id="perceptible"></a>-perceptible <em class="arg">epsilon</em></h4>
5537 </div>
5538
5539 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">set each pixel whose value is less than |<em>epsilon</em>| to <em>-epsilon</em> or <em>epsilon</em> (whichever is closer) otherwise the pixel value remains unchanged.</td><td style="text-align:right;"></td></tr></table>
5540
5541 <div style="margin: auto;">
5542   <h4><a id="ping"></a>-ping</h4>
5543 </div>
5544
5545 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">efficiently determine image characteristics.</td><td style="text-align:right;"></td></tr></table>
5546
5547 <div style="margin: auto;">
5548   <h4><a id="pointsize"></a>-pointsize <em class="arg">value</em></h4>
5549 </div>
5550
5551 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">pointsize of the PostScript, OPTION1, or TrueType font.</td><td style="text-align:right;"></td></tr></table>
5552
5553 <div style="margin: auto;">
5554   <h4><a id="polaroid"></a>-polaroid <em class="arg">angle</em></h4>
5555 </div>
5556
5557 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">simulate a Polaroid picture.</td><td style="text-align:right;"></td></tr></table>
5558
5559 <p>Use <code>+polaroid</code> to rotate the image at a random angle between -15 and +15 degrees.</p>
5560
5561 <div style="margin: auto;">
5562   <h4><a id="poly"></a>-poly <em class="arg">"wt,exp ..."</em></h4>
5563 </div>
5564
5565 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">combines multiple images according to a weighted sum of polynomials; one floating point weight (coefficient) and one floating point polynomial exponent (power) for each image expressed as comma separated pairs.</td><td style="text-align:right;"></td></tr></table>
5566
5567 <p> The weights should typically be fractions between -1 and 1. But the sum of weights should be 1 or at least between 0 and 1 to avoid clamping in non-hdri mode at black and white.</p>
5568
5569 <p>The exponents may be positive, negative or zero. A negative exponent is equivalent to 1 divided by the image raised to the corresponding positive exponent. A zero exponent always produces 1 scaled by quantumrange to white, i.e. wt*white, no matter what the image.</p>
5570
5571 <p>The format is: output = wt1*image1^exp1 + wt2*image2^exp2 ...</p>
5572
5573 <p>Some simple uses are:</p>
5574 <ul>
5575 <li>A weighted sum of each image provided all weights add to unity and all exponents=1. If the the weights are all equal to 1/(number of images), then this is equivalent to <a href="command-line-options.html#profile">-evaluate-sequence</a> <em class="arg">mean</em>.</li>
5576 <li>The sum of squares of two or more images, provided the weights are equal (and sum to 1 to avoid clamping) and the exponents equal 2.</li>
5577 </ul>
5578
5579 <p>Note that one may add a constant color to the expression simply by using xc:somecolor for one of the images and specifying the desired weight and exponent equal to 0.</p>
5580
5581 <p>Similarly one may add white to the expression by simply using null: (or xc:white) for one of the images with the appropriate weight and exponent equal to 0.</p>
5582
5583
5584 <div style="margin: auto;">
5585   <h4><a id="posterize"></a>-posterize <em class="arg">levels</em></h4>
5586 </div>
5587
5588 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">reduce the image to a limited number of color levels per channel.</td><td style="text-align:right;"></td></tr></table>
5589
5590 <p>Very low values of <em class="arg">levels</em>, e.g., 2, 3, 4, have the most
5591 visible effect.</p>
5592
5593 <div style="margin: auto;">
5594   <h4><a id="precision"></a>-precision <em class="arg">value</em></h4>
5595 </div>
5596
5597 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">set the maximum number of significant digits to be printed.</td><td style="text-align:right;"></td></tr></table>
5598
5599 <div style="margin: auto;">
5600   <h4><a id="preview"></a>-preview <em class="arg">type</em></h4>
5601 </div>
5602
5603 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">image preview type.</td><td style="text-align:right;"></td></tr></table>
5604
5605 <p>Use this option to affect the preview operation of an image (e.g.
5606 <code>convert file.png -preview Gamma Preview:gamma.png</code>). Choose from
5607 these previews:</p>
5608
5609 <pre class="text">
5610    Rotate           Shear            Roll             Hue
5611    Saturation       Brightness       Gamma            Spiff
5612    Dull             Grayscale        Quantize         Despeckle
5613    ReduceNoise      Add Noise        Sharpen          Blur
5614    Threshold        EdgeDetect       Spread           Shade
5615    Raise            Segment          Solarize         Swirl
5616    Implode          Wave             OilPaint         CharcoalDrawing
5617    JPEG
5618 </pre>
5619
5620 <p>To print a complete list of previews, use the <a href="command-line-options.html#list">-list preview</a> option.</p>
5621
5622 <p>The default preview is <code>JPEG</code>.</p>
5623
5624 <div style="margin: auto;">
5625   <h4><a id="print"></a>-print <em class="arg">string</em></h4>
5626 </div>
5627
5628 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">interpret string and print to console.</td><td style="text-align:right;"></td></tr></table>
5629
5630 <div style="margin: auto;">
5631   <h4><a id="process"></a>-process <em class="arg">command</em></h4>
5632 </div>
5633
5634 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">process the image with a custom image filter.</td><td style="text-align:right;"></td></tr></table>
5635
5636 <p>The command arguments has the form <code>"module arg1 arg2 arg3 ...
5637 argN"</code> where <code>module</code> is the name of the module to invoke (e.g.
5638 "Analyze") and arg1 arg2 arg3 ... argN are an arbitrary number of arguments to
5639 pass to the process module.</p>
5640
5641 <div style="margin: auto;">
5642   <h4><a id="profile"></a>-profile <em class="arg">filename</em><br></br>
5643   +profile <em class="arg">profile_name</em></h4>
5644 </div>
5645
5646 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Manage ICM, IPTC, or generic profiles in an image.</td><td style="text-align:right;"></td></tr></table>
5647
5648 <p>Using <a href="command-line-options.html#profile">-profile</a> <em class="arg">filename</em> adds an
5649 ICM (ICC color management), IPTC (newswire information), or a generic profile
5650 to the image.</p>
5651
5652 <p>Use <a href="command-line-options.html#profile">+profile <em class="arg">profile_name</em></a> to
5653 remove the indicated profile. ImageMagick uses standard filename globbing, so
5654 wildcard expressions may be used to remove more than one profile.  Here we
5655 remove all profiles from the image except for the XMP profile:  <code>+profile
5656 "!xmp,*"</code>. </p>
5657
5658 <p>Use <code>identify -verbose</code> to find out which profiles are in the
5659 image file. Use <a href="command-line-options.html#strip">-strip</a> to remove all profiles (and
5660 comments).</p>
5661
5662 <p>To extract a profile, the <a href="command-line-options.html#profile">-profile</a> option is not
5663 used. Instead, simply write the file to an image format such as <em class="arg">APP1, 8BIM, ICM,</em> or <em class="arg">IPTC</em>.</p>
5664
5665 <p>For example, to extract the Exif data (which is stored in JPEG files in the
5666 <em class="arg">APP1</em> profile), use.</p>
5667
5668 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert cockatoo.jpg profile.exif</span></p>
5669 <p>It is important to note that results may depend on whether or not the
5670 original image already has an included profile. Also, keep in mind that <a href="command-line-options.html#profile">-profile</a> is an "operator" (as opposed to a "setting") and
5671 therefore a conversion is made each time it is encountered, in order, in the
5672 command-line. For instance, in the following example, if the original image is
5673 CMYK with profile, a CMYK-CMYK-RGB conversion results.</p>
5674
5675 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert CMYK.tif -profile "CMYK.icc" -profile "RGB.icc" RGB.tiff</span></p>
5676 <p>Furthermore, since ICC profiles are not necessarily symmetric, extra
5677 conversion steps can yield unwanted results.  CMYK profiles are often very
5678 asymmetric since they involve 3−&gt;4 and 4−&gt;3 channel mapping.
5679 </p>
5680
5681 <div style="margin: auto;">
5682   <h4><a id="quality"></a>-quality <em class="arg">value</em></h4>
5683 </div>
5684
5685 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">JPEG/MIFF/PNG compression level.</td><td style="text-align:right;"></td></tr></table>
5686
5687 <p>For the JPEG and MPEG image formats, quality is 1 (lowest image quality and
5688 highest compression) to 100 (best quality but least effective compression).
5689 The default is to use the estimated quality of your input image if it can
5690 be determined, otherwise 92. When the quality is greater than 90, then the
5691 chroma channels are not downsampled.
5692 Use the <a href="command-line-options.html#sampling-factor">-sampling-factor</a> option to specify the
5693 factors for chroma downsampling.</p>
5694
5695 <p>For the MIFF image format, quality/10 is the zlib compression level, which
5696 is 0 (worst but fastest compression) to 9 (best but slowest). It has no effect
5697 on the image appearance, since the compression is always lossless.</p>
5698
5699 <p>For the JPEG-2000 image format, quality is mapped using a non-linear
5700 equation to the compression ratio required by the Jasper library. This
5701 non-linear equation is intended to loosely approximate the quality provided by
5702 the JPEG v1 format. The default quality value 100, a request for non-lossy
5703 compression.  A quality of 75 results in a request for 16:1 compression.</p>
5704
5705 <p>For the MNG and PNG image formats, the quality value sets the zlib
5706 compression level (quality / 10) and filter-type (quality % 10).  The default
5707 PNG "quality" is 75, which means compression level 7 with adaptive PNG
5708 filtering, unless the image has a color map, in which case it means
5709 compression level 7 with no PNG filtering.</p>
5710
5711 <p>For compression level 0, the Huffman-only strategy is used, which is
5712 fastest but not necessarily the worst compression.</p>
5713
5714 <p>If filter-type is 4 or less, the specified PNG filter-type is used for
5715 all scanlines:</p>
5716
5717 <pre class="text">
5718    0: none
5719    1: sub
5720    2: up
5721    3: average
5722    4: Paeth
5723 </pre>
5724
5725 <p>If filter-type is 5, adaptive filtering is used when quality is greater
5726 than 50 and the image does not have a color map, otherwise no filtering is
5727 used.</p>
5728
5729 <p>If filter-type is 6, adaptive filtering
5730 with <em class="arg">minimum-sum-of-absolute-values</em> is used.</p>
5731
5732 <p>Only if the output is MNG, if filter-type is 7, the LOCO color
5733 transformation (intrapixel differencing) and adaptive filtering
5734 with <em class="arg">minimum-sum-of-absolute-values</em> are used.</p>
5735
5736 <p>If the filter-type is 8 the zlib Z_RLE compression strategy is used with
5737  no PNG filtering.</p>
5738
5739 <p>If the filter-type is 9 the zlib Z_RLE compression strategy is used with
5740  adaptive PNG filtering.</p>
5741
5742 <p>The quality setting has no effect on the appearance or signature of PNG
5743 and MNG images, since the compression is always lossless.</p>
5744
5745 <p>Not all combinations of compression level, strategy, and PNG filter type
5746 can be obtained using the -quality option.  For more precise control,
5747 you can use the PNG:compression-level=N, PNG:compression-strategy=N, and
5748 PNG:compression-filter=N defines, respectively, instead.
5749 See <a href="command-line-options.html#define">-define</a>. Values from the defines take precedence
5750 over values from the -quality option.</p>
5751
5752 <p>For further information, see
5753 the <a href="http://www.w3.org/pub/WWW/TR">PNG</a> specification.</p>
5754
5755 <div style="margin: auto;">
5756   <h4><a id="quantize"></a>-quantize <em class="arg">colorspace</em></h4>
5757 </div>
5758
5759 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">reduce colors using this colorspace.</td><td style="text-align:right;"></td></tr></table>
5760
5761 <p>This setting defines the colorspace used to sort out and reduce the number
5762 of colors needed by an image (for later dithering) by operators such as <a href="command-line-options.html#colors">-colors</a>, Note that color reduction also happens
5763 automatically when saving images to color-limited image file formats, such as
5764 GIF, and PNG8.</p>
5765
5766
5767 <div style="margin: auto;">
5768   <h4><a id="quiet"></a>-quiet</h4>
5769 </div>
5770
5771 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">suppress all warning messages. Error messages are still reported.</td><td style="text-align:right;"></td></tr></table>
5772
5773 <div style="margin: auto;">
5774   <h4><a id="radial-blur"></a>-radial-blur  <em class="arg">angle</em></h4>
5775 </div>
5776
5777 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Blur around the center of the image.</td><td style="text-align:right;"></td></tr></table>
5778
5779 <p>Note that this is actually a rotational blur rather than a radial and as
5780 such actually mis-named. </p>
5781
5782 <p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
5783 pixels which are outside the image proper are blurred into the final result.
5784 </p>
5785
5786
5787 <div style="margin: auto;">
5788   <h4><a id="raise"></a>-raise <em class="arg">thickness</em></h4>
5789 </div>
5790
5791 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Lighten or darken image edges.</td><td style="text-align:right;"></td></tr></table>
5792
5793 <p>This will create a 3-D effect. Use <a href="command-line-options.html#raise">-raise</a> to create
5794 a raised effect, otherwise use <a href="command-line-options.html#raise">+raise</a>.  </p>
5795
5796 <p>Unlike the similar <a href="command-line-options.html#frame">-frame</a> option, <a href="command-line-options.html#raise">-raise</a> does not alter the dimensions of the image.</p>
5797
5798 <div style="margin: auto;">
5799   <h4><a id="random-threshold"></a>-random-threshold <em class="arg">low</em>x<em class="arg">high</em></h4>
5800 </div>
5801
5802 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Apply a random threshold to the image.</td><td style="text-align:right;"></td></tr></table>
5803
5804 <div style="margin: auto;">
5805   <h4><a id="red-primary"></a>-red-primary <em class="arg">x,y</em></h4>
5806 </div>
5807
5808 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set the red chromaticity primary point.</td><td style="text-align:right;"></td></tr></table>
5809
5810 <div style="margin: auto;">
5811   <h4><a id="regard-warnings"></a>-regard-warnings</h4>
5812 </div>
5813
5814 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Pay attention to warning messages.</td><td style="text-align:right;"></td></tr></table>
5815
5816 <p>This option causes some warnings in some image formats to be treated
5817 as errors. </p>
5818
5819 <div style="margin: auto;">
5820   <h4><a id="remap"></a>-remap <em class="arg">filename</em></h4>
5821 </div>
5822
5823 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Reduce the number of colors in an image to the colors used by this image.</td><td style="text-align:right;"></td></tr></table>
5824
5825 <p>If the <a href="command-line-options.html#dither">-dither</a> setting is enabled (the default) then
5826 the given colors are dithered over the image as necessary, otherwise the closest
5827 color (in RGB colorspace) is selected to replace that pixel in the image. </p>
5828
5829 <p>As a side effect of applying a <a href="command-line-options.html#remap">-remap</a> of colors across all
5830 images in the current image sequence, all the images will have the same color
5831 table.  That means that when saved to a file format such as GIF, it will use
5832 that color table as a single common or global color table, for all the images,
5833 without requiring extra local color tables. </p>
5834
5835 <p>Use <a href="command-line-options.html#remap">+remap</a> to reduce all images in the current image
5836 sequence to use a common color map over all the images. This equivalent to
5837 appending all the images together (without extra background colors) and color
5838 reducing those images using <a href="command-line-options.html#colors">-colors</a> with a 256 color
5839 limit, then <a href="command-line-options.html#remap">-remap</a> those colors over the original list of
5840 images. This ensures all the images follow a single color map. </p>
5841
5842 <p>If the number of colors over all the images is less than 256, then <a href="command-line-options.html#remap">+remap</a> should not perform any color reduction or dithering, as
5843 no color changes are needed. In that case, its only effect is to force the use
5844 of a global color table.  This recommended after using either <a href="command-line-options.html#colors">-colors</a> or <a href="command-line-options.html#ordered-dither">-ordered-dither</a> to
5845 reduce the number of colors in an animated image sequence. </p>
5846
5847 <p>Note, the remap image colormap has at most 8-bits of precision. Deeper color maps are automagically coalesced with other colors to meet this requirement.</p>
5848
5849 <div style="margin: auto;">
5850   <h4><a id="region"></a>-region <em class="arg">geometry</em></h4>
5851 </div>
5852
5853 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set a region in which subsequent operations apply.</td><td style="text-align:right;"></td></tr></table>
5854
5855 <p>The <em class="arg">x</em> and <em class="arg">y</em> offsets are treated
5856 in the same manner as in <a href="command-line-options.html#crop">-crop</a>.</p>
5857
5858 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
5859
5860 <div style="margin: auto;">
5861   <h4><a id="remote"></a>-remote</h4>
5862 </div>
5863
5864 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">perform a remote operation.</td><td style="text-align:right;"></td></tr></table>
5865
5866 <p>The only command recognized is the name of an image file to load.</p>
5867
5868 <p>If you have more than one <a href="display.html">display</a> application
5869 running simultaneously, use the <a href="command-line-options.html#window"> window</a> option to
5870 specify which application to control.</p>
5871
5872 <div style="margin: auto;">
5873   <h4><a id="render"></a>-render</h4>
5874 </div>
5875
5876 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">render vector operations.</td><td style="text-align:right;"></td></tr></table>
5877
5878 <p>Use <a href="command-line-options.html#render">+render</a> to turn off rendering vector operations.
5879 This useful when saving the result to vector formats such as MVG or SVG.</p>
5880
5881 <div style="margin: auto;">
5882 <h4><a id="repage"></a>-repage <em class="arg">geometry</em></h4>
5883 </div>
5884
5885 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Adjust the canvas and offset information of the image.</td><td style="text-align:right;"></td></tr></table>
5886
5887 <p>This option is like <a href="command-line-options.html#page">-page</a> but acts as an image operator
5888 rather than a setting.  You can separately set the canvas size or the offset
5889 of the image on that canvas by only providing those components. </p>
5890
5891 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
5892
5893 <p>If a <code>!</code> flag is given the offset given is added to the existing
5894 offset to move the image relative to its previous position. This useful for
5895 animation sequences. </p>
5896
5897 <p>A given a canvas size of zero such as '<code>0x0</code>' forces it to
5898 recalculate the canvas size so the image (at its current offset) will appear
5899 completely on that canvas (unless it has a negative offset).</p>
5900
5901 <p>Use <a href="command-line-options.html#repage">+repage</a> to completely remove/reset the virtual
5902 canvas meta-data from the images. </p>
5903
5904 <p>The <a href="command-line-options.html#set">-set</a> '<code>page</code>' option can be used to
5905 directly assign virtual canvas meta-data. </p>
5906
5907
5908 <div style="margin: auto;">
5909   <h4><a id="resample"></a>-resample <em class="arg">horizontal</em>x<em class="arg">vertical</em></h4>
5910 </div>
5911
5912 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Resample image to specified horizontal and vertical resolution.</td><td style="text-align:right;"></td></tr></table>
5913
5914 <p>Resize the image so that its rendered size remains the same as the original
5915 at the specified target resolution. For example, if a 300 DPI image renders at
5916 3 inches by 2 inches on a 300 DPI device, when the image has been resampled to
5917 72 DPI, it will render at 3 inches by 2 inches on a 72 DPI device.  Note that
5918 only a small number of image formats (e.g. JPEG, PNG, and TIFF) are capable of
5919 storing the image resolution. For formats which do not support an image
5920 resolution, the original resolution of the image must be specified via <a href="command-line-options.html#density">-density</a> on the command line prior to specifying the
5921 resample resolution.</p>
5922
5923 <p>Note that Photoshop stores and obtains image resolution from a proprietary
5924 embedded profile. If this profile exists in the image, then Photoshop will
5925 continue to treat the image using its former resolution, ignoring the image
5926 resolution specified in the standard file header.</p>
5927
5928 <div style="margin: auto;">
5929   <h4><a id="resize"></a>-resize <em class="arg">geometry</em></h4>
5930 </div>
5931
5932 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Resize an image.</td><td style="text-align:right;"></td></tr></table>
5933
5934 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument. Offsets, if present in the geometry string, are
5935 ignored, and the <a href="command-line-options.html#gravity">-gravity</a> option has no effect.</p>
5936
5937 <p>If the <a href="command-line-options.html#filter">-filter</a> option precedes the <a href="command-line-options.html#resize">-resize</a> option, the image is resized with the specified
5938 filter.</p>
5939
5940 <p>Many image processing algorithms assume your image is in a linear-light
5941 coding.  If your image is gamma-corrected, you can remove the nonlinear gamma
5942 correction, apply the transform, then restore it like this:</p>
5943
5944 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert portrait.jpg -gamma .45455 -resize 25% -gamma 2.2  \ <br></br> -quality 92 passport.jpg</span></p>
5945 <div style="margin: auto;">
5946   <h4><a id="respect-parentheses"></a>-respect-parentheses</h4>
5947 </div>
5948
5949 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">settings remain in effect until parenthesis boundary.</td><td style="text-align:right;"></td></tr></table>
5950
5951 <div style="margin: auto;">
5952   <h4><a id="reverse"></a>-reverse</h4>
5953 </div>
5954
5955 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Reverse the order of images in the current image list.</td><td style="text-align:right;"></td></tr></table>
5956
5957
5958 <div style="margin: auto;">
5959   <h4><a id="roll"></a>-roll {<em class="arg">+-</em>}<em class="arg">x</em>{<em class="arg">+-</em>}<em class="arg">y</em></h4>
5960 </div>
5961
5962 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">roll an image vertically or horizontally by the amount given.</td><td style="text-align:right;"></td></tr></table>
5963
5964 <p>A negative <em class="arg">x</em> offset rolls the image left-to-right.
5965 A negative <em class="arg">y</em> offset rolls the image top-to-bottom.</p>
5966
5967
5968 <div style="margin: auto;">
5969   <h4><a id="rotate"></a>-rotate <em class="arg">degrees</em>{<em class="arg">&lt;</em>}{<em class="arg">&gt;</em>}</h4>
5970 </div>
5971
5972 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Apply Paeth image rotation (using shear operations) to the image.</td><td style="text-align:right;"></td></tr></table>
5973
5974 <p>Use <code>&gt;</code> to rotate the image only if its width exceeds the
5975 height. <code>&lt;</code> rotates the image <em>only</em> if its width is less
5976 than the height. For example, if you specify <code>-rotate "-90&gt;"</code> and
5977 the image size is 480x640, the image is not rotated. However, if the image is
5978 640x480, it is rotated by -90 degrees. If you use <code>&gt;</code> or
5979 <code>&lt;</code>, enclose it in quotation marks to prevent it from being
5980 misinterpreted as a file redirection.</p>
5981
5982 <p>Empty triangles in the corners, left over from rotating the image, are
5983 filled with the <code>background</code> color. </p>
5984
5985 <p>See also the <a href="command-line-options.html#distort">-distort</a> operator and specifically the
5986 '<code>ScaleRotateTranslate</code>' distort method. </p>
5987
5988
5989 <div style="margin: auto;">
5990   <h4><a id="sample"></a>-sample <em class="arg">geometry</em></h4>
5991 </div>
5992
5993 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">minify / magnify the image with pixel subsampling and pixel replication, respectively.</td><td style="text-align:right;"></td></tr></table>
5994
5995 <p>Change the image size simply by directly sampling the pixels original
5996 from the image.  When magnifying, pixels are replicated in blocks.  When
5997 minifying, pixels are sub-sampled (i.e., some rows and columns are skipped
5998 over). </p>
5999
6000 <p>The results are thus equivalent to using <a href="command-line-options.html#resize">-resize</a> with
6001 a <a href="command-line-options.html#filter">-filter</a> setting of <code>point</code> (nearest
6002 neighbour), though <a href="command-line-options.html#sample">-sample</a> is a lot faster, as it
6003 avoids all the filter processing of the image. As such it completely ignores
6004 the current <a href="command-line-options.html#filter">-filter</a> setting. </p>
6005
6006 <p>The key feature of the <a href="command-line-options.html#sample">-sample</a> is that no new colors
6007 will be added to the resulting image, though some colors may disappear. </p>
6008
6009 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument. Offsets, if present in the geometry string, are
6010 ignored, unlike <a href="command-line-options.html#resize">-resize</a>. </p>
6011
6012
6013 <p>The actual sampling point is the middle of the sub-region being sampled.
6014 As such a single pixel sampling of an image will take the middle pixel, (or
6015 top-left-middle if image has even dimensions).  However the <a href="command-line-options.html#define">-define</a> '<code>sample:offset</code>' can be set to modify
6016 this position some other location within each sub-region being sampled, as
6017 a percentage offset.</p>
6018
6019 <p>By default this value is '<code>50</code>' for the midpoint, but could be set
6020 to '<code>0</code>' for top-left, '<code>100</code>' for bottom-right, or with
6021 separate X and Y offsets such as '<code>0x50</code>' for left-middle edge of
6022 sampling sub-region.</p>
6023
6024
6025 <div style="margin: auto;">
6026   <h4><a id="sampling-factor"></a>-sampling-factor <em class="arg">horizontal-factor</em>x<em class="arg">vertical-factor</em></h4>
6027 </div>
6028
6029 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">sampling factors used by JPEG or MPEG-2 encoder and YUV decoder/encoder.</td><td style="text-align:right;"></td></tr></table>
6030
6031 <p>This option specifies the sampling factors to be used by the JPEG encoder
6032 for chroma downsampling. If this option is omitted, the JPEG library will use
6033 its own default values. When reading or writing the YUV format and when
6034 writing the M2V (MPEG-2) format, use <a href="command-line-options.html#sampling-factor">-sampling-factor 2x1</a> or <a href="command-line-options.html#sampling-factor">-sampling-factor 4:2:2</a> to specify the 4:2:2
6035 downsampling method.</p>
6036
6037 <div style="margin: auto;">
6038   <h4><a id="scale"></a>-scale <em class="arg">geometry</em></h4>
6039 </div>
6040
6041 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">minify / magnify the image with pixel block averaging and pixel replication, respectively.</td><td style="text-align:right;"></td></tr></table>
6042
6043 <p>Change the image size simply by replacing pixels by averaging pixels
6044 together when minifying, or replacing pixels when magnifying.  </p>
6045
6046 <p>The results are thus equivalent to using <a href="command-line-options.html#resize">-resize</a> with
6047 a <a href="command-line-options.html#filter">-filter</a> setting of <code>box</code>.  Though it is a lot
6048 faster, as it avoids all the filter processing of the image. As such it
6049 completely ignores the current <a href="command-line-options.html#filter">-filter</a> setting. </p>
6050
6051 <p>If when shrinking (minifying) images the original image is some integer
6052 multiple of the new image size, the number of pixels averaged together to
6053 produce the new pixel color is the same across the whole image. This is
6054 a special case known as 'binning' and is often used as a method of reducing
6055 noise in image such as those generated by digital cameras, especially in low
6056 light conditions. </p>
6057
6058
6059 <div style="margin: auto;">
6060   <h4><a id="scene"></a>-scene <em class="arg">value</em></h4>
6061 </div>
6062
6063 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">set scene number.</td><td style="text-align:right;"></td></tr></table>
6064
6065 <p>This option sets the scene number of an image or the first image in an image sequence.</p>
6066
6067 <div style="margin: auto;">
6068   <h4><a id="screen"></a>-screen</h4>
6069 </div>
6070
6071 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">specify the screen to capture.</td><td style="text-align:right;"></td></tr></table>
6072
6073 <p>This option indicates that the GetImage request used to obtain the image
6074 should be done on the root window, rather than directly on the specified
6075 window. In this way, you can obtain pieces of other windows that overlap the
6076 specified window, and more importantly, you can capture menus or other popups
6077 that are independent windows but appear over the specified window.</p>
6078
6079 <div style="margin: auto;">
6080   <h4><a id="seed"></a>-seed</h4>
6081 </div>
6082
6083 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">seed a new sequence of pseudo-random numbers</td><td style="text-align:right;"></td></tr></table>
6084
6085 <div style="margin: auto;">
6086   <h4><a id="segment"></a>-segment <em class="arg">cluster-threshold</em>x<em class="arg">smoothing-threshold</em></h4>
6087 </div>
6088
6089 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">segment the colors of an image.</td><td style="text-align:right;"></td></tr></table>
6090
6091 <p>Segment an image by analyzing the histograms of the color components and
6092 identifying units that are homogeneous with the fuzzy c-means technique. This
6093 is part of the ImageMagick color quantization routines. </p>
6094
6095 <p>Specify <em class="arg">cluster threshold</em> as the number of pixels in
6096 each cluster that must exceed the cluster threshold to be considered valid.
6097 <em class="arg">Smoothing threshold</em> eliminates noise in the second
6098 derivative of the histogram. As the value is increased, you can expect
6099 a smoother second derivative.  The default is 1.5.</p>
6100
6101 <p>If the <a href="command-line-options.html#verbose">-verbose</a> setting is defined, a detailed report
6102 of the color clusters is returned.</p>
6103
6104
6105 <div style="margin: auto;">
6106   <h4><a id="selective-blur"></a>-selective-blur <em class="arg">radius</em><br></br>-selective-blur <em class="arg">radius</em>x<em class="arg">sigma</em>{<em class="arg">+threshold</em>}</h4>
6107 </div>
6108
6109 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Selectively blur pixels within a contrast threshold.</td><td style="text-align:right;"></td></tr></table>
6110
6111 <p>Blurs those pixels that are less than or equal to the threshold in
6112 contrast. The threshold may be expressed as a fraction of <em class="QR">QuantumRange</em> or as a percentage.</p>
6113
6114 <div style="margin: auto;">
6115   <h4><a id="separate"></a>-separate</h4>
6116 </div>
6117
6118 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">separate an image channel into a grayscale image.  Specify the channel with <a href="command-line-options.html#channel">-channel</a>.</td><td style="text-align:right;"></td></tr></table>
6119
6120 <div style="margin: auto;">
6121   <h4><a id="sepia-tone"></a>-sepia-tone <em class="arg">threshold</em></h4>
6122 </div>
6123
6124 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">simulate a sepia-toned photo.</td><td style="text-align:right;"></td></tr></table>
6125
6126 <p>Specify <em class="arg">threshold</em> as the percent threshold of the intensity (0 - 99.9%).</p>
6127
6128 <p>This option applies a special effect to the image, similar to the effect
6129 achieved in a photo darkroom by sepia toning.  Threshold ranges from 0 to <em class="QR">QuantumRange</em> and is a measure of the extent of the sepia
6130 toning.  A threshold of 80% is a good starting point for a reasonable
6131 tone.</p>
6132
6133
6134
6135 <div style="margin: auto;">
6136   <h4><a id="set"></a>-set <em class="arg">key value</em></h4>
6137   <h4>+set <em class="arg">key</em></h4>
6138 </div>
6139
6140 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">sets image attributes and properties for images in the current
6141 image sequence.</td><td style="text-align:right;"></td></tr></table>
6142
6143 <p>This will assign (or modify) specific settings attached to all the images
6144 in the current image sequence.  Using the <a href="command-line-options.html#set">+set</a> form of the
6145 option will either remove, or reset that setting to a default state, as
6146 appropriate.  </p>
6147
6148 <p>For example, it will modify specific well known image meta-data
6149 'attributes' such as those normally overridden by: the options <a href="command-line-options.html#delay">-delay</a>, <a href="command-line-options.html#dispose">-dispose</a>, and <a href="command-line-options.html#page">-page</a>, <a href="command-line-options.html#colorspace">-colorspace</a>; generally
6150 assigned before the image is read in, by using a <em class="arg">key</em> of
6151 the same name. </p>
6152
6153 <p>If the given <em class="arg">key</em> does not match a specific known
6154 'attribute ', such as shown above, the setting is stored as a a free form
6155 'property' string.  Such settings are listed in <a href="command-line-options.html#verbose">-verbose</a> information ("<code>info:</code>" output format) as "Properties".
6156 </p>
6157
6158 <p>This includes string 'properties' that are set by and assigned to images
6159 using the options <a href="command-line-options.html#comment">-comment</a>, <a href="command-line-options.html#label">-label</a>, <a href="command-line-options.html#caption">-caption</a>. These options actually assign
6160 a global 'artifact' which are automatically assigned (and any <a href="escape.html">Format Percent
6161 Escapes</a> expanded) to images as they are read in.  For example:</p>
6162
6163 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert rose: -set comment 'Rose is a rose is a rose is a rose' rose.png</span><span class="crtout">identify -format %c rose.png</span><span class="crtprompt"> $ </span><span class="crtin">Rose is a rose is a rose is a rose</span></p>
6164 <p>The set value can also make use of <a href="escape.html">Format and Print Image
6165 Properties</a> in the defined value.  For example:</p>
6166
6167 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert rose: -set origsize '%wx%h' -resize 50% \</span><span class="crtout">        -format 'Old size = %[origsize]  New size = %wx%h' info:</span><span class="crtprompt"> $ </span><span class="crtin">Old size = 70x46  New size = 35x23</span></p>
6168 <p>Other well known 'properties' that are availible include:
6169 '<code>date:create</code>' and '<code>date:modify</code>' and
6170 '<code>signature</code>'. </p>
6171
6172 <p>The <a href="command-line-options.html#repage">-repage</a> operator will also allow you to modify
6173 the '<code>page</code>' attribute of an image for images already in memory (also
6174 see <a href="command-line-options.html#repage">-page</a>).  However it is designed to provide a finer
6175 control of the sub-parts of this 'attribute'. The <a href="command-line-options.html#set">-set page</a>
6176 option will only provide a direct, unmodified assignment of  '<code>page</code>'
6177 attribute. </p>
6178
6179 <p>This option can also associate a colorspace or profile with your image.
6180 For example,</p>
6181
6182 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert image.psd -set profile ISOcoated_v2_eci.icc image-icc.psd</span></p>
6183 <p>Some 'properties' must be defined in a specific way to be used. For
6184 example only 'properties' prefixed with "<code>filename:</code>" can be used to
6185 modify the output filename of an image. For example</p>
6186
6187 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert rose: -set filename:mysize '%wx%h' 'rose_%[filename:mysize].png'</span></p>
6188 <p>If the setting value is prefixed with "<code>option:</code>" the setting will
6189 be saved as a global "Artifact" exactly as if it was set using the <a href="command-line-options.html#define">-define</a> option. As such settings are global in scope, they
6190 can be used to pass 'attributes' and 'properties' of one specific image,
6191 in a way that allows you to use them in a completely different image, even if
6192 the original image has long since been modified or destroyed. For example: </p>
6193
6194 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert rose:  -set option:rosesize '%wx%h' -delete 0 \</span><span class="crtout">        label:'%[rosesize]'   label_size_of_rose.gif</span></p>
6195 <p>Note that <a href="escape.html">Format Percent Escapes</a> will only match
6196 a 'artifact' if the given <em class="arg">key</em> does not match an existing
6197 'attribute' or 'property'.  </p>
6198
6199 <p>You can set the attributes of the image registry by prefixing the value
6200 with <code>registry:</code>.</p>
6201
6202 <p>The <a href="command-line-options.html#set">-set profile</a> option can also be used to inject
6203 previously-formatted ancillary chunks into the output PNG file, using
6204 the commandline option as shown below or by setting the profile via a
6205 programming interface:</p>
6206
6207 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert in.png -set profile PNG-chunk-x:&lt;filename&gt; out.png</span></p>
6208 <p>where <em>x</em> is a location flag and
6209 <em class="arg">filename</em> is a file containing the chunk
6210 name in the first 4 bytes, then a colon (":"), followed by the chunk data.
6211 This encoder will compute the chunk length and CRC, so those must not
6212 be included in the file.</p>
6213
6214 <p>"x" can be "b" (before PLTE), "m" (middle, i.e., between PLTE and IDAT),
6215 or "e" (end, i.e., after IDAT).  If you want to write multiple chunks
6216 of the same type, then add a short unique string after the "x" to prevent
6217 subsequent profiles from overwriting the preceding ones, e.g.,</p>
6218
6219
6220 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert in.png -set profile PNG-chunk-b01:file01 / <br></br>
6221             -profile PNG-chunk-b02:file02 out.png</span></p>
6222
6223 <div style="margin: auto;">
6224   <h4><a id="shade"></a>-shade <em class="arg">azimuth</em>x<em class="arg">elevation</em></h4>
6225 </div>
6226
6227 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">shade the image using a distant light source.</td><td style="text-align:right;"></td></tr></table>
6228
6229 <p>Specify <em class="arg">azimuth</em> and <em class="arg">elevation</em> as
6230 the position of the light source. Use <a href="command-line-options.html#shade">+shade</a> to return
6231 the shading results as a grayscale image.</p>
6232
6233 <div style="margin: auto;">
6234   <h4><a id="shadow"></a>-shadow <em class="arg">percent-opacity</em>{x<em class="arg">sigma</em>}{<em class="arg">+-</em>}<em class="arg">x</em>{<em class="arg">+-</em>}<em class="arg">y</em>{<em class="arg">%</em>}</h4>
6235 </div>
6236
6237 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">simulate an image shadow.</td><td style="text-align:right;"></td></tr></table>
6238
6239 <div style="margin: auto;">
6240   <h4><a id="shared-memory"></a>-shared-memory</h4>
6241 </div>
6242
6243 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">use shared memory.</td><td style="text-align:right;"></td></tr></table>
6244
6245 <p>This option specifies whether the utility should attempt to use shared
6246 memory for pixmaps. ImageMagick must be compiled with shared memory support,
6247 and the display must support the <em class="arg">MIT-SHM</em> extension.
6248 Otherwise, this option is ignored. The default is <code>True</code>.</p>
6249
6250 <div style="margin: auto;">
6251   <h4><a id="sharpen"></a>-sharpen <em class="arg">radius</em><br></br>-sharpen <em class="arg">radius</em>x<em class="arg">sigma</em>+<em class="arg">bias</em></h4>
6252 </div>
6253
6254 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">sharpen the image.</td><td style="text-align:right;"></td></tr></table>
6255
6256 <p>Use a Gaussian operator of the given radius and standard deviation (sigma).</p>
6257
6258 <div style="margin: auto;">
6259   <h4><a id="shave"></a>-shave <em class="arg">geometry</em></h4>
6260 </div>
6261
6262 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Shave pixels from the image edges.</td><td style="text-align:right;"></td></tr></table>
6263
6264 <p>The <em class="arg">size</em> portion of the <em class="arg">geometry</em>
6265 argument specifies the width of the region to be removed from both sides of
6266 the image and the height of the regions to be removed from top and bottom.
6267 Offsets are ignored.</p>
6268
6269 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
6270
6271 <div style="margin: auto;">
6272   <h4><a id="shear"></a>-shear <em class="arg">Xdegrees</em>[x<em class="arg">Ydegrees</em>]</h4>
6273 </div>
6274
6275 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Shear the image along the x-axis and/or y-axis.</td><td style="text-align:right;"></td></tr></table>
6276
6277 <p>The shear angles may be positive, negative, or zero. When <em class="arg">Ydegrees</em> is omitted it defaults to 0. When both angles are
6278 given, the horizontal component of the shear is performed before the vertical
6279 component.</p>
6280
6281 <p>Shearing slides one edge of an image along the x-axis or y-axis (i.e.,
6282 horizontally or vertically, respectively),creating a parallelogram. The amount
6283 of each is controlled by the respective shear angle. For horizontal shears,
6284 <em class="arg">Xdegrees</em> is measured clockwise relative to "up" (the
6285 negative y-axis), sliding the top edge to the right when 0°&lt;<em class="arg">Xdegrees</em>&lt;90° and to the left when 90°&lt;<em class="arg">Xdegrees</em>&lt;180°.  For vertical shears <em class="arg">Ydegrees</em> is measured clockwise relative to "right" (the
6286 positive x-axis), sliding the right edge down when 0°&lt;<em class="arg">Ydegrees</em>&lt;90° and up when 90°&lt;<em class="arg">Ydegrees</em>&lt;180°.</p>
6287
6288 <p>Empty triangles left over from shearing the image are filled with the color
6289 defined by the <a href="command-line-options.html#fill">-background</a> option. The color is specified
6290 using the format described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
6291
6292 <p>The horizontal shear is performed before the vertical part. This is
6293 important to note, since horizontal and vertical shears do not
6294 <em>commute</em>, i.e., the order matters in a sequence of shears. For
6295 example, the following two commands are not equivalent.</p>
6296
6297 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert logo: -shear 20x0 -shear 0x60 logo-sheared.png</span><span class="crtout"></span><span class="crtprompt"> $ </span><span class="crtin">convert logo: -shear 0x60 -shear 20x0 logo-sheared.png</span></p>
6298 <p>The first of the two commands above is equivalent to the following, except
6299 for the amount of empty space created; the command that follows generates
6300 a smaller image, and so is a better choice in terms of time and space.</p>
6301
6302 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert logo: -shear 20x60 logo-sheared.png</span></p>
6303 <div style="margin: auto;">
6304   <h4><a id="sigmoidal-contrast"></a>-sigmoidal-contrast <em class="arg">contrast</em>x<em class="arg">mid-point</em></h4>
6305 </div>
6306
6307 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">increase the contrast without saturating highlights or shadows.</td><td style="text-align:right;"></td></tr></table>
6308
6309 <p>Increase the contrast of the image using a sigmoidal transfer function
6310 without saturating highlights or shadows. <em class="arg">Contrast</em>
6311 indicates how much to increase the contrast. For example, near 1 is none, 3 is
6312 typical and 20 is a lot. Note that exactly zero is mathematically invalid.
6313 </p>
6314
6315 <p>The <em class="arg">mid-point</em> indicates where the maximum change
6316 'slope' in contrast should fall in the resultant image (0 is white; 50% is
6317 middle-gray; 100% is black). </p>
6318
6319 <p>By default the image contrast is increased, use <em class="arg">+sigmoidal-contrast</em> to decrease the contrast.</p>
6320
6321 <p>To achieve the equivalent of a sigmoidal brightness change (similar to 
6322 a gamma adjustment), you would use <em class="arg">-sigmoidal-contrast
6323 {brightness}x0%</em> to increase brightness and <em class="arg">+sigmoidal-contrast {brightness}x0%</em> to decrease brightness.
6324 Note the use of '0' fo rthe mid-point of the sigmoidal curve. </p>
6325
6326 <p>Using a very high <em class="arg">contrast</em> will produce a sort of
6327 'smoothed thresholding' of the image.  Not as sharp (with high aliasing
6328 effects) of a true threshold, but with tapered gray-levels around the threshold
6329 <em class="arg">mid-point</em>. </p>
6330
6331 <div style="margin: auto;">
6332   <h4><a id="silent"></a>-silent</h4>
6333 </div>
6334
6335 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">operate silently.</td><td style="text-align:right;"></td></tr></table>
6336
6337 <div style="margin: auto;">
6338   <h4><a id="similarity-threshold"></a>-similarity-threshold <em class="arg">value</em></h4>
6339 </div>
6340
6341 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">minimum RMSE for subimage match.</td><td style="text-align:right;">[<a href="compare.html">compare</a>]</td></tr></table>
6342
6343 <p>If this setting is used, then the search will stop as soon as it finds a match whose metric is less than or equal to the value. A partially filled second output image will result. Using a value of zero, will cause the search to stop at the first perfect match it finds. If this setting is left off, then the search will proceed to completion or as limited by <em class="arg">-dissimilarity-threshold</em>.</p>
6344
6345 <div style="margin: auto;">
6346   <h4><a id="size"></a>-size <em class="arg">width</em>[x<em class="arg">height</em>][<em class="arg">+offset</em>]</h4>
6347 </div>
6348
6349 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">set the width and height of the image.</td><td style="text-align:right;"></td></tr></table>
6350
6351 <p>Use this option to specify the width and height of raw images whose
6352 dimensions are unknown such as <code>GRAY</code>, <code>RGB</code>, or
6353 <code>CMYK</code>. In addition to width and height, use <a href="command-line-options.html#size">-size</a> with an offset to skip any header information in the
6354 image or tell the number of colors in a <code>MAP</code> image file, (e.g. -size
6355 640x512+256).</p>
6356
6357 <p>For Photo CD images, choose from these sizes:</p>
6358
6359 <pre class="text">
6360    192x128
6361    384x256
6362    768x512
6363    1536x1024
6364    3072x2048
6365 </pre>
6366
6367 <div style="margin: auto;">
6368   <h4><a id="sketch"></a>-sketch <em class="arg">radius</em><br></br>-sketch <em class="arg">radius</em>x<em class="arg">sigma</em>+<em class="arg">angle</em></h4>
6369 </div>
6370
6371 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">simulate a pencil sketch.</td><td style="text-align:right;"></td></tr></table>
6372
6373 <p>Sketch with the given radius, standard deviation (sigma), and angle.   The
6374 angle given is the angle toward which the image is sketched.  That is the
6375 direction people would consider the object is coming from.  </p>
6376
6377 <div style="margin: auto;">
6378   <h4><a id="smush"></a>-smush <em class="arg">offset</em></h4>
6379 </div>
6380
6381 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">smush an image sequence together.</td><td style="text-align:right;"></td></tr></table>
6382
6383 <div style="margin: auto;">
6384   <h4><a id="snaps"></a>-snaps <em class="arg">value</em></h4>
6385 </div>
6386
6387 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set the number of screen snapshots.</td><td style="text-align:right;">[<a href="import.html">import</a>]</td></tr></table>
6388
6389 <p>Use this option to grab more than one image from the X server screen, to create an animation sequence.</p>
6390
6391 <div style="margin: auto;">
6392   <h4><a id="solarize"></a>-solarize <em class="arg">threshold</em></h4>
6393 </div>
6394
6395 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">negate all pixels above the threshold level.</td><td style="text-align:right;"></td></tr></table>
6396
6397 <p>Specify <em class="arg">factor</em> as the percent threshold of the intensity (0 - 99.9%).</p>
6398
6399 <p>This option produces a <em class="arg">solarization</em> effect seen when
6400 exposing a photographic film to light during the development process.</p>
6401
6402 <div style="margin: auto;">
6403   <h4><a id="sparse-color"></a>-sparse-color <em class="arg">method</em>  '<em class="arg">x</em>,<em class="arg">y</em> <em class="arg">color</em>  ...'</h4>
6404 </div>
6405
6406 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%"> color the given image using the specified points of color, and filling the other intervening colors using the given methods. </td><td style="text-align:right;"></td></tr></table>
6407
6408
6409 <table class="doc">
6410   <tbody>
6411   <tr valign="top">
6412     <th align="left" style="width: 8%">Method</th>
6413     <th align="left">Description</th>
6414   </tr>
6415
6416   <tr valign="top">
6417     <td valign="top">barycentric</td>
6418     <td valign="top">three point triangle of color given 3 points.
6419         Giving only 2 points will form a linear gradient between those points.
6420         The gradient generated extends beyond the triangle created by those
6421         3 points. </td>
6422   </tr>
6423
6424   <tr valign="top">
6425     <td valign="top">bilinear</td>
6426     <td valign="top">Like barycentric but for 4 points. Less than 4 points
6427         fall back to barycentric. </td>
6428   </tr>
6429   <tr valign="top">
6430     <td valign="top">voronoi</td>
6431     <td valign="top">Simply map each pixel to the to nearest color point
6432         given. The result are polygonal 'cells' of solid color. </td>
6433   </tr>
6434
6435   <tr valign="top">
6436     <td valign="top">shepards</td>
6437     <td valign="top">Colors points biased on the ratio of inverse distance
6438         squared. Generating spots of color in a sea of the average of
6439         colors. </td>
6440   </tr>
6441
6442   <tr valign="top">
6443     <td valign="top">inverse</td>
6444     <td valign="top">Colors points biased on the ratio of inverse distance.
6445         This generates sharper points of color rather than rounded spots of
6446         '<code>shepards</code>'  Generating spots of color in a sea of the
6447         average of colors. </td>
6448   </tr>
6449
6450   </tbody>
6451 </table>
6452
6453 <p>The points are placed according to the images location on the virtual
6454 canvas (<a href="command-line-options.html#page">-page</a> or <a href="command-line-options.html#repage">-repage</a>
6455 offset), and do not actually have to exist on the given image, but may be
6456 some point beyond the edge of the image. All points are floating point values.
6457 </p>
6458
6459 <p>Only the color channels defined by the <a href="command-line-options.html#channel">-channel</a> are
6460 modified, which means that by default matte/alpha transparency channel is not
6461 effected. Typically transparency channel is turned off either before or after
6462 the operation. </p>
6463
6464 <p>Of course if some color points are transparent to generate a transparent
6465 gradient, then the image also requires transparency enabled to store the
6466 values. </p>
6467
6468 <p>All the above methods when given a single point of color will replace all
6469 the colors in the image with the color given, regardless of the point. This is
6470 logical, and provides an alternative technique to recolor an image to some
6471 default value. </p>
6472
6473
6474 <div style="margin: auto;">
6475   <h4><a id="splice"></a>-splice <em class="arg">geometry</em></h4>
6476 </div>
6477
6478 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Splice the current background color into the image.</td><td style="text-align:right;"></td></tr></table>
6479
6480 <p>This will add rows and columns of the current <a href="command-line-options.html#background">-background</a> color into the given image according to the
6481 given  <a href="command-line-options.html#gravity">-gravity</a> geometry setting.  &gt;See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument. Essentially <a href="command-line-options.html#splice">-splice</a> will divide the
6482 image into four quadrants, separating them by the inserted rows and columns.
6483 </p>
6484
6485 <p>If a dimension of geometry is zero no rows or columns will be added for that
6486 dimension.  Similarly using a zero offset with the appropriate <a href="command-line-options.html#gravity">-gravity</a> setting will add rows and columns to the edges of
6487 the image, padding the image only along that one edge. Edge padding is what <a href="command-line-options.html#splice">-splice</a> is most commonly used for. </p>
6488
6489 <p>If the exact same  <em class="arg">geometry</em> and <a href="command-line-options.html#gravity">-gravity</a> is later used with <a href="command-line-options.html#chop">-chop</a> the
6490 added added all splices removed. </p>
6491
6492 <div style="margin: auto;">
6493   <h4><a id="spread"></a>-spread <em class="arg">amount</em></h4>
6494 </div>
6495
6496 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">displace image pixels by a random amount.</td><td style="text-align:right;"></td></tr></table>
6497
6498 <p>The argument <em class="arg">amount</em> defines the size of the
6499 neighborhood around each pixel from which to choose a candidate pixel to
6500 swap.</p>
6501
6502 <div style="margin: auto;">
6503   <h4><a id="statistic"></a>-statistic <em class="arg">type</em> <em class="arg">geometry</em></h4>
6504 </div>
6505
6506 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">replace each pixel with corresponding statistic from the neighborhood.</td><td style="text-align:right;">[<a href="convert.html">convert</a>, <a href="mogrify.html">mogrify</a>]</td></tr></table>
6507
6508 <p>Choose from these statistic types:</p>
6509 <pre class="text">
6510    Gradient   maximum difference in area
6511    Maximum    maximum value per channel in neighborhood
6512    Minimum    minimum value per channel in neighborhood
6513    Mean       average value per channel in neighborhood
6514    Median     median value per channel in neighborhood
6515    Mode       mode (most frequent) value per channel in neighborhood
6516    Nonpeak    value just before or after the median value per channel in neighborhood
6517 </pre>
6518
6519 <div style="margin: auto;">
6520   <h4><a id="stegano"></a>-stegano <em class="arg">offset</em></h4>
6521 </div>
6522
6523 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">hide watermark within an image.</td><td style="text-align:right;"></td></tr></table>
6524
6525 <p>Use an offset to start the image hiding some number of pixels from the
6526 beginning of the image. Note this offset and the image size. You will need
6527 this information to recover the steganographic image (e.g. display -size
6528 320x256+35 stegano:image.png).</p>
6529
6530 <div style="margin: auto;">
6531   <h4><a id="stereo"></a>-stereo <em class="arg">+x</em>{<em class="arg">+y</em>}</h4>
6532 </div>
6533
6534 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">composite two images to create a red / cyan stereo anaglyph.</td><td style="text-align:right;">[<a href="composite.html">composite</a>]</td></tr></table>
6535
6536 <p>The left side of the stereo pair (second image) is saved as the red channel of the output image. The right side (first image) is saved as the green and blue channels. Red-green stereo glasses are required to properly view the stereo image.</p>
6537
6538 <div style="margin: auto;">
6539   <h4><a id="storage-type"></a>-storage-type <em class="arg">type</em></h4>
6540 </div>
6541
6542 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">pixel storage type.  Here are the valid types:</td><td style="text-align:right;"></td></tr></table>
6543
6544 <pre class="text">
6545    char     unsigned characters
6546    double   doubles
6547    float    floats
6548    integer  integers
6549    long     longs
6550    quantum  pixels in the native depth of your ImageMagick distribution
6551    short    unsigned shorts
6552 </pre>
6553
6554 <p>Float and double types are normalized from 0.0 to 1.0 otherwise the pixels
6555 values range from 0 to the maximum value the storage type can support.</p>
6556
6557 <div style="margin: auto;">
6558   <h4><a id="stretch"></a>-stretch <em class="arg">fontStretch</em></h4>
6559 </div>
6560
6561 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set a type of stretch style for fonts.</td><td style="text-align:right;"></td></tr></table>
6562
6563 <p>This setting suggests a type of stretch that ImageMagick should try to
6564 apply to the currently selected font family. Select <em class="arg">fontStretch</em> from the following.</p>
6565
6566 <pre class="text">
6567    Any
6568    Condensed
6569    Expanded
6570    ExtraCondensed
6571    ExtraExpanded
6572    Normal
6573    SemiCondensed
6574    SemiExpanded
6575    UltraCondensed
6576    UltraExpanded
6577 </pre>
6578
6579 <p>To print a complete list of stretch types, use <a href="command-line-options.html#list">-list
6580 stretch</a>.</p>
6581
6582 <p>For other settings that affect fonts, see the options <a href="command-line-options.html#font">-font</a>, <a href="command-line-options.html#family">-family</a>, <a href="command-line-options.html#style">-style</a>, and <a href="command-line-options.html#weight">-weight</a>. </p>
6583
6584 <div style="margin: auto;">
6585   <h4><a id="strip"></a>-strip</h4>
6586 </div>
6587
6588 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">strip the image of any profiles or comments.</td><td style="text-align:right;"></td></tr></table>
6589
6590 <div style="margin: auto;">
6591   <h4><a id="stroke"></a>-stroke <em class="arg">color</em></h4>
6592 </div>
6593
6594 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">color to use when stroking a graphic primitive.</td><td style="text-align:right;"></td></tr></table>
6595
6596 <p>The color is specified using the format described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
6597
6598 <p>See <a href="command-line-options.html#draw">-draw</a> for further details.</p>
6599
6600 <div style="margin: auto;">
6601   <h4><a id="strokewidth"></a>-strokewidth <em class="arg">value</em></h4>
6602 </div>
6603
6604 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">set the stroke width.</td><td style="text-align:right;"></td></tr></table>
6605
6606 <p>See <a href="command-line-options.html#draw">-draw</a> for further details.</p>
6607
6608 <div style="margin: auto;">
6609   <h4><a id="style"></a>-style <em class="arg">fontStyle</em></h4>
6610 </div>
6611
6612 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set a font style for text.</td><td style="text-align:right;"></td></tr></table>
6613
6614 <p>This setting suggests a font style that ImageMagick should try to apply to
6615 the currently selected font family. Select <em class="arg">fontStyle</em> from
6616 the following.</p>
6617
6618 <pre class="text">
6619    Any
6620    Italic
6621    Normal
6622    Oblique
6623 </pre>
6624
6625 <p>For other settings that affect fonts, see the options <a href="command-line-options.html#font">-font</a>, <a href="command-line-options.html#family">-family</a>, <a href="command-line-options.html#stretch">-stretch</a>, and <a href="command-line-options.html#weight">-weight</a>. </p>
6626
6627 <div style="margin: auto;">
6628   <h4><a id="subimage-search"></a>-subimage-search</h4>
6629 </div>
6630
6631 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">search for subimage.</td><td style="text-align:right;">[<a href="compare.html">compare</a>]</td></tr></table>
6632
6633 <p>This option is required to have compare search for the best match location
6634 of a small image within a larger image. This search will produce two images
6635 (or two frames). The first is the "difference" image and the second will
6636 be the "match score" image.</p>
6637
6638 <p>The "match-score" image is smaller containing a pixel for ever possible
6639 position of the top-left corner of the given sub-image. that is its size will
6640 be the size of the larger_image - sub_image + 1.  The brightest location in
6641 this image is the location s the locate on the best match that is also
6642 reported. Note that this may or may not be a perfect match, and the actual
6643 brightness will reflect this. Other bright 'peaks' can be used to locate other
6644 possible matching locations. </p>
6645
6646 <p>Note that the search will try to compare the sub-image at every possible
6647 location in the larger image, as such it can be very slow.  The smaller the
6648 sub-image the faster this search is. </p>
6649
6650
6651 <div style="margin: auto;">
6652   <h4><a id="swap"></a>-swap <em class="arg">index,index</em></h4>
6653 </div>
6654
6655 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Swap the positions of two images in the image sequence.</td><td style="text-align:right;"></td></tr></table>
6656
6657 <p>For example, <a href="command-line-options.html#swap">-swap 0,2</a> swaps the first and the third
6658 images in the current image sequence. Use <a href="command-line-options.html#swap">+swap</a> to switch
6659 the last two images in the sequence.</p>
6660
6661 <div style="margin: auto;">
6662   <h4><a id="swirl"></a>-swirl <em class="arg">degrees</em></h4>
6663 </div>
6664
6665 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">swirl image pixels about the center.</td><td style="text-align:right;"></td></tr></table>
6666
6667 <p><em class="arg">Degrees</em> defines the tightness of the swirl.</p>
6668
6669 <div style="margin: auto;">
6670   <h4><a id="synchronize"></a>-synchronize</h4>
6671 </div>
6672
6673 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">synchronize image to storage device.</td><td style="text-align:right;"></td></tr></table>
6674
6675 <p>Set to "true" to ensure all image data is fully flushed and synchronized to disk. There is a performance penalty, but the benefit include ensuring a valid image file in the event of a system crash and early reporting if there is not anout disk space for the image pixel cache.</p>
6676
6677 <div style="margin: auto;">
6678   <h4><a id="taint"></a>-taint</h4>
6679 </div>
6680
6681 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Mark the image as modified.</td><td style="text-align:right;"></td></tr></table>
6682
6683 <div style="margin: auto;">
6684   <h4><a id="text-font"></a>-text-font <em class="arg">name</em></h4>
6685 </div>
6686
6687 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">font for writing fixed-width text.</td><td style="text-align:right;"></td></tr></table>
6688
6689 <p>Specifies the name of the preferred font to use in fixed (typewriter style)
6690 formatted text. The default is 14 point <em class="arg">Courier</em>.</p>
6691
6692 <p>You can tag a font to specify whether it is a PostScript, TrueType, or
6693 OPTION1 font. For example, <code>Courier.ttf</code> is a TrueType font and
6694 <code>x:fixed</code> is OPTION1.</p>
6695
6696 <div style="margin: auto;">
6697   <h4><a id="texture"></a>-texture <em class="arg">filename</em></h4>
6698 </div>
6699
6700 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">name of texture to tile onto the image background.</td><td style="text-align:right;"></td></tr></table>
6701
6702 <div style="margin: auto;">
6703   <h4><a id="threshold"></a>-threshold <em class="arg">value</em>{<em class="arg">%</em>}</h4>
6704 </div>
6705
6706 <!-- {<em class="arg">green,blue,opacity</em>}
6707 <p>If the green or blue value is omitted, these channels use the same value as
6708 the first one provided. If all three color values are the same, the result is
6709 a bi-level image. If the opacity threshold is omitted, OpaqueOpacity is used
6710 and any partially transparent pixel becomes fully transparent.</p>
6711 -->
6712
6713 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Apply simultaneous black/white threshold to the image.</td><td style="text-align:right;"></td></tr></table>
6714
6715 <p>Any pixel values (more specifically, those channels set using <a href="command-line-options.html#channel">‑channel</a>) that exceed the specified threshold are reassigned the
6716 maximum channel value, while all other values are assigned the minimum.</p>
6717
6718 <p> The threshold value can be given as a percentage or as an absolute integer
6719 value corresponding to the desired channel value. When given as an integer,
6720 the minimum attainable value is 0 (corresponding to black when all channels
6721 are affected), but the maximum value (corresponding to white) is that of the
6722 <code>quantum depth</code> of the particular build of ImageMagick, and is
6723 therefore dependent on the installation. For that reason, a reasonable
6724 recommendation for most applications is to specify the threshold values as
6725 a percentage.  </p>
6726
6727 <p> The following would force pixels with red values above 50% to have 100%
6728 red values, while those at or below 50% red would be set to 0 in the red
6729 channel. The green, blue, and alpha channels (if present) would be unchanged.
6730 </p>
6731
6732 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert in.png -channel red -threshold 50% out.png</span></p>
6733 <p>As (possibly) impractical but instructive examples, the following would
6734 generate an all-black and an all-white image with the same dimensions as the
6735 input image.</p>
6736
6737
6738 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert in.png -threshold 100% black.png</span><span class="crtout"></span><span class="crtprompt"> $ </span><span class="crtin">convert in.png -threshold -1 white.png</span></p>
6739 <p>Note that the values of the transparency channel is treated as 'matte'
6740 values (0 is opaque) and not as 'alpha' values (0 is transparent).</p>
6741
6742 <p> See also <a href="command-line-options.html#black-threshold">‑black‑threshold</a> and <a href="command-line-options.html#white-threshold">‑white‑threshold</a>.
6743 </p>
6744
6745 <div style="margin: auto;">
6746   <h4><a id="thumbnail"></a>-thumbnail <em class="arg">geometry</em></h4>
6747 </div>
6748
6749 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Create a thumbnail of the image.</td><td style="text-align:right;"></td></tr></table>
6750
6751 <p>This is similar to <a href="command-line-options.html#resize">-resize</a>, except it is optimized
6752 for speed and any image profile, other than a color profile, is removed to
6753 reduce the thumbnail size.  To strip the color profiles as well, add <a href="command-line-options.html#strip">-strip</a> just before of after this option.</p>
6754
6755 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
6756
6757 <div style="margin: auto;">
6758   <h4><a id="tile"></a>-tile <em class="arg">filename</em></h4>
6759 </div>
6760
6761 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set the tile image used for filling a subsequent graphic primitive.</td><td style="text-align:right;"></td></tr></table>
6762
6763 <div style="margin: auto;">
6764   <h4>-tile <em class="arg">geometry</em></h4>
6765 </div>
6766
6767 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Specify the layout of images .</td><td style="text-align:right;">[<a href="montage.html">montage</a>]</td></tr></table>
6768
6769 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
6770
6771 <div style="margin: auto;">
6772   <h4>-tile</h4>
6773 </div>
6774
6775 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Specifies that a subsequent composite operation is repeated across and down image.</td><td style="text-align:right;">[<a href="composite.html">composite</a>]</td></tr></table>
6776
6777 <div style="margin: auto;">
6778   <h4><a id="tile-offset"></a>-tile-offset {<em class="arg">+-</em>}<em class="arg">x</em>{<em class="arg">+-</em>}<em class="arg">y</em></h4>
6779 </div>
6780
6781 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Specify the offset for tile images, relative to the background image it is tiled on.</td><td style="text-align:right;"></td></tr></table>
6782
6783 <p>This should be set before the tiling image is set by <a href="command-line-options.html#tile">-tile</a> or <a href="command-line-options.html#texture">-texture</a>, or directly applied for
6784 creating a tiled canvas using <code>TILE:</code> or <code>PATTERN:</code> input
6785 formats. </p>
6786
6787 <p>Internally ImageMagick does a <a href="command-line-options.html#roll">-roll</a> of the tile image
6788 by the arguments given when the tile image is set. </p>
6789
6790 <div style="margin: auto;">
6791   <h4><a id="tint"></a>-tint <em class="arg">value</em></h4>
6792 </div>
6793
6794 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Tint the image with the fill color.</td><td style="text-align:right;"></td></tr></table>
6795
6796 <p>Tint the image with the fill color.</p>
6797
6798 <p>Specify the amount of tinting as a percentage.  Pure colors like black,
6799 white red, yellow, will not be affected by -tint. Only mid-range colors such
6800 as the various shades of grey.</p>
6801
6802 <div style="margin: auto;">
6803   <h4><a id="title"></a>-title <em class="arg">string</em></h4>
6804 </div>
6805
6806 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Assign a title to displayed image.</td><td style="text-align:right;">[<a href="animate.html">animate</a>, <a href="display.html">display</a>, <a href="montage.html">montage</a>]</td></tr></table>
6807
6808 <p>Use this option to assign a specific title to the image. This assigned to
6809 the image window and is typically displayed in the window title bar.
6810 Optionally you can include the image filename, type, width, height, Exif data,
6811 or other image attribute by embedding special format characters described
6812 under the <a href="command-line-options.html#format">-format</a> option.</p>
6813
6814 <p>For example,</p>
6815
6816 <p class="crtsnip">
6817   -title "%m:%f %wx%h"
6818 </p>
6819
6820 <p>produces an image title of <code>MIFF:bird.miff 512x480</code> for an image
6821 titled <code>bird.miff</code> and whose width is 512 and height is 480.</p>
6822
6823
6824 <div style="margin: auto;">
6825   <h4><a id="transform"></a>-transform</h4>
6826 </div>
6827
6828 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">transform the image.</td><td style="text-align:right;"></td></tr></table>
6829
6830 <p>This option applies the transformation matrix from a previous <a href="command-line-options.html#affine">-affine</a> option.</p>
6831
6832 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert -affine 2,2,-2,2,0,0 -transform bird.ppm bird.jpg</span></p>
6833
6834 <p>This operator has been now been superseded by the  <a href="command-line-options.html#distort">-distort</a> '<code>AffineProjection</code>' method. </p>
6835
6836
6837 <div style="margin: auto;">
6838   <h4><a id="transparent"></a>-transparent <em class="arg">color</em></h4>
6839 </div>
6840
6841 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Make this color transparent within the image.</td><td style="text-align:right;"></td></tr></table>
6842
6843 <p>The <em class="arg">color</em> argument is defined using the format
6844 described under the <a href="command-line-options.html#fill">-fill</a> option. The <a href="command-line-options.html#fuzz">-fuzz</a> setting can be used to match and replace colors similar to the one
6845 given. </p>
6846
6847 <p>Use  <a href="command-line-options.html#transparent">+transparent</a> to invert the pixels matched.
6848 that is make all non-matching colors transparent. </p>
6849
6850 <p>The <a href="command-line-options.html#opaque">-opaque</a>  operator is exactly the same as <a href="command-line-options.html#transparent">-transparent</a> but replaces the matching color with the
6851 current <a href="command-line-options.html#fill">-fill</a> color setting, rather than transparent.
6852 However the <a href="command-line-options.html#transparent">-transparent</a> operator also ensures
6853 that the image has an alpha channel enabled, as per "<code><a href="command-line-options.html#alpha">-alpha</a> set</code>", and does not require you to modify the <a href="command-line-options.html#channel">-channel</a> to enable alpha channel handling. </p>
6854
6855 <p>Note that this does not define the color as being the 'transparency color'
6856 used for color-mapped image formats, such as GIF.  For that use <a href="command-line-options.html#transparent-color">-transparent-color</a> </p>
6857
6858
6859 <div style="margin: auto;">
6860   <h4><a id="transparent-color"></a>-transparent-color <em class="arg">color</em></h4>
6861 </div>
6862
6863 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set the transparent color.</td><td style="text-align:right;"></td></tr></table>
6864
6865 <p>Sometimes this is used for saving to image formats such as
6866 GIF and PNG8 which uses this color to represent boolean transparency.  This
6867 does not make a color transparent, it only defines what color the transparent
6868 color is in the color palette of the saved image. Use <a href="command-line-options.html#transparent">-transparent</a> to make an opaque color transparent.</p>
6869
6870 <p>This option allows you to have both an opaque visible color, as well as a
6871 transparent color of the same color value without conflict.  That is, you can
6872 use the same color for both the transparent and opaque color areas within an
6873 image.  This, in turn, frees to you to select a transparent color that is
6874 appropriate when an image is displayed by an application that does not handle a
6875 transparent color index, while allowing ImageMagick to correctly handle images of this
6876 type. </p>
6877
6878 <p>The default transparent color is <code>#00000000</code>, which is fully transparent black.</p>
6879
6880 <div style="margin: auto;">
6881   <h4><a id="transpose"></a>-transpose</h4>
6882 </div>
6883
6884 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Mirror the image along the top-left to bottom-right diagonal.</td><td style="text-align:right;"></td></tr></table>
6885
6886 <p> This option mathematically transposes the pixel array.  It is equivalent to the sequence <code>-flip -rotate 90</code>.
6887 </p>
6888
6889 <div style="margin: auto;">
6890   <h4><a id="transverse"></a>-transverse</h4>
6891 </div>
6892
6893 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Mirror the image along the images bottom-left top-right diagonal.  Equivalent to the operations <code>-flop -rotate 90</code>.</td><td style="text-align:right;"></td></tr></table>
6894
6895
6896 <div style="margin: auto;">
6897   <h4><a id="treedepth"></a>-treedepth <em class="arg">value</em></h4>
6898 </div>
6899
6900 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">tree depth for the color reduction algorithm.</td><td style="text-align:right;"></td></tr></table>
6901
6902 <p>Normally, this integer value is zero or one. A value of zero or one causes
6903 the use of an optimal tree depth for the color reduction algorithm.</p>
6904
6905 <p>An optimal depth generally allows the best representation of the source
6906 image with the fastest computational speed and the least amount of memory.
6907 However, the default depth is inappropriate for some images. To assure the
6908 best representation, try values between 2 and 8 for this parameter.  Refer to
6909 the <a href="quantize.html">color reduction algorithm</a> for more details.</p>
6910
6911 <p>The <a href="command-line-options.html#colors">-colors</a> or <a href="command-line-options.html#monochrome">-monochrome</a>
6912 option, or writing to an image format which requires color reduction, is
6913 required for this option to take effect.</p>
6914
6915 <div style="margin: auto;">
6916   <h4><a id="trim"></a>-trim</h4>
6917 </div>
6918
6919 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">trim an image.</td><td style="text-align:right;"></td></tr></table>
6920
6921 <p>This option removes any edges that are exactly the same color as the corner
6922 pixels. Use <a href="command-line-options.html#fuzz">-fuzz</a> to make <a href="command-line-options.html#trim">-trim</a> remove
6923 edges that are nearly the same color as the corner pixels.</p>
6924
6925 <p>The page or virtual canvas information of the image is preserved allowing
6926 you to extract the result of the <a href="command-line-options.html#trim">-trim</a> operation from the
6927 image.  Use a <a href="command-line-options.html#repage">+repage</a> to remove the virtual canvas page
6928 information if it is unwanted.</p>
6929
6930 <p>If the trimmed image 'disappears' an warning is produced, and a special
6931 single pixel transparent 'missed' image is returned, in the same way as when a
6932 <a href="command-line-options.html#crop">-crop</a> operation 'misses' the image proper. </p>
6933
6934
6935 <div style="margin: auto;">
6936   <h4><a id="type"></a>-type <em class="arg">type</em></h4>
6937 </div>
6938
6939 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">the image type.</td><td style="text-align:right;"></td></tr></table>
6940  <p>Choose from: <code>Bilevel</code>,
6941 <code>Grayscale</code>, <code>GrayscaleMatte</code>, <code>Palette</code>,
6942 <code>PaletteMatte</code>, <code>TrueColor</code>, <code>TrueColorMatte</code>,
6943 <code>ColorSeparation</code>, or <code>ColorSeparationMatte</code>.</p>
6944
6945 <p>Normally, when a format supports different subformats such as grayscale and
6946 truecolor, the encoder will try to choose an efficient subformat. The <a href="command-line-options.html#type">-type</a> option can be used to override this behavior. For
6947 example, to prevent a JPEG from being written in grayscale format even though
6948 only gray pixels are present, use.</p>
6949
6950 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert bird.png -type TrueColor bird.jpg</span></p>
6951 <p>Similarly, use <a href="command-line-options.html#type">-type TrueColorMatte</a> to force the
6952 encoder to write an alpha channel even though the image is opaque, if the
6953 output format supports transparency.</p>
6954
6955 <p>Use <a href="command-line-options.html#type">-type optimize</a> to ensure the image is written in the smallest possible file size.</p>
6956
6957 <div style="margin: auto;">
6958   <h4><a id="undercolor"></a>-undercolor <em class="arg">color</em></h4>
6959 </div>
6960
6961 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">set the color of the annotation bounding box.</td><td style="text-align:right;"></td></tr></table>
6962
6963 <p>The color is specified using the format described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
6964
6965 <p>See <a href="command-line-options.html#draw">-draw</a> for further details.</p>
6966
6967
6968 <div style="margin: auto;">
6969   <h4><a id="update"></a>-update <em class="arg">seconds</em></h4>
6970 </div>
6971
6972 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">detect when image file is modified and redisplay.</td><td style="text-align:right;"></td></tr></table>
6973
6974 <p>Suppose that while you are displaying an image the file that is currently
6975 displayed is over-written.  <code>display</code> will automagically detect that
6976 the input file has been changed and update the displayed image
6977 accordingly.</p>
6978
6979
6980 <div style="margin: auto;">
6981   <h4><a id="unique-colors"></a>-unique-colors</h4>
6982 </div>
6983
6984 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">discard all but one of any pixel color.</td><td style="text-align:right;"></td></tr></table>
6985
6986
6987 <div style="margin: auto;">
6988   <h4><a id="units"></a>-units <em class="arg">type</em></h4>
6989 </div>
6990
6991 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">the units of image resolution.</td><td style="text-align:right;"></td></tr></table>
6992
6993 <p>Choose from: <code>Undefined</code>, <code>PixelsPerInch</code>, or
6994 <code>PixelsPerCentimeter</code>. This option is normally used in conjunction
6995 with the <a href="command-line-options.html#density">-density</a> option.</p>
6996
6997
6998 <div style="margin: auto;">
6999   <h4><a id="unsharp"></a>-unsharp <em class="arg">radius</em><br></br>-unsharp <em class="arg">radius</em>x<em class="arg">sigma</em>{<em class="arg">+gain</em>}{<em class="arg">+threshold</em>}</h4>
7000 </div>
7001
7002 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">sharpen the image with an unsharp mask operator.</td><td style="text-align:right;"></td></tr></table>
7003
7004 <p>The <a href="command-line-options.html#unsharp">-unsharp</a> option sharpens an image. The image is
7005 convolved with a Gaussian operator of the given radius and standard deviation
7006 (sigma). For reasonable results, radius should be larger than sigma. Use
7007 a radius of 0 to have the method select a suitable radius.</p>
7008
7009 <p>The parameters are:</p>
7010
7011 <pre class="text">
7012    radius     The radius of the Gaussian, in pixels,  not counting the center
7013               pixel (default 0).
7014    sigma      The standard deviation of the Gaussian, in pixels (default 1.0).
7015    gain       The fraction of the difference between the original and the blur
7016               image that is added back into the original (default 1.0).
7017    threshold  The threshold, as a fraction of <em class="QR">QuantumRange</em>, needed to apply the
7018               difference amount (default 0.05).
7019 </pre>
7020
7021
7022 <div style="margin: auto;">
7023   <h4><a id="verbose"></a>-verbose</h4>
7024 </div>
7025
7026 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">print detailed information about the image when this option
7027 precedes the <a href="command-line-options.html#identify">-identify</a> option or
7028 <code>info:</code>.</td><td style="text-align:right;"></td></tr></table>
7029
7030
7031 <div style="margin: auto;">
7032   <h4><a id="version"></a>-version</h4>
7033 </div>
7034
7035 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">print ImageMagick version string and exit.</td><td style="text-align:right;"></td></tr></table>
7036
7037
7038 <div style="margin: auto;">
7039   <h4><a id="view"></a>-view <em class="arg">string</em></h4>
7040 </div>
7041
7042 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">FlashPix viewing parameters.</td><td style="text-align:right;"></td></tr></table>
7043
7044
7045 <div style="margin: auto;">
7046   <h4><a id="vignette"></a>-vignette <em class="arg">radius</em>{x<em class="arg">sigma</em>}{<em class="arg">+-</em>}<em class="arg">x</em>{<em class="arg">+-</em>}<em class="arg">y</em>{<em class="arg">%</em>}</h4>
7047 </div>
7048
7049 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">soften the edges of the image in vignette style.</td><td style="text-align:right;"></td></tr></table>
7050
7051
7052 <div style="margin: auto;">
7053   <h4><a id="virtual-pixel"></a>-virtual-pixel <em class="arg">method</em></h4>
7054 </div>
7055
7056 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Specify contents of <em>virtual pixels</em>.</td><td style="text-align:right;"></td></tr></table>
7057
7058 <p>This option defines what color source should be used if and when a color
7059 lookup completely 'misses' the source image. The color(s) that appear to
7060 surround the source image.  Generally this color is derived from the source
7061 image, but could also be set to a specify background color. </p>
7062
7063 <p>Choose from these methods:</p>
7064
7065 <pre class="text">
7066    background            the area surrounding the image is the background color
7067    black                 the area surrounding the image is black
7068    checker-tile          alternate squares with image and background color
7069    dither                non-random 32x32 dithered pattern
7070    edge                  extend the edge pixel toward infinity
7071    gray                  the area surrounding the image is gray
7072    horizontal-tile       horizontally tile the image, background color above/below
7073    horizontal-tile-edge  horizontally tile the image and replicate the side edge pixels
7074    mirror                mirror tile the image
7075    random                choose a random pixel from the image
7076    tile                  tile the image (default)
7077    transparent           the area surrounding the image is transparent blackness
7078    vertical-tile         vertically tile the image, sides are background color
7079    vertical-tile-edge    vertically tile the image and replicate the side edge pixels
7080    white                 the area surrounding the image is white
7081 </pre>
7082
7083 <p>The default value is "edge".</p>
7084
7085 <p>This most important for distortion operators such as <a href="command-line-options.html#distort">-distort</a>, <a href="command-line-options.html#implode">-implode</a>, and <a href="command-line-options.html#fx">-fx</a>.
7086 However it also effects operations that may access pixels just outside the
7087 image proper, such as <a href="command-line-options.html#convolve">-convolve</a>, <a href="command-line-options.html#blur">-blur</a>, and <a href="command-line-options.html#sharpen">-sharpen</a>. </p>
7088
7089 <p>To print a complete list of virtual pixel types, use the <a href="command-line-options.html#list">-list virtual-pixel</a> option.</p>
7090
7091
7092 <div style="margin: auto;">
7093   <h4><a id="visual"></a>-visual <em class="arg">type</em></h4>
7094 </div>
7095
7096 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Animate images using this X visual type.</td><td style="text-align:right;">[<a href="animate.html">animate</a>, <a href="display.html">display</a>]</td></tr></table>
7097
7098 <p>Choose from these visual classes:</p>
7099
7100 <pre class="text">
7101    StaticGray
7102    GrayScale
7103    StaticColor
7104    PseudoColor
7105    TrueColor
7106    DirectColor
7107    default
7108    visual id
7109 </pre>
7110
7111 <p>The X server must support the visual you choose, otherwise an error occurs.
7112 If a visual is not specified, the visual class that can display the most
7113 simultaneous colors on the default screen is chosen.</p>
7114
7115
7116 <div style="margin: auto;">
7117   <h4><a id="watermark"></a>-watermark <em class="arg">brightness</em>x<em class="arg">saturation</em></h4>
7118 </div>
7119
7120 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Watermark an image using the given percentages of brightness and
7121 saturation.</td><td style="text-align:right;">[<a href="composite.html">composite</a>]</td></tr></table>
7122
7123 <p>Take a grayscale image (with alpha mask) and modify the destination image's
7124 brightness according to watermark image's grayscale value and the <em class="arg">brightness</em> percentage.  The destinations color saturation
7125 attribute is just direct modified by the <em class="arg">saturation</em>
7126 percentage, which defaults to 100 percent (no color change). </p>
7127
7128
7129 <div style="margin: auto;">
7130   <h4><a id="wave"></a>-wave <em class="arg">amplitude</em><br></br>-wave <em class="arg">amplitude</em>x<em class="arg">wavelength</em></h4>
7131 </div>
7132
7133 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Shear the columns of an image into a sine wave.</td><td style="text-align:right;"></td></tr></table>
7134
7135 <p>Specify <em class="arg">amplitude</em> and <em class="arg">wavelength</em>
7136 of the wave.</p>
7137
7138 <div style="margin: auto;">
7139   <h4><a id="weight"></a>-weight <em class="arg">fontWeight</em></h4>
7140 </div>
7141
7142 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Set a font weight for text.</td><td style="text-align:right;"></td></tr></table>
7143
7144 <p>This setting suggests a font weight that ImageMagick should try to apply to
7145 the currently selected font family. Use a positive integer for <em class="arg">fontWeight</em> or select from the following.</p>
7146
7147 <table class="doc">
7148   <col width="25%"></col>
7149   <col width="75%"></col>
7150   <thead>
7151   <tr>
7152   <th><em class="arg">fontWeight</em></th>
7153   <th>Description</th>
7154   </tr>
7155   </thead>
7156   <tbody>
7157     <tr><td>All </td>
7158         <td>No effect. </td></tr>
7159     <tr><td>Bold </td>
7160         <td>Same as <em class="arg">fontWeight</em> = 700.</td></tr>
7161     <tr><td>Bolder </td>
7162         <td>Add 100 to font weight if currently ≤ 800.</td></tr>
7163     <tr><td>Lighter </td>
7164         <td>Subtract 100 to font weight if currently ≤ 100.</td></tr>
7165     <tr><td>Normal </td>
7166         <td>Same as <em class="arg">fontWeight</em> = 400.</td></tr>
7167  </tbody>
7168  </table>
7169
7170 <p>To print a complete list of weight types, use <a href="command-line-options.html#list">-list
7171 weight</a>.</p>
7172
7173 <p>For other settings that affect fonts, see the options <a href="command-line-options.html#font">-font</a>, <a href="command-line-options.html#family">-family</a>, <a href="command-line-options.html#stretch">-stretch</a>, and <a href="command-line-options.html#style">-style</a>. </p>
7174
7175 <div style="margin: auto;">
7176   <h4><a id="white-point"></a>-white-point <em class="arg">x,y</em></h4>
7177 </div>
7178
7179 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">chromaticity white point.</td><td style="text-align:right;"></td></tr></table>
7180
7181 <div style="margin: auto;">
7182   <h4><a id="white-threshold"></a>-white-threshold <em class="arg">value</em>{<em class="arg">%</em>}</h4>
7183 </div>
7184
7185 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Force to white all pixels above the threshold while leaving all
7186 pixels at or below the threshold unchanged.</td><td style="text-align:right;"></td></tr></table>
7187
7188 <p> The threshold value can be given as a percentage or as an absolute integer
7189 value within [0, <em class="QR">QuantumRange</em>] corresponding to the
7190 desired <a href="command-line-options.html#channel">‑channel</a> value. See <a href="command-line-options.html#threshold">‑threshold</a>for more details on thresholds and resulting values.  </p>
7191
7192 <div style="margin: auto;">
7193   <h4><a id="window"></a>-window <em class="arg">id</em></h4>
7194 </div>
7195
7196 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Make the image the background of a window.</td><td style="text-align:right;">[<a href="animate.html">animate</a>, <a href="display.html">display</a>]</td></tr></table>
7197
7198 <p><em class="arg">id</em> can be a window id or name. Specify <code>root</code>
7199 to select X's root window as the target window.</p>
7200
7201 <p>By default the image is tiled onto the background of the target window. If
7202 <code>backdrop</code> or <a href="command-line-options.html#geometry">-resize</a> are specified, the
7203 image is surrounded by the background color. Refer to <code>X RESOURCES</code>
7204 for details.</p>
7205
7206 <p>The image will not display on the root window if the image has more unique
7207 colors than the target window colormap allows. Use <a href="command-line-options.html#colors">-colors</a> to reduce the number of colors.</p>
7208
7209 <div style="margin: auto;">
7210   <h4><a id="window-group"></a>-window-group</h4>
7211 </div>
7212
7213 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">specify the window group.</td><td style="text-align:right;"></td></tr></table>
7214
7215 <div style="margin: auto;">
7216   <h4><a id="write"></a>-write <em class="arg">filename</em></h4>
7217 </div>
7218
7219 <table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">write an image sequence.</td><td style="text-align:right;"></td></tr></table>
7220  <p>The image sequence preceding the <a href="command-line-options.html#write">-write</a> <em class="arg">filename</em> option is written out, and processing continues with the same image in its current state if there are additional options. To restore the image to its original state after writing it, use the <a href="command-line-options.html#write">+write</a> <em class="arg">filename</em> option.</p>
7221
7222 <p>Use <a href="command-line-options.html#compress">-compress</a> to specify the type of image compression.</p>
7223 </div>
7224 </div>
7225
7226
7227 </div>
7228
7229 <div id="linkbar">
7230     <span id="linkbar-west"> </span>
7231
7232     <span id="linkbar-center">
7233       <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
7234       <a href="../discourse-server">Discourse Server</a> •
7235       <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a> •
7236       <a href="http://jqmagick.imagemagick.org/">JqMagick</a>
7237     </span>
7238     <span id="linkbar-east"> </span>
7239 </div>
7240 <div class="footer">
7241   <span id="footer-west">©  1999-2013 ImageMagick Studio LLC</span>
7242   <span id="footer-east"> <a href="contact.html">Contact the Wizards</a></span>
7243 </div>
7244 <div style="clear: both; margin: 0; width: 100%; "></div>
7245 </body>
7246 </html>