]> granicus.if.org Git - imagemagick/blob - www/command-line-options.html
(no commit message)
[imagemagick] / www / command-line-options.html
1 \r
2 \r
3 \r
4 \r
5 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" \r
6   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
7 <html version="-//W3C//DTD XHTML 1.1//EN"\r
8       xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"\r
9       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
10       xsi:schemaLocation="http://www.w3.org/1999/xhtml\r
11                           http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">\r
12 <head>\r
13   <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>\r
14   <meta name="google-site-verification" content="MxsMq6bdLOx0KSuz1MY6yG9ZTIJ7_7DVRfl5NCAT5Yg"/>\r
15   <title>ImageMagick: Command-line Options</title>
16   <meta http-equiv="content-language" content="en-US"/>
17   <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
18   <meta http-equiv="reply-to" content="magick-users@imagemagick.org"/>
19   <meta name="application-name" content="ImageMagick"/>
20   <meta name="description" content="Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats.  In addition resize, rotate, shear, distort and transform images automagically."/>
21   <meta name="application-url" content="http://www.imagemagick.org"/>
22   <meta name="generator" content="PHP"/>
23   <meta name="keywords" content="command-line, options, ImageMagick, PerlMagick, image processing, OpenMP, software development library, image, photo, software, Magick++, MagickWand"/>
24   <meta name="rating" content="GENERAL"/>
25   <meta name="robots" content="INDEX, FOLLOW"/>
26   <meta name="generator" content="ImageMagick Studio LLC"/>
27   <meta name="author" content="ImageMagick Studio LLC"/>
28   <meta name="revisit-after" content="2 DAYS"/>
29   <meta name="resource-type" content="document"/>
30   <meta name="copyright" content="Copyright (c) 1999-2012 ImageMagick Studio LLC"/>
31   <meta name="distribution" content="Global"/>
32   <link rel="icon" href="../images/wand.png"/>
33   <link rel="shortcut icon" href="../images/wand.ico"  type="images/x-icon"/>
34   <link rel="canonical" href="http://www.imagemagick.org" />\r
35   <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"/>\r
36   <!-- Add jQuery library -->\r
37   <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>\r
38   \r
39   <!-- Optionaly include easing and/or mousewheel plugins -->\r
40   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/jquery.easing-1.3.pack.js"></script>\r
41   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/jquery.mousewheel-3.0.6.pack.js"></script>\r
42   \r
43   <!-- Add fancyBox -->\r
44   <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/jquery.fancybox.css?v=2.0.4" type="text/css" media="screen" />\r
45   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/jquery.fancybox.pack.js?v=2.0.4"></script>\r
46   \r
47   <!-- Optionaly include button and/or thumbnail helpers -->\r
48   <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/helpers/jquery.fancybox-buttons.css?v=2.0.4" type="text/css" media="screen" />\r
49   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/helpers/jquery.fancybox-buttons.js?v=2.0.4"></script>\r
50   \r
51   <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/helpers/jquery.fancybox-thumbs.css?v=2.0.4" type="text/css" media="screen" />\r
52   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/helpers/jquery.fancybox-thumbs.js?v=2.0.4"></script>\r
53   <script type="text/javascript">\r
54         $(document).ready(function() {\r
55                 $(".fancybox").fancybox();\r
56         });\r
57   </script>\r
58   <!-- ImageMagick style -->\r
59   <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />\r
60   <style type="text/css" media="all">\r
61     @import url("../www/magick.css");\r
62   </style>\r
63 </head>\r
64 \r
65 <body id="www-imagemagick-org">\r
66 <div class="titlebar">\r
67 <div style="margin: 17px auto; float: left;">\r
68   <script type="text/javascript">\r
69   <!--\r
70     google_ad_client = "pub-3129977114552745";\r
71     google_ad_slot = "5439289906";\r
72     google_ad_width = 728;\r
73     google_ad_height = 90;\r
74   //-->\r
75   </script>\r
76   <script type="text/javascript"\r
77     src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
78   </script>\r
79 </div>\r
80 <a href="../discourse-server">\r
81   <img src="../images/logo.jpg"\r
82   alt="ImageMagick Logo"\r
83   style="width: 123px; height: 118px; border: 0px; float: right;" /></a>\r
84 <a href="../index.html">\r
85   <img src="../images/sprite.jpg"\r
86   alt="ImageMagick Sprite"\r
87   style="width: 114px; height: 118px; border: 0px; float: right;" /></a>\r
88 </div>\r
89 \r
90 <div class="westbar">\r
91 \r
92 <div class="menu">
93   <a title="About ImageMagick" href="../index.html">About ImageMagick</a>
94 </div>
95 <div class="menu">
96   <a title="Binary Releases" href="binary-releases.html">Binary Releases</a>
97 </div>
98 <div class="sub">
99     <a title="Binary Release: Unix" href="binary-releases.html#unix">Unix</a>
100 </div>
101 <div class="sub">
102     <a title="Binary Release: MacOS X" href="binary-releases.html#macosx">Mac OS X</a>
103 </div>
104 <div class="sub">
105     <a title="Binary Release: iOS" href="binary-releases.html#iOS">iOS</a>
106 </div>
107 <div class="sub">
108     <a title="Binary Release: Windows" href="binary-releases.html#windows">Windows</a>
109 </div>
110 <div class="sep"></div>\r
111 <div class="menu">
112   <a title="Command-line Tools" href="command-line-tools.html">Command-line Tools</a>
113 </div>
114 <div class="sub">
115     <a title="Command-line Tools: Processing" href="command-line-processing.html">Processing</a>
116 </div>
117 <div class="sub">
118     <a title="Command-line Tools: Options" href="command-line-options.html">Options</a>
119 </div>
120 <div class="sub">
121     <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
122 </div>
123 <div class="menu">
124   <a title="Program Interfaces" href="api.html">Program Interfaces</a>
125 </div>
126 <div class="sub">
127     <a title="Program Interface: MagickWand" href="magick-wand.html">MagickWand</a>
128 </div>
129 <div class="sub">
130     <a title="Program Interface: MagickCore" href="magick-core.html">MagickCore</a>
131 </div>
132 <div class="sub">
133     <a title="Program Interface: PerlMagick" href="perl-magick.html">PerlMagick</a>
134 </div>
135 <div class="sub">
136     <a title="Program Interface: Magick++" href="magick++.html">Magick++</a>
137 </div>
138 <div class="sep"></div>\r
139 <div  class="menu">
140    <a title="Install from Source" href="install-source.html">Install from Source</a>
141 </div>
142 <div class="sub">
143     <a title="Install from Source: Unix" href="install-source.html#unix">Unix</a>
144 </div>
145 <div class="sub">
146     <a title="Install from Source: Windows" href="install-source.html#windows">Windows</a>
147  </div>
148 <div class="menu">
149   <a title="Resources" href="resources.html">Resources</a>
150 </div>
151 <div class="menu">
152   <a title="Architecture" href="architecture.html">Architecture</a>
153 </div>
154 <div class="menu">
155   <a title="Download" href="download.html">Download</a>
156 </div>
157 <div class="sep"></div>\r
158 <div class="menu">
159   <a title="Search" href="search.html">Search</a>
160 </div>
161 <div class="sep"></div>\r
162 <div class="menu">
163   <a title="Site Map" href="sitemap.html">Site Map</a>
164 </div>
165 <div  class="sub">
166   <a title="Site Map: Links" href="links.html">Links</a>
167 </div>
168 <div class="sep"></div>\r
169 <div class="menu">
170   <a rel="follow" title="Sponsors" href="sponsors.html">Sponsors:</a>
171
172   <a href="http://www.networkredux.com"> <img src="../images/networkredux.png" width="140" height="31" alt="[sponsor]" style="margin-top: 4px; margin-left: 4px; border: 0px; float: left;" /></a>
173   <a href="http://www.dinodirect.com/ipads-tablets/"> <img src="../images/dino-direct.jpg" width="140" height="90" alt="[sponsor]" style="margin-top: 4px; margin-left: 4px; border: 0px; float: left;" /></a><!-- 201208010120 mickey@163... -->
174 <div class="sponsbox">
175 <div class="sponsor">
176   <a rel="follow" title="Sponsor: The Fastest &amp; Easiest Way to Find Images" href="http://www.graphicsfactory.com">The Fastest &amp; Easiest Way to Find Images</a><!-- 201210010270 graphicsfac... -->
177 </div>
178 <div class="sponsor">
179   <a rel="follow" title="Sponsor: VPS" href="http://www.interdominios.com/vps">VPS</a><!-- 201209010090 barsh@inter... -->
180 </div>
181 <div class="sponsor">
182   <a rel="follow" title="Werbebanner Werbeplane" href="http://www.allesbanner.de">Werbebanner Werbeplane</a><!-- 201212010450 info@druck... -->
183 </div>
184 <div class="sponsor">
185   <a rel="follow" title="Entertainment News &amp; Photos" href="http://www.zimbio.com">Entertainment News &amp; Photos</a><!-- 201211010540 bd@zimb... -->
186 </div>
187 <div class="sponsor">
188   <a rel="follow" title="Sponsor: LED24" href="http://led24.de/">LED24</a><!-- 201207010270 info@led24... -->
189 </div>
190 <div class="sponsor">
191   <a rel="follow" title="Sponsor: Best Website Hosting" href="http://www.top-cheap-web-hosting.com">Best Website Hosting</a><!-- 201304010090 eunge.liu-->
192 </div>
193 <div class="sponsor">
194   <a rel="follow" title="Android Tablet" href="http://www.dinodirect.com/ipads-tablets/">Android Tablet</a><!-- 201208010120 mickey@163... -->
195 </div>
196 <div class="sponsor">
197   <a rel="follow" title="Sponsor: Web Site Hosting" href="http://webhostinggeeks.com">Web Site Hosting</a><!-- 201302010900 funds@enmob... -->
198 </div>
199 <div class="sponsor">
200    <a rel="follow" title="Sponsor: Premium Quality Stock Photos" href="http://www.f1online.pro/en/">Premium Quality Stock Photos</a><!-- 2012080100540 ... -->
201 </div>
202 <div class="sponsor">
203    <a rel="follow" title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 2012070100250 ... -->
204 </div>
205 <div class="sponsor">
206   <a rel="follow" title="Sponsor: Managed Server" href="http://www.robhost.de">Managed Server</a><!-- 201210010720 klikics... -->
207 </div>
208 <div class="sponsor">
209   <a rel="follow" title="Sponsor: Druckerei" href="http://www.allesdruck.de">Druckerei</a><!-- 201303011500 r.leo -->
210 </div>
211 <div  class="sponsor">
212    <a rel="follow" title="Sponsor: Kaffeemaschinen reparatur" href="http://www.kaffeemaschinen-reparatur.de">Kaffeemaschinen reparatur</a><!-- 2012080100030 Temurbas atlas-multimedia-->
213 </div>
214 <div class="sponsor">
215    <a rel="follow" title="Sponsor: Web Hosting" href="http://www.hostucan.com">Web Hosting</a><!-- 2012120100150 racent marketing@webhosting...-->
216 </div>
217 </div>
218 </div>
219 </div>\r
220 \r
221 <div class="eastbar">\r
222   <div class="g-plusone" id="gplusone"></div>\r
223   <script type="text/javascript">\r
224     window.___gcfg = {\r
225       lang: 'en-US'\r
226     };\r
227 \r
228     (function() {\r
229       var po = document.createElement('script');\r
230       po.type = 'text/javascript'; po.async = true;\r
231       po.src = 'https://apis.google.com/js/plusone.js';\r
232       var script = document.getElementsByTagName('script')[0];\r
233       script.parentNode.insertBefore(po, script);\r
234     })();\r
235     var gplusone = document.getElementById("gplusone");\r
236     gplusone.setAttribute("data-size","medium");\r
237     gplusone.setAttribute("data-count","false");\r
238   </script>\r
239 </div>\r
240 \r
241 <div class="main">\r
242 \r
243 <h1>Create, Edit, or Compose Bitmap Images With These Command-line Options</h1>
244 <p class="navigation-index">
245 [ <a href="command-line-options.html#adaptive-blur">&#x2011;adaptive&#x2011;blur</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#adaptive-resize">&#x2011;adaptive&#x2011;resize</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#adaptive-sharpen">&#x2011;adaptive&#x2011;sharpen</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#adjoin">&#x2011;adjoin</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#affine">&#x2011;affine</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#alpha">&#x2011;alpha</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#annotate">&#x2011;annotate</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#antialias">&#x2011;antialias</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#append">&#x2011;append</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#attenuate">&#x2011;attenuate</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#authenticate">&#x2011;authenticate</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#auto-gamma">&#x2011;auto&#x2011;gamma</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#auto-level">&#x2011;auto&#x2011;level</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#auto-orient">&#x2011;auto&#x2011;orient</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#backdrop">&#x2011;backdrop</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#background">&#x2011;background</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#bench">&#x2011;bench</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#bias">&#x2011;bias</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#black-point-compensation">&#x2011;black&#x2011;point&#x2011;compensation</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#black-threshold">&#x2011;black&#x2011;threshold</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#blend">&#x2011;blend</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#blue-primary">&#x2011;blue&#x2011;primary</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#blue-shift">&#x2011;blue&#x2011;shift</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#blur">&#x2011;blur</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#border">&#x2011;border</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#bordercolor">&#x2011;bordercolor</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#borderwidth">&#x2011;borderwidth</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#brightness-contrast">&#x2011;brightness&#x2011;contrast</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#cache">&#x2011;cache</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#caption">&#x2011;caption</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#cdl">&#x2011;cdl</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#channel">&#x2011;channel</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#charcoal">&#x2011;charcoal</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#chop">&#x2011;chop</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#clamp">&#x2011;clamp</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#clip">&#x2011;clip</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#clip-mask">&#x2011;clip&#x2011;mask</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#clip-path">&#x2011;clip&#x2011;path</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#clone">&#x2011;clone</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#clut">&#x2011;clut</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#coalesce">&#x2011;coalesce</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#colorize">&#x2011;colorize</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#colormap">&#x2011;colormap</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#color-matrix">&#x2011;color&#x2011;matrix</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#colors">&#x2011;colors</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#colorspace">&#x2011;colorspace</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#combine">&#x2011;combine</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#comment">&#x2011;comment</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#compose">&#x2011;compose</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#composite">&#x2011;composite</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#compress">&#x2011;compress</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#contrast">&#x2011;contrast</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#contrast-stretch">&#x2011;contrast&#x2011;stretch</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#convolve">&#x2011;convolve</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#crop">&#x2011;crop</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#cycle">&#x2011;cycle</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#debug">&#x2011;debug</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#decipher">&#x2011;decipher</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#deconstruct">&#x2011;deconstruct</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#define">&#x2011;define</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#delay">&#x2011;delay</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#delete">&#x2011;delete</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#density">&#x2011;density</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#depth">&#x2011;depth</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#descend">&#x2011;descend</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#deskew">&#x2011;deskew</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#despeckle">&#x2011;despeckle</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#direction">&#x2011;direction</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#displace">&#x2011;displace</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#display">&#x2011;display</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#dispose">&#x2011;dispose</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#dissimilarity-threshold">&#x2011;dissimilarity&#x2011;threshold</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#dissolve">&#x2011;dissolve</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#distort">&#x2011;distort</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#dither">&#x2011;dither</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#draw">&#x2011;draw</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#duplicate">&#x2011;duplicate</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#edge">&#x2011;edge</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#emboss">&#x2011;emboss</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#encipher">&#x2011;encipher</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#encoding">&#x2011;encoding</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#endian">&#x2011;endian</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#enhance">&#x2011;enhance</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#equalize">&#x2011;equalize</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#evaluate">&#x2011;evaluate</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#evaluate-sequence">&#x2011;evaluate&#x2011;sequence</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#extent">&#x2011;extent</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#extract">&#x2011;extract</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#family">&#x2011;family</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#features">&#x2011;features</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#fft">&#x2011;fft</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#fill">&#x2011;fill</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#filter">&#x2011;filter</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#flatten">&#x2011;flatten</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#flip">&#x2011;flip</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#floodfill">&#x2011;floodfill</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#flop">&#x2011;flop</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#font">&#x2011;font</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#foreground">&#x2011;foreground</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#format">&#x2011;format</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#format_identify_">&#x2011;format[identify]</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#frame">&#x2011;frame</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#frame_import_">&#x2011;frame[import]</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#function">&#x2011;function</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#fuzz">&#x2011;fuzz</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#fx">&#x2011;fx</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#gamma">&#x2011;gamma</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#gaussian-blur">&#x2011;gaussian&#x2011;blur</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#geometry">&#x2011;geometry</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#gravity">&#x2011;gravity</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#green-primary">&#x2011;green&#x2011;primary</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#hald-clut">&#x2011;hald&#x2011;clut</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#help">&#x2011;help</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#highlight-color">&#x2011;highlight&#x2011;color</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#iconGeometry">&#x2011;iconGeometry</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#iconic">&#x2011;iconic</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#identify">&#x2011;identify</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#ift">&#x2011;ift</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#immutable">&#x2011;immutable</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#implode">&#x2011;implode</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#insert">&#x2011;insert</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#intent">&#x2011;intent</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#interlace">&#x2011;interlace</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#interpolate">&#x2011;interpolate</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#interline-spacing">&#x2011;interline&#x2011;spacing</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#interword-spacing">&#x2011;interword&#x2011;spacing</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#kerning">&#x2011;kerning</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#label">&#x2011;label</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#lat">&#x2011;lat</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#layers">&#x2011;layers</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#level">&#x2011;level</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#level-colors">&#x2011;level&#x2011;colors</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#limit">&#x2011;limit</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#linear-stretch">&#x2011;linear&#x2011;stretch</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#linewidth">&#x2011;linewidth</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#liquid-rescale">&#x2011;liquid&#x2011;rescale</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#list">&#x2011;list</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#log">&#x2011;log</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#loop">&#x2011;loop</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#lowlight-color">&#x2011;lowlight&#x2011;color</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#magnify">&#x2011;magnify</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#map">&#x2011;map</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#map_stream_">&#x2011;map[stream]</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#mask">&#x2011;mask</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#mattecolor">&#x2011;mattecolor</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#median">&#x2011;median</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#metric">&#x2011;metric</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#mode">&#x2011;mode</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#modulate">&#x2011;modulate</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#monitor">&#x2011;monitor</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#monochrome">&#x2011;monochrome</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#morph">&#x2011;morph</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#morphology">&#x2011;morphology</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#mosaic">&#x2011;mosaic</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#motion-blur">&#x2011;motion&#x2011;blur</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#name">&#x2011;name</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#negate">&#x2011;negate</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#noise">&#x2011;noise</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#normalize">&#x2011;normalize</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#opaque">&#x2011;opaque</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#ordered-dither">&#x2011;ordered&#x2011;dither</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#orient">&#x2011;orient</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#page">&#x2011;page</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#paint">&#x2011;paint</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#path">&#x2011;path</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#pause_animate_">&#x2011;pause[animate]</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#pause_import_">&#x2011;pause[import]</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#pen">&#x2011;pen</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#ping">&#x2011;ping</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#pointsize">&#x2011;pointsize</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#polaroid">&#x2011;polaroid</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#posterize">&#x2011;posterize</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#precision">&#x2011;precision</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#preview">&#x2011;preview</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#print">&#x2011;print</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#process">&#x2011;process</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#profile">&#x2011;profile</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#quality">&#x2011;quality</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#quantize">&#x2011;quantize</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#quiet">&#x2011;quiet</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#radial-blur">&#x2011;radial&#x2011;blur</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#raise">&#x2011;raise</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#random-threshold">&#x2011;random&#x2011;threshold</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#red-primary">&#x2011;red&#x2011;primary</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#regard-warnings">&#x2011;regard&#x2011;warnings</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#region">&#x2011;region</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#remap">&#x2011;remap</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#remote">&#x2011;remote</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#render">&#x2011;render</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#repage">&#x2011;repage</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#resample">&#x2011;resample</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#resize">&#x2011;resize</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#respect-parentheses">&#x2011;respect&#x2011;parentheses</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#reverse">&#x2011;reverse</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#roll">&#x2011;roll</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#rotate">&#x2011;rotate</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#sample">&#x2011;sample</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#sampling-factor">&#x2011;sampling&#x2011;factor</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#scale">&#x2011;scale</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#scene">&#x2011;scene</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#screen">&#x2011;screen</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#seed">&#x2011;seed</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#segment">&#x2011;segment</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#selective-blur">&#x2011;selective&#x2011;blur</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#separate">&#x2011;separate</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#sepia-tone">&#x2011;sepia&#x2011;tone</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#set">&#x2011;set</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#shade">&#x2011;shade</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#shadow">&#x2011;shadow</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#shared-memory">&#x2011;shared&#x2011;memory</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#sharpen">&#x2011;sharpen</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#shave">&#x2011;shave</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#shear">&#x2011;shear</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#sigmoidal-contrast">&#x2011;sigmoidal&#x2011;contrast</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#silent">&#x2011;silent</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#size">&#x2011;size</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#sketch">&#x2011;sketch</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#smush">&#x2011;smush</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#snaps">&#x2011;snaps</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#solarize">&#x2011;solarize</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#sparse-color">&#x2011;sparse&#x2011;color</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#splice">&#x2011;splice</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#spread">&#x2011;spread</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#statistic">&#x2011;statistic</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#stegano">&#x2011;stegano</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#stereo">&#x2011;stereo</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#stretch">&#x2011;stretch</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#strip">&#x2011;strip</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#stroke">&#x2011;stroke</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#strokewidth">&#x2011;strokewidth</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#style">&#x2011;style</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#subimage-search">&#x2011;subimage&#x2011;search</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#swap">&#x2011;swap</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#swirl">&#x2011;swirl</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#synchronize">&#x2011;synchronize</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#taint">&#x2011;taint</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#text-font">&#x2011;text&#x2011;font</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#texture">&#x2011;texture</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#threshold">&#x2011;threshold</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#thumbnail">&#x2011;thumbnail</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#tile">&#x2011;tile</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#tile-offset">&#x2011;tile&#x2011;offset</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#tint">&#x2011;tint</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#title">&#x2011;title</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#transform">&#x2011;transform</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#transparent">&#x2011;transparent</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#transparent-color">&#x2011;transparent&#x2011;color</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#transpose">&#x2011;transpose</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#transverse">&#x2011;transverse</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#treedepth">&#x2011;treedepth</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#trim">&#x2011;trim</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#type">&#x2011;type</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#undercolor">&#x2011;undercolor</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#unique-colors">&#x2011;unique&#x2011;colors</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#units">&#x2011;units</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#unsharp">&#x2011;unsharp</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#update">&#x2011;update</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#verbose">&#x2011;verbose</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#version">&#x2011;version</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#view">&#x2011;view</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#vignette">&#x2011;vignette</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#virtual-pixel">&#x2011;virtual&#x2011;pixel</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#visual">&#x2011;visual</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#watermark">&#x2011;watermark</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#wave">&#x2011;wave</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#weight">&#x2011;weight</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#white-point">&#x2011;white&#x2011;point</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#white-threshold">&#x2011;white&#x2011;threshold</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#window">&#x2011;window</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#window-group">&#x2011;window&#x2011;group</a> <span class='bull'>&nbsp;&bull; </span> <a href="command-line-options.html#write">&#x2011;write</a>  ] </p>
246
247 <div class="doc-section">
248
249 <p>Below is list of command-line options recognized by the ImageMagick <a
250 href="command-line-tools.html">command-line
251 tools</a>. If you want a description of a particular option, click on the
252 option name in the navigation bar above and you will go right to it. Unless
253 otherwise noted, each option is recognized by the commands <a href="convert.html">convert</a>, <a href="mogrify.html">mogrify</a>.</p>
254
255 <div style="margin: auto;">
256   <h4><a id="adaptive-blur"></a>-adaptive-blur <em class="arg">radius</em>[x<em class="arg">sigma</em>]</h4>
257 </div>
258
259 <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>
260
261 <p>A Gaussian operator of the given radius and standard deviation (<em
262 class="arg">sigma</em>) is used. If <em class="arg">sigma</em> is not given it
263 defaults to 1.</p>
264
265 <div style="margin: auto;">
266   <h4><a id="adaptive-resize"></a>-adaptive-resize <em class="arg">geometry</em></h4>
267 </div>
268
269 <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>
270
271 <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>
272 option defaults to data-dependent triangulation.  Use the <a
273 href="command-line-options.html#filter">-filter</a> to choose a different resampling algorithm.
274 Offsets, if present in the geometry string, are ignored, and the <a
275 href="command-line-options.html#gravity">-gravity</a> option has no effect.</p>
276
277 <div style="margin: auto;">
278   <h4><a id="adaptive-sharpen"></a>-adaptive-sharpen <em class="arg">radius</em>[x<em class="arg">sigma</em>]</h4>
279 </div>
280
281 <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>
282
283 <p>A Gaussian operator of the given radius and standard deviation (<em
284 class="arg">sigma</em>) is used. If <em class="arg">sigma</em> is not given it
285 defaults to 1.</p>
286
287 <div style="margin: auto;">
288   <h4><a id="adjoin"></a>-adjoin</h4>
289 </div>
290
291 <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>
292
293 <p>This option is enabled by default. An attempt is made to save all images of
294 an image sequence into the given output file.  However, some formats, such as
295 JPEG and PNG, do not support more than one image per file, and in that case
296 ImageMagick is forced to write each image as a separate file.  As such, if
297 more than one image needs to be written, the filename given is modified by
298 adding a <a href="command-line-options.html#scene">-scene</a> number before the suffix, in order to
299 make distinct names for each image. </p>
300
301 <p>Use <a href="command-line-options.html#adjoin">+adjoin</a> to force each image to be written to
302 separate files, whether or not the file format allows multiple images per file
303 (for example, GIF, MIFF, and TIFF). </p>
304
305 <p>Including a C-style integer format string in the output filename will
306 automagically enable <a href="command-line-options.html#adjoin">+adjoin</a> and are used to specify
307 where the <a href="command-line-options.html#scene">-scene</a> number is placed in the filenames. These
308 strings, such as '<kbd>%d</kbd>' or '<kbd>%03d</kbd>', are familiar to those
309 who have used the standard <kbd>printf()</kbd>' C-library function. As an
310 example, the command</p>
311
312 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert logo: rose: -morph 15 my%02dmorph.jpg</span></p>
313 <p>will create a sequence of 17 images (the two given plus 15 more created by
314 <a href="command-line-options.html#morph">-morph</a>), named: my00morph.jpg, my01morph.jpg,
315 my02morph.jpg, ..., my16morph.jpg.  </p>
316
317 <p>In summary, ImageMagick tries to write all images to one file, but will
318 save to multiple files, if any of the following conditions exist...
319 <ol>
320 <li>the output image's file format does not allow multi-image files,
321 <li>the <a href="command-line-options.html#adjoin">+adjoin</a> option is given, or
322 <li>a printf() integer format string (eg: "%d") is present in the output
323  filename.
324 </ol></p>
325
326
327 <div style="margin: auto;">
328   <h4><a id="affine"></a>-affine
329   <em class="arg">s<sub>x</sub></em>,<em class="arg">r<sub>x</sub></em>,<em
330   class="arg">r<sub>y</sub></em>,<em class="arg">s<sub>y</sub></em>[,<em
331   class="arg">t<sub>x</sub></em>,<em class="arg">t<sub>y</sub></em>]</h4>
332 </div>
333
334 <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>
335
336 <p>This option sets a transformation matrix, for use by subsequent <a
337 href="command-line-options.html#draw">-draw</a> or <a href="command-line-options.html#transform">-transform</a> options. </p>
338
339 <p>The matrix entries are entered as comma-separated numeric values either in
340 quotes or without spaces. </p>
341
342 <p>Internally, the transformation matrix has 3x3 elements, but three of them
343 are omitted from the input because they are constant. The new (transformed)
344 coordinates (<em class="arg">x'</em>, <em class="arg">y'</em>) of a pixel at
345 position (<em class="arg">x</em>, <em class="arg">y</em>) in the original
346 image are calculated using the following matrix equation.</p>
347
348 <div class="eqn">
349 <img alt="affine transformation"  src="../images/affine.png"/>
350 </div>
351
352 <p> The size of the resulting image is that of the smallest rectangle that
353 contains the transformed source image.  The parameters <em
354 class="arg">t<sub>x</sub></em> and <em class="arg">t<sub>y</sub></em>
355 subsequently shift the image pixels so that those that are moved out of the
356 image area are cut off.</p>
357
358 <p>The transformation matrix complies with the left-handed pixel coordinate
359 system: positive <em class="arg">x</em> and <em class="arg">y</em> directions
360 are rightward and downward, resp.; positive rotation is clockwise.</p>
361
362 <p> If the translation coefficients <em class="arg">t<sub>x</sub></em> and <em
363 class="arg">t<sub>y</sub></em> are omitted they default to 0,0. Therefore,
364 four parameters suffice for rotation and scaling without translation.</p>
365
366 <p>Scaling by the factors <em class="arg">s<sub>x</sub></em> and <em
367 class="arg">s<sub>y</sub></em> in the <em>x</em> and <em>y</em> directions,
368 respectively, is accomplished with the following.</p>
369
370 <p>See <a href="command-line-options.html#transform">-transform</a>, and the <a
371 href="command-line-options.html#distort">-distort</a> method '<kbd>Affineprojection</kbd> for more
372 information </p>
373
374
375 <p class="crtsnip"> -affine <em class="arg">s<sub>x</sub></em>,0,0,<em
376 class="arg">s<sub>y</sub></em> </p>
377
378 <p>Translation by a displacement (<em class="arg">t<sub>x</sub></em>, <em
379 class="arg">t<sub>y</sub></em>) is accomplished like so:</p>
380
381 <p class="crtsnip">
382   -affine 1,0,0,1,<em class="arg">t<sub>x</sub></em>,<em class="arg">t<sub>y</sub></em>
383 </p>
384
385 <p>Rotate clockwise about the origin (the upper left-hand corner) by an angle
386 <em>a</em> by letting <em>c</em> = cos(<em>a</em>), <em>s</em>
387 = sin(<em>a</em>), and using the following.</p>
388
389 <p class="crtsnip">
390   -affine <em>c</em>,<em>s</em>,-<em>s</em>,<em>c</em>
391 </p>
392
393 <p>The cumulative effect of a sequence of <a href="command-line-options.html#affine" >-affine</a>
394 transformations can be accomplished by instead by a single <a href="command-line-options.html#affine"
395 >-affine</a> operation using the matrix equal to the product of the matrices
396 of the individual transformations.</p>
397
398 <p>An attempt is made to detect near-singular transformation matrices. If the
399 matrix determinant has a sufficiently small absolute value it is rejected.</p>
400
401 <div style="margin: auto;">
402   <h4><a id="alpha"></a>-alpha <em class="arg">type</em></h4>
403 </div>
404
405 <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>
406
407 <p>Used to set a flag on an image indicating whether or not to use existing alpha
408 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>
409
410
411 <table class="doc">
412   <tbody>
413   <tr valign="top">
414     <th align="left" style="width: 8%">type</th>
415     <th align="left">Description</th>
416   </tr>
417
418   <tr valign="top">
419     <td valign="top"><kbd>Activate</kbd> or <kbd>On</kbd></td>
420     <td valign="top">
421        Enable the image's transparency channel. Note normally <kbd>Set</kbd>
422        should be used instead of this, unless you specifically need to
423        preserve existing (but specifically turned <kbd>Off</kbd>) transparency
424        channel. </td></tr>
425
426   <tr valign="top">
427     <td valign="top"><kbd>Deactivate</kbd> or <kbd>Off</kbd></td>
428     <td valign="top">
429        Disables the image's transparency channel. Does not delete or change the
430        existing data, just turns off the use of that data.</td></tr>
431
432   <tr valign="top">
433     <td valign="top"><kbd>Set</kbd></td>
434     <td valign="top">
435        Activates the alpha/matte channel. If it was previously turned off
436        then it also resets the channel to opaque.  If the image already had
437        the alpha channel turned on, it will have no effect.</td></tr>
438
439   <tr valign="top">
440     <td valign="top"><kbd>Opaque</kbd></td>
441     <td valign="top">
442        Enables the alpha/matte channel and forces it to be fully opaque.
443        </td></tr>
444
445   <tr valign="top">
446     <td valign="top"><kbd>Transparent</kbd></td>
447     <td valign="top">
448        Activates the alpha/matte channel and forces it to be fully
449        transparent. This effectively creates a fully transparent image the
450        same size as the original and with all its original RGB data still
451        intact, but fully transparent. </td></tr>
452
453   <tr valign="top">
454     <td valign="top"><kbd>Extract</kbd></td>
455     <td valign="top">
456        Copies the alpha channel values into all the color channels and turns
457        '<kbd>Off</kbd>' the the image's transparency, so as to generate
458        a gray-scale mask of the image's shape. The alpha channel data is left
459        intact just deactivated.  This is the inverse of '<kbd>Copy</kbd>'.
460        </td></tr>
461
462   <tr valign="top">
463     <td valign="top"><kbd>Copy</kbd></td>
464     <td valign="top">
465        Turns '<kbd>On</kbd>' the alpha/matte channel, then copies the
466        gray-scale intensity of the image, into the alpha channel, converting
467        a gray-scale mask into a transparent shaped mask ready to be colored
468        appropriately. The color channels are not modified.  </td></tr>
469
470   <tr valign="top">
471     <td valign="top"><kbd>Shape</kbd></td>
472     <td valign="top">
473        As per '<kbd>Copy</kbd>' but also colors the resulting shape mask with
474        the current background color.  That is the RGB color channels is
475        replaced, with appropriate alpha shape.
476        </td></tr>
477
478   <tr valign="top">
479     <td valign="top"><kbd>Remove</kbd></td>
480     <td valign="top">
481        Composite the image over the background color.
482        </td></tr>
483
484   <tr valign="top">
485     <td valign="top"><kbd>Background</kbd></td>
486     <td valign="top">
487        Set any fully-transparent pixel to the background color, while leaving
488        it fully-transparent.  This can make some image file formats, such as
489        PNG, smaller as the RGB values of transparent pixels are more uniform,
490        and thus can compress better.
491        </td></tr>
492   </tbody>
493 </table>
494
495 <p>Note that while the <a href="command-line-options.html#matte" >+matte</a> operation is the same as
496 "<kbd><a href="command-line-options.html#alpha" >-alpha</a> Off</kbd>", the <a href="command-line-options.html#matte"
497 >-matte</a> operation is the same as "<kbd><a href="command-line-options.html#alpha" >-alpha</a>
498 Set</kbd>" and not "<kbd><a href="command-line-options.html#alpha" >-alpha</a> On</kbd>".  </p>
499
500
501 <div style="margin: auto;">
502  <h4><a id="annotate"></a>
503  -annotate <em class="arg">degrees</em> <em class="arg">text</em><br />
504  -annotate <em class="arg">Xdegrees</em>x<em class="arg">Ydegrees</em> <em
505  class="arg">text</em><br /> -annotate <em class="arg">Xdegrees</em>x<em
506  class="arg">Ydegrees</em> {+-}<em class="arg">t<sub>x</sub></em>{+-}<em
507  class="arg">t<sub>y</sub></em> <em class="arg">text</em></h4>
508 </div>
509
510 <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>
511
512 <p>This is a convenience for annotating an image with text. For more precise
513 control over text annotations, use <a href="command-line-options.html#draw">-draw</a>.</p>
514
515
516 <p>The values <em class="arg">Xdegrees</em> and <em class="arg">Ydegrees</em>
517 control the shears with respect to the , respectively, applied to the text,
518 while <em class="arg">t<sub>x</sub></em> and <em
519 class="arg">t<sub>y</sub></em> are offsets that give the location of the text
520 relative to the upper left corner of the image.</p>
521
522 <p>Using <a href="command-line-options.html#annotate">-annotate</a>&nbsp;<em class="arg">degrees</em>
523 or <a href="command-line-options.html#annotate">-annotate</a>&nbsp;<em class="arg">degrees</em>x<em
524 class="arg">degrees</em> produces an unsheared rotation of the text. The
525 direction of the rotation is positive, which means a clockwise rotation if <em
526 class="arg">degrees</em> is positive. (This conforms to the usual mathematical
527 convention once it is realized that the positive <em>y</em>&ndash;direction is
528 conventionally considered to be <em>downward</em> for images.)</p>
529
530 <p>The new (transformed) coordinates (<em class="arg">x'</em>, <em
531 class="arg">y'</em>) of a pixel at position (<em class="arg">x</em>, <em
532 class="arg">y</em>) in the image are calculated using the following matrix
533 equation.</p> <div class="eqn"><img alt="annotate transformation"  src="../images/annotate.png"/></div>
534
535 <p>If <em class="arg">t<sub>x</sub></em> and <em
536 class="arg">t<sub>y</sub></em> are omitted, they default to 0. This makes the
537 bottom-left of the text becomes the upper-left corner of the image, which is
538 probably undesirable. Adding a <a href="command-line-options.html#gravity" >-gravity</a> option in this
539 case leads to nice results.</p>
540
541 <p>Text is any UTF-8 encoded character sequence.  If <em class="arg">text</em>
542 is of the form '@mytext.txt', the text is read from the file
543 <kbd>mytext.txt</kbd>.  Text  in a file is taken literally; no embedded
544 formatting characters are recognized.</p>
545
546 <div style="margin: auto;">
547   <h4><a id="antialias"></a>-antialias</h4>
548 </div>
549
550 <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
551 drawing fonts and lines.</td><td style='text-align:right;'></td></tr></table>
552
553 <p>By default, objects (e.g. text, lines, polygons, etc.) are antialiased when
554 drawn.  Use <a href="command-line-options.html#antialias">+antialias</a> to disable the addition of
555 antialiasing edge pixels.  This will then reduce the number of colors added to
556 an image to just the colors being directly drawn.  That is, no mixed colors
557 are added when drawing such objects. </p>
558
559 <div style="margin: auto;">
560   <h4><a id="append"></a>-append</h4>
561 </div>
562
563 <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>
564
565 <p>This option creates a single longer image image, by joining all the current
566 images in sequence top-to-bottom. Use <a href="command-line-options.html#append">+append</a> to
567 stack images left-to-right. </p>
568
569 <p>If they are not of the same width, narrower images are padded with the
570 current <a href="command-line-options.html#background">-background</a> color setting, and their
571 position relative to each other can be controlled by the current <a
572 href="command-line-options.html#gravity">-gravity</a> setting. </p>
573
574
575 <div style="margin: auto;">
576   <h4><a id="attenuate"></a>-attenuate <em class="arg">value</em></h4>
577 </div>
578
579 <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>
580
581 <p>If unset the value is equivelent to 1.0, or a maximum noise addition</p>
582
583 <div style="margin: auto;">
584   <h4><a id="authenticate"></a>-authenticate <em class="arg">password</em></h4>
585 </div>
586
587 <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>
588
589 <p>Use this option to supply a <em class="arg">password</em> for decrypting
590 a PDF that has been encrypted using Microsoft Crypto API (MSC API). The
591 encrypting using the MSC API is not supported.</p>
592
593 <p>For a different encryption method, see <a href="command-line-options.html#encipher">-encipher</a>
594 and <a href="command-line-options.html#decipher">-decipher</a>. </p>
595
596
597
598 <div style="margin: auto;">
599   <h4><a id="auto-gamma"></a>-auto-gamma</h4>
600 </div>
601
602 <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>
603
604 <p>This calculates the mean values of an image, then applies a calculated  <a
605 href="command-line-options.html#gamma" >-gamma</a> adjustment so that is the mean color exists in the
606 image it will get a have a value of 50%. </p>
607
608 <p>This means that any solid 'gray' image becomes 50% gray. </p>
609
610 <p>This works well for real-life images with little or no extreme dark and
611 light areas, but tend to fail for images with large amounts of bright sky or
612 dark shadows. It also does not work well for diagrams or cartoon like images.
613 </p>
614
615 <p>It uses the <a href="command-line-options.html#channel" >-channel</a> setting, (including the
616 '<em>sync</em>' flag for channel synchronization), to determine which color
617 values is used and modified. As the default <a href="command-line-options.html#channel"
618 >-channel</a> setting is '<em>RGB,sync</em>', channels are modified
619 together by the same gamma value, preserving colors. </p>
620
621
622
623 <div style="margin: auto;">
624   <h4><a id="auto-level"></a>-auto-level</h4>
625 </div>
626
627 <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>
628
629 <p>This is a 'perfect' image normalization operator.  It finds the exact
630 minimum and maximum color values in the image and then applies a <a
631 href="command-line-options.html#level" >-level</a> operator to stretch the values to the full range of
632 values. </p>
633
634 <p>The operator is not typically used for real-life images, image scans, or
635 JPEG format images, as a single 'out-rider' pixel can set a bad min/max values
636 for the <a href="command-line-options.html#level" >-level</a> operation.  On the other hand it is the
637 right operator to use for color stretching gradient images being used to
638 generate Color lookup tables, distortion maps, or other 'mathematically'
639 defined images.  </p>
640
641 <p>The operator is very similar to the <a href="command-line-options.html#normalize">-normalize</a>, <a
642 href="command-line-options.html#contrast-stretch" >-contrast-stretch</a>, and <a href="command-line-options.html#linear-stretch"
643 >-linear-stretch</a> operators, but without 'histogram binning' or 'clipping'
644 problems that these operators may have. That is <a href="command-line-options.html#auto-level"
645 >-auto-level</a> is the perfect or ideal version these operators. </p>
646
647 <p>It uses the <a href="command-line-options.html#channel" >-channel</a> setting, (including the
648 special '<em>sync</em>' flag for channel synchronization), to determine
649 which color values are used and modified. As the default <a
650 href="command-line-options.html#channel" >+channel</a> setting is '<em>RGB,sync</em>', the
651 '<em>sync</em>' ensures that the color channels will are modified
652 together by the same gamma value, preserving colors, and ignoring
653 transparency. </p>
654
655
656 <div style="margin: auto;">
657   <h4><a id="auto-orient"></a>-auto-orient</h4>
658 </div>
659
660 <table style='background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%'><tr><td style='width:75%'>Automagically orient (rotate) an image created by a digital camera.</td><td style='text-align:right;'></td></tr></table>
661
662 <p>This operator reads and resets the EXIF image profile setting 'Orientation'
663 and then performs the appropriate 90 degree rotation on the image to orient
664 the image, for correct viewing. </p>
665
666 <p>This EXIF profile setting is usually set using a gravity sensor in digital
667 camera, however photos taken directly downward or upward may not have an
668 appropriate value.  Also images that have been orientation 'corrected' without
669 reseting this setting, may be 'corrected' again resulting in a incorrect
670 result.  If the EXIF profile was previously stripped, the  <a
671 href="command-line-options.html#auto-orient" >-auto-orient</a> operator will do nothing. </p>
672
673
674 <div style="margin: auto;">
675   <h4><a id="average"></a>-average</h4>
676 </div>
677
678 <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>
679
680 <p>An error results if the images are not identically sized.</p>
681
682
683 <div style="margin: auto;">
684   <h4><a id="backdrop"></a>-backdrop</h4>
685 </div>
686
687 <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>
688
689 <p>This backdrop covers the entire workstation screen and is useful for hiding
690 other X window activity while viewing the image. The color of the backdrop is
691 specified as the background color. The color is specified using the format
692 described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
693
694 <div style="margin: auto;">
695   <h4><a id="background"></a>-background <em class="arg">color</em></h4>
696 </div>
697
698 <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>
699
700 <p>The color is specified using the format described under the <a
701 href="command-line-options.html#fill">-fill</a> option. The default background color (if none is
702 specified or found in the image) is white.</p>
703
704 <div style="margin: auto;">
705   <h4><a id="bench"></a>-bench <em class="arg">iterations</em></h4>
706 </div>
707
708 <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>
709
710 <p>Repeat the entire command for the given number of <em class="arg"
711 >iterations</em> and report the user-time and elapsed time. For instance,
712 consider the following command and its output.  Modify the benchmark with the
713 -duration to run the benchmark for a fixed number of seconds and -concurrent
714 to run the benchmark in parallel (requires the OpenMP feature).</p>
715
716 <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>
717 <p>In this example, 5 iterations were completed at 0.875657 iterations per
718 second, using 4 threads and 6.88 seconds of the user's allotted time, for
719 a total elapsed time of 5.71 seconds.</p>
720
721 <div style="margin: auto;">
722   <h4><a id="bias"></a>-bias <em class="arg">value</em>{<em class="arg">%</em>}</h4>
723 </div>
724
725 <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>
726
727 <p>This option shifts the output of <a href="command-line-options.html#convolve">&#x2011;convolve</a>  so that
728 positive and negative results are relative to the specified bias value. </p>
729
730 <p>This is important for non-HDRI compilations of ImageMagick when dealing
731 with convolutions that contain negative as well as positive values. This is
732 especially the case with convolutions involving high pass filters or edge
733 detection. Without an output bias, the negative values are clipped at
734 zero.</p>
735
736 <p>When using an ImageMagick with the HDRI compile-time setting, <a href="command-line-options.html#bias">&#x2011;bias</a> is not needed, as ImageMagick is able to store/handle any
737 negative results without clipping to the color value range
738 (0..QuantumRange).</p>
739
740 <p>See the discussion on HDRI implementations of ImageMagick on the page <a
741 href="high-dynamic-range.html" >High Dynamic-Range Images</a>. For more
742 about HDRI go the ImageMagick <a
743 href="http://www.imagemagick.org/Usage/basics/#hdri" >Usage</a> pages or this
744 <a
745 href="http://en.wikipedia.org/wiki/High_dynamic_range_imaging">Wikipedia</a>
746 entry.  </p>
747
748 <div style="margin: auto;">
749   <h4><a id="black-point-compensation"></a>-black-point-compensation</h4>
750 </div>
751
752 <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>
753
754 <div style="margin: auto;">
755   <h4><a id="black-threshold"></a>-black-threshold <em class="arg">value</em>{<em class="arg">%</em>}</h4>
756 </div>
757
758 <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>
759
760 <p> The threshold value can be given as a percentage or as an absolute integer
761 value within [0,&nbsp;<em class="QR">QuantumRange</em>] corresponding to the
762 desired <a href="command-line-options.html#channel">&#x2011;channel</a> value. See <a href="command-line-options.html#threshold">&#x2011;threshold</a>for more details on thresholds and resulting values.  </p>
763
764
765 <div style="margin: auto;">
766   <h4><a id="blend"></a>-blend <em class="arg">geometry</em></h4>
767 </div>
768
769 <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>
770
771 <p>Blend will average the images together ('plus') according to the
772 percentages given and each pixels transparency.  If only a single percentage
773 value is given it sets the weight of the composite or 'source' image, while
774 the background image is weighted by the exact opposite amount. That is a
775 <kbd>-blend 30%</kbd> merges 30% of the 'source' image with 70% of the
776 'destination' image.  Thus it is equivalent to <kbd>-blend 30x70%</kbd>.</p>
777
778
779 <div style="margin: auto;">
780   <h4><a id="blue-primary"></a>-blue-primary <em class="arg">x</em>,<em class="arg">y</em></h4>
781 </div>
782
783 <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>
784
785 <div style="margin: auto;">
786   <h4><a id="blue-shift"></a>-blue-shift <em class="arg">factor</em></h4>
787 </div>
788
789 <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>
790
791 <div style="margin: auto;">
792
793 <div style="margin: auto;">
794   <h4><a id="blur"></a>-blur <em class="arg">radius</em><br />-blur <em class="arg">radius</em>x<em class="arg">sigma</em></h4>
795 </div>
796
797 <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>
798
799 <p>Convolve the image with a Gaussian or normal distribution using the given
800 <em class="arg" >Sigma</em> value.  The formula is:</p>
801
802 <div class="eqn"><img alt="gaussian distribution" width="243px" height="42px" src="../images/gaussian-blur.png"/>
803 </div>
804
805 <p>The <em class="arg" >Sigma</em> value is the important argument, and
806 determines the actual amount of blurring that will take place. </p>
807
808 <p>The <em class="arg" >Radius</em> is only used to determine the size of the
809 array which will hold the calculated Gaussian distribution. It should be an
810 integer.  If not given, or set to zero, IM will calculate the largest possible
811 radius that will provide meaningful results for the Gaussian distribution.
812 </p>
813
814 <p>The larger the <em class="arg" >Radius</em> the slower the
815 operation is. However too small a <em class="arg" >Radius</em>, and sever
816 aliasing effects may result.  As a guideline, <em class="arg" >Radius</em>
817 should be at least twice the <em class="arg" >Sigma</em> value, though three
818 times will produce a more accurate result. </p>
819
820 <p>This option differs from <a href="command-line-options.html#gaussian-blur">-gaussian-blur</a> simply
821 by taking advantage of the separability properties of the distribution.  Here
822 we apply a single-dimensional Gaussian matrix in the horizontal direction,
823 then repeat the process in the vertical direction.</p>
824
825 <p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
826 pixels which are outside the image proper are blurred into the final result.
827 </p>
828
829
830 <div style="margin: auto;">
831   <h4>-blur <em class="arg">Width</em>[x<em class="arg">Height</em>[+<em class="arg">Angle</em>]]</h4>
832 </div>
833
834 <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>
835
836 <p>Each pixel in the overlaid region is replaced with an Elliptical Weighted
837 Average (EWA) of the source image, scaled according to the grayscale
838 mapping. </p>
839
840 <p>The ellipse is weighted with sigma set to the given <em class="arg"
841 >Width</em> and <em class="arg" >Height</em>. The <em class="arg" >Height</em>
842 defaults to the <em class="arg" >Width</em> for a normal circular Gaussian
843 weighting.  The <em class="arg" >Angle</em> will rotate the ellipse from
844 horizontal clock-wise.  </p>
845
846 <p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
847 pixels which are outside the image proper are blurred into the final result.
848 </p>
849
850
851 <div style="margin: auto;">
852   <h4><a id="border"></a>-border <em class="arg">geometry</em></h4>
853 </div>
854
855 <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>
856
857 <p>Set the width and height using the <em class="arg">size</em> portion of the
858 <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
859 ignored. </p>
860
861 <p>Set the border color by preceding with the <a
862 href="command-line-options.html#bordercolor">-bordercolor</a> setting.</p>
863
864 <p>The <a href="command-line-options.html#border">-border</a> operation is affected by the current <a
865 href="command-line-options.html#compose">-compose</a> setting and assumes that this is using the default
866 '<kbd>Over</kbd>' composition method.  It generates a image of the appropriate
867 size colors by the current <a href="command-line-options.html#bordercolor">-bordercolor</a> before
868 overlaying the original image in the center of this net image.  This means that
869 with the default compose method of '<kbd>Over</kbd>' any transparent parts may
870 be replaced by the current <a href="command-line-options.html#bordercolor">-bordercolor</a> setting.</p>
871 <p>See also the <a href="command-line-options.html#frame">-frame</a> option, which has more
872 functionality.</p>
873
874 <div style="margin: auto;">
875   <h4><a id="bordercolor"></a>-bordercolor <em class="arg">color</em></h4>
876 </div>
877
878 <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>
879
880 <p>The color is specified using the format described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
881
882 <p>The default border color is <kbd>#DFDFDF</kbd>, <span style="background-color: #dfdfdf;">this shade of gray</span>.</p>
883
884 <div style="margin: auto;">
885   <h4><a id="borderwidth"></a>-borderwidth <em class="arg">geometry</em> </h4>
886 </div>
887
888 <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>
889
890 <div style="margin: auto;">
891   <h4><a id="brightness-contrast"></a>-brightness-contrast <em class="arg">brightness</em><br />-brightness-contrast <em class="arg">brightness</em>{x<em class="arg">contrast</em>}{<em class="arg">%</em>}}</h4>
892 </div>
893
894 <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>
895
896 <p>Brightness and Contrast values apply changes to the input image. They are
897 not absolute settings. A brightness or contrast value of zero means no change.
898 The range of values is -100 to +100 on each. Positive values increase the
899 brightness or contrast and negative values decrease the brightness or contrast.
900 To control only contrast, set the brightness=0. To control only brightness,
901 set contrast=0 or just leave it off.</p>
902
903 <p>You may also use <a href="command-line-options.html#fill">-channel</a> to control which channels to
904 apply the brightness and/or contrast change. The default is to apply the same
905 transformation to all channels.</p>
906
907 <p>Brightness and Contrast arguments are converted to offset and slope of a
908 linear transform and applied
909 using <a href="command-line-options.html#fill">-function polynomial "slope,offset"</a>.</p>
910
911 <p>The slope varies from 0 at contrast=-100 to almost vertical at
912 contrast=+100. For brightness=0 and contrast=-100, the result are totally
913 midgray. For brightness=0 and contrast=+100, the result will approach but
914 not quite reach a threshold at midgray; that is the linear transformation
915 is a very steep vertical line at mid gray.</p>
916
917 <p>Negative slopes, i.e. negating the image, are not possible with this
918 function. All achievable slopes are zero or positive.</p>
919
920 <p>The offset varies from -0.5 at brightness=-100 to 0 at brightness=0 to +0.5
921 at brightness=+100. Thus, when contrast=0 and brightness=100, the result is
922 totally white. Similarly, when contrast=0 and brightness=-100, the result is
923 totally black.</p>
924
925 <p>As the range of values for the arguments are -100 to +100, adding the '%'
926 symbol is no different than leaving it off.</p>
927
928 <div style="margin: auto;">
929   <h4><a id="cache"></a>-cache <em class="arg">threshold</em></h4>
930 </div>
931
932 <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>
933
934 <div style="margin: auto;">
935   <h4><a id="caption"></a>-caption <em class="arg">string</em></h4>
936 </div>
937
938 <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>
939
940 <p>This option sets the caption meta-data of an image read in after this
941 option has been given.  To modify a caption of images already in memory use
942 "<kbd><a href="command-line-options.html#set">-set</a> caption</kbd>". </p>
943
944 <p>The caption can contain special format characters listed in the <a
945 href="escape.html">Format and
946 Print Image Properties</a>. These attributes are expanded when the caption
947 is finally assigned to the individual images. </p>
948
949 <p>If the first character of <em class="arg">string</em> is <em
950 class="arg">@</em>, the image caption is read from a file titled by the
951 remaining characters in the string.  Comments read in from a file are literal;
952 no embedded formatting characters are recognized.</p>
953
954 <p>Caption meta-data is not visible on the image itself. To do that use the
955 <a href="command-line-options.html#annotate">-annotate</a> or <a href="command-line-options.html#draw">-draw</a> options
956 instead.</p>
957
958 <p>For example,</p>
959
960 <p class="crtsnip">
961      -caption "%m:%f %wx%h"  bird.miff
962 </p>
963
964 <p>produces an image caption of <kbd>MIFF:bird.miff 512x480</kbd> (assuming
965 that the image <kbd>bird.miff</kbd> has a width of 512 and a height of
966 480.</p>
967
968
969 <div style="margin: auto;">
970   <h4><a id="cdl"></a>-cdl <em class="arg">filename</em></h4>
971 </div>
972
973 <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>
974
975 <p>Here is an example color correction collection:</p>
976
977 <pre class="text">
978 &lt;?xml version="1.0" encoding="UTF-8"?&gt;
979 &lt;ColorCorrectionCollection xmlns="urn:ASC:CDL:v1.2"&gt;
980   &lt;ColorCorrection id="cc06668"&gt;
981     &lt;SOPNode&gt;
982       &lt;Slope&gt; 0.9 1.2 0.5 &lt;/Slope&gt;
983       &lt;Offset&gt; 0.4 -0.5 0.6 &lt;/Offset&gt;
984       &lt;Power&gt; 1.0 0.8 1.5 &lt;/Power&gt;
985     &lt;/SOPNode&gt;
986     &lt;SATNode&gt;
987       &lt;Saturation&gt; 0.85 &lt;/Saturation&gt;
988     &lt;/SATNode&gt;
989   &lt;/ColorCorrection&gt;
990 &lt;/ColorCorrectionCollection&gt;
991 </pre>
992
993 <div style="margin: auto;">
994   <h4><a id="channel"></a>-channel <em class="arg">type</em></h4>
995 </div>
996
997 <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>
998
999 <p>Choose from: <kbd>Red</kbd>, <kbd>Green</kbd>, <kbd>Blue</kbd>,
1000 <kbd>Alpha</kbd>, <kbd>Cyan</kbd>, <kbd>Magenta</kbd>, <kbd>Yellow</kbd>,
1001 <kbd>Black</kbd>, <kbd>Opacity</kbd>, <kbd>Index</kbd>, <kbd>RGB</kbd>,
1002 <kbd>RGBA</kbd>, <kbd>CMYK</kbd>, or <kbd>CMYKA</kbd>.</p>
1003
1004 <p>The channels above can also be specified as a comma-separated list or can be
1005 abbreviated as a concatenation of the letters '<kbd>R</kbd>', '<kbd>G</kbd>',
1006 '<kbd>B</kbd>', '<kbd>A</kbd>', '<kbd>O</kbd>', '<kbd>C</kbd>',
1007 '<kbd>M</kbd>', '<kbd>Y</kbd>', '<kbd>K</kbd>'.
1008
1009 For example, to only select the <kbd>Red</kbd> and <kbd>Blue</kbd> channels
1010 you can either use </p>
1011 <p class="crtsnip">
1012     -channel Red,Blue
1013 </p>
1014 <p>or you can use the short hand form</p>
1015 <p class="crtsnip">
1016     -channel RB
1017 </p>
1018
1019 <p>All the channels that are present in an image can be specified using the
1020 special channel type <kbd>All</kbd>. Not all operators are 'channel capable',
1021 but generally any operators that are generally 'grey-scale' image operators,
1022 will understand this setting.  See individual operator documentation. </p>
1023
1024 <br />
1025
1026 <p>On top of the normal channel selection an extra flag can be specified,
1027 '<kbd>Sync</kbd>'.  This is turned on by default and if set means that
1028 operators that understand this flag should perform: cross-channel
1029 synchronization of the channels. If not specified, then most grey-scale
1030 operators will apply their image processing operations to each individual
1031 channel (as specified by the rest of the <a href="command-line-options.html#channel">-channel</a>
1032 setting) completely independently from each other. </p>
1033
1034 <p>For example for operators such as <a href="command-line-options.html#auto-level">-auto-level</a> and
1035 <a href="command-line-options.html#auto-gamma">-auto-gamma</a> the color channels are modified
1036 together in exactly the same way so that colors will remain in-sync. Without
1037 it being set, then each channel is modified separately and
1038 independently, which may produce color distortion. </p>
1039
1040 <p>The <a href="command-line-options.html#morphology">-morphology</a> '<kbd>Convolve</kbd>' method
1041 and the <a href="command-line-options.html#compose">-compose</a> mathematical methods, also understands
1042 the '<kbd>Sync</kbd>' flag to modify the behaviour of pixel colors according
1043 to the alpha channel (if present). That is to say it will modify the image
1044 processing with the understanding that fully-transparent colors should not
1045 contribute to the final result. </p>
1046
1047 <p>Basically, by default, operators work with color channels in synchronous, and
1048 treats transparency as special, unless the <a href="command-line-options.html#channel">-channel</a>
1049 setting is modified so as to remove the effect of the '<kbd>Sync</kbd>' flag.
1050 How each operator does this depends on that operators current implementation.
1051 Not all operators understands this flag at this time, but that is changing.
1052 </p>
1053
1054 <p>To print a complete list of channel types, use <a href="command-line-options.html#list">-list
1055 channel</a>.</p>
1056
1057 <br />
1058
1059 <p>By default, ImageMagick sets <a href="command-line-options.html#channel">-channel</a> to the value
1060 '<kbd>RGBK,sync</kbd>', which specifies that operators act on all color
1061 channels except the transparency channel, and that all the color channels are
1062 to be modified in exactly the same way, with an understanding of transparency
1063 (depending on the operation being applied).  The 'plus' form <a
1064 href="command-line-options.html#channel" >+channel</a> will reset the value back to this default. </p>
1065
1066 <p>Options that are affected by the <a href="command-line-options.html#channel" >-channel</a> setting
1067 include the following.
1068
1069 <a href="command-line-options.html#auto-gamma">-auto-gamma</a>,
1070 <a href="command-line-options.html#auto-level">-auto-level</a>,
1071 <a href="command-line-options.html#black-threshold">-black-threshold</a>,
1072 <a href="command-line-options.html#blur">-blur</a>,
1073 <a href="command-line-options.html#clamp">-clamp</a>,
1074 <a href="command-line-options.html#clut">-clut</a>,
1075 <a href="command-line-options.html#combine">-combine</a>,
1076 <a href="command-line-options.html#composite">-composite</a> (Mathematical compose methods only),
1077 <a href="command-line-options.html#convolve">-convolve</a>,
1078 <a href="command-line-options.html#contrast-stretch">-contrast-stretch</a>,
1079 <a href="command-line-options.html#evaluate">-evaluate</a>,
1080 <a href="command-line-options.html#function">-function</a>,
1081 <a href="command-line-options.html#fx">-fx</a>,
1082 <a href="command-line-options.html#gaussian-blur">-gaussian-blur</a>,
1083 <a href="command-line-options.html#hald-clut">-hald-clut</a>,
1084 <a href="command-line-options.html#motion-blur">-motion-blur</a>,
1085 <a href="command-line-options.html#morphology">-morphology</a>,
1086 <a href="command-line-options.html#negate">-negate</a>,
1087 <a href="command-line-options.html#normalize">-normalize</a>,
1088 <a href="command-line-options.html#ordered-dither">-ordered-dither</a>,
1089 <a href="command-line-options.html#radial-blur">-radial-blur</a>,
1090 <a href="command-line-options.html#random-threshold">-random-threshold</a>,
1091 <a href="command-line-options.html#separate">-separate</a>,
1092 <a href="command-line-options.html#threshold">-threshold</a>, and
1093 <a href="command-line-options.html#white-threshold">-white-threshold</a>.
1094 </p>
1095
1096 <p>Warning, some operators behave differently when the <a href="command-line-options.html#channel"
1097 >+channel</a> default setting is in effect, verses ANY user defined <a
1098 href="command-line-options.html#channel" >-channel</a> setting (including the equivalent of the
1099 default). These operators have yet to be made to understand the newer 'Sync'
1100 flag. </p>
1101
1102 <p>For example <a href="command-line-options.html#threshold">-threshold</a> will by default gray-scale
1103 the image before thresholding, if no <a href="command-line-options.html#channel" >-channel</a> setting
1104 has been defined. This is not 'Sync flag controlled, yet. </p>
1105
1106 <p>Also some operators such as <a href="command-line-options.html#blur">-blur</a>, <a
1107 href="command-line-options.html#gaussian-blur">-gaussian-blur</a>, will modify their handling of the
1108 color channels if the '<kbd>alpha</kbd>' channel is also enabled by <a
1109 href="command-line-options.html#channel" >-channel</a>.  Generally this done to ensure that
1110 fully-transparent colors are treated as being fully-transparent, and thus any
1111 underlying 'hidden' color has no effect on the final results.  Typically
1112 resulting in 'halo' effects. The newer <a href="command-line-options.html#morphology">-morphology</a>
1113 convolution equivalents however does have a understanding of the 'Sync' flag
1114 and will thus handle transparency correctly by default. </p>
1115
1116 <p>As a alpha channel is optional within images, some operators will read the
1117 color channels of an image as a greyscale alpha mask, when the image has no
1118 alpha channel present, and the <a href="command-line-options.html#channel" >-channel</a> setting tells
1119 the operator to apply the operation using alpha channels. The <a
1120 href="command-line-options.html#clut">-clut</a> operator is a good example of this. </p>
1121
1122
1123
1124 <div style="margin: auto;">
1125   <h4><a id="charcoal"></a>-charcoal <em class="arg">factor</em></h4>
1126 </div>
1127
1128 <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>
1129
1130 <div style="margin: auto;">
1131   <h4><a id="chop"></a>-chop <em class="arg">geometry</em></h4>
1132 </div>
1133
1134 <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>
1135
1136 <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>
1137 and <em class="arg">height</em> given in the of the <em class="arg">size</em>
1138 portion of the <em class="arg">geometry</em> argument give the number of
1139 columns and rows to remove. The <em class="arg">offset</em> portion of
1140 the <em class="arg">geometry</em> argument is influenced by
1141 a <a href="command-line-options.html#gravity">-gravity</a> setting, if present.</p>
1142
1143 <p>The <a href="command-line-options.html#chop">-chop</a> option removes entire rows and columns,
1144 and moves the remaining corner blocks leftward and upward to close the gaps.</p>
1145
1146 <p>While it can remove internal rows and columns of pixels, it is more
1147 typically used with as <a href="command-line-options.html#gravity">-gravity</a> setting and zero
1148 offsets so as to remove a single edge from an image.  Compare this to <a
1149 href="command-line-options.html#shave" >-shave</a> which removes equal numbers of pixels from oppisite
1150 sides of the image.  </p>
1151
1152 <p>Using <a href="command-line-options.html#chop">-chop</a> effectively undoes the results of a <a
1153 href="command-line-options.html#splice">-splice</a> that was given the same <em
1154 class="arg">geometry</em> and <a href="command-line-options.html#gravity">-gravity</a> settings. </p>
1155
1156 <div style="margin: auto;">
1157   <h4><a id="clamp"></a>-clamp</h4>
1158 </div>
1159
1160 <table style='background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%'><tr><td style='width:75%'>Restrict image colors from 0 to the quantum depth.</td><td style='text-align:right;'></td></tr></table>
1161
1162
1163 <div style="margin: auto;">
1164   <h4><a id="clip"></a>-clip</h4>
1165 </div>
1166
1167 <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>
1168
1169 <p>If a clipping path is present, it is applied to subsequent operations.</p>
1170
1171 <p>For example, in the command</p>
1172
1173 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert -clip -negate cockatoo.tif negated.tif</span></p>
1174 <p>only the pixels within the clipping path are negated.</p>
1175
1176 <p>The <a href="command-line-options.html#clip">-clip</a> feature requires the XML library. If the XML
1177 library is not present, the option is ignored.</p>
1178
1179 <div style="margin: auto;">
1180   <h4><a id="clip-mask"></a>-clip-mask</h4>
1181 </div>
1182
1183 <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>
1184
1185 <p>Use the given image as a 'do-not-modify' mask of the current images in the
1186 current image sequence.  Assuming the clipmask is a greyscale image the same
1187 size at the one already in memory, any areas that is white will not be
1188 modified by any of the 'image processing operators' that follow, until the
1189 mask is removed. Pixels in the black areas of the clip mask will be modified
1190 as normal. </p>
1191
1192 <p>In some ways this is similar to (though not the same) as defining
1193 a rectangular <a href="command-line-options.html#region" >-region</a>, or using the negative of the
1194 mask (thrid) image in a three image <a href="command-line-options.html#composite" >-composite</a>,
1195 operation. </p>
1196
1197
1198 <div style="margin: auto;">
1199   <h4><a id="clip-path"></a>-clip-path <em class="arg">id</em></h4>
1200 </div>
1201
1202 <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>
1203
1204 <p>This is almost identical to <a href="command-line-options.html#clip">-clip</a>. </p>
1205
1206
1207 <div style="margin: auto;">
1208   <h4><a id="clone"></a>-clone <em class="arg">index(s)</em></h4>
1209 </div>
1210
1211 <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>
1212
1213 <p>Inside parenthesis (where the operator is normally used) it will make a
1214 clone of the images from the last 'pushed' image sequence, and adds them to
1215 the end of the current image sequence. Outside parenthesis
1216 (not recommended) it clones the images from the current image sequence. </p>
1217
1218 <p>Specify the image by its index in the sequence.  The first image is index
1219 0.  Negative indexes are relative to the end of the sequence; for
1220 example, <kbd>&minus;1</kbd>
1221 represents the last image of the sequence.  Specify a range of images with a
1222 dash (e.g. <kbd>0&minus;4</kbd>).  Separate multiple indexes with commas but no
1223 spaces (e.g. <kbd>0,2,5</kbd>).  A value of '<kbd>0&minus;&minus;1</kbd> will
1224 effectively clone all the images. </p>
1225
1226 <p>The <a href="command-line-options.html#clone">+clone</a> will simply make a copy of the last image
1227 in the image sequence, and is thus equivalent to using a argument of
1228 '<kbd>&minus;1</kbd>'. </p>
1229
1230 <div style="margin: auto;">
1231   <h4><a id="clut"></a>-clut</h4>
1232 </div>
1233
1234 <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
1235 corresponding channel in the second image as a <b>c</b>olor
1236 <b>l</b>ook<b>u</b>p <b>t</b>able.</td><td style='text-align:right;'></td></tr></table>
1237
1238 <p>The second (LUT) image is ordinarily a gradient image containing the
1239 histogram mapping of how each channel should be modified. Typically it is a
1240 either a single row or column image of replacement color values. If larger
1241 than a single row or column, values are taken from a diagonal line from
1242 top-left to bottom-right corners.</p>
1243
1244 <p>The lookup is further controlled by the <a
1245 href="command-line-options.html#interpolate">-interpolate</a> setting, which is especially handy for an
1246 LUT which is not the full length needed by the ImageMagick installed Quality
1247 (Q) level. Good settings for this are the '<kbd>bilinear</kbd>' and
1248 '<kbd>bicubic</kbd>' interpolation settings, which give smooth color
1249 gradients, and the '<kbd>integer</kbd>' setting for a direct, unsmoothed
1250 lookup of color values. </p>
1251
1252 <p>This operator is especially suited to replacing a grayscale image with a
1253 specific color gradient from the CLUT image. </p>
1254
1255 <p>Only the channel values defined by the <a href="command-line-options.html#channel">-channel</a>
1256 setting will have their values replaced. In particular, since the default <a
1257 href="command-line-options.html#channel">-channel</a> setting is <kbd>RGB</kbd>, this means that
1258 transparency (alpha/matte channel) is not affected, unless the <a
1259 href="command-line-options.html#channel">-channel</a> setting is modified. When the alpha channel is
1260 set, it is treated by the <a href="command-line-options.html#clut" >-clut</a> operator in the same way
1261 as the other channels, implying that alpha/matte values are replaced using the
1262 alpha/matte values of the original image. </p>
1263
1264 <p>If either the image being modified, or the lookup image, contains no
1265 transparency (i.e. <a href="command-line-options.html#alpha" >-alpha</a> is turned 'off') but the <a
1266 href="command-line-options.html#channel">-channel</a> setting includes alpha replacement, then it is
1267 assumed that image represents a gray-scale gradient which is used for the
1268 replacement alpha values.  That is you can use a gray-scale CLUT image to
1269 adjust a existing images alpha channel, or you can color a gray-scale image
1270 using colors form CLUT containing the desired colors, including transparency.
1271 </p>
1272
1273 <p>See also <a href="command-line-options.html#hald-clut" >-hald-clut</a> which replaces colors
1274 according to the lookup of the full color RGB value from a 2D representation
1275 of a 3D color cube. </p>
1276
1277
1278 <div style="margin: auto;">
1279   <h4><a id="coalesce"></a>-coalesce</h4>
1280 </div>
1281
1282 <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>
1283
1284 <p>Overlay each image in an image sequence according to
1285 its <a href="command-line-options.html#dispose">-dispose</a> meta-data, to reproduce the look of
1286 an animation at each point in the animation sequence. All images should be
1287 the same size, and are assigned appropriate GIF disposal settings for the
1288 animation to continue working as expected as a GIF animation.  Such frames
1289 are more easily viewed and processed than the highly optimized GIF overlay
1290 images.  </p>
1291
1292 <p>The animation can be re-optimized after processing using
1293 the <a href="command-line-options.html#layers">-layers</a> method '<kbd>optimize</kbd>', although
1294 there is no guarantee that the restored GIF animation optimization is
1295 better than the original. </p>
1296
1297
1298 <div style="margin: auto;">
1299   <h4><a id="colorize"></a>-colorize <em class="arg">value</em></h4>
1300 </div>
1301
1302 <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>
1303
1304 <p>Specify the amount of colorization as a percentage. Separate colorization
1305 values can be applied to the red, green, and blue channels of the image with
1306 a comma-delimited list of colorization
1307 values (e.g., <kbd>-colorize 0,0,50</kbd>).</p>
1308
1309 <div style="margin: auto;">
1310   <h4><a id="colormap"></a>-colormap <em class="arg">type</em></h4>
1311 </div>
1312
1313 <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>
1314
1315 <p>The <em class="arg">type</em> can be  <kbd>shared</kbd> or <kbd>private</kbd>.</p>
1316
1317 <p>This option only applies when the default X server visual
1318 is <kbd>PseudoColor</kbd> or <kbd>GrayScale</kbd>. Refer
1319 to <a href="command-line-options.html#visual">-visual</a> for more details. By default,
1320 a shared colormap is allocated. The image shares colors with
1321 other X clients. Some image colors could be approximated,
1322 therefore your image may look very different than intended.
1323 If <kbd>private</kbd> is chosen, the image colors appear exactly
1324 as they are defined. However, other clients may go <em>technicolor</em>
1325 when the image colormap is installed.</p>
1326
1327 <div style="margin: auto;">
1328   <h4><a id="colors"></a>-colors <em class="arg">value</em></h4>
1329 </div>
1330
1331 <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>
1332
1333 <p>The actual number of colors in the image may be less than your request,
1334 but never more. Note that this a color reduction option. Images with fewer
1335 unique colors than specified by <em class="arg">value</em> will have any
1336 duplicate or unused colors removed.  The ordering of an existing color
1337 palette may be altered. When converting an image from color to grayscale,
1338 it is more efficient to convert the image to the gray colorspace before
1339 reducing the number of colors. Refer to
1340 the <a href="quantize.html">
1341 color reduction algorithm</a> for more details.</p>
1342
1343 <div style="margin: auto;">
1344   <h4><a id="color-matrix"></a>-color-matrix <em class="arg">matrix</em></h4>
1345 </div>
1346
1347 <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>
1348
1349 <p>This option permits saturation changes, hue rotation, luminance to alpha,
1350 and various other effects.  Although variable-sized transformation matrices
1351 can be used, typically one uses a 5x5 matrix for an RGBA image and a 6x6
1352 for CMYKA (or RGBA with offsets).  The matrix is similar to those used by
1353 Adobe Flash except offsets are in column 6 rather than 5 (in support of
1354 CMYKA images) and offsets are normalized (divide Flash offset by 255).</p>
1355
1356 <p>As an example, to add contrast to an image with offsets, try this command:</p>
1357
1358 <pre class="text">
1359    convert kittens.jpg -color-matrix \
1360      " 1.5 0.0 0.0 0.0, 0.0, -0.157 \
1361        0.0 1.5 0.0 0.0, 0.0, -0.157 \
1362        0.0 0.0 1.5 0.0, 0.0, -0.157 \
1363        0.0 0.0 0.0 1.0, 0.0,  0.0 \
1364        0.0 0.0 0.0 0.0, 1.0,  0.0 \
1365        0.0 0.0 0.0 0.0, 0.0,  1.0" kittens.png
1366 </pre>
1367 <div style="margin: auto;">
1368   <h4><a id="colorspace"></a>-colorspace <em class="arg">value</em></h4>
1369 </div>
1370
1371 <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>
1372
1373 <p>Choices are:</p>
1374
1375 <pre class="text">
1376    CMY          CMYK         Gray         HSB
1377    HSL          HWB          Lab          Log
1378    OHTA         Rec601Luma   Rec601YCbCr  Rec709Luma
1379    Rec709YCbCr  RGB          sRGB         Transparent
1380    XYZ          YCbCr        YCC          YIQ
1381    YPbPr        YUV
1382 </pre>
1383
1384 <p>To print a complete list of colorspaces, use <a href="command-line-options.html#list">-list
1385 colorspace</a>.</p>
1386
1387 <p>For a more accurate color conversion to or from the RGB, CMYK, or grayscale
1388 colorspaces, use the <a href="command-line-options.html#profile">-profile</a> option.</p>
1389
1390 <table class="doc">
1391         <caption>Conversion Of RGB To Other Color Spaces</caption>
1392         <tr><th align="left" valign="middle">CMY</th></tr>
1393         <tr><td align="left" valign="middle">C=<em class="QR">QuantumRange</em>&minus;R</td></tr>
1394         <tr><td align="left" valign="middle">M=<em class="QR">QuantumRange</em>&minus;G</td></tr>
1395         <tr><td align="left" valign="middle">Y=<em class="QR">QuantumRange</em>&minus;B</td></tr>
1396         <tr><th align="left" valign="middle">CMYK &mdash; starts with CMY from above</th></tr>
1397         <tr><td align="left" valign="middle">K=min(C,Y,M)</td></tr>
1398         <tr><td align="left" valign="middle">C=<em class="QR">QuantumRange</em>*(C&minus;K)/(<em class="QR">QuantumRange</em>&minus;K)</td></tr>
1399         <tr><td align="left" valign="middle">M=<em class="QR">QuantumRange</em>*(M&minus;K)/(<em class="QR">QuantumRange</em>&minus;K)</td></tr>
1400         <tr><td align="left" valign="middle">Y=<em class="QR">QuantumRange</em>*(Y&minus;K)/(<em class="QR">QuantumRange</em>&minus;K)</td></tr>
1401
1402         <tr><th align="left" valign="middle">Gray</th></tr>
1403         <tr><td align="left" valign="middle">Gray = 0.29900*R+0.58700*G+0.11400*B</td></tr>
1404
1405         <tr><th align="left" valign="middle">HSB &mdash; Hue, Saturation, Brightness; like a cone peak downward</th></tr>
1406         <tr><td align="left" valign="middle">H=angle around perimeter (0 to 360 deg); H=0 is red; increasing angles toward green</td></tr>
1407         <tr><td align="left" valign="middle">S=distance from axis outward</td></tr>
1408         <tr><td align="left" valign="middle">B=distance along axis from bottom upward; B=max(R,G,B); <em>intensity-like</em></td></tr>
1409
1410         <tr><th align="left" valign="middle">HSL &mdash; Hue, Saturation, Lightness; like a double cone end-to-end with peaks at very top and bottom</th></tr>
1411         <tr><td align="left" valign="middle">H=angle around perimeter (0 to 360 deg); H=0 is red; increasing angles toward green</td></tr>
1412         <tr><td align="left" valign="middle">S=distance from axis outward</td></tr>
1413         <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>
1414
1415         <tr><th align="left" valign="middle">HWB &mdash; Hue, Whiteness, Blackness</th></tr>
1416         <tr><td align="left" valign="middle">Hue (complicated equation)</td></tr>
1417         <tr><td align="left" valign="middle">Whiteness (complicated equation)</td></tr>
1418         <tr><td align="left" valign="middle">Blackness (complicated equation)</td></tr>
1419
1420         <tr><th align="left" valign="middle">LAB</th></tr>
1421         <tr><td align="left" valign="middle">L (complicated equation relating X,Y,Z)</td></tr>
1422         <tr><td align="left" valign="middle">A (complicated equation relating X,Y,Z)</td></tr>
1423         <tr><td align="left" valign="middle">B (complicated equation relating X,Y,Z)</td></tr>
1424
1425         <tr><th align="left" valign="middle">LOG</th></tr>
1426         <tr><td align="left" valign="middle">I1 (complicated equation involving logarithm of R)</td></tr>
1427         <tr><td align="left" valign="middle">I2 (complicated equation involving logarithm of G)</td></tr>
1428         <tr><td align="left" valign="middle">I3 (complicated equation involving logarithm of B)</td></tr>
1429
1430         <tr><th align="left" valign="middle">OHTA &mdash; approximates principal components transformation</th></tr>
1431         <tr><td align="left" valign="middle">I1=0.33333*R+0.33334*G+0.33333*B; <em>intensity-like</em></td></tr>
1432         <tr><td align="left" valign="middle">I2=(0.50000*R+0.00000*G&minus;0.50000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1433         <tr><td align="left" valign="middle">I3=(&minus;0.25000*R+0.50000*G&minus;0.25000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1434
1435         <tr><th align="left" valign="middle">Rec601Luma</th></tr>
1436         <tr><td align="left" valign="middle">Gray = 0.29900*R+0.58700*G+0.11400*B</td></tr>
1437
1438         <tr><th align="left" valign="middle">Rec601YCbCr</th></tr>
1439         <tr><td align="left" valign="middle">Y=0.299000*R+0.587000*G+0.114000*B; <em>intensity-like</em></td></tr>
1440         <tr><td align="left" valign="middle">Cb=(&minus;0.168736*R-0.331264*G+0.500000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1441         <tr><td align="left" valign="middle">Cr=(0.500000*R&minus;0.418688*G&minus;0.081312*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1442
1443         <tr><th align="left" valign="middle">Rec709Luma</th></tr>
1444         <tr><td align="left" valign="middle">Gray=0.21260*R+0.71520*G+0.07220*B</td></tr>
1445
1446         <tr><th align="left" valign="middle">Rec709YCbCr</th></tr>
1447         <tr><td align="left" valign="middle">Y=0.212600*R+0.715200*G+0.072200*B; <em>intensity-like</em></td></tr>
1448         <tr><td align="left" valign="middle">Cb=(&minus;0.114572*R&minus;0.385428*G+0.500000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1449         <tr><td align="left" valign="middle">Cr=(0.500000*R&minus;0.454153*G&minus;0.045847*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1450
1451         <tr><th align="left" valign="middle">sRGB</th></tr>
1452         <tr><td align="left" valign="middle">if R &le; .04045 then Rs=R/12.92 else Rs=((R+.055)/1.055)^2.4</td></tr>
1453         <tr><td align="left" valign="middle">if G &le; .04045 then Gs=B/12.92 else Gs=((G+.055)/1.055)^2.4</td></tr>
1454         <tr><td align="left" valign="middle">if B &le; .04045 then Bs=B/12.92 else Bs=((B+.055)/1.055)^2.4</td></tr>
1455
1456         <tr><th align="left" valign="middle">XYZ</th></tr>
1457         <tr><td align="left" valign="middle">X=0.4124240*R+0.3575790*G+0.1804640*B</td></tr>
1458         <tr><td align="left" valign="middle">Y=0.2126560*R+0.7151580*G+0.0721856*B</td></tr>
1459         <tr><td align="left" valign="middle">Z=0.0193324*R+0.1191930*G+0.9504440*B</td></tr>
1460
1461         <tr><th align="left" valign="middle">YCC</th></tr>
1462         <tr><td align="left" valign="middle">Y=(0.29900*R+0.58700*G+0.11400*B) (with complicated scaling); <em>intensity-like</em></td></tr>
1463         <tr><td align="left" valign="middle">C1=(&minus;0.29900*R&minus;0.58700*G+0.88600*B) (with complicated scaling)</td></tr>
1464         <tr><td align="left" valign="middle">C2=(0.70100*R&minus;0.58700*G&minus;0.11400*B) (with complicated scaling)</td></tr>
1465
1466         <tr><th align="left" valign="middle">YCbCr</th></tr>
1467         <tr><td align="left" valign="middle">Y=0.299000*R+0.587000*G+0.114000*B; <em>intensity-like</em></td></tr>
1468         <tr><td align="left" valign="middle">Cb=(&minus;0.168736*R&minus;0.331264*G+0.500000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1469         <tr><td align="left" valign="middle">Cr=(0.500000*R&minus;0.418688*G&minus;0.081312*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1470
1471         <tr><th align="left" valign="middle">YIQ</th></tr>
1472         <tr><td align="left" valign="middle">Y=0.29900*R+0.58700*G+0.11400*B; <em>intensity-like</em></td></tr>
1473         <tr><td align="left" valign="middle">I=(0.59600*R&minus;0.27400*G&minus;0.32200*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1474         <tr><td align="left" valign="middle">Q=(0.21100*R&minus;0.52300*G+0.31200*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1475
1476         <tr><th align="left" valign="middle">YPbPr</th></tr>
1477         <tr><td align="left" valign="middle">Y=0.299000*R+0.587000*G+0.114000*B; <em>intensity-like</em></td></tr>
1478         <tr><td align="left" valign="middle">Pb=(&minus;0.168736*R&minus;0.331264*G+0.500000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1479         <tr><td align="left" valign="middle">Pr=(0.500000*R&minus;0.418688*G&minus;0.081312*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1480
1481         <tr><th align="left" valign="middle">YUV</th></tr>
1482         <tr><td align="left" valign="middle">Y=0.29900*R+0.58700*G+0.11400*B; <em>intensity-like</em></td></tr>
1483         <tr><td align="left" valign="middle">U=(&minus;0.14740*R&minus;0.28950*G+0.43690*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1484         <tr><td align="left" valign="middle">V=(0.61500*R&minus;0.51500*G&minus;0.10000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1485 </table>
1486
1487 <div style="margin: auto;">
1488   <h4><a id="combine"></a>-combine</h4>
1489 </div>
1490
1491 <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>
1492
1493 <p>The channels (previously set by <a href="command-line-options.html#channel">-channel</a>) of the
1494 combined image are taken from the grayscale values of each image in the
1495 sequence, in order. For the default -channel setting of <kbd>RGB</kbd>, this
1496 means the first image  is assigned to the <kbd>Red</kbd> channel, the second
1497 to the <kbd>Green</kbd> channel, the third to the <kbd>Blue</kbd>.</p>
1498
1499 <p>This option can be thought of as the inverse to <a
1500 href="command-line-options.html#separate">-separate</a>, so long as the channel settings are the same.
1501 Thus, in the following example, the final image should be a copy of the
1502 original.  </p>
1503
1504 <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/> -combine imagecopy.png</span></p>
1505 <div style="margin: auto;">
1506   <h4><a id="comment"></a>-comment <em class="arg">string</em></h4>
1507 </div>
1508
1509 <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>
1510
1511 <p>This option sets the comment meta-data of an image read in after this
1512 option has been given.  To modify a comment of images already in memory use
1513 "<kbd><a href="command-line-options.html#set">-set</a> comment</kbd>". </p>
1514
1515 <p>The comment can contain special format characters listed in the <a
1516 href="escape.html">Format and
1517 Print Image Properties</a>. These attributes are expanded when the comment
1518 is finally assigned to the individual images. </p>
1519
1520 <p>If the first character of <em class="arg">string</em> is <em
1521 class="arg">@</em>, the image comment is read from a file titled by the
1522 remaining characters in the string.  Comments read in from a file are literal;
1523 no embedded formatting characters are recognized.</p>
1524
1525 <p>Comment meta-data are not visible on the image itself. To do that use the
1526 <a href="command-line-options.html#annotate">-annotate</a> or <a href="command-line-options.html#draw">-draw</a> options
1527 instead.</p>
1528
1529 <p>For example,</p>
1530
1531 <p class="crtsnip">
1532      -comment "%m:%f %wx%h"  bird.miff
1533 </p>
1534
1535 <p>produces an image comment of <kbd>MIFF:bird.miff 512x480</kbd> (assuming
1536 that the image <kbd>bird.miff</kbd> has a width of 512 and a height of
1537 480.</p>
1538
1539 <div style="margin: auto;">
1540   <h4><a id="compose"></a>-compose <em class="arg">operator</em></h4>
1541 </div>
1542
1543 <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>
1544
1545 <p>See <a href="compose.html">Alpha Compositing</a> for
1546 a detailed discussion of alpha compositing.</p>
1547
1548 <p>This setting effects image processing operators that merge two (or more)
1549 images together in some way.  This includes the operators,
1550 <a href="command-line-options.html#composite">-composite</a>,
1551 <a href="command-line-options.html#layers">-layers</a> composite,
1552 <a href="command-line-options.html#flatten">-flatten</a>,
1553 <a href="command-line-options.html#mosaic">-mosaic</a>,
1554 <a href="command-line-options.html#layers">-layers</a> merge,
1555 <a href="command-line-options.html#border">-border</a>,
1556 <a href="command-line-options.html#frame">-frame</a>,
1557 and <a href="command-line-options.html#extent">-extent</a>. </p>
1558
1559 <p>It is also one of the primary options for the "<kbd>composite</kbd>"
1560 command.  </p>
1561
1562
1563 <div style="margin: auto;">
1564   <h4><a id="composite"></a>-composite</h4>
1565 </div>
1566
1567 <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>
1568
1569 <p>Take the first image 'destination' and overlay the second 'source' image
1570 according to the current <a href="command-line-options.html#compose">-compose</a> setting. The location
1571 of the 'source' or 'overlay' image is controlled according to <a
1572 href="command-line-options.html#geometry" >-geometry</a>, and <a href="command-line-options.html#geometry" >-geometry</a>
1573 settings. </p>
1574
1575 <p>If a third image is given this is treated as a gray-scale 'mask' image
1576 relative to the first 'destination' image. This mask will limit what parts of
1577 the destination can be modified by the image composition.  However for the
1578 '<kbd>displace</kbd>' compose method, the mask is used to provide a separate
1579 Y-displacement image instead. </p>
1580
1581 <p>If a <a href="command-line-options.html#compose">-compose</a> method requires extra numerical
1582 arguments or flags these can be provided by setting the  <a
1583 href="command-line-options.html#set">-set</a> '<kbd class="arg">option:compose:args</kbd>'
1584 appropriately for the compose method. </p>
1585
1586 <p>Some <a href="command-line-options.html#compose">-compose</a> methods can modify the 'destination'
1587 image outside the overlay area. You can disable this by setting the special <a
1588 href="command-line-options.html#set">-set</a> '<kbd class="arg">option:compose:outside-overlay</kbd>'
1589 to '<kbd>false</kbd>'.  </p>
1590
1591
1592 <div style="margin: auto;">
1593   <h4><a id="compress"></a>-compress <em class="arg">type</em></h4>
1594 </div>
1595
1596 <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>
1597
1598 <p>Choices are: <kbd class="arg">None</kbd>, <kbd class="arg">BZip</kbd>, <kbd
1599 class="arg">Fax</kbd>, <kbd class="arg">Group4</kbd>, <kbd
1600 class="arg">JPEG</kbd>,  <kbd class="arg">JPEG2000</kbd>, <kbd
1601 class="arg">Lossless</kbd>, <kbd class="arg">LZW</kbd>, <kbd
1602 class="arg">RLE</kbd> or <kbd class="arg">Zip</kbd>.</p>
1603
1604 <p>To print a complete list of compression types, use <a href="command-line-options.html#list">-list
1605 compress</a>.</p>
1606
1607 <p>Specify <a href="command-line-options.html#compress">+compress</a> to store the binary image in an
1608 uncompressed format. The default is the compression type of the specified
1609 image file.</p>
1610
1611 <p>If <kbd>LZW</kbd> compression is specified but LZW compression has not been
1612 enabled, the image data is written in an uncompressed LZW format that can be
1613 read by LZW decoders. This may result in larger-than-expected GIF files.</p>
1614
1615 <p><kbd>Lossless</kbd> refers to lossless JPEG, which is only available if the
1616 JPEG library has been patched to support it. Use of lossless JPEG is generally
1617 not recommended.</p>
1618
1619 <p>
1620 When writing an ICO file, you may request that the images be encoded in
1621 PNG format, by specifying <kbd>Zip</kbd> compression.</p>
1622
1623 <p>
1624 When writing a JNG file, specify <kbd>Zip</kbd> compression to request that
1625 the alpha channel be encoded in PNG "IDAT" format, or <kbd>JPEG</kbd>
1626 to request that it be encoded in JPG "JDAA" format.</p>
1627
1628 <p>Use the <a href="command-line-options.html#quality">-quality</a> option to set the compression level
1629 to be used by JPEG, PNG, MIFF, and MPEG encoders.
1630 Use the <a href="command-line-options.html#sampling-factor">-sampling-factor</a> option to set the
1631 sampling factor to be used by JPEG, MPEG, and YUV encoders for down-sampling
1632 the chroma channels.</p>
1633
1634 <div style="margin: auto;">
1635   <h4><a id="contrast"></a>-contrast</h4>
1636 </div>
1637
1638 <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>
1639
1640 <p>This option enhances the intensity differences between the lighter and
1641 darker elements of the image. Use <a href="command-line-options.html#contrast">-contrast</a> to enhance
1642 the image or <a href="command-line-options.html#contrast">+contrast</a> to reduce the image
1643 contrast.</p>
1644
1645 <p>For a more pronounced effect you can repeat the option:</p>
1646
1647 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert rose: -contrast -contrast rose_c2.png</span></p>
1648 <div style="margin: auto;">
1649   <h4><a id="contrast-stretch"></a>-contrast-stretch <em class="arg">black-point</em><br />-contrast-stretch <em class="arg">black-point</em>{x<em class="arg">white-point</em>}{<em class="arg">%</em>}}</h4>
1650 </div>
1651
1652 <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>
1653
1654 <p>While performing the stretch, black-out at most <em
1655 class="arg" >black-point</em> pixels and white-out at most <em
1656 class="arg" >white-point</em> pixels. Or, if percent is used, black-out at most
1657 <em class="arg" >black-point %</em> pixels and white-out at most <em
1658 class="arg" >white-point %</em> pixels.</p>
1659
1660 <p>Prior to ImageMagick 6.4.7-0, <a href="command-line-options.html#contrast-stretch"
1661 >-contrast-stretch</a> will black-out at most <em class="arg"
1662 >black-point</em> pixels and white-out at most <em class="arg" >total pixels
1663 minus white-point</em> pixels. Or, if percent is used, black-out at most <em
1664 class="arg">black-point %</em> pixels and white-out at most <em class="arg"
1665 >100% minus white-point %</em> pixels.</p>
1666
1667 <p>Note that <kbd>-contrast-stretch 0</kbd> will modify the image such that
1668 the image's min and max values are stretched to 0 and <em class="QR"
1669 >QuantumRange</em>, respectively, without any loss of data due to burn-out or
1670 clipping at either end. This is not the same as <a href="command-line-options.html#normalize"
1671 >-normalize</a>, which is equivalent to <kbd>-contrast-stretch 0.15x0.05%</kbd> (or
1672 prior to ImageMagick 6.4.7-0, <kbd>-contrast-stretch 2%x99%</kbd>).</p>
1673
1674 <p>Internally operator works by creating a histogram bin, and then uses that
1675 bin to modify the image. As such some colors may be merged together when they
1676 originally fell into the same 'bin'. </p>
1677
1678 <p>All the channels are normalized in concert by the came amount so as to
1679 preserve color integrity, when the default <a href="command-line-options.html#channel" >+channel</a>
1680 setting is in use.  Specifying any other <a href="command-line-options.html#channel" >-channel</a>
1681 setting will normalize the RGB channels independently.</p>
1682
1683 <p>See also  <a href="command-line-options.html#auto-level" >-auto-level</a> for a 'perfect'
1684 normalization of mathematical images. </p>
1685
1686 <p>This operator is under review for re-development. </p>
1687
1688
1689 <div style="margin: auto;">
1690   <h4><a id="convolve"></a>-convolve <em class="arg">kernel</em></h4>
1691 </div>
1692
1693 <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>
1694
1695 <p>The <em class="arg">kernel</em> is a matrix specified as
1696 a comma-separated list of integers (with no spaces), ordered left-to right,
1697 starting with the top row. Presently, only odd-dimensioned kernels are
1698 supported, and therefore the number of entries in the specified <em
1699 class="arg">kernel</em> must be 3<sup>2</sup>=9, 5<sup>2</sup>=25,
1700 7<sup>2</sup>=49, etc. </p>
1701
1702 <p>Note that the <a href="command-line-options.html#convolve">&#x2011;convolve</a> operator supports the <a href="command-line-options.html#bias">&#x2011;bias</a> setting. This option shifts the convolution so that
1703 positive and negative results are relative to a user-specified bias value.
1704 This is important for non-HDRI compilations of ImageMagick when dealing with
1705 convolutions that contain negative as well as positive values. This is
1706 especially the case with convolutions involving high pass filters or edge
1707 detection. Without an output bias, the negative values is clipped at zero.
1708 </p>
1709
1710 <p>When using an ImageMagick with the HDRI compile-time setting, <a href="command-line-options.html#bias">&#x2011;bias</a> is not needed, as ImageMagick is able to store/handle any
1711 negative results without clipping to the color value range (0..QuantumRange).
1712 See the discussion on HDRI implementations of ImageMagick on the page <a
1713 href="high-dynamic-range.html">High
1714 Dynamic-Range Images</a>. For more about HDRI go the ImageMagick <a
1715 href="http://www.imagemagick.org/Usage/basics/#hdri">Usage</a> pages or this
1716 <a href="http://en.wikipedia.org/wiki/High_dynamic_range_imaging">Wikipedia</a>
1717 entry.  </p>
1718
1719
1720 <div style="margin: auto;">
1721   <h4><a id="crop"></a>-crop <em class="arg">geometry</em></h4>
1722 </div>
1723
1724 <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>
1725
1726 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
1727
1728 <p>The <em class="arg">width</em> and <em class="arg">height</em> of the <em
1729 class="arg">geometry</em> argument give the size of the image that remains
1730 after cropping, and <em class="arg">x</em> and <em class="arg">y</em> in the
1731 <em class="arg">offset</em> (if present) gives the location of the top left
1732 corner of the cropped image with respect to the original image. To specify the
1733 amount to be removed, use <a href="command-line-options.html#shave">-shave</a> instead.</p>
1734
1735 <p>If the <em class="arg">x</em> and <em class="arg">y</em> offsets are
1736 present, a single image is generated, consisting of the pixels from the
1737 cropping region. The offsets specify the location of the upper left corner of
1738 the cropping region measured downward and rightward with respect to the upper
1739 left corner of the image. If the <a href="command-line-options.html#gravity">-gravity</a> option is
1740 present with <kbd>NorthEast</kbd>, <kbd>East</kbd>, or <kbd>SouthEast</kbd>
1741 gravity, it gives the distance leftward from the right edge of the image to
1742 the right edge of the cropping region. Similarly, if the <a
1743 href="command-line-options.html#gravity">-gravity</a> option is present with <kbd>SouthWest</kbd>,
1744 <kbd>South</kbd>, or <kbd>SouthEast</kbd> gravity, the distance is measured
1745 upward between the bottom edges.</p>
1746
1747 <p>If the <em class="arg">x</em> and <em class="arg">y</em> offsets are
1748 omitted, a set of tiles of the specified geometry, covering the entire input
1749 image, is generated. The rightmost tiles and the bottom tiles are smaller if
1750 the specified geometry extends beyond the dimensions of the input image.</p>
1751
1752 <p>By adding a exclamation character flag to the geometry argument, the
1753 cropped images virtual canvas page size and offset is set as if the
1754 geometry argument was a viewport or window. This means the canvas page size
1755 is set to exactly the same size you specified, the image offset set
1756 relative top left corner of the region cropped. </p>
1757
1758 <p>If the cropped image 'missed' the actual image on its virtual canvas, a
1759 special single pixel transparent 'missed' image is returned, and a 'crop
1760 missed' warning given. </p>
1761
1762 <p>It might be necessary to <a href="command-line-options.html#repage" >+repage</a> the image prior to
1763 cropping the image to ensure the crop coordinate frame is relocated to the
1764 upper-left corner of the visible image.
1765
1766 Similarly you may want to use <a href="command-line-options.html#repage" >+repage</a> after cropping to
1767 remove the page offset that will be left behind. This is especially true when
1768 you are going to write to an image format such as PNG that supports an image
1769 offset.</p>
1770
1771 <div style="margin: auto;">
1772   <h4><a id="cycle"></a>-cycle <em class="arg">amount</em></h4>
1773 </div>
1774
1775 <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>
1776
1777 <p><em class="arg">Amount</em> defines the number of positions each
1778 colormap entry is shifted.</p>
1779
1780
1781 <div style="margin: auto;">
1782   <h4><a id="debug"></a>-debug <em class="arg">events</em></h4>
1783 </div>
1784
1785 <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>
1786
1787 <p>The <kbd>events</kbd> parameter specifies which events are to be logged. It
1788 can be either <kbd>None</kbd>, <kbd>All</kbd>, <kbd>Trace</kbd>, or
1789 a comma-separated list consisting of one or more of the following domains:
1790 <kbd>Accelerate</kbd>, <kbd>Annotate</kbd>, <kbd>Blob</kbd>, <kbd>Cache</kbd>,
1791 <kbd>Coder</kbd>, <kbd>Configure</kbd>, <kbd>Deprecate</kbd>,
1792 <kbd>Exception</kbd>, <kbd>Locale</kbd>, <kbd>Render</kbd>,
1793 <kbd>Resource</kbd>, <kbd>Security</kbd>, <kbd>TemporaryFile</kbd>,
1794 <kbd>Transform</kbd>, <kbd>X11</kbd>, or <kbd>User</kbd>. </p>
1795
1796
1797 <p>For example, to log cache and blob events, use.</p>
1798
1799 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert -debug "Cache,Blob" rose: rose.png</span></p>
1800 <p>The <kbd>User</kbd> domain is normally empty, but developers can log user
1801 events in their private copy of ImageMagick.</p>
1802
1803 <p>To print the complete list of debug methods, use <a href="command-line-options.html#list">-list
1804 debug</a>.</p>
1805
1806 <p>Use the <a href="command-line-options.html#log">-log</a> option to specify the format for debugging
1807 output.</p>
1808
1809 <p>Use <a href="command-line-options.html#debug">+debug</a> to turn off all logging.</p>
1810
1811 <p>Debugging may also be set using the <kbd>MAGICK_DEBUG</kbd> <a href="resources.html#environment"
1812 >environment variable</a>.  The allowed values for the <kbd>MAGICK_DEBUG</kbd>
1813 environment variable are the same as for the <a href="command-line-options.html#debug">-debug</a>
1814 option.</p>
1815
1816
1817 <div style="margin: auto;">
1818   <h4><a id="decipher"></a>-decipher <em class="arg">filename</em></h4>
1819 </div>
1820
1821 <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
1822 <a href="command-line-options.html#encipher">-encipher</a>.</td><td style='text-align:right;'></td></tr></table>
1823
1824 <p>Get the passphrase from the file specified by <em
1825 class="arg">filename</em>.</p>
1826
1827 <p>For more information, see the webpage, <a
1828 href="../www/cipher.html">ImageMagick: Encipher or
1829 Decipher an Image</a>.</p>
1830
1831
1832 <div style="margin: auto;">
1833   <h4><a id="deconstruct"></a>-deconstruct</h4>
1834 </div>
1835
1836 <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>
1837
1838 <p>Given a sequence of images all the same size, such as produced by <a
1839 href="command-line-options.html#coalesce">-coalesce</a>, replace the second and later images, with
1840 a smaller image of just the area that changed relative to the previous image.
1841 </p>
1842
1843 <p>The resulting sequence of images can be used to optimize an animation
1844 sequence, though will not work correctly for GIF animations when parts of the
1845 animation can go from opaque to transparent. </p>
1846
1847 <p>This option is actually equivalent to the  <a href="command-line-options.html#layers">-layers</a>
1848 method '<kbd>compare-any</kbd>'. </p>
1849
1850
1851 <div style="margin: auto;">
1852   <h4><a id="define"></a>-define <em class="arg">key</em>{<em class="arg">=value</em>}<em class="arg">...</em></h4>
1853 </div>
1854
1855 <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
1856 coders and image processing operations.</td><td style='text-align:right;'></td></tr></table>
1857
1858 <p>This option creates one or more definitions for coders and decoders to use
1859 while reading and writing image data.  Definitions are generally used to
1860 control image file format coder modules, and image processing operations,
1861 beyond what is provided by normal means.  Defined settings are listed in <a
1862 href="command-line-options.html#verbose" >-verbose</a> information ("<kbd>info:</kbd>" output format)
1863 as "Artifacts". </p>
1864
1865 <p>If <em class="arg">value</em> is missing for a definition, an empty-valued
1866 definition of a flag is created with that name. This used to control on/off
1867 options.  Use <a href="command-line-options.html#define">+define key</a> to remove definitions
1868 previously created.  Use <a href="command-line-options.html#define">+define "*"</a> to remove all
1869 existing definitions.</p>
1870
1871 <p>The same 'artifact' settings can also be defined using the <a
1872 href="command-line-options.html#set" >-set "option:<em class="arg">key</em>" "<em class="arg"
1873 >value</em>"</a> option, which also allows the use of <a href="escape.html" >Format and Print Image
1874 Properties</a> in the defined value. </p>
1875
1876 <p>The <em>option</em> and <em>key</em> are case-independent (they are
1877 converted to lowercase for use within the decoders) while the <em>value</em>
1878 is case-dependent.</p>
1879
1880 <p>Such settings are global in scope, and effect all images and operations. </p>
1881
1882 <p>The following definitions are just some of the artifacts that are
1883 available:</p>
1884
1885 <dl>
1886
1887 <dt>compose:args=<em class="arg">arguments</em></dt>
1888 <dd>Sets certain compose argument values when using convert ... -compose ...
1889     -composite. See <a href="compose.html"
1890     >Image Composition</a></dd>
1891
1892 <dt>distort:scale=<em class="arg">value</em></dt>
1893    <dd>Sets the output scaling factor for use with <a href="command-line-options.html#distort"
1894    >-distort</a></dd>
1895
1896 <dt>distort:viewport=WxH+X+Y</dt>
1897    <dd>Sets the viewport for use with <a href="command-line-options.html#distort">-distort</a></dd>
1898
1899 <dt>dcm:display-range=reset</dt>
1900 <dd>Set the display range to the minimum and maximum pixel values for the
1901     DCM image format.</dd>
1902
1903 <dt>dot:layout-engine=<em class="arg">value</em></dt>
1904 <dd>Set the specify the layout engine for the DOT image format (e.g.
1905     <kbd>neato</kbd>).</dd>
1906
1907 <dt>jpeg:extent=<em class="arg">value</em></dt>
1908 <dd>Restrict the maximum JPEG file size, for example <kbd>-define
1909     jpeg:extent=400kb</kbd>.</dd>
1910
1911 <dt>jpeg:size=<em class="arg">geometry</em></dt>
1912 <dd>Set the size hint of a JPEG image, for example, -define jpeg:size=128x128.
1913     It is most useful for increasing performance and reducing the memory
1914     requirements when reducing the size of a large JPEG image.</dd>
1915
1916 <dt>jp2:rate=<em class="arg">value</em></dt>
1917 <dd>Specify the compression factor to use while writing JPEG-2000 files. The
1918     compression factor is the reciprocal of the compression ratio. The valid
1919     range is 0.0 to 1.0, with 1.0 indicating lossless compression. If defined,
1920     this value overrides the -quality setting.  A quality setting of 75
1921     results in a rate value of 0.06641.</dd>
1922
1923 <dt>mng:need-cacheoff</dt>
1924   <dd>turn playback caching off for streaming MNG.</dd>
1925
1926 <dt>png:bit-depth=<em class="arg">value</em></dt>
1927 <dt>png:color-type=<em class="arg">value</em></dt>
1928 <dd>desired bit-depth and color-type for PNG output.  You can force the PNG
1929     encoder to use a different bit-depth and color-type than it would have
1930     normally selected, but only if this does not cause any loss of image
1931     quality. Any attempt to reduce image quality is treated as an error and no
1932     PNG file is written.  E.g., if you have a 1-bit black-and-white image, you
1933     can use these "defines" to cause it to be written as an 8-bit grayscale,
1934     indexed, or even a 64-bit RGBA.  But if you have a 16-million color image,
1935     you cannot force it to be written as a grayscale or indexed PNG.  If you
1936     wish to do this, you must use the appropriate <a href="command-line-options.html#depth">-depth</a>,
1937     <a href="command-line-options.html#colors">-colors</a>, or <a href="command-line-options.html#type">-type</a> directives to
1938     reduce the image quality prior to using the PNG encoder. Note that in
1939     indexed PNG files, "bit-depth" refers to the number of bits per index,
1940     which can be 1, 2, 4, or 8.  In such files, the color samples always have
1941     8-bit depth.</dd>
1942
1943 <dt>png:compression-filter=<em class="arg">value</em></dt>
1944    <dd> valid values are 0 through 7. 0-4 are the corresponding PNG filters,
1945    5 means adaptive filtering except for images with a colormap, 6 means
1946    adaptive filtering for all images, 7 means MNG "loco" compression.</dd>
1947
1948 <dt>png:compression-level=<em class="arg">value</em></dt>
1949    <dd> valid values are 0 through 9, with 0 providing the least but fastest
1950        compression and 9 usually providing the best and always the slowest.</dd>
1951
1952 <dt>png:compression-strategy=<em class="arg">value</em></dt>
1953    <dd> valid values are 0 through 4, meaning default, filtered, huffman_only,
1954    rle, and fixed ZLIB compression strategy. If you are using an old zlib
1955    that does not support Z_RLE (before 1.2.0) or Z_FIXED (before 1.2.2.2),
1956    values 3 and 4, respectively, will use the zlib default strategy
1957    instead.</dd>
1958
1959 <dt>png:format=<em class="arg">value</em></dt>
1960    <dd> valid values are <em class="arg">png8</em>, <em class="arg">png24</em>,
1961    and <em class="arg">png32</em>.  This property can be useful for specifying
1962    the specific PNG format to be used, when the usual method of prepending the
1963    format name to the output filename is inconvenient, such as when writing
1964    a PNG-encoded ICO file.</dd>
1965
1966 <dt>png:exclude-chunk=<em class="arg">value</em></dt>
1967 <dt>png:include-chunk=<em class="arg">value</em></dt>
1968 <dd>ancillary chunks to be excluded from or included in PNG output.
1969
1970     <p>The<em class="arg">value</em> can be the name of a PNG chunk-type such
1971     as <em class="arg">bKGD</em>, a comma-separated list of chunk-types,
1972     or the word <em class="arg">all</em> or
1973     the word <em class="arg">none</em>.  There must be no spaces in the
1974     list.  Although PNG chunk-names are case-dependent, you can use
1975     all lowercase names if you prefer.</p>
1976
1977     <p>The "include-chunk" and "exclude-chunk" lists only affect the behavior
1978     of the PNG encoder and have no effect on the PNG decoder.</p>
1979
1980     <p>As a special case, if the <kbd>sRGB</kbd> chunk is excluded and
1981     the <kbd>gAMA</kbd> chunk is included, the <kbd>gAMA</kbd> chunk will
1982     only be written if gamma is not 1/2.2, since most decoders assume
1983     sRGB and gamma=1/2.2 when no colorspace information is included in
1984     the PNG file.  Because the list is processed from left to right, you
1985     can achieve this with a single define:</p>
1986
1987 <pre class="text">
1988    -define png:include-chunk=none,gAMA
1989 </pre>
1990
1991     <p>As a special case, if the <kbd>sRGB</kbd> chunk is not excluded and
1992     the PNG encoder recognizes that the image contains the sRGB ICC profile,
1993     the PNG encoder will write the <kbd>sRGB</kbd> chunk instead of the entire
1994     3144-byte ICC profile.  To force the PNG encoder to write the sRGB
1995     profile as an <kbd>iCCP</kbd> chunk in the output PNG instead of the
1996     <kbd>sRGB</kbd> chunk, exclude the <kbd>sRGB</kbd> chunk.</p>
1997
1998     <p>The critical PNG chunks <kbd>IHDR</kbd>, <kbd>PLTE</kbd>,
1999     <kbd>IDAT</kbd>, and <kbd>IEND</kbd> cannot be excluded.  Any such
2000     entries appearing in the list will be ignored.</p>
2001
2002     <p>If the ancillary PNG <kbd>tRNS</kbd> chunk is excluded and the
2003     image has transparency, the PNG colortype is forced to be 4 or 6
2004     (GRAY_ALPHA or RGBA).  If the image is not transparent, then the
2005     <kbd>tRNS</kbd> chunk isn't written anyhow, and there is no effect
2006     on the PNG colortype of the output image.</p>
2007
2008     <p>The <a href="command-line-options.html#strip">-strip</a> option does the equivalent of the
2009     following for PNG output:</p>
2010
2011 <pre class="text">
2012    -define png:include-chunk=none,trns,gama
2013 </pre>
2014
2015     <p>The default behavior is to include all known PNG ancillary chunks
2016     plus ImageMagick's private <kbd>vpAg</kbd> ("virtual page") chunk,
2017     and to exclude all PNG chunks that are unknown to ImageMagick,
2018     regardless of their PNG "copy-safe" status as described in the
2019     PNG specification.</p>
2020
2021     <p>Any chunk names that are not known to ImageMagick are ignored
2022     if they appear in either the "include-chunk" or "exclude-chunk" list.
2023     The ancillary chunks currently known to ImageMagick are
2024     <kbd>bKGD</kbd>, <kbd>cHRM</kbd>, <kbd>gAMA</kbd>, <kbd>iCCP</kbd>,
2025     <kbd>oFFs</kbd>, <kbd>pHYs</kbd>, <kbd>sRGB</kbd>, <kbd>tEXt</kbd>,
2026     <kbd>tRNS</kbd>, <kbd>vpAg</kbd>, and <kbd>zTXt</kbd>.</p>
2027
2028     <p>You can also put <kbd>date</kbd> in the list to include or exclude
2029     the "Date:create" and "Date:modify" text chunks that ImageMagick normally
2030     inserts in the output PNG.</p>
2031
2032 </dd>
2033
2034 <dt>png:preserve-colormap</dt>
2035   <dd>Use the existing image->colormap. Normally the PNG encoder will
2036       try to optimize the palette, eliminating unused entries and putting
2037       the transparent colors first.  If this flag is set, that behavior
2038       is suppressed.</dd>
2039
2040 <dt>ps:imagemask</dt>
2041 <dd>If the ps:imagemask flag is defined, the PS3 and EPS3 coders will create
2042     Postscript files that render bilevel images with the Postscript imagemask
2043     operator instead of the image operator.</dd>
2044
2045 <dt>quantum:format=<em class="arg">type</em></dt>
2046 <dd>Set the type to <kbd>floating-point</kbd> to specify a floating-point
2047     format for raw files (e.g. GRAY:) or for MIFF and TIFF images in HDRI mode
2048     to preserve negative values. If <a href="command-line-options.html#depth">-depth</a> 16 is
2049     included, the result is a single precision floating point format.
2050     If <a href="command-line-options.html#depth">-depth</a> 32 is included, the result is
2051     double precision floating point format.</dd>
2052
2053 <dt>showkernel=1</em></dt>
2054 <dd>Outputs (to 'standard error') all the information about a generated <a
2055     href="command-line-options.html#morphology" >-morphology</a> kernel.</dd>
2056
2057 <dt>tiff:quantum:polarity=min-is-black
2058 <br />
2059 tiff:quantum:polarity=min-is-white</dt>
2060    <dd>Toggles the photometric interpretation</dd>
2061
2062 <dt>tiff:rows-per-strip=<em class="arg">value</em></dt>
2063    <dd>Sets the number of rows per strip</dd>
2064
2065 <dt>tiff:tile-geometry=<em class="arg">WxH</em></dt>
2066 <dd>Sets the tile size for pyramid tiffs. Requires the suffix PTIF: before the
2067     outputname</dd>
2068
2069
2070 </dl>
2071
2072 <p>For example, to create a postscript file that will render only the black
2073 pixels of a bilevel image, use:</p>
2074
2075 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert bilevel.tif -define ps:imagemask eps3:stencil.ps</span></p>
2076 <p>Set attributes of the image registry by prefixing the value with
2077 <kbd>registry:</kbd>.  For example, to set a temporary path to put work files,
2078 use:</p>
2079
2080 <p class="crtsnip">
2081 -define registry:temporary-path=/data/tmp
2082 </p>
2083
2084
2085
2086 <div style="margin: auto;">
2087   <h4><a id="delay"></a>-delay <em class="arg">ticks</em> <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>
2088 </div>
2089
2090 <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>
2091
2092 <p>This option is useful for regulating the animation of image sequences
2093 <em>ticks/ticks-per-second</em> seconds must expire before the display of the
2094 next image. The default is no delay between each showing of the image
2095 sequence.  The default ticks-per-second is 100.</p>
2096
2097 <p>Use <kbd>&gt;</kbd> to change the image delay <em>only</em> if its current
2098 value exceeds the given delay. <kbd>&lt;</kbd> changes the image delay
2099 <em>only</em> if current value is less than the given delay.  For example, if
2100 you specify <kbd>30&gt;</kbd> and the image delay is 20, the image delay does
2101 not change. However, if the image delay is 40 or 50, the delay it is changed
2102 to 30. Enclose the given delay in quotation marks to prevent the
2103 <kbd>&lt;</kbd> or <kbd>&gt;</kbd> from being interpreted by your shell as
2104 a file redirection.</p>
2105
2106
2107 <div style="margin: auto;">
2108   <h4><a id="delete"></a>-delete <em class="arg">indexes</em></h4>
2109 </div>
2110
2111 <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>
2112
2113 <p>Specify the image by its index in the sequence.  The first image is index
2114 0.  Negative indexes are relative to the end of the sequence, for example, -1
2115 represents the last image of the sequence.  Specify a range of images with
2116 a dash (e.g. 0-4).  Separate indexes with a comma (e.g. 0,2).  Use
2117 <kbd>+delete</kbd> to delete the last image in the current image sequence.</p>
2118
2119
2120 <div style="margin: auto;">
2121   <h4><a id="density"></a>-density <em class="arg">width</em><br />-density <em class="arg">width</em>x<em class="arg">height</em></h4>
2122 </div>
2123
2124 <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
2125 rendering to devices.</td><td style='text-align:right;'></td></tr></table>
2126
2127 <p>This option specifies the image resolution to store while encoding a raster
2128 image or the canvas resolution while rendering (reading) vector formats such
2129 as Postscript, PDF, WMF, and SVG into a raster image. Image resolution
2130 provides the unit of measure to apply when rendering to an output device or
2131 raster image. The default unit of measure is in dots per inch (DPI). The <a
2132 href="command-line-options.html#units">-units</a> option may be used to select dots per centimeter
2133 instead.</p>
2134
2135 <p>The default resolution is 72 dots per inch, which is equivalent to one
2136 point per pixel (Macintosh and Postscript standard). Computer screens are
2137 normally 72 or 96 dots per inch, while printers typically support 150, 300,
2138 600, or 1200 dots per inch. To determine the resolution of your display, use
2139 a ruler to measure the width of your screen in inches, and divide by the
2140 number of horizontal pixels (1024 on a 1024x768 display).</p>
2141
2142 <p>If the file format supports it, this option may be used to update the
2143 stored image resolution. Note that Photoshop stores and obtains image
2144 resolution from a proprietary embedded profile. If this profile is not
2145 stripped from the image, then Photoshop will continue to treat the image using
2146 its former resolution, ignoring the image resolution specified in the standard
2147 file header.</p>
2148
2149 <p>The <a href="command-line-options.html#density">-density</a> option sets an <em>attribute</em> and
2150 does not alter the underlying raster image. It may be used to adjust the
2151 rendered size for desktop publishing purposes by adjusting the scale applied
2152 to the pixels. To resize the image so that it is the same size at a different
2153 resolution, use the <a href="command-line-options.html#resample">-resample</a> option.</p>
2154
2155 <div style="margin: auto;">
2156   <h4><a id="depth"></a>-depth <em class="arg">value</em></h4>
2157 </div>
2158
2159 <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>
2160
2161 <p>This the number of bits in a color sample within a pixel.  Use this option
2162 to specify the depth of raw images whose depth is unknown such as GRAY, RGB,
2163 or CMYK, or to change the depth of any image after it has been read.</p>
2164
2165 <div style="margin: auto;">
2166   <h4><a id="descend"></a>-descend</h4>
2167 </div>
2168
2169 <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>
2170
2171 <div style="margin: auto;">
2172   <h4><a id="deskew"></a>-deskew <em class="arg">threshold</em></h4>
2173 </div>
2174
2175 <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>
2176
2177 <p>Use <a href="command-line-options.html#set">-set</a> <kbd>option:deskew:auto-crop
2178 <em>width</em></kbd> to auto crop the image.  The set argument is the pixel
2179 width of the image background (e.g 40).</p>
2180
2181 <div style="margin: auto;">
2182   <h4><a id="despeckle"></a>-despeckle</h4>
2183 </div>
2184
2185 <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>
2186
2187 <div style="margin: auto;">
2188   <h4><a id="direction"></a>-direction <em class="arg">type</em></h4>
2189 </div>
2190
2191 <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>
2192
2193 <div style="margin: auto;">
2194   <h4><a id="displace"></a>-displace <em class="arg">horizontal-scale</em><br />-displace <em class="arg">horizontal-scale</em>x<em class="arg">vertical-scale</em></h4>
2195 </div>
2196
2197 <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>
2198
2199 <p>With this option, the 'overlay' image, and optionally the 'mask' image,
2200 is used as a displacement map, which is used to displace the lookup of
2201 what part of the 'background' image is seen at each point of the overlaid
2202 area.  Much like the displacement map is a 'lens' that redirects light shining
2203 through it so as to present a distorted view the original 'background' image
2204 behind it. </p>
2205
2206 <p>Any perfect grey areas of the displacement map produce a zero
2207 displacement of the image. Black areas produce the given maximum negative
2208 displacement of the lookup point, while white produce a maximum positive
2209 displacement of the lookup. </p>
2210
2211 <p>Note that it is the lookup of the 'background' that is displaced, not a
2212 displacement of the image itself. As such an area of the displacement map
2213 containing 'white' will have the lookup point 'shifted' by a positive amount,
2214 and thus generating a copy of the destination image to the right/downward from
2215 the correct position.  That is the image will look like it may have been
2216 'shifted' in a negative left/upward direction.  Understanding this is a very
2217 important in understanding how displacement maps work.  </p>
2218
2219 <p>The given arguments define the maximum amount of displacement in pixels
2220 that a particular map can produce. If the displacement scale is large enough
2221 it is also possible to lookup parts of the 'background' image that lie well
2222 outside the bounds of the displacement map itself.  That is you could very
2223 easily copy a section of the original image from outside the overlay area
2224 into the overlay area. </p>
2225
2226 <p>The '%' flag makes the displacement scale relative to the size of the
2227 overlay image (100% = half width/height of image). Using '!' switches
2228 percentage arguments to refer to the destination image size instead.
2229 these flags were added as of IM v6.5.3-5.</p>
2230
2231 <p>Normally a single grayscale displacement map is provided, which with the
2232 given scaling values will determine a single direction (vector) in which
2233 displacements can occur (positively or negatively).  However, if you also
2234 specify a third image which is normally used as a <em class="arg">mask</em>,
2235 the <em class="arg">composite image</em> is used for horizontal X
2236 displacement, while the <em class="arg">mask image</em> is used for vertical Y
2237 displacement.  This allows you to define completely different displacement
2238 values for the X and Y directions, and allowing you to lookup any point within
2239 the  <em class="arg">scale</em> bounds.  In other words each pixel can lookup
2240 any other nearby pixel, producing complex 2 dimensional displacements, rather
2241 than a simple 1 dimensional vector displacements. </p>
2242
2243 <p>Alternatively rather than supplying two separate images, as of IM v6.4.4-0,
2244 you can use the 'red' channel of the overlay image to specify the horizontal
2245 or X displacement, and the 'green' channel for the vertical or Y displacement.
2246 </p>
2247
2248 <p>As of IM v6.5.3-5 any alpha channel in the overlay image is used as a
2249 mask the transparency of the destination image. However areas outside the
2250 overlaid areas will not be effected. </p>
2251
2252
2253 <div style="margin: auto;">
2254   <h4><a id="display"></a>-display <em class="arg">host:display[.screen]</em></h4>
2255 </div>
2256
2257 <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>
2258
2259 <p>This option is used with convert for obtaining image or font from this
2260 X server. See <em class="arg">X(1)</em>.</p>
2261
2262 <div style="margin: auto;">
2263   <h4><a id="dispose"></a>-dispose <em class="arg">method</em></h4>
2264 </div>
2265
2266 <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>
2267
2268 <p>The layer disposal method defines the way each the displayed image is to be
2269 modified after the current 'frame' of an animation has finished being
2270 displayed (after its 'delay' period), but before the next frame on an
2271 animation is to be overlaid onto the display. </p>
2272
2273 <p>Here are the valid methods:</p>
2274
2275 <pre class="text">
2276    Undefined   0  No disposal specified (equivalent to '<kbd>none</kbd>').
2277    None        1  Do not dispose, just overlay next frame image.
2278    Background  2  Clear the frame area with the background color.
2279    Previous    3  Clear to the image prior to this frames overlay.
2280 </pre>
2281
2282 <p>You can also use the numbers given above, which is what the GIF format
2283 uses internally to represent the above settings. </p>
2284
2285 <p>To print a complete list of dispose methods, use <a href="command-line-options.html#list">-list dispose</a>.</p>
2286
2287 <p>Use <a href="command-line-options.html#dispose" >+dispose</a>, turn off the setting and prevent
2288 resetting the layer disposal methods of images being read in. </p>
2289
2290 <p>Use <a href="command-line-options.html#set">-set</a> '<kbd>dispose</kbd>' method to set the image
2291 disposal method for images already in memory.</p>
2292
2293 <div style="margin: auto;">
2294   <h4><a id="dissimilarity-threshold"></a>-dissimilarity-threshold <em class="arg">value</em></h4>
2295 </div>
2296
2297 <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>
2298
2299
2300 <div style="margin: auto;">
2301   <h4><a id="dissolve"></a>-dissolve <em class="arg">src_percent</em>[x<em class="arg">dst_percent</em>]</h4>
2302 </div>
2303
2304 <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>
2305
2306 <p>The opacity of the composite image is multiplied by the given percent, then
2307 it is composited 'over' the main image.  If <em class="arg">src_percent</em>
2308 is greater than 100, start dissolving the main image so it becomes
2309 transparent at a value of '<kbd class="arg">200</kbd>'.  If both percentages
2310 are given, each image are dissolved to the percentages given. </p>
2311
2312 <p>Note that dissolve percentages do not add, two opaque images dissolved
2313 '50,50', produce a 75% transparency. For a 50% + 50% blending of the two
2314 images, you would need to use dissolve values of '50,100'.  </p>
2315
2316 <div style="margin: auto;">
2317   <h4><a id="distort"></a>-distort <em class="arg">method arguments</em></h4>
2318 </div>
2319
2320 <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>
2321
2322 <p>The <em class="arg">arguments</em> is a single string containing a list
2323 of floating point numbers separated by commas or spaces.  The number of
2324 and meaning of the floating point values depends on the distortion <em
2325 class="arg">method</em> being used. </p>
2326
2327 <p>Choose from these distortion types:</p>
2328
2329 <table class="doc">
2330   <tr valign="top">
2331     <th align="left" style="width: 8%">Method</th>
2332     <th align="left">Description</th>
2333   </tr>
2334
2335   <tr valign="top">
2336     <td valign="top"><kbd>ScaleRotateTranslate</kbd>&nbsp;&nbsp;
2337     <br/>or &nbsp; <kbd>SRT</kbd></td>
2338     <td valign="top">
2339        Distort image by first scaling and rotating about a given 'center',
2340        before translating that 'center' to the new location, in that order. It
2341        is an alternative method of specifying a '<kbd>Affine</kbd>' type of
2342        distortion, but without shearing effects.  It also provides a good way
2343        of rotating and displacing a smaller image for tiling onto a larger
2344        background (IE 2-dimensional animations). <br/>
2345
2346        The number of arguments determine the specific meaning of each
2347        argument for the scales, rotation, and translation operations. <br/>
2348
2349        <table style="margin-left:auto; margin-right:auto;">
2350        <tr><td># &nbsp;</td><td>arguments meaning</td></tr>
2351        <tr><td>1:</td><td><em>Angle_of_Rotation</em></td></tr>
2352        <tr><td>2:</td><td><em>Scale &nbsp; Angle</em></td></tr>
2353        <tr><td>3:</td><td><em>X,Y &nbsp; &nbsp; Angle</em></td></tr>
2354        <tr><td>4:</td><td><em>X,Y &nbsp; Scale &nbsp; Angle</em></td></tr>
2355        <tr><td>5:</td>
2356            <td><em>X,Y &nbsp; ScaleX,ScaleY &nbsp; Angle</em></td></tr>
2357        <tr><td>6:</td>
2358            <td><em>X,Y &nbsp; Scale &nbsp; Angle &nbsp; NewX,NewY</em></td></tr>
2359        <tr><td>7:</td>
2360            <td><em>X,Y &nbsp; ScaleX,ScaleY &nbsp; Angle
2361                    &nbsp; NewX,NewY</em></td></tr>
2362        </table>
2363
2364        This is actually an alternative way of specifying a 2 dimensional linear
2365        '<kbd>Affine</kbd>' or '<kbd>AffineProjection</kbd>' distortion.  </td> </tr>
2366
2367   <tr valign="top">
2368     <td valign="top"><kbd>Affine</kbd></td>
2369     <td valign="top">
2370        Distort the image linearly by moving a list of at least 3 or more sets
2371        of control points (as defined below).  Ideally 3 sets or 12 floating
2372        point values are given allowing the image to be linearly scaled,
2373        rotated, sheared, and translated, according to those three points. See
2374        also the related '<kbd>AffineProjection</kbd>' and '<kbd>SRT</kbd>'
2375        distortions. <br/>
2376
2377        More than 3 sets given control point pairs (12 numbers) is least
2378        squares fitted to best match a linear affine distortion. If only 2
2379        control point pairs (8 numbers) are given a two point image translation
2380        rotation and scaling is performed, without any possible  shearing,
2381        flipping or changes in aspect ratio to the resulting image. If only one
2382        control point pair is provides the image is only translated, (which may
2383        be a floating point non-integer translation). <br/>
2384
2385        This distortion does not include any form of perspective distortion.
2386        </td>
2387
2388   </tr>
2389
2390   <tr valign="top">
2391     <td valign="top"><kbd>AffineProjection</kbd></td>
2392     <td valign="top">
2393        Linearly distort an image using the given Affine Matrix of 6
2394        pre-calculated coefficients forming a set of Affine Equations to map
2395        the source image to the destination image.
2396
2397        <div style="text-align: center"><em>
2398        s<sub>x</sub>, r<sub>x</sub>,
2399        r<sub>y</sub>, s<sub>y</sub>,
2400        t<sub>x</sub>, t<sub>y</sub>
2401        </em></div>
2402
2403        See <a href="command-line-options.html#affine" >-affine</a> setting for more detail, and
2404        meanings of these coefficients. <br/>
2405
2406        The distortions '<kbd>Affine</kbd>' and '<kbd>SRT</kbd>' provide
2407        alternative methods of defining this distortion, with ImageMagick doing
2408        the calculations needed to generate the required coefficients. You can
2409        see the internally generated coefficients, by using a <a
2410        href="command-line-options.html#verbose" >-verbose</a> setting with those other variants.  </td>
2411
2412   </tr>
2413
2414   <tr valign="top">
2415     <td valign="top"><kbd>BilinearForward</kbd><br/>
2416     <kbd>BilinearReverse</kbd></td>
2417     <td valign="top">
2418        Bilinear Distortion, given a minimum of 4 sets of coordinate pairs, or
2419        16 values (see below). Not that lines may not appear straight after
2420        distortion, though the distance between coordinates will remain
2421        consistent. <br/>
2422
2423        The '<kbd>BilinearForward</kbd>' is used to map rectangles to any
2424        quadrilateral, while the '<kbd>BilinearReverse</kbd>' form maps any
2425        quadrilateral to a rectangle, while preserving the straight line edges
2426        in each case.  <br/>
2427
2428        Note that '<kbd>BilinearForward</kbd>' can generate invalid pixels
2429        which will be colored using the <a href="command-line-options.html#mattecolor" >-mattecolor</a>
2430        color setting.  Also if the quadrilateral becomes 'flipped' the image
2431        may disappear. <br/>
2432
2433        There are future plans to produce a true Bilinear distortion that will
2434        attempt to map any quadrilateral to any other quadrilateral, while
2435        preserving edges (and edge distance ratios).
2436
2437        </td>
2438   </tr>
2439
2440   <tr valign="top">
2441     <td valign="top"><kbd>Perspective</kbd></td>
2442     <td valign="top">
2443        Perspective distort the images, using a list of 4 or more sets of
2444        control points (as defined below).  More that 4 sets (16 numbers) of
2445        control points provide least squares fitting for more accurate
2446        distortions (for the purposes of image registration and panorama
2447        effects).  Less than 4 sets will fall back to a '<kbd>Affine</kbd>'
2448        linear distortion.  <br/>
2449
2450        Perspective Distorted images ensures that straight lines remain
2451        straight, but the scale of the distorted image will vary. The horizon
2452        is anti-aliased, and the 'sky' color may be set using the
2453        <a href="command-line-options.html#mattecolor" >-mattecolor</a> setting. </td>
2454   </tr>
2455
2456   <tr valign="top">
2457     <td valign="top"><kbd>PerspectiveProjection</kbd>&nbsp;&nbsp;</td>
2458     <td valign="top">
2459        Do a '<kbd>Perspective</kbd>' distortion biased on a set of 8
2460        pre-calculated coefficients. You can get these coefficients by looking
2461        at the <a href="command-line-options.html#verbose" >-verbose</a> output of a
2462        '<kbd>Perspective</kbd>' distortion, or by calculating them yourself.
2463        If the last two perspective scaling coefficients are zero, the
2464        remaining 6 represents a transposed 'Affine Matrix'. </td>
2465
2466   </tr>
2467
2468   <tr valign="top">
2469     <td valign="top"><kbd>Arc</kbd></td>
2470     <td valign="top">
2471        Arc the image (variation of polar mapping) over the angle given around
2472        a circle. <br/>
2473        <table width="90%" style = "margin-left: auto; margin-right: auto;">
2474        <tr valign="top"><td>Argument</td>
2475            <td>Meaning</td></tr>
2476        <tr valign="top"><td><em>arc_angle</em></td>
2477            <td>The angle over which to arc the image side-to-side</td></tr>
2478        <tr valign="top"><td><em>rotate_angle</em></td>
2479            <td>Angle to rotate resulting image from vertical center</td></tr>
2480        <tr valign="top"><td><em>top_radius</em></td>
2481            <td>Set top edge of source image at this radius</td></tr>
2482        <tr valign="top"><td><em>bottom_radius</em>&nbsp;</td>
2483            <td>Set bottom edge to this radius (radial scaling)</td></tr>
2484        </table>
2485
2486        The resulting image is always resized to best fit the resulting image,
2487        (as if using <a href="command-line-options.html#distort" >+distort</a>) while attempting to
2488        preserve scale and aspect ratio of the original image as much as
2489        possible with the arguments given by the user. All four arguments will
2490        be needed to change the overall aspect ratio of an 'Arc'ed image. <br/>
2491
2492        This a variation of a polar distortion designed to try to preserve the
2493        aspect ratio of the image rather than direct Cartesian to Polar
2494        conversion. </td>
2495   </tr>
2496
2497   <tr valign="top">
2498     <td valign="top"><kbd>Polar</kbd></td>
2499     <td valign="top">
2500        Like '<kbd>Arc</kbd>' but do a complete Cartesian to Polar mapping of
2501        the image. that is the height of the input image is mapped to the
2502        radius limits, while the width is wrapped around between the
2503        angle limits. <br/>
2504
2505        Arguments: <em>Rmax,Rmin CenterX,CenterY, start,end_angle</em> <br/>
2506
2507        All arguments are optional. With <em>Rmin</em> defaulting to zero, the
2508        center to the center of the image, and the angles going from -180 (top)
2509        to +180 (top).  If <em>Rmax</em> is given the special value of
2510        '<code>0</code>', the the distance from the center to the nearest edge
2511        is used for the radius of the output image, which will ensure the whole
2512        image is visible (though scaled smaller).  However a special value of
2513        '<code>-1</code>' will use the distance from the center to the furthest
2514        corner,  This may 'clip' the corners from the input rectangular image,
2515        but will generate the exact reverse of a '<kbd>DePolar</kbd>' with
2516        the same arguments. <br/>
2517
2518        If the plus form of distort (<a href="command-line-options.html#distort" >+distort</a>) is used
2519        output image center will default to <code>0,0</code> of the virtual
2520        canvas, and the image size adjusted to ensure the whole input image is
2521        made visible in the output image on the virtual canvas. </td>
2522
2523   </tr>
2524
2525   <tr valign="top">
2526     <td valign="top"><kbd>DePolar</kbd></td>
2527     <td valign="top">
2528        Uses the same arguments and meanings as a '<kbd>Polar</kbd>' distortion
2529        but generates the reverse Polar to Cartesian distortion. <br/>
2530
2531        The special <em>Rmax</em> setting of '<code>0</code>' may however clip
2532        the corners of the input image.  However using the special
2533        <em>Rmax</em> setting of '<code>-1</code>' (maximum center to corner
2534        distance) will ensure the whole distorted image is preserved in the
2535        generated result, so that the same argument to '<kbd>Polar</kbd>' will
2536        reverse the distortion re-producing the original.
2537
2538        Note that as this distortion requires the area resampling of a circular
2539        arc, which can not be handled by the builtin EWA resampling function.
2540        As such the normal EWA filters are turned off. It is recommended some
2541        form of 'super-sampling' image processing technique be used to produce
2542        a high quality result. </td>
2543
2544   </tr>
2545
2546   <tr valign="top">
2547     <td valign="top"><kbd>Barrel</kbd></td>
2548     <td valign="top">
2549        Given the four coefficients (A,B,C,D) as defined by <a
2550        href="http://wiki.panotools.org/Lens_correction_model" >Helmut
2551        Dersch</a>, perform a barrel or pin-cushion distortion appropriate to
2552        correct radial lens distortions.  That is in photographs, make straight
2553        lines straight again. <br/>
2554
2555        Arguments: <em>A &nbsp; B &nbsp; C</em> &nbsp; [ <em>D</em> &nbsp; [
2556        <em>X</em> , <em>Y</em> ] ] <br/>
2557        or <em>A<sub>x</sub> B<sub>x</sub> C<sub>x</sub> D<sub>x</sub> &nbsp;
2558        A<sub>y</sub> B<sub>y</sub> C<sub>y</sub> D<sub>y</sub></em> &nbsp;
2559        [ <em>X</em> , <em>Y</em> ] <br/>
2560        So that it forms the function <br/>
2561           Rsrc = r * ( <em>A</em>*r<sup>3</sup> + <em>B</em>*r<sup>2</sup> +
2562                                <em>C</em>*r + <em>D</em> )<br/>
2563
2564        Where <em>X</em>,<em>Y</em> is the optional center of the distortion
2565        (defaulting to the center of the image). <br/>
2566        The second form is typically used to distort images, rather than
2567        correct lens distortions. <br/>
2568        </td>
2569
2570   </tr>
2571
2572   <tr valign="top">
2573     <td valign="top"><kbd>BarrelInverse</kbd></td>
2574     <td valign="top">
2575        This is very similar to '<kbd>Barrel</kbd>' with the same set of
2576        arguments, and argument handling.  However it uses the inverse
2577        of the radial polynomial,
2578        so that it forms the function <br/>
2579           Rsrc = r / ( <em>A</em>*r<sup>3</sup> + <em>B</em>*r<sup>2</sup> +
2580                                <em>C</em>*r + <em>D</em> )<br/>
2581        Note that this is not the reverse of the '<kbd>Barrel</kbd>'
2582        distortion, just a different barrel-like radial distortion method.
2583
2584        </td>
2585   </tr>
2586
2587   <tr valign="top">
2588     <td valign="top"><kbd>Shepards</kbd></td>
2589     <td valign="top">
2590        Distort the given list control points (any number) using an Inverse
2591        Squared Distance Interpolation Method (<a
2592        href="http://en.wikipedia.org/wiki/Shepard%27s_method" >Shepards
2593        Method</a>). The control points in effect do 'localized' displacement
2594        of the image around the given control point (preserving the look and
2595        the rotation of the area near the control points.  For best results
2596        extra control points should be added to 'lock' the positions of the
2597        corners, edges and other unchanging parts of the image, to prevent
2598        their movement. <br/>
2599
2600        The distortion has been likened to 'taffy pulling' using nails, or
2601        pins' stuck in a block of 'jelly' which is then moved to the new
2602        position, distorting the surface of the jelly. <br/>
2603
2604        Internally it is equivalent to generating a displacement map (see <a
2605        href="command-line-options.html#displace" >-displace</a>) for source image color look-up using
2606        the <a href="command-line-options.html#sparse-color" >-sparse-color</a> method of the same name.
2607
2608        </td>
2609   </tr>
2610
2611 </table>
2612
2613 <p>To print a complete list of distortion methods, use <a href="command-line-options.html#list">-list
2614 distort</a>.</p>
2615
2616 <p>Many of the above distortion methods such as '<kbd>Affine</kbd>',
2617 '<kbd>Perspective</kbd>', and '<kbd>Shepards</kbd>' use a list control points
2618 defining how these points in the given image should be distorted in the
2619 destination image. Each set of four floating point values represent a source
2620 image coordinate, followed immediately by the destination image coordinate.
2621 This produces a list of values such as...</p>
2622 <div style="text-align: center"><em>
2623       U<sub>1</sub>,V<sub>1</sub> X<sub>1</sub>,Y<sub>1</sub> &nbsp;
2624       U<sub>2</sub>,V<sub>2</sub> X<sub>2</sub>,Y<sub>2</sub> &nbsp;
2625       U<sub>3</sub>,V<sub>3</sub> X<sub>3</sub>,Y<sub>3</sub> &nbsp;
2626       ... &nbsp;
2627       U<sub>n</sub>,V<sub>n</sub> X<sub>n</sub>,Y<sub>n</sub> &nbsp;
2628 </em></div>
2629 <p>where <em>U,V</em> on the source image is mapped to <em>X,Y</em> on the
2630 destination image. </p>
2631
2632 <p>For example, to warp an image using '<kbd>perspective</kbd>' distortion,
2633 needs a list of at least 4 sets of coordinates, or 16 numbers.  Here is the
2634 perspective distortion of the built-in "rose:" image. Note how spaces were
2635 used to group the 4 sets of coordinate pairs, to make it easier to read and
2636 understand.</p>
2637
2638 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>
2639 convert rose:  -virtual-pixel black \<br/>
2640      -distort Perspective '0,0,0,0  0,45,0,45  69,0,60,10  69,45,60,35' \<br/>
2641      rose_3d_rotated.gif</span></p>
2642 <p>If more that the required number of coordinate pairs are given for
2643 a distortion, the distortion method is 'least squares' fitted to produce the
2644 best result for all the coordinate pairs given. If less than the ideal number
2645 of points are given, the distort will generally fall back to a simpler form of
2646 distortion that can handles the smaller number of coordinates (usually a linear
2647 '<kbd>Affine</kbd>' distortion). </p>
2648
2649 <p>By using more coordinates you can make use of image registration tool to
2650 find matching coordinate pairs in overlapping images, so as to improve the
2651 'fit' of the distortion. Of course a bad coordinate pair can also make the
2652 'fit' worse. Caution is always advised. </p>
2653
2654 <p>Colors are acquired from the source image according to the <a
2655 href="command-line-options.html#interpolate" >-interpolate</a> color lookup setting, when the image is
2656 magnified.  However if the viewed image is minified (image becomes smaller),
2657 a special area resampling function (added ImageMagick v6.3.5-9), is used to
2658 produce a higher quality image.  For example you can use
2659 a '<kbd>perspective</kbd>' distortion to view a infinitely tiled 'plane' all
2660 the way to the horizon. </p>
2661
2662 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>
2663 convert -size 90x90 pattern:checkerboard -normalize -virtual-pixel tile \<br/>
2664      -distort perspective  '0,0,5,45  89,0,45,46  0,89,0,89  89,89,89,89' \<br/>
2665      checks_tiled.jpg</span></p>
2666 <p>Note that a infinitely tiled perspective images involving the horizon can
2667 be very slow to generate due to the use of the high quality 'area resampling'
2668 function (added ImageMagick v6.3.5-9).  You can turn off 'area resampling'
2669 using a <a href="command-line-options.html#filter" >-filter</a> setting of '<kbd>point</kbd>'
2670 (recommended if you plan to use super-sampling instead). </p>
2671
2672 <p>If an image generates <i>invalid pixels</i>, such as the 'sky' in the last
2673 '<kbd>perspective</kbd>' distortion example, <a href="command-line-options.html#distort" >-distort</a>
2674 will use the current <a href="command-line-options.html#mattecolor" >-mattecolor</a> setting for these
2675 pixels. If you do not what these pixels to be visible, set the color to match
2676 the rest of the ground. </p>
2677
2678 <p>The output image size will by default be the same as the input image.  This
2679 means that if the part of the distorted image falls outside the viewed area of
2680 the 'distorted space', those parts is clipped and lost.  However if you use
2681 the plus form of the operator (<a href="command-line-options.html#distort" >+distort</a>) the operator
2682 will attempt (if possible) to show the whole of the distorted image, while
2683 retaining a correct 'virtual canvas' offset, for image layering. This offset
2684 may need to be removed using <a href="command-line-options.html#repage" >+repage</a>, to remove if it
2685 is unwanted. </p>
2686
2687 <p>You can alternatively specify a special "<kbd><a href="command-line-options.html#set" >-set</a>
2688 option:distort:viewport {geometry_string}</kbd>" setting which will specify
2689 the size and the offset of the generated 'viewport' image of the distorted
2690 image space.</p>
2691
2692 <p>Adding a "<kbd><a href="command-line-options.html#set" >-set</a> option:distort:scale
2693 {scale_factor}</kbd>" will scale the output image (viewport or otherwise) by
2694 that factor without changing the viewed contents of the distorted image. This
2695 can be used either for 'super-sampling' the image for a higher quality result,
2696 or for panning and zooming around the image (with appropriate viewport
2697 changes, or post-distort cropping and resizing). </p>
2698
2699 <p>Setting <a href="command-line-options.html#verbose" >-verbose</a> setting, will cause <a
2700 href="command-line-options.html#distort" >-distort</a> to attempt to output the internal coefficients,
2701 and the <a href="command-line-options.html#fx" >-fx</a> equivalent to the distortion, for expert study,
2702 and debugging purposes. This many not be available for all distorts. </p>
2703
2704 <p>Affine rotations and shears (such as '<kbd>SRT</kbd>' distortion), tend to
2705 produce a cleaner result that the equivalent <a href="command-line-options.html#rotate" >-rotate</a>
2706 and/or <a href="command-line-options.html#shear" >-shear</a> operation, with more control of due to the
2707 above settings. It is algorithmically slower however, though that may not be
2708 the case in ImageMagick's implementation.  </p>
2709
2710
2711 <div style="margin: auto;">
2712   <h4><a id="dither"></a>-dither <em class="arg">method</em></h4>
2713 </div>
2714
2715 <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
2716 images when general color reduction is applied via an option, or automagically
2717 when saving to specific formats. This enabled by default. </td><td style='text-align:right;'></td></tr></table>
2718
2719 <p>Dithering places two or more colors in neighboring pixels so that to the
2720 eye a closer approximation of the images original color is reproduced. This
2721 reduces the number of colors needed to reproduce the image but at the cost of
2722 a lower level pattern of colors. Error diffusion dithers can use any set of
2723 colors (generated or user defined) to an image.  </p>
2724
2725 <p>Dithering is turned on by default, to turn it off use the plus form of the
2726 setting, <a href="command-line-options.html#dither">+dither</a>. This will also also render PostScript
2727 without text or graphic aliasing. Disabling dithering often (but not always)
2728 leads to faster process, a smaller number of colors, but more cartoon like
2729 image coloring.  Generally resulting in 'color banding' effects in areas with
2730 color gradients. </p>
2731
2732 <p>The color reduction operators <a href="command-line-options.html#colors">-colors</a>, <a
2733 href="command-line-options.html#monochrome">-monochrome</a>, <a href="command-line-options.html#remap ">-remap</a>, and <a
2734 href="command-line-options.html#posterize">-posterize</a>, apply dithering to images using the reduced
2735 color set they created. These operators are also used as part of automatic
2736 color reduction when saving images to formats with limited color support, such
2737 as <kbd>GIF:</kbd>, <kbd>XBM:</kbd>, and others, so dithering may also be used
2738 in these cases. </p>
2739
2740 <p>Alternatively you can use <a href="command-line-options.html#random-threshold">-random-threshold</a>
2741 to generate purely random dither. Or use <a
2742 href="command-line-options.html#ordered-dither">-ordered-dither</a> to apply threshold mapped dither
2743 patterns, using uniform color maps, rather than specific color maps. </p>
2744
2745
2746 <div style="margin: auto;">
2747   <h4><a id="draw"></a>-draw <em class="arg">string</em></h4>
2748 </div>
2749
2750 <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>
2751
2752 <p>Use this option to annotate or decorate an image with one or more graphic
2753 primitives. The primitives include shapes, text, transformations, and pixel
2754 operations.</p>
2755
2756 <p>The shape primitives:</p>
2757
2758 <pre class="text">
2759    point           x,y
2760    line            x0,y0 x1,y1
2761    rectangle       x0,y0 x1,y1
2762    roundRectangle  x0,y0 x1,y1 wc,hc
2763    arc             x0,y0 x1,y1 a0,a1
2764    ellipse         x0,y0 rx,ry a0,a1
2765    circle          x0,y0 x1,y1
2766    polyline        x0,y0  ...  xn,yn
2767    polygon         x0,y0  ...  xn,yn
2768    bezier          x0,y0  ...  xn,yn
2769    path            path specification
2770    image           operator x0,y0 w,h filename
2771 </pre>
2772
2773 <p>The text primitive:</p>
2774
2775 <pre class="text">
2776    text            x0,y0 string
2777 </pre>
2778 <p>The text gravity primitive:</p>
2779
2780 <pre class="text">
2781    gravity         NorthWest, North, NorthEast, West, Center,
2782                    East, SouthWest, South, or SouthEast
2783 </pre>
2784
2785 <p>The text gravity primitive only affects the placement of text and does not
2786 interact with the other primitives.  It is equivalent to using the <a
2787 href="command-line-options.html#gravity">-gravity</a> command-line option, except that it is limited in
2788 scope to the <a href="command-line-options.html#draw">-draw</a> option in which it appears.</p>
2789
2790 <p>The transformation primitives:</p>
2791
2792 <pre class="text">
2793    rotate     degrees
2794    translate  dx,dy
2795    scale      sx,sy
2796    skewX      degrees
2797    skewY      degrees
2798 </pre>
2799
2800 <p>The pixel operation primitives:</p>
2801
2802 <pre class="text">
2803    color  x0,y0 method
2804    matte  x0,y0 method
2805 </pre>
2806
2807 <p>The shape primitives are drawn in the color specified by the preceding <a
2808 href="command-line-options.html#fill">-fill</a> setting.  For unfilled shapes, use <a
2809 href="command-line-options.html#fill">-fill none</a>.  You can optionally control the stroke (the
2810 "outline" of a shape) with the <a href="command-line-options.html#stroke">-stroke</a> and <a
2811 href="command-line-options.html#strokewidth">-strokewidth</a> settings.</p>
2812
2813 <p>A <kbd>point</kbd> primitive is specified by a single <em>point</em> in the
2814 pixel plane, that is, by an ordered pair of integer coordinates,
2815 <em>x</em>,<em>y</em>. (As it involves only a single pixel, a <kbd>point</kbd>
2816 primitive is not affected by <a href="command-line-options.html#stroke">-stroke</a> or <a
2817 href="command-line-options.html#strokewidth">-strokewidth</a>.)</p>
2818
2819 <p>A <kbd>line</kbd> primitive requires a start point and end point.</p>
2820
2821 <p>A <kbd>rectangle</kbd> primitive is specified by the pair of points at the
2822 upper left and lower right corners.</p>
2823
2824 <p>A <kbd>roundRectangle</kbd> primitive takes the same corner points as
2825 a <kbd>rectangle</kbd> followed by the width and height of the rounded corners
2826 to be removed.</p>
2827
2828 <p>The <kbd>circle</kbd> primitive makes a disk (filled) or circle (unfilled).
2829 Give the center and any point on the perimeter (boundary).</p>
2830
2831 <p>The <kbd>arc</kbd> primitive is used to inscribe an elliptical segment in
2832 to a given rectangle. An <kbd>arc</kbd> requires the two corners used for
2833 <kbd>rectangle</kbd> (see above) followed by the start and end angles of the
2834 arc of the segment segment (e.g. 130,30 200,100 45,90). The start and end
2835 points produced are then joined with a line segment and the resulting segment
2836 of an ellipse is filled.</p>
2837
2838 <p>Use <kbd>ellipse</kbd> to draw a partial (or whole) ellipse. Give the
2839 center point, the horizontal and vertical "radii" (the <em>semi-axes</em> of
2840 the ellipse) and start and end angles in degrees (e.g. 100,100 100,150
2841 0,360).</p>
2842
2843 <p>The <kbd>polyline</kbd> and <kbd>polygon</kbd> primitives require three or
2844 more points to define their perimeters. A <kbd>polyline</kbd> is simply
2845 a <kbd>polygon</kbd> in which the final point is not stroked to the start
2846 point. When unfilled, this is a <em>polygonal line</em>. If the <a
2847 href="command-line-options.html#stroke">-stroke</a> setting is <kbd>none</kbd> (the default), then
2848 a <kbd>polyline</kbd> is identical to a <kbd>polygon</kbd>.  </p>
2849
2850 <p>A <em>coordinate</em> is a pair of integers separated by a space or
2851 optional comma. </p>
2852
2853 <p>As an example, to define a circle centered at 100,100 that extends to
2854 150,150 use:</p>
2855
2856 <p class="crtsnip">
2857    -draw 'circle 100,100 150,150'
2858 </p>
2859
2860 <p>The <kbd>Bezier</kbd> primitive creates a spline curve and requires three
2861 or points to define its shape. The first and last points are the
2862 <em>knots</em> and these points are attained by the curve, while any
2863 intermediate coordinates are <em>control points</em>. If two control points
2864 are specified, the line between each end knot and its sequentially respective
2865 control point determines the tangent direction of the curve at that end. If
2866 one control point is specified, the lines from the end knots to the one
2867 control point determines the tangent directions of the curve at each end. If
2868 more than two control points are specified, then the additional control points
2869 act in combination to determine the intermediate shape of the curve. In order
2870 to draw complex curves, it is highly recommended either to use the
2871 <kbd>path</kbd> primitive or to draw multiple four-point bezier segments with
2872 the start and end knots of each successive segment repeated. For example:</p>
2873
2874 <p class="crtsnip">
2875    -draw 'bezier 20,50 45,100 45,0 70,50'
2876 </p>
2877 <p class="crtsnip">
2878    -draw 'bezier 70,50 95,100 95,0 120,50'
2879 </p>
2880
2881
2882 <p>A <kbd>path</kbd> represents an outline of an object, defined in terms of
2883 moveto (set a new current point), lineto (draw a straight line), curveto (draw
2884 a Bezier curve), arc (elliptical or circular arc) and closepath (close the
2885 current shape by drawing a line to the last moveto) elements. Compound paths
2886 (i.e., a path with subpaths, each consisting of a single moveto followed by
2887 one or more line or curve operations) are possible to allow effects such as
2888 <em>donut holes</em> in objects. (See <a
2889 href="http://www.w3.org/TR/SVG/paths.html">Paths</a>.)</p>
2890
2891 <p>Use <kbd>image</kbd> to composite an image with another image. Follow the
2892 image keyword with the composite operator, image location, image size, and
2893 filename:</p>
2894
2895 <p class="crtsnip">
2896    -draw 'image SrcOver 100,100 225,225 image.jpg'
2897 </p>
2898
2899 <p>You can use 0,0 for the image size, which means to use the actual
2900 dimensions found in the image header. Otherwise, it is scaled to the given
2901 dimensions. See <a href="compose.html">Alpha Compositing</a> for
2902 a detailed discussion of alpha composition methods that are available. </p>
2903
2904 The "special augmented compose operators" such as "dissolve" that require
2905 arguments cannot be used at present with the <kbd>-draw image</kbd> option.
2906  </p>
2907
2908 <p>Use <kbd>text</kbd> to annotate an image with text. Follow the text
2909 coordinates with a string. If the string has embedded spaces, enclose it in
2910 single or double quotes.</p>
2911
2912 <p>For example, the following annotates the image with <kbd>Works like
2913 magick!</kbd> for an image titled <kbd>bird.miff</kbd>. </p>
2914
2915 <p class="crtsnip">
2916    -draw "text 100,100 'Works like magick!' "
2917 </p>
2918
2919 <p>See the <a href="command-line-options.html#annotate">-annotate</a> option for another convenient way
2920 to annotate an image with text.</p>
2921
2922 <p>The <kbd>rotate</kbd> primitive rotates subsequent shape primitives and
2923 text primitives about the origin of the main image. If the <a
2924 href="command-line-options.html#region">-region</a> option precedes the <a href="command-line-options.html#draw">-draw</a>
2925 option, the origin for transformations is the upper left corner of the
2926 region.</p>
2927
2928 <p>The <kbd>translate</kbd> primitive translates subsequent shape and text
2929 primitives.</p>
2930
2931 <p>The <kbd>scale</kbd> primitive scales them.</p>
2932
2933 <p>The <kbd>skewX</kbd> and <kbd>skewY</kbd> primitives skew them with respect
2934 to the origin of the main image or the region.</p>
2935
2936 <p>The transformations modify the current affine matrix, which is initialized
2937 from the initial affine matrix defined by the <a href="command-line-options.html#affine">-affine</a>
2938 option. Transformations are cumulative within the <a href="command-line-options.html#draw">-draw</a>
2939 option. The initial affine matrix is not affected; that matrix is only changed
2940 by the appearance of another <a href="command-line-options.html#affine">-affine</a> option. If another
2941 <a href="command-line-options.html#draw">-draw</a> option appears, the current affine matrix is
2942 reinitialized from the initial affine matrix.</p>
2943
2944 <p>Use the <kbd>color</kbd> primitive to change the color of a pixel to the
2945 fill color (see <a href="command-line-options.html#fill">-fill</a>). Follow the pixel coordinate with
2946 a method:</p>
2947
2948 <pre class="text">
2949    point
2950    replace
2951    floodfill
2952    filltoborder
2953    reset
2954 </pre>
2955
2956 <p>Consider the target pixel as that specified by your coordinate. The
2957 <kbd>point</kbd> method recolors the target pixel. The <kbd>replace</kbd>
2958 method recolors any pixel that matches the color of the target pixel.
2959 <kbd>Floodfill</kbd> recolors any pixel that matches the color of the target
2960 pixel and is a neighbor, whereas <kbd>filltoborder</kbd> recolors any neighbor
2961 pixel that is not the border color. Finally, <kbd>reset</kbd> recolors all
2962 pixels.</p>
2963
2964 <p>Use <kbd>matte</kbd> to the change the pixel matte value to transparent.
2965 Follow the pixel coordinate with a method (see the <kbd>color</kbd> primitive
2966 for a description of methods). The <kbd>point</kbd> method changes the matte
2967 value of the target pixel. The <kbd>replace</kbd> method changes the matte
2968 value of any pixel that matches the color of the target pixel.
2969 <kbd>Floodfill</kbd> changes the matte value of any pixel that matches the
2970 color of the target pixel and is a neighbor, whereas <kbd>filltoborder</kbd>
2971 changes the matte value of any neighbor pixel that is not the border color (<a
2972 href="command-line-options.html#bordercolor">-bordercolor</a>). Finally <kbd>reset</kbd> changes the
2973 matte value of all pixels.</p>
2974
2975 <p>You can set the primitive color, font, and font bounding box color with <a
2976 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>
2977 respectively.  Options are processed in command line order so be sure to use
2978 these options <em>before</em> the <a href="command-line-options.html#draw">-draw</a> option.</p>
2979
2980 <p>Strings that begin with a number must be quoted (e.g. use '1.png' rather
2981 than 1.png).</p>
2982
2983 <p>Drawing primitives conform to the <a href="magick-vector-graphics.html" >Magick
2984 Vector Graphics</a> format.</p>
2985
2986
2987 <div style="margin: auto;">
2988   <h4><a id="duplicate"></a>-duplicate <em class="arg">count,indexes</em></h4>
2989 </div>
2990
2991 <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>
2992
2993 <p>Specify the count and the image to duplicate by its index in the sequence.
2994 The first image is index 0.  Negative indexes are relative to the end of the
2995 sequence, for example, -1 represents the last image of the sequence.  Specify
2996 a range of images with a dash (e.g. 0-4).  Separate indexes with a comma (e.g.
2997 0,2).  Use <kbd>+duplicate</kbd> to duplicate the last image in the current
2998 image sequence.</p>
2999
3000 <div style="margin: auto;">
3001   <h4><a id="edge"></a>-edge <em class="arg">radius</em></h4>
3002 </div>
3003
3004 <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>
3005
3006 <div style="margin: auto;">
3007   <h4><a id="emboss"></a>-emboss <em class="arg">radius</em></h4>
3008 </div>
3009
3010 <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>
3011
3012 <div style="margin: auto;">
3013   <h4><a id="encipher"></a>-encipher <em class="arg">filename</em></h4>
3014 </div>
3015
3016 <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>
3017
3018 <p>Get the passphrase from the file specified by <em class="arg"
3019 >filename</em>.</p>
3020
3021 <p>For more information, see the webpage, <a
3022 href="../www/cipher.html">ImageMagick: Encipher or
3023 Decipher an Image</a>.</p>
3024
3025
3026
3027 <div style="margin: auto;">
3028   <h4><a id="encoding"></a>-encoding <em class="arg">type</em></h4>
3029 </div>
3030
3031 <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>
3032
3033 <p>Choose from <kbd>AdobeCustom</kbd>, <kbd>AdobeExpert</kbd>,
3034 <kbd>AdobeStandard</kbd>, <kbd>AppleRoman</kbd>, <kbd>BIG5</kbd>,
3035 <kbd>GB2312</kbd>, <kbd>Latin 2</kbd>, <kbd>None</kbd>, <kbd>SJIScode</kbd>,
3036 <kbd>Symbol</kbd>, <kbd>Unicode</kbd>, <kbd>Wansung</kbd>.</p>
3037
3038 <div style="margin: auto;">
3039   <h4><a id="endian"></a>-endian <em class="arg">type</em></h4>
3040 </div>
3041
3042 <table style='background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%'><tr><td style='width:75%'>Specify endianness (<kbd>MSB</kbd> or <kbd>LSB</kbd>) of the image.</td><td style='text-align:right;'></td></tr></table>
3043
3044 <p>To print a complete list of endian types, use the <a href="command-line-options.html#list">-list endian</a> option.</p>
3045
3046 <p>Use <a href="command-line-options.html#endian">+endian</a> to revert to unspecified endianness.</p>
3047
3048
3049 <div style="margin: auto;">
3050   <h4><a id="enhance"></a>-enhance</h4>
3051 </div>
3052
3053 <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>
3054
3055
3056 <div style="margin: auto;">
3057   <h4><a id="equalize"></a>-equalize</h4>
3058 </div>
3059
3060 <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>
3061
3062 <p>To perform histogram equalization on all channels in concert, transform the
3063 image into some other color space, such as HSL, OHTA, YIQ or YUV, then
3064 equalize the appropriate intensity-like channel, then convert back to RGB.</p>
3065
3066 <p>For example using HSL, we have: ... <kbd>-colorspace HSL -channel lightness
3067 -equalize -colorspace RGB</kbd> ...</p>
3068
3069 <p>For YIQ, YUV and OHTA use the red channel. For example, OHTA is a principal
3070 components transformation that puts most of the information in the first
3071 channel. Here we have ... <kbd>-colorspace OHTA -channel red -equalize
3072 -colorspace RGB</kbd> ...</p>
3073
3074 <div style="margin: auto;">
3075   <h4><a id="evaluate"></a>-evaluate <em class="arg">operator value</em></h4>
3076 </div>
3077
3078 <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>
3079
3080 <p>(See the <a href="command-line-options.html#function" >-function</a> operator for some
3081 multi-parameter functions. See the <a href="command-line-options.html#fx" >-fx</a> operator if more
3082 elaborate calculations are needed.)</p>
3083
3084 <p>The behaviors of each <em class="arg">operator</em> are summarized in the
3085 following list. For brevity, the numerical value of a "pixel" referred to
3086 below is the value of the corresponding channel of that pixel, while
3087 a "normalized pixel" is that number divided by the maximum
3088 (installation-dependent) value <em class="QR">QuantumRange</em>. (If
3089 normalized pixels are used, they are restored, following the other
3090 calculations, to the full range by multiplying by <em
3091 class="QR">QuantumRange</em>.)</p>
3092
3093 <table class="doc">
3094   <col width="25%" />
3095   <col width="75%" />
3096   <thead>
3097   <tr>
3098   <th><em class="arg">operator</em></th>
3099   <th>Summary (see further below for details)</th>
3100   </tr>
3101   </thead>
3102   <tbody>
3103
3104     <tr><td>Abs </td>             <td>Add <em class="arg">value</em> to pixels and return absolute value. </td></tr>
3105     <tr><td>Add </td>             <td>Add <em class="arg">value</em> to pixels. </td></tr>
3106     <tr><td>AddModulus </td>      <td>Add <em class="arg">value</em> to pixels modulo <em class="QR">QuantumRange</em>.</td></tr>
3107     <tr><td>And  </td>            <td>Binary AND of pixels with <em class="arg">value</em>.</td></tr>
3108     <tr><td>Cos, Cosine </td>             <td>Apply cosine to pixels with frequency <em class="arg">value</em> with 50% bias added.</td></tr>
3109     <tr><td>Divide  </td>         <td>Divide pixels by <em class="arg">value</em>.</td></tr>
3110     <tr><td>Exp  </td>            <td>base-e exponential function</td></tr>
3111     <tr><td>Exponential  </td>            <td>base-e exponential function</td></tr>
3112     <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>
3113     <tr><td>Log  </td>            <td>Apply scaled logarithm to normalized pixels.</td></tr>
3114     <tr><td>Max  </td>            <td>Clip pixels at lower bound <em class="arg">value</em>.</td></tr>
3115     <tr><td>Mean  </td>            <td>Add the <em class="arg">value</em> and divide by 2.</td></tr>
3116     <tr><td>Median  </td>          <td>Choose the median value from an image sequence.</td></tr>
3117     <tr><td>Min  </td>            <td>Clip pixels at upper bound <em class="arg">value</em>.</td></tr>
3118     <tr><td>Multiply </td>        <td>Multiply pixels by <em class="arg">value</em>.</td></tr>
3119     <tr><td>Or  </td>             <td>Binary OR of pixels with <em class="arg">value</em>.</td></tr>
3120     <tr><td>Pow </td>             <td>Raise normalized pixels to the power <em class="arg">value</em>.</td></tr>
3121     <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>
3122     <tr><td>Set </td>             <td>Set pixel equal to <em class="arg">value</em>.</td></tr>
3123     <tr><td>Sin, Sine </td>             <td>Apply sine to pixels with frequency <em class="arg">value</em> with 50% bias added.</td></tr>
3124     <tr><td>Subtract </td>        <td>Subtract <em class="arg">value</em> from pixels.</td></tr>
3125     <tr><td>Xor </td>             <td>Binary XOR of pixels with <em class="arg">value.</em></td></tr>
3126
3127     <tr><td>&nbsp;</td></tr>
3128
3129    <tr><td>Gaussian-noise</td></tr>
3130    <tr><td>Impulse-noise</td></tr>
3131    <tr><td>Laplacian-noise</td></tr>
3132    <tr><td>Multiplicative-noise</td>      <td>(These are equivalent to the corresponding <a href="command-line-options.html#noise" >-noise</a> operators.)</td></tr>
3133    <tr><td>PoissonNoise</td></tr>
3134    <tr><td>Uniform-noise</td></tr>
3135
3136    <tr><td>&nbsp;</td></tr>
3137
3138    <tr><td>Threshold </td>       <td>Threshold pixels larger than <em class="arg">value</em>.</td></tr>
3139    <tr><td>ThresholdBlack </td>  <td>Threshold pixels to zero values equal to or below <em class="arg">value</em>.</td></tr>
3140    <tr><td>ThresholdWhite </td>  <td>Threshold pixels to maximum values above <em class="arg">value</em>.  </td></tr>
3141  </tbody>
3142  </table>
3143
3144 <p>The specified functions are applied only to each previously set <a
3145 href="command-line-options.html#channel" >-channel</a> in the image. If necessary, the results of the
3146 calculations are truncated (clipped) to fit in the interval [0,&nbsp;<em
3147 class="QR">QuantumRange</em>].  The transparency channel of the image is
3148 represented as a 'alpha' values (0 = fully transparent), so, for example, a
3149 <kbd>Divide</kbd> by&nbsp;2 of the alpha channel will make the image
3150 semi-transparent.  Append the percent symbol '<kbd>%</kbd>' to specify a value
3151 as a percentage of the <em class="QR">QuantumRange</em>.</p>
3152
3153 <p>To print a complete list of <a href="command-line-options.html#evaluate">-evaluate</a> operators, use
3154 <a href="command-line-options.html#list">-list evaluate</a>.</p>
3155
3156 <p>The results of the <kbd>Add</kbd>, <kbd>Subtract</kbd> and
3157 <kbd>Multiply</kbd> methods can also be achieved using either the <a
3158 href="command-line-options.html#level" >-level</a> or the <a href="command-line-options.html#level" >+level</a> operator, with
3159 appropriate argument, to linearly modify the overall range of color values.
3160 Please note, however, that <a href="command-line-options.html#level" >-level</a> treats transparency as
3161 'matte' values (0 = opaque), while <a href="command-line-options.html#level" >-evaluate</a> works with
3162 'alpha' values.</p>
3163
3164 <p><kbd>AddModulus</kbd> has been added as of ImageMagick 6.4.8-4 and provides
3165 addition modulo the <em class="QR">QuantumRange</em>. It is therefore
3166 equivalent to <kbd>Add</kbd> unless the resulting pixel value is outside the
3167 interval [0,&nbsp;<em class="QR">QuantumRange</em>]. </p>
3168
3169 <p><kbd>Exp or Exponential</kbd> has been added as of ImageMagick 6.6.5-1 and
3170 works on normalized pixel values. The <em class="arg">value</em> used with
3171 <kbd>Exp</kbd> should be negative so as to produce a decaying exponential
3172 function. Non-negative values will always produce results larger unity and
3173 thus outside the interval [0,&nbsp;<em class="QR">QuantumRange</em>]. The
3174 formula is expressed below. </p>
3175
3176         <div style="text-align:center;">
3177         exp(<em class="arg">value</em> &times; <b><em>u</em></b>)
3178         </div>
3179
3180 <p> If the input image is squared, for example, using <a href="command-line-options.html#-function"
3181 >-function polynomial "2 0 0"</a>, then a decaying Gaussian function will be
3182 the result.</p>
3183
3184 <p><kbd>Log</kbd> has been added as of ImageMagick 6.4.2-1 and works on
3185 normalized pixel values. This a <em>scaled</em> log function. The <em
3186 class="arg">value</em> used with <kbd>Log</kbd> provides a <em>scaling
3187 factor</em> that adjusts the curvature in the graph of the log function. The
3188 formula applied to a normalized value <b><em>u</em></b> is below. </p>
3189
3190         <div style="text-align:center;">
3191         log(<em class="arg">value</em> &times; <b><em>u</em></b> + 1) / log(<em class="arg">value</em> + 1)
3192         </div>
3193
3194 <p><kbd>Pow</kbd> has been added as of ImageMagick 6.4.1-9, and works on
3195 normalized pixel values. Note that <kbd>Pow</kbd> is related to the <a
3196 href="command-line-options.html#gamma" >-gamma</a> operator. For example, <b>-gamma 2</b> is equivalent
3197 to <b>-evaluate pow 0.5</b>, i.e., a 'square root' function. The value used
3198 with <a href="command-line-options.html#gamma" >-gamma</a> is simply the reciprocal of the value used
3199 with <kbd>Pow</kbd>.</p>
3200
3201 <p><kbd>Cosine</kbd> and <kbd>Sine</kbd> was added as of IM v6.4.8-8 and
3202 converts the image values into a value according to a (co)sine wave function.
3203 The  synonyms <kbd>Cos</kbd> and <kbd>Sin</kbd> may also be used.  The output
3204 is biased 50% and normalized by 50% so as to fit in the respective color value
3205 range.  The <em class="arg">value</em> scaling of the <em>period</em> of the
3206 function (its frequency), and thus determines the number of 'waves' that will
3207 be generated over the input color range.  For example, if the <em
3208 class="arg">value</em> is&nbsp;1, the effective period is simply the <em
3209 class="QR">QuantumRange</em>; but if the <em class="arg">value</em> is&nbsp;2,
3210 then the effective period is the <em>half</em> the <em
3211 class="QR">QuantumRange</em>.</p>
3212
3213         <div style="text-align:center;">
3214         0.5 + 0.5 &times; cos(2 &pi; <b><em>u</em></b> &times; <em class="arg">value</em>).
3215         </div>
3216
3217 <p>See also the <a href="command-line-options.html#function" >-function</a> operator, which is a
3218 multi-value version of evaluate. </p>
3219
3220 <div style="margin: auto;">
3221   <h4><a id="evaluate-sequence"></a>-evaluate-sequence <em class="arg">operator</em></h4>
3222 </div>
3223
3224 <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
3225 logical expression over a sequence of images.</td><td style='text-align:right;'></td></tr></table>
3226
3227 <p>To print a complete list of <a
3228 href="command-line-options.html#evaluate-sequence">-evaluate-sequence</a> operators, use <a
3229 href="command-line-options.html#list">-list evaluate</a>.</p>
3230
3231 <div style="margin: auto;">
3232   <h4><a id="extent"></a>-extent <em class="arg">geometry</em></h4>
3233 </div>
3234
3235 <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>
3236
3237 <p>If the image is enlarged, unfilled areas are set to the background color.
3238 To position the image, use offsets in the <em class="arg">geometry</em>
3239 specification or precede with a <a href="command-line-options.html#gravity">-gravity</a> setting.  To
3240 specify how to compose the image with the background, use <a href="command-line-options.html#compose"
3241 >-compose</a>.</p>
3242
3243 <p>This command reduces or expands a JPEG image to fit on an 800x600
3244 display.  If the aspect ratio of the input image isn't exactly 4:3, then the
3245 image is centered on an 800x600 black canvas: </p>
3246
3247 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert input.jpg -resize 800x600 -background black -compose Copy \ <br />  -gravity center -extent 800x600 -quality 92 output.jpg</span></p>
3248
3249
3250 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
3251
3252 <div style="margin: auto;">
3253   <h4><a id="extract"></a>-extract <em class="arg">geometry</em></h4>
3254 </div>
3255
3256 <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>
3257
3258 <p>This option is most useful for extracting a subregion of a very large raw
3259 image.  Note that these two commands are equivalent:</p>
3260
3261 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert -size 16000x16000 -depth 8 -extract 640x480+1280+960 \ <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/> image.rgb image.png</span></p><p>If you omit the offsets, as in</p>
3262
3263 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert -size 16000x16000 -depth 8 -extract 640x480 \ <br/> image.rgb image.png</span></p>
3264 <p>the image is <em>resized</em> to the specified dimensions instead,
3265 equivalent to:</p>
3266
3267 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert -size 16000x16000 -depth 8 -resize 640x480 image.rgb image.png</span></p>
3268 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
3269
3270 <div style="margin: auto;">
3271   <h4><a id="family"></a>-family <em class="arg">fontFamily</em></h4>
3272 </div>
3273
3274 <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>
3275
3276 <p>This setting suggests a font family that ImageMagick should try to use for
3277 rendering text. If the family can be found it is used; if not, a default font
3278 (e.g., "Arial") or a family known to be similar is substituted (e.g.,
3279 "Courier" might be used if "System" is requested but not found).  </p>
3280
3281 <p>For other settings that affect fonts, see the options <a
3282 href="command-line-options.html#font">-font</a>, <a href="command-line-options.html#stretch">-stretch</a>, <a
3283 href="command-line-options.html#style">-style</a>, and <a href="command-line-options.html#weight">-weight</a>.  </p>
3284
3285 <div style="margin: auto;">
3286   <h4><a id="features"></a>-features <em class="arg">distance</em></h4>
3287 </div>
3288
3289 <table style='background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%'><tr><td style='width:75%'>display 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;'></td></tr></table>
3290
3291 <div style="margin: auto;">
3292   <h4><a id="fft"></a>-fft</h4>
3293 </div>
3294
3295 <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>
3296
3297 <p>This option is new as of ImageMagick 6.5.4-3 (and now working for Windows
3298 users in ImageMagick 6.6.0-9). It transforms an image from the normal
3299 (spatial) domain to the frequency domain. In the frequency domain, an image is
3300 represented as a superposition of complex sinusoidal waves of varying
3301 amplitudes. The image x and y coordinates are the possible frequencies along
3302 the x and y directions, respectively, and the pixel intensity values are
3303 complex numbers that correspond to the sinusoidal wave amplitudes. See for
3304 example, <a href="http://en.wikipedia.org/wiki/Fourier_transform">Fourier
3305 Transform</a>, <a href="http://en.wikipedia.org/wiki/DFT">Discrete Fourier
3306 Transform</a> and <a href="http://en.wikipedia.org/wiki/FFT">Fast Fourier
3307 Transform</a>.</p>
3308
3309 <p>A single image name is provided as output for this option. However, the
3310 output result will have two components. It is either a two-frame image or two
3311 separate images, depending upon whether the image format specified supports
3312 multi-frame images. The reason that we get a dual output result is because the
3313 frequency domain represents an image using complex numbers, which cannot be
3314 visualized directly. Therefore, the complex values are automagically separated
3315 into a two-component image representation. The first component is the
3316 magnitude of the complex number and the second is the phase of the complex
3317 number. See for example, <a
3318 href="http://en.wikipedia.org/wiki/Complex_numbers">Complex Numbers</a>.</p>
3319
3320 <p>The magnitude and phase component images must be specified using image
3321 formats that do not limit the color or compress the image. Thus, MIFF, TIF,
3322 PFM, EXR and PNG are the recommended image formats to use. All of these
3323 formats, except PNG support multi-frame images. So for example,</p>
3324
3325 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert image.png -fft fft_image.miff</span></p>
3326 <p>generates a magnitude image as <kbd>fft_image.miff[0]</kbd> and a phase
3327 image as <kbd>fft_image.miff[1]</kbd>. Similarly,</p>
3328
3329 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert image.png -fft fft_image.png</span></p>
3330 <p>generates a magnitude image as <kbd>fft_image-0.png</kbd> and a phase image
3331 as <kbd>fft_image-1.png</kbd>. If you prefer this representation, then you can
3332 force any of the other formats to produce two output images by including <a
3333 href="command-line-options.html#adjoin">+adjoin</a> following -fft in the command line.</p>
3334
3335 <p>The input image can be any size, but if not square and even-dimensioned, it
3336 is padded automagically to the larger of the width or height of the input
3337 image and to an even number of pixels. The padding will occur at the bottom
3338 and/or right sides of the input image. The resulting output magnitude and
3339 phase images is square at this size. The kind of padding relies on the <a
3340 href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting.</p>
3341
3342 <p>Both output components will have dynamic ranges that fit within
3343 [0,&nbsp;<em class="QR">QuantumRange</em>], so that HDRI need not be enabled.
3344 Phase values nominally range from 0 to 2*&pi;, but is scaled to span the full
3345 dynamic range.  (The first few releases had non-HDRI scaled but HDRI not
3346 scaled). The magnitude image is not scaled and thus generally will contain
3347 very small values. As such, the image normally will appear totally black. In
3348 order to view any detail, the magnitude image typically is enhanced with a log
3349 function into what is usually called the spectrum. A log function is used to
3350 enhance the darker values more in comparison to the lighter values. This can
3351 be done, for example, as follows:</p>
3352
3353 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert fft_image.miff[0] -contrast-stretch 0 \ <br />
3354                 -evaluate log 1000 fft_image_spectrum.png</span></p>
3355 <p>where either <a href="command-line-options.html#contrast-stretch">-contrast-stretch</a> 0 or <a
3356 href="command-line-options.html#auto-level">-auto-level</a> is used to scale the image to full dynamic
3357 range, first. The argument to the <a href="command-line-options.html#evaluate">-evaluate</a> log
3358 typically is specified between 100 and 10,000, depending upon the amount of
3359 detail that one wants to bring out in the spectrum. Larger values produce more
3360 visible detail. Too much detail, however, may hide the important features.</p>
3361
3362 <p>The <a href="http://www.fftw.org/">FFTW</a> delegate library is required to
3363 use <a href="command-line-options.html#fft">-fft</a>.</p>
3364
3365 <p>Use <a href="command-line-options.html#fft">+fft</a> to produce two output images that are the real
3366 and imaginary components of the complex valued Fourier transform.</p>
3367
3368 <p>However, as the real and imaginary components can contain negative values,
3369 this requires that IM be configured with HDRI enabled. In this case, you must
3370 use either MIFF, TIF, PFM or MPC formats for the real and imaginary component
3371 results, since they are formats that preserve both negative and fractional
3372 values without clipping them or truncating the fractional part. With either
3373 MIFF or TIF, one should add -define quantum:format=32, to allow those image
3374 types to work properly in HDRI mode without clipping.</p>
3375
3376 <p>The real and imaginary component images resulting from <a
3377 href="command-line-options.html#fft">+fft</a> are also square, even dimensioned images due to the same
3378 padding that was discussed above for the magnitude and phase component
3379 images.</p>
3380
3381 <p>See the discussion on HDRI implementations of ImageMagick on the page <a
3382 href="high-dynamic-range.html" >High Dynamic-Range Images</a>. For more
3383 about HDRI go the ImageMagick <a
3384 href="http://www.imagemagick.org/Usage/basics/#hdri" >Usage</a> pages, <a
3385 href="http://www.fmwconcepts.com/imagemagick/fourier_transforms/fourier.html"
3386 >Fred's Fourier Processing With ImageMagick page</a> or this <a
3387  href="http://en.wikipedia.org/wiki/High_dynamic_range_imaging" >Wikipedia</a>
3388  entry.  </p>
3389
3390
3391 <div style="margin: auto;">
3392   <h4><a id="fill"></a>-fill <em class="arg">color</em></h4>
3393 </div>
3394
3395 <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>
3396
3397 <p>This option accepts a color name, a hex color, or a numerical RGB, RGBA,
3398 HSL, HSLA, CMYK, or CMYKA specification.  See <a href="color.html" >Color Names</a> for
3399 a description of how to properly specify the color argument.</p>
3400
3401 <p>Enclose the color specification in quotation marks to prevent the "#" or
3402 the parentheses from being interpreted by your shell.</p>
3403
3404 <p>For example,</p>
3405
3406 <p class="crtsnip">
3407   -fill blue
3408 </p>
3409 <p class="crtsnip">
3410   -fill "#ddddff"
3411 </p>
3412 <p class="crtsnip">
3413   -fill "rgb(255,255,255)"
3414 </p>
3415
3416 <p>See <a href="command-line-options.html#draw">-draw</a> for further details.</p>
3417
3418 <p>To print a complete list of color names, use the <a href="command-line-options.html#list">-list color</a> option.</p>
3419
3420 <div style="margin: auto;">
3421   <h4><a id="filter"></a>-filter <em class="arg">type</em></h4>
3422 </div>
3423
3424 <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
3425 distorting an image.</td><td style='text-align:right;'></td></tr></table>
3426
3427 <p>Use this option to affect the resizing operation of an image during
3428 operations such as <a href="command-line-options.html#resize">-resize</a> and <a href="command-line-options.html#distort"
3429 >-distort</a>. For example you can use a simple resize filter such as:</p>
3430
3431 <pre class="text">
3432    Point       Hermite       Cubic
3433    Box         Gaussian      Catrom
3434    Triangle    Quadratic     Mitchell
3435 </pre>
3436
3437 <p>The <kbd>Bessel</kbd> and <kbd>Sinc</kbd> filter is also provided (as well
3438 as a faster <kbd>SincFast</kbd> equivalent form).  However these filters are
3439 generally useless on their own as they are infinite filters that are being
3440 clipped to the filters support size. Their direct use is not recommended
3441 except via expert settings (see below). </p>
3442
3443 <p>Instead these special filter functions are typically windowed by a windowing
3444 function that the <a href="command-line-options.html#filter" >-filter</a> setting defines.   That is
3445 using these functions will define a 'Windowed' filter, appropriate to the
3446 operator involved.  Windowed filters include: </p>
3447
3448 <pre class="text">
3449    Lanczos       Hamming       Parzen
3450    Blackman      Kaiser        Welsh
3451    Hanning       Bartlett      Bohman
3452 </pre>
3453
3454 <p>Also one special self-windowing filter is also provided
3455 <kbd>Lagrange</kbd>, which will automagically re-adjust its function depending
3456 on the current 'support' or 'lobes' expert settings (see below).</p>
3457
3458 <p>If you do not select a filter with this option, the filter defaults to
3459 <kbd>Mitchell</kbd> for a colormapped image, a image with a matte channel, or
3460 if the image is enlarged.  Otherwise the filter default to
3461 <kbd>Lanczos</kbd>.</p>
3462
3463 <p>To print a complete list of resize filters, use the <a href="command-line-options.html#list">-list
3464 filter</a> option.</p>
3465
3466 <p>You can modify how the filter behaves as it scales your image through the
3467 use of these expert settings (see also <a href="command-line-options.html#define" >-define</a> and <a
3468 href="command-line-options.html#set" >-set</a>):-</p>
3469
3470 <dl class="doc">
3471 <dt>-define filter:blur=<em>factor</em></dt>
3472 <dd>Scale the X axis of the filter (and its window). Use &gt; 1.0 for
3473     blurry or &lt; 1.0 for sharp. This should only be used with Gaussian and
3474     Gaussian-like filters simple filters, or you may not get the expected
3475     results. </dd>
3476
3477 <dt>-define filter:support=<em>radius</em></dt>
3478 <dd>Set the filter support radius. Defines how large the filter should be and
3479     thus directly defines how slow the filtered resampling process is. All
3480     filters have a default 'prefered' support size. Some filters like
3481     <kbd>Lagrange</kbd> and windowed filters adjust themselves depending on
3482     this value.  With simple filters this value either does nothing (but slow
3483     the resampling), or will clip the filter function in a detrimental way.
3484     </dd>
3485
3486 <dt>-define filter:lobes=<em>count</em></dt>
3487 <dd>Set the number of lobes to use for the Sinc/Bessel filter. This an
3488     alternative way of specifying the 'support' range of the filter, that is
3489     designed to be more suited to windowed filters, especially when used for
3490     image distorts.</dd>
3491
3492 <dt>-define filter:sigma=<em>value</em></dt>
3493 <dd>The 'sigma' value used to define the <kbd>Gaussian</kbd> filter.  Default
3494     sigma value is '<kbd>0.5</kbd>'.  It only effects <kbd>Gaussian</kbd> but
3495     does not shrink (but may enlarge) the filter's 'support'.  It can be used
3496     to generate very small blurs but without the filter 'missing' pixels due
3497     to using a small support setting. A larger value of '<kbd>0.707</kbd>'
3498     (a value of '1/sqrt(2)') is another common setting. </dd>
3499
3500 <dt>-define filter:b=<em>b-spline_factor</em></dt>
3501 <dt>-define filter:c=<em>keys_alpha_factor</em></dt>
3502 <dd>Redefine the values used for cubic filters such as <kbd>Cubic</kbd>,
3503     <kbd>Catrom</kbd>, <kbd>Mitchel</kbd>, and <kbd>Hermite</kbd>, as well as
3504     the <kbd>Parzen</kbd> cubic windowing function. If only one of the values
3505     are defined, the other is set so as to generate a 'Cubic-Keys' filter.
3506     The values meaning was defined by a research paper by
3507     Mitchell-Netravali.</dd>
3508
3509 <dt>-define filter:kaiser-beta=<em>value</em></dt>
3510 <dd>The 'alpha' value used to as part of the Kaiser Windowing function.
3511     Default value is '6.5'.  It only effects Kaiser windowing function, and
3512     does not effect any other attributes.</dd>
3513
3514 <dd>Before IM v6.7.6-10, this option was known as "filter:alpha", (an
3515     inheritance from the very old "zoom" program). It was changed to bring the
3516     function in line with more modern academic research usage, and better
3517     assign it be more definitive.  </dd>
3518
3519 <dt>-define filter:kaiser-alpha=<em>value</em></dt>
3520 <dd>This value when multiplied by 'PI' is equivelent to "kaiser-beta", and
3521     will override that setting.  It only effects Kaiser windowing function,
3522     and does not effect any other attributes. </dd>
3523
3524 <dt>-define filter:filter=<em>filter_function</em></dt>
3525 <dd>Use this function directly as the weighting filter.  This will allow
3526     you to directly use a windowing function such as <kbd>Blackman</kbd>,
3527     as a resampling filter, rather than as its normal usage as a windowing
3528     function. </dd>
3529
3530 <dd>If defined, no windowing function also defined, the window function is set
3531     to <kbd>Box</kbd>). Directly specifying <kbd>Sinc</kbd> or <kbd>Jinc</kbd>
3532     as a filter will also do this. </dd>
3533
3534 <dt>-define filter:window=<em>filter_function</em></dt>
3535 <dd>The IIR (infinite impulse response) filters <kbd>Sinc</kbd> and
3536     <kbd>Jinc</kbd> are windowed (brought down to zero over the defined
3537     support range) with the given filter. This allows you to specify a filter
3538     function to be used as a windowing function for these IIR filters. </dd>
3539
3540 <dd>Many of the defined filters are actually windowing functions for these IIR
3541     filters.  A typical choices is <kbd>Box</kbd>, (which effectively turns
3542     off the windowing function).  </dd>
3543
3544 <dt>-define filter:verbose=<em>1</em></dt>
3545 <dd>This causes IM to print information on the final internal filter
3546     selection to standard output.  This includes a commented header on the
3547     filter settings being used, and data allowing the filter weights to be
3548     easily graphed. </dd>
3549
3550 <dd>Note however that some filters are internally defined in terms of other
3551     filters.  The <kbd>Lanczos</kbd> filter for example is defined in terms of
3552     a <kbd>SincFast</kbd> windowed <kbd>SincFast</kbd> filter, while
3553     <kbd>Mitchell</kbd> is defined as a <kbd>Cubic</kbd> filter with specific
3554     'B' and 'C' settings. </dd>
3555
3556 </dl>
3557
3558 <p>For example, to get a 8 lobe Bessel windowed Bessel filter:</p>
3559
3560 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert image.png -filter bessel \<br/>
3561           -set filter:window=bessel -set filter:lobes=8 \<br/>
3562           -resize 150%   image.jpg</span></p>
3563 <p>Or a raw un-windowed Sinc filter with 4 lobes:</p>
3564
3565 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert image.png -set filter:filter=sinc -set filter:lobes=4 \<br/>
3566           -resize 150%   image.jpg</span></p>
3567 <p>To extract the data for a raw windowing function, combine it with
3568 a '<kbd>Box</kbd>' filter.  For example the '<kbd>Welsh</kbd> parabolic
3569 windowing function. </p>
3570
3571 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert null: -define filter:filter=Box \<br/>
3572                  -define filter:window=Welsh \<br/>
3573                  -define filter:support=1.0 \<br/>
3574                  -define filter:verbose=1 \<br/>
3575                  -resize 2 null:  > window_welsh.dat<br/>
3576   gnuplot<br/>
3577      set grid<br/>
3578      plot "window_welsh.dat" with lines</span></p>
3579 <p>Note that the use of expert options is provided for image processing experts
3580 who have studied and understand how resize filters work. Without this
3581 knowledge, and an understanding of the definition of the actual filters
3582 involved, using expert settings are more likely to be detrimental to your image
3583 resizing.</p>
3584
3585
3586 <div style="margin: auto;">
3587   <h4><a id="flatten"></a>-flatten</h4>
3588 </div>
3589
3590 <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>
3591
3592
3593 <div style="margin: auto;">
3594   <h4><a id="flip"></a>-flip</h4>
3595 </div>
3596
3597 <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>
3598
3599 <p>reflect the scanlines in the vertical direction. The image will be mirrored
3600 upside-down. </p>
3601
3602
3603 <div style="margin: auto;">
3604   <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>
3605 </div>
3606
3607 <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>
3608
3609 <p>Flood fill starts from the given 'seed point' which is not gravity effected.
3610 Any color that matches within <a href="command-line-options.html#fuzz" >-fuzz</a> color distance of the
3611 given <em class="arg">color</em>  argument, connected to that 'seed point'
3612 will be replaced with the current <a href="command-line-options.html#fill" >-fill</a> color. </p>
3613
3614 <p>Note that if the pixel at the 'seed point' does not itself match the given
3615 <em class="arg">color</em> (according to <a href="command-line-options.html#fuzz" >-fuzz</a>), then no
3616 action will be taken. </p>
3617
3618 <p>This operator works more like the <a href="command-line-options.html#opaque" >-opaque</A> option, than
3619 a more general flood fill that reads the matching color directly at the 'seed
3620 point'. For this form of flood fill, look at <a href="command-line-options.html#draw" >-draw</a>  and
3621 its 'color floodfill' drawing method.  </p>
3622
3623
3624 <div style="margin: auto;">
3625   <h4><a id="flop"></a>-flop</h4>
3626 </div>
3627
3628 <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>
3629
3630 <p>Reflect the scanlines in the horizontal direction, just like the image in
3631 a vertical mirror. </p>
3632
3633
3634 <div style="margin: auto;">
3635   <h4><a id="font"></a>-font <em class="arg">name</em></h4>
3636 </div>
3637
3638 <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>
3639
3640 <p>To print a complete list of fonts, use the <a href="command-line-options.html#list">-list font</a>
3641 option (for versions prior to 6.3.6, use 'type' instead of 'font').</p>
3642
3643 <p>In addition to the fonts specified by the above pre-defined list, you can
3644 also specify a font from a specific source.  For example <kbd>Arial.ttf</kbd>
3645 is a TrueType font file, <kbd>ps:helvetica</kbd> is PostScript font, and
3646 <kbd>x:fixed</kbd> is X11 font.</p>
3647
3648 <p>For other settings that affect fonts, see the options <a
3649 href="command-line-options.html#family">-family</a>, <a href="command-line-options.html#stretch">-stretch</a>, <a
3650 href="command-line-options.html#style">-style</a>, and <a href="command-line-options.html#weight">-weight</a>. </p>
3651
3652
3653 <div style="margin: auto;">
3654   <h4><a id="foreground"></a>-foreground <em class="arg">color</em></h4>
3655 </div>
3656
3657 <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>
3658
3659 <p>The color is specified using the format described under the <a
3660 href="command-line-options.html#fill">-fill</a> option.</p>
3661
3662 <p>The default foreground color is black.</p>
3663
3664 <div style="margin: auto;">
3665   <h4><a id="format"></a>-format <em class="arg">type</em></h4>
3666 </div>
3667
3668 <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>
3669
3670 <p>When used with the <kbd>mogrify</kbd> utility, this option converts any
3671 image to the image <a href="formats.html">format</a> you specify.
3672 For a list of image format types supported by ImageMagick, use <a
3673 href="command-line-options.html#list">-list format</a>.</p>
3674
3675 <p>By default the file is written to its original name. However, if the
3676 filename extension matches a supported format, the extension is replaced with
3677 the image format type specified with <a href="command-line-options.html#format">-format</a>. For
3678 example, if you specify <em class="arg">tiff</em> as the format type and the
3679 input image filename is <em class="arg">image.gif</em>, the output image
3680 filename becomes <em class="arg">image.tiff</em>.</p>
3681
3682 <div style="margin: auto;">
3683   <h4><a id="format_identify_"></a>-format <em class="arg">string</em></h4>
3684 </div>
3685
3686 <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>
3687
3688 <p>See <a href="escape.html">Format and Print Image
3689 Properties</a> for an explanation on how to specify the argument to this
3690 option.</p>
3691
3692 <div style="margin: auto;">
3693   <h4><a id="frame"></a>-frame <em class="arg">geometry</em></h4>
3694 </div>
3695
3696 <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>
3697
3698 <p>The color of the border is specified with the <a href="command-line-options.html#mattecolor"
3699 >-mattecolor</a> command line option. </p>
3700
3701 <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
3702 class="arg">geometry</em> argument indicates the amount of extra width and
3703 height that is added to the dimensions of the image. If no offsets are given
3704 in the <em class="arg">geometry</em> argument, then the border added is
3705 a solid color.  Offsets <em>x</em> and <em>y</em>, if present, specify that
3706 the width and height of the border is partitioned to form an outer bevel of
3707 thickness <em>x</em>&nbsp;pixels and an inner bevel of thickness
3708 <em>y</em>&nbsp;pixels. Negative offsets make no sense as frame arguments.
3709 </p>
3710
3711 <p>The <a href="command-line-options.html#frame">-frame</a> option is affected by the current <a
3712 href="command-line-options.html#compose">-compose</a> setting and assumes that this is using the default
3713 '<kbd>Over</kbd>' composition method.  It generates a image of the appropriate
3714 size with the current <a href="command-line-options.html#bordercolor">-bordercolor</a> setting, and then
3715 draws the frame of four distinct colors close to the current <a
3716 href="command-line-options.html#mattecolor">-mattecolor</a>.  The original image is then overlaid onto
3717 center of this image.  This means that with the default compose method of
3718 '<kbd>Over</kbd>' any transparent parts may be replaced by the current <a
3719 href="command-line-options.html#bordercolor">-bordercolor</a> setting.</p>
3720
3721 <p>The image composition is not
3722 affected by the <a href="command-line-options.html#gravity">-gravity</a> option.</p>
3723
3724
3725 <div style="margin: auto;">
3726   <h4><a id="frame_import_"></a>-frame</h4>
3727 </div>
3728
3729 <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>
3730
3731 <div style="margin: auto;">
3732   <h4><a id="function"></a>-function <em class="arg">function</em> <em class="arg">parameters</em></h4>
3733 </div>
3734
3735 <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>
3736
3737 <p>This operator performs calculations based on the given arguments to modify
3738 each of the color values for each previously set <a
3739 href="command-line-options.html#channel">-channel</a> in the image. See <a
3740 href="command-line-options.html#evaluate">-evaluate</a> for details concerning how the results of the
3741 calculations are handled.</p>
3742
3743 <p>This is can be considered a multi-argument version of the <a
3744 href="command-line-options.html#evaluate">-evaluate</a> operator. (Added in
3745 ImageMagick&nbsp;6.4.8&minus;8.)</p>
3746
3747 <p>Here,  <em class="arg">parameters</em> is a comma-separated list of
3748 numerical values. The number of values varies depending on which <em
3749 class="arg">function</em> is selected. Choose the <em
3750 class="arg">function</em> from:</p>
3751
3752 <pre class="text">
3753    Polynomial
3754    Sinusoid
3755    Arcsin
3756    Arctan
3757 </pre>
3758
3759 <p>To print a complete list of <a href="command-line-options.html#function">-function</a> operators,
3760 use <a href="command-line-options.html#list">-list function</a>. Descriptions follow.</p>
3761
3762 <dl class="doc">
3763 <dt><kbd>Polynomial</kbd></dt>
3764 <dd>
3765
3766 <p>The <kbd>Polynomial</kbd> function takes an arbitrary number of parameters,
3767 these being the coefficients of a polynomial, in decreasing order of degree.
3768 That is, entering</p>
3769
3770 <div style="text-align: center">
3771    -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>
3772 </div>
3773
3774 <p>will invoke a polynomial function given by</p>
3775
3776 <div style="text-align: center">
3777    <em>a</em><sub><em>n</em></sub> <b><em>u</em></b><sup><em>n</em></sup> +
3778    <em>a</em><sub><em>n</em>-1</sub> <b><em>u</em></b><sup><em>n</em>-1</sup> +
3779    &middot;&middot;&middot; <em>a</em><sub>1</sub> <b><em>u</em></b> + <em>a</em><sub>0</sub>,
3780 </div>
3781
3782 <p>where <b><em>u</em></b> is pixel's original normalized channel value.</p>
3783
3784 <p>The <kbd>Polynomial</kbd> function can be used in place of <kbd>Set</kbd>
3785 (the <em>constant</em> polynomial) and <kbd>Add</kbd>, <kbd>Divide</kbd>,
3786 <kbd>Multiply</kbd>, and <kbd>Subtract</kbd> (some <em>linear</em>
3787 polynomials) of the <a href="command-line-options.html#evaluate">-evaluate</a> operator. The <a
3788 href="command-line-options.html#level">-level</a> operator also affects channels linearly. Some
3789 correspondences follow.</p>
3790
3791 <table class="doc">
3792   <col width="35%" />
3793   <col width="35%" />
3794   <col width="30%" />
3795   <tr>
3796         <td>-evaluate Set <em class="arg">value</em> </td>
3797         <td>-function Polynomial <em class="arg">value</em></td>
3798         <td>(Constant functions; set <em class="arg">value</em>&times;100% gray when channels are RGB.)</td>
3799   </tr>
3800   <tr>
3801         <td>-evaluate Add <em class="arg">value</em> </td>
3802         <td>-function Polynomial 1,<em class="arg">value</em></td>
3803   </tr>
3804   <tr>
3805         <td>-evaluate Subtract <em class="arg">value</em> </td>
3806         <td>-function Polynomial 1,&minus;<em class="arg">value</em></td>
3807   </tr>
3808   <tr>
3809         <td>-evaluate Multiply <em class="arg">value</em> </td>
3810         <td>-function Polynomial <em class="arg">value</em>,0</td>
3811   </tr>
3812   <tr>
3813         <td>+level  black% x white%</td>
3814         <td>-function Polynomial  A,B</td>
3815         <td>(Reduce contrast. Here, A=(white-black)/100 and  B=black/100.)</td>
3816   </tr>
3817 </table>
3818
3819 <p>The <kbd>Polynomial</kbd> function gives great versatility, since
3820 polynomials can be used to fit any continuous curve to any degree of accuracy
3821 desired.</p>
3822
3823 </dd>
3824
3825 <dt><kbd>Sinusoid</kbd></dt>
3826 <dd>
3827 <p>The <kbd>Sinusoid</kbd> function can be used to vary the channel values
3828 sinusoidally by setting frequency, phase shift, amplitude, and a bias. These
3829 values are given as one to four parameters, as follows,</p>
3830
3831 <div style="text-align: center">
3832    -function <kbd>Sinusoid</kbd> <em class="arg">freq</em>,[<em class="arg">phase</em>,[<em class="arg">amp</em>,[<em class="arg">bias</em>]]]
3833 </div>
3834
3835 <p>where <em>phase</em> is in degrees. (The domain [0,1] of the function
3836 corresponds to 0 through <em class="arg">freq</em>&times;360&nbsp;degrees.)
3837 The result is that if a pixel's normalized channel value is originally
3838 <b><em>u</em></b>, its resulting normalized value is given by </p>
3839
3840 <div style="text-align: center">
3841 <em class="arg">amp</em> * sin(2*&pi;* (<em class="arg">freq</em> * <b><em>u</em></b> + <em class="arg">phase</em> / 360)) + <em class="arg">bias</em>
3842 </div>
3843
3844 <p> For example, the following generates a curve that starts and ends at 0.9
3845 (when <b><em>u</em></b>=0 and 1, resp.), oscillating three times between
3846 .7&minus;.2=.5 and .7+.2=.9. </p>
3847
3848 <p class="crtsnip">
3849    -function Sinusoid 3,-90,.2,.7
3850 </p>
3851
3852 <p>The default values of <em class="arg">amp</em> and <em
3853 class="arg">bias</em> are both .5. The default for <em class="arg">phase</em>
3854 is 0.</p>
3855
3856 <p>The <kbd>Sinusoid</kbd> function generalizes <kbd>Sin</kbd> and
3857 <kbd>Cos</kbd> of the <a href="command-line-options.html#evaluate">-evaluate</a> operator by allowing
3858 varying amplitude, phase and bias. The correspondence is as follows.</p>
3859
3860 <table class="doc">
3861   <tr>
3862         <td>-evaluate Sin <em class="arg">freq</em> </td>
3863         <td>-function Sinusoid <em class="arg">freq</em>,0 </td>
3864   </tr>
3865   <tr>
3866         <td>-evaluate Cos <em class="arg">freq</em> </td>
3867         <td>-function Sinusoid <em class="arg">freq</em>,90 </td>
3868   </tr>
3869 </table>
3870 </dd>
3871
3872 <dt><kbd>ArcSin</kbd></dt>
3873 <dd>
3874 <p>The <kbd>ArcSin</kbd> function generates the inverse curve of a Sinusoid,
3875 and can be used to generate cylindrical distortion and displacement maps.
3876 The curve can be adjusted relative to both the input values and output range
3877 of values.</p>
3878
3879 <p style="text-align: center">
3880    -function <kbd>ArcSin</kbd> <em class="arg">width</em>,[<em class="arg">center</em>,[<em class="arg">range</em>,[<em class="arg">bias</em>]]]
3881 </p>
3882
3883 <p>with all values given in terms of normalized color values (0.0 for black,
3884 1.0 for white). Defaulting to values covering the full range from 0.0 to 1.0
3885 for bout input (<em class="arg">width</em>), and output (<em
3886 class="arg">width</em>) values. '<code>1.0,0.5,1.0,0.5</code>' </p>
3887
3888 <p style="text-align: center">
3889 <em class="arg">range</em>/&pi; * asin( 2/<em class="arg">width</em> * ( <b><em>u</em></b> - <em class="arg">center</em> ) ) + <em class="arg">bias</em>
3890 </p>
3891
3892 </dd>
3893
3894 <dt><kbd>ArcTan</kbd></dt>
3895 <dd>
3896 <p>The <kbd>ArcTan</kbd> function generates a curve that smooth crosses from
3897 limit values at infinities, though a center using the given slope value.
3898 All these values can be adjusted via the arguments.</p>
3899
3900 <p style="text-align: center">
3901    -function <kbd>ArcTan</kbd> <em class="arg">slope</em>,[<em class="arg">center</em>,[<em class="arg">range</em>,[<em class="arg">bias</em>]]]
3902 </p>
3903
3904 <p>Defaulting to '<code>1.0,0.5,1.0,0.5</code>'.
3905 </p>
3906
3907 <p style="text-align: center">
3908 <em class="arg">range</em>/&pi; * atan( <em class="arg">slope</em>*&pi; * ( <b><em>u</em></b> - <em class="arg">center</em> ) ) + <em class="arg">bias</em>
3909 </p>
3910
3911 </dd>
3912
3913 </dl>
3914
3915
3916 <div style="margin: auto;">
3917   <h4><a id="fuzz"></a>-fuzz <em class="arg">distance</em>{<em class="arg">%</em>}</h4>
3918 </div>
3919
3920 <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>
3921
3922 <p>A number of algorithms search for a target color. By default the color must
3923 be exact. Use this option to match colors that are close to the target color
3924 in RGB space. For example, if you want to automagically trim the edges of an
3925 image with <a href="command-line-options.html#trim">-trim</a> but the image was scanned and the target
3926 background color may differ by a small amount. This option can account for
3927 these differences.</p>
3928
3929 <p>The <em class="arg">distance</em> can be in absolute intensity units or, by
3930 appending <kbd>%</kbd> as a percentage of the maximum possible intensity (255,
3931 65535, or 4294967295).</p>
3932
3933
3934 <div style="margin: auto;">
3935   <h4><a id="fx"></a>-fx <em class="arg">expression</em></h4>
3936 </div>
3937
3938 <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>
3939
3940 <p>If the first character of <em class="arg">expression</em> is <kbd>@</kbd>,
3941 the expression is read from a file titled by the remaining characters in the
3942 string.</p>
3943
3944 <p>See <a href="fx.html">FX,
3945 The Special Effects Image Operator</a> for a detailed discussion of this
3946 option.</p>
3947
3948
3949 <div style="margin: auto;">
3950   <h4><a id="gamma"></a>-gamma <em class="arg">value</em></h4>
3951 </div>
3952
3953 <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>
3954
3955 <p>The same color image displayed on two different workstations may look
3956 different due to differences in the display monitor. Use gamma correction to
3957 adjust for this color difference.  Reasonable values extend from
3958 <kbd>0.8</kbd> to <kbd>2.3</kbd>. Gamma less than 1.0 darkens the image and
3959 gamma greater than 1.0 lightens it. Large adjustments to image gamma may
3960 result in the loss of some image information if the pixel quantum size is only
3961 eight bits (quantum range 0 to 255).</p>
3962
3963 <p>Gamma adjusts the image's channel values pixel-by-pixel according to
3964 a power law, namely, pow(pixel,1/gamma) or pixel^(1/gamma), where pixel is the
3965 normalized or 0 to 1 color value. For example, using a value of gamma=2 is the
3966 same as taking the square root of the image.</p>
3967
3968 <p>You can apply separate gamma values to the red, green, and blue channels of
3969 the image with a gamma value list delimited with commas (e.g.,
3970 <kbd>1.7,2.3,1.2</kbd>).</p>
3971
3972 <p>Use <a href="command-line-options.html#gamma">+gamma <em class="arg">value</em></a> to set the
3973 image gamma level without actually adjusting the image pixels. This option
3974 is useful if the image is of a known gamma but not set as an image attribute
3975 (e.g. PNG images).  Write the "file gamma" which is the reciprocal of the
3976 display gamma; e.g., if your image is sRGB and you want to write a PNG gAMA
3977 chunk, use
3978 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert input.png +gamma .45455 output.png</span></p>(0.45455 is 1/2.2)</p>
3979
3980 <p>Note that gamma adjustments are also available via the <a href="command-line-options.html#level">-level</a> operator.</p>
3981
3982 <div style="margin: auto;">
3983   <h4><a id="gaussian-blur"></a>-gaussian-blur <em class="arg">radius</em><br />-gaussian-blur <em class="arg">radius</em>x<em class="arg">sigma</em>+<em class="arg">bias</em></h4>
3984 </div>
3985
3986 <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>
3987
3988 <p>Convolve the image with a Gaussian or normal distribution using the given
3989 <em class="arg" >Sigma</em> value.  The formula is:</p>
3990
3991 <div class="eqn"><img alt="gaussian distribution" width="243px" height="42px" src="../images/gaussian-blur.png"/>
3992 </div>
3993
3994 <p>The <em class="arg" >Sigma</em> value is the important argument, and
3995 determines the actual amount of blurring that will take place. </p>
3996
3997 <p>The <em class="arg" >Radius</em> is only used to determine the size of the
3998 array which will hold the calculated Gaussian distribution. It should be an
3999 integer.  If not given, or set to zero, IM will calculate the largest possible
4000 radius that will provide meaningful results for the Gaussian distribution.
4001 </p>
4002
4003 <p>The larger the <em class="arg" >Radius</em> the radius the slower the
4004 operation is. However too small a <em class="arg" >Radius</em>, and sever
4005 aliasing effects may result.  As a guideline, <em class="arg" >Radius</em>
4006 should be at least twice the <em class="arg" >Sigma</em> value, though three
4007 times will produce a more accurate result. </p>
4008
4009 <p>This differs from the faster <a href="command-line-options.html#blur">-blur</a> operator in that a
4010 full 2-dimensional convolution is used to generate the weighted average of the
4011 neighboring pixels. </p>
4012
4013 <p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
4014 pixels which are outside the image proper are blurred into the final result.
4015 </p>
4016
4017
4018 <div style="margin: auto;">
4019   <h4><a id="geometry"></a>-geometry <em class="arg">geometry</em></h4>
4020 </div>
4021
4022 <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>
4023
4024 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
4025
4026 <div style="margin: auto;">
4027   <h4><a id="gravity"></a>-gravity <em class="arg">type</em></h4>
4028 </div>
4029
4030 <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>
4031
4032 <p>Choices include: <kbd>NorthWest</kbd>, <kbd>North</kbd>,
4033 <kbd>NorthEast</kbd>, <kbd>West</kbd>, <kbd>Center</kbd>, <kbd>East</kbd>,
4034 <kbd>SouthWest</kbd>, <kbd>South</kbd>, <kbd>SouthEast</kbd>.  Use <a
4035 href="command-line-options.html#list">-list gravity</a> to get a complete list of <a
4036 href="command-line-options.html#gravity">-gravity</a> settings available in your ImageMagick
4037 installation.</p>
4038
4039 <p>The direction you choose specifies where to position text or subimages. For
4040 example, a gravity of <kbd>Center</kbd> forces the text to be centered within
4041 the image. By default, the image gravity is <kbd>NorthWest</kbd>. See <a
4042 href="command-line-options.html#draw">-draw</a> for more details about graphic primitives.  Only the
4043 text primitive of <a href="command-line-options.html#draw">-draw</a> is affected by the <a
4044 href="command-line-options.html#gravity">-gravity</a> option.</p>
4045
4046 <p>The <a href="command-line-options.html#gravity">-gravity</a> option is also used in concert with the
4047 <a href="command-line-options.html#geometry">-geometry</a> setting and other settings or options that
4048 take <em class="arg">geometry</em> as an argument, such as the <a
4049 href="command-line-options.html#crop">-crop</a> option. </p>
4050
4051 <p>If a <a href="command-line-options.html#gravity">-gravity</a> setting occurs before another option
4052 or setting having a <em class="arg">geometry</em> argument that specifies an
4053 offset, the offset is usually applied to the point within the image suggested
4054 by the <a href="command-line-options.html#gravity">-gravity</a> argument.  Thus, in the following
4055 command, for example, suppose the file <kbd>image.png</kbd> has dimensions
4056 200x100. The offset specified by the argument to <a href="command-line-options.html#region">-region</a>
4057 is (&minus;40,+20). The argument to <a href="command-line-options.html#gravity">-gravity</a> is
4058 <kbd>Center</kbd>, which suggests the midpoint of the image, at the point
4059 (100,50). The offset (&minus;40,20) is applied to that point, giving
4060 (100&minus;40,50+20)=(60,70), so the specified 10x10&nbsp;region is located at
4061 that point. (In addition, the <a href="command-line-options.html#gravity">-gravity</a> affects the
4062 region itself, which is <em>centered</em> at the pixel
4063 coordinate&nbsp;(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>
4064
4065 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert image.png -gravity Center -region 10x10-40+20 \ <br/> -negate output.png</span></p>
4066 <p>When used as an option to <a href="composite.html">composite</a>, <a
4067 href="command-line-options.html#gravity">-gravity</a> gives the direction that the image gravitates
4068 within the composite.</p>
4069
4070 <p>When used as an option to <a href="montage.html">montage</a>, <a
4071 href="command-line-options.html#gravity">-gravity</a> gives the direction that an image gravitates
4072 within a tile. The default gravity is <kbd>Center</kbd> for this purpose.</p>
4073
4074
4075 <div style="margin: auto;">
4076   <h4><a id="green-primary"></a>-green-primary <em class="arg">x,y</em></h4>
4077 </div>
4078
4079 <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>
4080
4081
4082 <div style="margin: auto;">
4083   <h4><a id="hald-clut"></a>-hald-clut</h4>
4084 </div>
4085
4086 <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>
4087
4088 <p>A Hald color lookup table is a 3-dimensional color cube mapped to 2
4089 dimensions.  Create it with the <kbd>HALD:</kbd> prefix (e.g. HALD:8).  You
4090 can apply any color transformation to the Hald image and then use this option
4091 to apply the transform to the image. </p>
4092
4093 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert image.png hald.png -hald-clut transform.png</span></p>
4094 <p>This option provides a convenient method for you to use Gimp or Photoshop
4095 to make color corrections to the Hald CLUT image and subsequently apply them
4096 to multiple images using an ImageMagick script. </p>
4097
4098 <p>Note that the representation is only of the normal RGB color space and that
4099 the whole color value triplet is used for the interpolated lookup of the
4100 represented Hald color cube image.  Because of this the operation is not <a
4101 href="command-line-options.html#channel" >-channel</a> setting effected, nor can it adjust or modify an
4102 images transparency or alpha/matte channel.</p>
4103
4104 <p>See also <a href="command-line-options.html#clut" >-clut</a> which provides color value replacement
4105 of the individual color channels, usually involving a simpler gray-scale
4106 image. E.g:  gray-scale to color replacement, or modification by a histogram
4107 mapping. </p>
4108
4109
4110 <div style="margin: auto;">
4111   <h4><a id="help"></a>-help</h4>
4112 </div>
4113
4114 <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>
4115
4116 <div style="margin: auto;">
4117   <h4><a id="highlight-color"></a>-highlight-color <em class="arg">color</em></h4>
4118 </div>
4119
4120 <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>
4121
4122 <div style="margin: auto;">
4123   <h4><a id="iconGeometry"></a>-iconGeometry <em class="arg">geometry</em></h4>
4124 </div>
4125
4126 <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>
4127
4128 <p>Offsets, if present in the geometry specification, are handled in the same
4129 manner as the <a href="command-line-options.html#geometry">-geometry</a> option, using X11 style to
4130 handle negative offsets.</p>
4131
4132 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
4133
4134 <div style="margin: auto;">
4135   <h4><a id="iconic"></a>-iconic</h4>
4136 </div>
4137
4138 <table style='background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%'><tr><td style='width:75%'>iconic animation.</td><td style='text-align:right;'></td></tr></table>
4139
4140 <div style="margin: auto;">
4141   <h4><a id="identify"></a>-identify</h4>
4142 </div>
4143
4144 <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>
4145
4146 <p>This information is printed: image scene number; image name; image size;
4147 the image class (<em class="arg">DirectClass</em> or <em
4148 class="arg">PseudoClass</em>); the total number of unique colors; and the
4149 number of seconds to read and transform the image. Refer to <a href="miff.html">MIFF</a> for
4150 a description of the image class.</p>
4151
4152 <p>If <a href="command-line-options.html#colors">-colors</a> is also specified, the total unique colors
4153 in the image and color reduction error values are printed. Refer to <a
4154 href="quantize.html">color
4155 reduction algorithm</a> for a description of these values.</p>
4156
4157 <p>If <a href="command-line-options.html#verbose">-verbose</a> precedes this option, copious
4158 amounts of image properties are displayed including image statistics, profiles,
4159 image histogram, and others.</p>
4160
4161 <div style="margin: auto;">
4162   <h4><a id="ift"></a>-ift</h4>
4163 </div>
4164
4165 <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>
4166
4167 <p>This option is new as of ImageMagick 6.5.4-3 (and now working for Windows
4168 users in ImageMagick 6.6.0-9). It transforms a pair of magnitude and phase
4169 images from the frequency domain to a single image in the normal or spatial
4170 domain. See for example, <a
4171 href="http://en.wikipedia.org/wiki/Fourier_transform">Fourier Transform</a>,
4172 <a href="http://en.wikipedia.org/wiki/DFT">Discrete Fourier Transform</a> and
4173 <a href="http://en.wikipedia.org/wiki/FFT">Fast Fourier Transform</a>.</p>
4174
4175 <p>For example, depending upon the image format used to store the result of
4176 the <a href="command-line-options.html#fft">-fft</a>, one would use either</p>
4177
4178 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert fft_image.miff -ift fft_image_ift.png</span></p>
4179 <p>or</p>
4180
4181 <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>
4182
4183 <p>The resulting image may need to be cropped due to padding introduced when
4184 the original image, prior to the <a href="command-line-options.html#fft">-fft</a> or <a
4185 href="command-line-options.html#fft">+fft</a>, was not square or even dimensioned. Any padding is at
4186 the right and/or bottom sides of the image.</p>
4187
4188 <p>The <a href="http://www.fftw.org/">FFTW</a> delegate library is required to
4189 use <a href="command-line-options.html#ift">-ift</a>.</p>
4190
4191 <p>Use <a href="command-line-options.html#ift">+ift</a> (with HDRI enabled) to transform a pair of real
4192 and imaginary images from the frequency domain to a single image in the normal
4193 (spatial) domain.</p>
4194
4195 <div style="margin: auto;">
4196   <h4><a id="immutable"></a>-immutable</h4>
4197 </div>
4198
4199 <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>
4200
4201 <div style="margin: auto;">
4202   <h4><a id="implode"></a>-implode <em class="arg">factor</em></h4>
4203 </div>
4204
4205 <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>
4206
4207 <div style="margin: auto;">
4208   <h4><a id="insert"></a>-insert <em class="arg">index</em></h4>
4209 </div>
4210
4211 <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>
4212
4213 <p>This option takes last image in the current image sequence and inserts it
4214 at the given index. If a negative index is used, the insert position is
4215 calculated before the last image is removed from the sequence. As such
4216 <kbd>-insert -1</kbd> will result in no change to the image sequence.</p>
4217
4218 <p>The <kbd>+insert</kbd> option is equivalent to <kbd>-insert -1</kbd>. In
4219 other words, insert the last image, at the end of the current image sequence.
4220 Consequently this has no effect on the image sequence order.</p>
4221
4222 <div style="margin: auto;">
4223   <h4><a id="intent"></a>-intent <em class="arg">type</em></h4>
4224 </div>
4225
4226 <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>
4227
4228 <p>Use this option to affect the color management operation of an image (see
4229 <a href="command-line-options.html#profile">-profile</a>).  Choose from these intents: <kbd>Absolute,
4230 Perceptual, Relative, Saturation</kbd>.</p>
4231
4232 <p>The default intent is Perceptual for the sRGB colorspace and undefined for the RGB and gray colorspaces.</p>
4233
4234 <p>To print a complete list of rendering intents, use <a href="command-line-options.html#list">-list intent</a>.</p>
4235
4236 <div style="margin: auto;">
4237   <h4><a id="interlace"></a>-interlace <em class="arg">type</em></h4>
4238 </div>
4239
4240 <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>
4241
4242 <p>Choose from:</p>
4243
4244 <pre class="text">
4245    none
4246    line
4247    plane
4248    partition
4249    JPEG
4250    GIF
4251    PNG
4252 </pre>
4253
4254 <p>This option is used to specify the type of interlacing scheme for raw image
4255 formats such as <kbd>RGB</kbd> or <kbd>YUV</kbd>.</p>
4256
4257 <p><kbd>None</kbd> means do not interlace (RGBRGBRGBRGBRGBRGB...),</p>
4258
4259 <p><kbd>Line</kbd> uses scanline interlacing (RRR...GGG...BBB...RRR...GGG...BBB...), and.</p>
4260
4261 <p><kbd>Plane</kbd> uses plane interlacing (RRRRRR...GGGGGG...BBBBBB...).</p>
4262
4263 <p><kbd>Partition</kbd> is like plane except the different planes are saved to
4264 individual files (e.g. image.R, image.G, and image.B).</p>
4265
4266 <p>Use <kbd>Line</kbd> or <kbd>Plane</kbd> to create an <kbd>interlaced
4267 PNG</kbd> or <kbd>GIF</kbd> or <kbd>progressive JPEG</kbd> image.</p>
4268
4269 <p>To print a complete list of interlacing schemes, use <a href="command-line-options.html#list">-list
4270 interlace</a>.</p>
4271
4272 <div style="margin: auto;">
4273   <h4><a id="interpolate"></a>-interpolate <em class="arg">type</em></h4>
4274 </div>
4275
4276 <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>
4277
4278 <p>When looking up the color of a pixel using a non-integer floating point
4279 value, you typically fall in between the pixel colors defined by the source
4280 image. This setting determines how the color is determined from the colors of
4281 the pixels surrounding that point.  That is how to determine the color of a
4282 point that falls between two, or even four different colored pixels. </p>
4283
4284 <pre class="text">
4285    integer           The color of the top-left pixel (floor function)
4286    nearest-neighbor  The nearest pixel to the lookup point (rounded function)
4287    average           The average color of the surrounding four pixels
4288    bilinear          A double linear interpolation of pixels (the default)
4289    mesh              Divide area into two flat triangular interpolations
4290    bicubic           Fitted bicubic-spines of surrounding 16 pixels
4291    spline            Direct spline curves (colors are blurred)
4292    filter            Use resize <a href="command-line-options.html#filter">-filter</a> settings
4293 </pre>
4294
4295 <p>This most important for distortion operators such as <a href="command-line-options.html#distort"
4296 >-distort</a>, <a href="command-line-options.html#implode" >-implode</a>, <a href="command-line-options.html#transform"
4297 >-transform</a> and <a href="command-line-options.html#fx" >-fx</a>. </p>
4298
4299 <p>To print a complete list of interpolation methods, use <a href="command-line-options.html#list">-list interpolate</a>.</p>
4300
4301 <p>See also <a href="command-line-options.html#virtual-pixel" >-virtual-pixel</a>, for control of the
4302 lookup for positions outside the boundaries of the image. </p>
4303
4304
4305 <div style="margin: auto;">
4306   <h4><a id="interline-spacing"></a>-interline-spacing <em class="arg">value</em></h4>
4307 </div>
4308
4309 <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>
4310
4311 <div style="margin: auto;">
4312   <h4><a id="interword-spacing"></a>-interword-spacing <em class="arg">value</em></h4>
4313 </div>
4314
4315 <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>
4316
4317 <div style="margin: auto;">
4318   <h4><a id="kerning"></a>-kerning <em class="arg">value</em></h4>
4319 </div>
4320
4321 <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>
4322
4323 <div style="margin: auto;">
4324   <h4><a id="label"></a>-label <em class="arg">name</em></h4>
4325 </div>
4326
4327 <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>
4328
4329 <p>Use this option to assign a specific label to the image, as it is read in
4330 or created.  You can use the <a href="command-line-options.html#set" >-set</a> operation to re-assign
4331 a the labels of images already read in.  Image formats such as TIFF, PNG,
4332 MIFF, supports saving the label information with the image.</p>
4333
4334 <p>When saving an image to a <em class="arg">PostScript</em> file, any label
4335 assigned to an image is used as a header string to print above the postscript
4336 image. </p>
4337
4338 <p>You can include the image filename, type, width, height, or other image
4339 attribute by embedding special format character.  See <a href="escape.html">Format and Print Image
4340 Properties</a> for details of the percent escape codes.</p>
4341
4342 <p>For example,</p>
4343
4344 <p class="crtsnip">
4345   -label "%m:%f %wx%h"  bird.miff
4346 </p>
4347
4348 <p>assigns an image label of <kbd>MIFF:bird.miff 512x480</kbd> to the
4349 "<kbd>bird.miff</kbd>" image and whose width is 512 and height is 480, as it
4350 is read in.  If a  <a href="command-line-options.html#label">+label</a> option was used instead, any
4351 existing label present in the image would be used.  You can remove all labels
4352 from an image by assigning the empty string. </p>
4353
4354 <p>A label is not drawn on the image, but is embedded in the image datastream
4355 via <em>Label</em> tag or similar mechanism. If you want the label to be
4356 visible on the image itself, use the <a href="command-line-options.html#draw">-draw</a> option, or
4357 during the final processing in the creation of a image montage.</p>
4358
4359 <p>If the first character of <em class="arg">string</em> is <em
4360 class="arg">@</em>, the image label is read from a file titled by the
4361 remaining characters in the string. Labels in a file are literal, no embedded
4362 formatting characters are recognized.</p>
4363
4364
4365 <div style="margin: auto;">
4366   <h4><a id="lat"></a>-lat <em class="arg">width</em><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>
4367 </div>
4368
4369 <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>
4370
4371 <p>Adaptively threshold each pixel based on the value of pixels in a
4372 surrounding window.  If the current pixel is lighter than this average plus
4373 the optional <kbd>offset</kbd>, then it is made white, otherwise it is made
4374 black.  Small variations in pixel values such as found in scanned documents
4375 can be ignored if offset is positive. A negative offset will make it more
4376 sensitive to those small variations. </p>
4377
4378 <p>This is commonly used to threshold images with an uneven background.  It is
4379 based on the assumption that average color of the small window is the
4380 the local background color, from which to separate the foreground color. </p>
4381
4382
4383 <div style="margin: auto;">
4384   <h4><a id="layers"></a>-layers <em class="arg">method</em></h4>
4385 </div>
4386
4387 <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>
4388
4389 <p>Perform various image operation methods to a ordered sequence of images
4390 which may represent either a set of overlaid 'image layers', a GIF disposal
4391 animation, or a fully-'coalesced' animation sequence. </p>
4392
4393 <table class="doc">
4394   <tbody>
4395   <tr valign="top">
4396     <th align="left" style="width: 8%">Method</th>
4397     <th align="left">Description</th>
4398   </tr>
4399
4400   <tr valign="top">
4401     <td valign="top">compare-any</td>
4402     <td valign="top">Crop the second and later frames to the smallest rectangle
4403         that contains all the differences between the two images.  No GIF <a
4404         href="command-line-options.html#dispose" >-dispose</a> methods are taken into account. </td>
4405   </tr>
4406
4407   <tr><td></td><td>This exactly the same as the <a href="command-line-options.html#deconstruct"
4408         >-deconstruct</a> operator, and does not preserve animations normal
4409         working, especially when animation used layer disposal methods such as
4410         '<kbd>Previous</kbd>' or '<kbd>Background</kbd>'. </td>
4411   </tr>
4412
4413   <tr valign="top">
4414     <td valign="top">compare-clear</td>
4415     <td valign="top">As '<kbd>compare-any</kbd>' but crop to the bounds of any
4416        opaque pixels which become transparent in the second frame. That is the
4417        smallest image needed to mask or erase pixels for the next frame. </td>
4418   </tr>
4419
4420   <tr valign="top">
4421     <td valign="top">compare-overlay</td>
4422     <td valign="top">As '<kbd>compare-any</kbd>' but crop to pixels that add
4423        extra color to the next image, as a result of overlaying color pixels.
4424        That is the smallest single overlaid image to add or change colors. </td>
4425    </tr>
4426
4427    <tr><td></td><td>This can be used with the <a href="command-line-options.html#compose" >-compose</a> alpha
4428        composition method '<kbd>change-mask</kbd>', to reduce the image to
4429        just the pixels that need to be overlaid. </td>
4430    </tr>
4431
4432   <tr valign="top">
4433     <td valign="top">coalesce</td>
4434     <td valign="top">Equivalent to a call to the <a href="command-line-options.html#coalesce"
4435         >-coalesce</a> operator.  Apply the layer disposal methods set in the
4436         current image sequence to form a fully defined animation sequence, as
4437         it should be displayed.  Effectively converting a GIF animation into a
4438         'film strip'-like animation.  </td>
4439   </tr>
4440
4441   <tr valign="top">
4442     <td valign="top">composite</td>
4443     <td valign="top">Alpha Composition of two image lists, separated by a
4444         "<kbd>null:</kbd>" image, with the destination image list first, and
4445         the source images last.  An image from each list are composited
4446         together until one list is finished. The separator image and source
4447         image lists are removed. </td>
4448   </tr>
4449
4450
4451   <tr><td></td>
4452     <td>The <a href="command-line-options.html#geometry" >-geometry</a> offset is adjusted according
4453         to <a href="command-line-options.html#gravity" >-gravity</a> in accordance of the virtual
4454         canvas size of the first image in each list. Unlike a normal <a
4455         href="command-line-options.html#composite" >-composite</a> operation, the canvas offset is also
4456         added to the final composite positioning of each image. </td> </tr>
4457
4458   <tr><td></td>
4459     <td>If one of the image lists only contains one image, that image is
4460         applied to all the images in the other image list, regardless of which
4461         list it is. In this case it is the image meta-data of the list which
4462         preserved.  </td>
4463   </tr>
4464
4465
4466   <tr valign="top">
4467     <td valign="top">dispose</td>
4468     <td valign="top">This like '<kbd>coalesce</kbd>' but shows the look of
4469         the animation after the layer disposal method has been applied, before
4470         the next sub-frame image is overlaid. That is the 'dispose' image that
4471         results from the application of the GIF <a href="command-line-options.html#dispose"
4472         >-dispose</a> method.  This allows you to check what
4473         is going wrong with a particular animation you may be developing.
4474         </td>
4475   </tr>
4476
4477   <tr valign="top">
4478     <td valign="top">flatten</td>
4479     <td valign="top">Create a canvas the size of the first images virtual
4480         canvas using the current <a href="command-line-options.html#background" >-background</a> color,
4481         and <a href="command-line-options.html#compose" >-compose</a> each image in turn onto that
4482         canvas.  Images falling outside that canvas is clipped. Final
4483         image will have a zero virtual canvas offset. </td>
4484   </tr>
4485
4486   <tr><td></td>
4487     <td>This usually used as one of the final 'image layering' operations
4488         overlaying all the prepared image layers into a final image. </td>
4489   </tr>
4490
4491   <tr><td></td>
4492     <td>For a single image this method can also be used to fillout a virtual
4493         canvas with real pixels, or to underlay an opaque color to remove
4494         transparency from an image.</td>
4495   </tr>
4496
4497
4498   <tr valign="top">
4499     <td valign="top">merge</td>
4500     <td valign="top">As 'flatten' method but merging all the given image
4501         layers to create a new layer image just large enough to hold all the
4502         image without clipping or extra space. The new images virtual offset
4503         will preserve the position of the new layer, even if this offset is
4504         negative.  The virtual canvas size of the first image is preserved.
4505         </td>
4506   </tr>
4507
4508   <tr><td></td><td>Caution is advised when handling image layers with
4509         negative offsets as few image file formats handle them correctly.
4510         Following this operation method with <a href="command-line-options.html#repage" >+repage</a>
4511         will remove the layer offset, and create a image in which all the
4512         overlaid image positions relative to each other is preserved, though
4513         not necessarily exactly where you specified them.
4514         </td>
4515   </tr>
4516
4517   <tr><td></td><td>See also 'trim-bounds' below which is closely related but
4518         without  doing the'flatten' to merge the images together. </td>
4519   </tr>
4520
4521   <tr valign="top">
4522     <td valign="top">mosaic</td>
4523     <td valign="top">As 'flatten' method but expanding the initial canvas size
4524         of the first image in a positive direction only so as to hold all the
4525         image layers.  However as a virtual canvas is 'locked' to the origin,
4526         by its own definition, image layers with a negative offsets will still
4527         become clipped by the top and left edges. See 'merge' or 'trim-bounds'
4528         if this could be a problem. </td>
4529
4530   </tr>
4531
4532   <tr><td></td><td>This method is commonly used to layout individual image
4533         using various offset but without knowing the final canvas size. The
4534         resulting image will, like 'flatten' not have any virtual offset, so
4535         can be saved to any image file format. </td>
4536   </tr>
4537
4538
4539   <tr valign="top">
4540     <td valign="top">optimize</td>
4541     <td valign="top">Optimize a coalesced animation, into GIF animation using
4542         a number of general techniques.  This currently a short cut to
4543         apply both the '<kbd>optimize-frame</kbd>', and
4544         '<kbd>optimize-transparency</kbd>' methods but may be expanded to
4545         include other optimization methods as they are developed. </td>
4546   </tr>
4547
4548   <tr valign="top">
4549     <td valign="top">optimize-frame</td>
4550     <td valign="top">Optimize a coalesced animation, into GIF animation by
4551         reducing the number of pixels per frame as much as possible by
4552         attempting to pick the best layer disposal method to use, while ensuring
4553         the result will continue to animate properly. </td>
4554   </tr>
4555
4556   <tr><td></td><td> There is no guarantee that the best optimization is found.
4557         But then no reasonably fast GIF optimization algorithm can do this.
4558         However this does seem to do better than most other GIF frame
4559         optimizers seen. </td>
4560   </tr>
4561
4562   <tr valign="top">
4563     <td valign="top">optimize-plus</td>
4564     <td valign="top">As '<kbd>optimize-frame</kbd>' but attempt to improve the
4565         overall optimization by adding extra frames to the animation, without
4566         changing the final look or timing of the animation.  The frames are
4567         added to attempt to separate the clearing of pixels from the
4568         overlaying of new additional pixels from one animation frame to the
4569         next.  If this does not improve the optimization (for the next frame
4570         only), it will fall back to the results of the previous normal
4571         '<kbd>optimize-frame</kbd>' technique. </td>
4572   </tr>
4573
4574   <tr><td></td><td>There is the possibility that the change in the disposal
4575         style will result in a worsening in the optimization of later frames,
4576         though this is unlikely. In other words there no guarantee that it is
4577         better than the normal '<kbd>optimize-frame</kbd>' technique. For some
4578         animations however you can get a vast improvement in the final
4579         animation size. </td>
4580   </tr>
4581
4582   <tr valign="top">
4583     <td valign="top">optimize-transparency</td>
4584     <td valign="top">Given a GIF animation, replace any pixel in the sub-frame
4585         overlay images with transparency, if it does not change the resulting
4586         animation by more than the current <a href="command-line-options.html#fuzz" >-fuzz</a> factor.
4587         </td>
4588   </tr>
4589
4590   <tr><td></td><td>This should allow a existing frame optimized GIF animation
4591         to compress into a smaller file size due to larger areas of one
4592         (transparent) color rather than a pattern of multiple colors repeating
4593         the current disposed image of the last frame. </td>
4594   </tr>
4595
4596   <tr valign="top">
4597     <td valign="top">remove-dups</td>
4598     <td valign="top">Remove (and merge time delays) of duplicate consecutive
4599         images, so as to simplify layer overlays of coalesced animations.
4600         </td>
4601   </tr>
4602
4603    <tr><td></td><td>Usually this a result of using a constant time delay
4604         across the whole animation, or after a larger animation was split into
4605         smaller sub-animations.  The duplicate frames could also have been
4606         used as part of some frame optimization methods. </td>
4607   </tr>
4608
4609   <tr valign="top">
4610     <td valign="top">remove-zero</td>
4611     <td valign="top">Remove any image with a zero time delay, unless ALL the
4612         images have a zero time delay (and is not a proper timed animation, a
4613         warning is then issued). </td>
4614   </tr>
4615
4616   <tr><td></td><td>In a GIF animation, such images are usually frames which
4617         provide partial intermediary updates between the frames that are
4618         actually displayed to users.  These frames are usually added for
4619         improved frame optimization in GIF animations. </td>
4620   </tr>
4621
4622   <tr valign="top">
4623     <td valign="top">trim-bounds</td>
4624     <td valign="top">Find the bounds of all the images in the current
4625         image sequence, then adjust the offsets so all images are contained on
4626         a minimal positive canvas. None of the image data is modified or
4627         merged, only the individual image virtual canvas size and offset.
4628         All the images is given the same canvas size, and and will have
4629         a positive offset, but will remain in the same position relative to
4630         each other. As a result of the minimal canvas size at least one image
4631         will touch every edge of that canvas.  The image data touching those
4632         edges however may be transparent.  </td>
4633   </tr>
4634
4635   <tr><td></td><td>The result is much like if you used 'merge' followed by a
4636         <a href="command-line-options.html#repage" >+repage</a> option, except that all the images
4637         have been kept separate.  If 'flatten' is used after using
4638         'trim-bounds' you will get the same result.  </td>
4639   </tr>
4640
4641   </tbody>
4642 </table>
4643
4644 <p>To print a complete list of layer types, use <a href="command-line-options.html#list">-list layers</a>.</p>
4645
4646 <p>The operators <a href="command-line-options.html#coalesce" >-coalesce</a>, <a href="command-line-options.html#deconstruct"
4647 >-deconstruct</a>, <a href="command-line-options.html#flatten" >-flatten</a>, and <a href="command-line-options.html#mosaic"
4648 >-mosaic</a> are only aliases for the above methods and may be depreciated in
4649 the future.  Also see  <a href="command-line-options.html#page" >-page</a>,  <a href="command-line-options.html#repage"
4650 >-repage</a> operators, the <a href="command-line-options.html#compose" >-compose</a> setting, and the
4651 GIF <a href="command-line-options.html#dispose" >-dispose</a> and  <a href="command-line-options.html#delay" >-delay</a>
4652 settings. </p>
4653
4654
4655 <div style="margin: auto;">
4656   <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>
4657 </div>
4658
4659 <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>
4660
4661 <p>Given one, two or three values delimited with commas: black-point,
4662 white-point, gamma (for example: 10,250,1.0 or 2%,98%,0.5). The black and
4663 white points range from 0 to <em class="QR">QuantumRange</em>, or from 0 to
4664 100%; if the white point is omitted it is set to (<em
4665 class="QR">QuantumRange</em> - black_point), so as to center contrast changes.
4666 If a <kbd>%</kbd> sign is present anywhere in the string, both black and white
4667 points are percentages of the full color range.  Gamma will do a <a
4668 href="command-line-options.html#gamma">-gamma</a> adjustment of the values.  If it is omitted, the
4669 default of 1.0 (no gamma correction) is assumed.</p>
4670
4671 <p>In normal usage (<kbd>-level</kbd>) the image values are stretched so that
4672 the given '<kbd>black_point</kbd>' value in the original image is set to zero
4673 (or black), while the given '<kbd>white_point</kbd>' value is set to <em
4674 class="QR">QuantumRange</em> (or white).  This provides you with direct
4675 contrast adjustments to the image.  The '<kbd>gamma</kbd>' of the resulting
4676 image will then be adjusted. </p>
4677
4678 <p>From ImageMagick v6.4.1-9 using the plus form of the operator
4679 (<kbd>+level</kbd>) or adding the special '!' flag anywhere in the argument
4680 list, will cause the operator to do the reverse of the level adjustment.  That
4681 is a zero, or <em class="QR">QuantumRange</em> value (black, and white, resp.)
4682 in the original image, is adjusted to the given level values, allowing you to
4683 de-contrast, or compress the channel values within the image. The
4684 '<kbd>gamma</kbd>' is adjusted before the level adjustment to de-contrast the
4685 image is made. </p>
4686
4687 <p>Only the channels defined by the current <a href="command-line-options.html#channel">-channel</a>
4688 setting are adjusted (defaults to RGB color channels only), allowing you to
4689 limit the effect of this operator. </p>
4690
4691 <p>Please note that the transparency channel is treated as 'matte'
4692 values (0 is opaque) and not as 'alpha' values (0 is transparent).</p>
4693
4694
4695 <div style="margin: auto;">
4696   <h4><a id="level-colors"></a>-level-colors {<em
4697   class="arg">black_color</em>}{,}{<em class="arg">white_color</em>}</h4>
4698 </div>
4699
4700 <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>
4701
4702 <p>This function is exactly like <a href="command-line-options.html#level">-level</a>, except that the
4703 value value for each color channel is determined by the
4704 '<kbd>black_color</kbd>' and '<kbd>white_color</kbd>' colors given (as
4705 described under the <a href="command-line-options.html#fill">-fill</a> option). </p>
4706
4707 <p>This effectually means the colors provided to <kbd>-level-colors</kbd>
4708 is mapped to become 'black' and 'white' respectively, with all the other
4709 colors linearly adjusted (or clipped) to match that change. Each channel is
4710 adjusted separately using the channel values of the colors specified. </p>
4711
4712 <p>On the other hand the plus form of the operator (<kbd>+level-colors</kbd>)
4713 will map the image color 'black' and 'white' to the given colors
4714 respectively, resulting in a gradient (de-contrasting) tint of the image to
4715 those colors. This can also be used to convert a plain gray-scale image into a
4716 one using the gradient of colors specified. </p>
4717
4718 <p>By supplying a single color with a comma separator either before or after
4719 that color, will just replace the respective 'black' or 'white' point
4720 respectively.  But if no comma separator is provided, the given color is
4721 used for both the black and white color points, making the operator either
4722 threshold the images around that color (- form) or set all colors to that
4723 color (+ form). </p>
4724
4725
4726 <div style="margin: auto;">
4727   <h4><a id="limit"></a>-limit <em class="arg">type value</em></h4>
4728 </div>
4729
4730 <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>
4731
4732 <p>Choose from: <kbd>area</kbd>, <kbd>disk</kbd>, <kbd>file</kbd>,
4733 <kbd>map</kbd>, <kbd>memory</kbd>, <kbd>threads</kbd>, or <kbd>time</kbd>.</p>
4734
4735 <p>The value for <kbd>file</kbd> is in number of files. The other limits are
4736 in bytes. Define arguments for the memory, map, area, and disk resource limits
4737 with SI prefixes (.e.g 100MB).<p>
4738
4739 <p>By default the limits are 768 files, 2GB of image area, 1.5GiB memory, 8GiB
4740 memory map, and 18.45EB of disk.  These limits are adjusted relative to the
4741 available resources on your computer if this information is available.   When
4742 any limit is reached, ImageMagick fails in some fashion but attempts to take
4743 compensating actions, if possible. For example, the following limits
4744 memory:</p>
4745
4746 <p class="crtsnip">
4747   -limit memory 32MiB -limit map 64MiB
4748 </p>
4749
4750 <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>
4751
4752 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>identify -list resource</span><span class='crtout'></span></p><pre class="text">
4753   File         Area       Memory          Map         Disk   Thread         Time
4754   ------------------------------------------------------------------------------
4755    768     12.404GB    8.6642GiB    23.104GiB  18.446744EB        8    unlimited
4756 </pre>
4757
4758 <p>Requests for pixel storage to keep intermediate images are satisfied by one
4759 of three resource categories: in-memory pool, memory-mapped files pool, and
4760 disk pool (in that order) depending on the <a href="command-line-options.html#limit">&#x2011;limit</a> settings
4761 and whether the system honors a resource request. If the total size of
4762 allocated pixel storage in the given pool reaches the corresponding limit, the
4763 request is passed to the next pool. Additionally, requests that exceed the
4764 <kbd>area</kbd> limit automagically are allocated on disk.</p>
4765
4766 <p>To illustrate how ImageMagick utilizes resource limits, consider a typical
4767 image resource request.  First, ImageMagick tries to allocate the pixels in
4768 memory.  The request might be denied if the resource request exceeds the
4769 <kbd>memory</kbd> limit or if the system does not honor the request.  If
4770 a memory request is not honored, the pixels are allocated to disk and the file
4771 is memory-mapped. However, if the allocation request exceeds the
4772 <kbd>map</kbd> limit, the resource allocation goes to disk. In all cases, if
4773 the resource request exceeds the <kbd>area</kbd> limit, the pixels are
4774 automagically cached to disk. If the disk has a hard limit, the program
4775 fails.</p>
4776
4777 <p>In most cases you simply do not need to concern yourself with resource
4778 limits.  ImageMagick chooses reasonable defaults and most images do not tax
4779 your computer resources.  Where limits do come in handy is when you process
4780 images that are large or on shared systems where ImageMagick can consume all
4781 or most of the available memory. In this case, the ImageMagick workflow slows
4782 other processes or, in extreme cases, brings the system to a halt.  Under
4783 these circumstances, setting limits give some assurances that the ImageMagick
4784 workflow will not interfere with other concurrent uses of the computer.  For
4785 example, assume you have a web interface that processes images uploaded from
4786 the Internet.  To assure ImageMagick does not exceed 10mb of memory you can
4787 simply set the area limit to 10mb:</p>
4788
4789 <p class="crtsnip">
4790 -limit area 10mb
4791 </p>
4792
4793 <p>Now whenever a large image is processed, the pixels are automagically
4794 cached to disk instead of memory.  This of course implies that large images
4795 typically process very slowly, simply because pixel processing in memory can
4796 be an order of magnitude faster than on disk.  Because your web site users
4797 might inadvertently upload a huge image to process, you should set a disk
4798 limit as well:</p>
4799
4800 <p class="crtsnip">
4801 -limit area 10mb -limit disk 500mb
4802 </p>
4803
4804 <p>Here ImageMagick stops processing if an image requires more than 500MB of disk storage.</p>
4805
4806 <p>In addition to command-line resource limit option, resources can be set
4807 with <a href="resources.html#environment" >environment variables</a>. Set the
4808 environment variables <kbd>MAGICK_AREA_LIMIT</kbd>,
4809 <kbd>MAGICK_DISK_LIMIT</kbd>, <kbd>MAGICK_FILE_LIMIT</kbd>,
4810 <kbd>MAGICK_MEMORY_LIMIT</kbd>, <kbd>MAGICK_MAP_LIMIT</kbd>,
4811 <kbd>MAGICK_THREAD_LIMIT</kbd>, <kbd>MAGICK_TIME_LIMIT</kbd> for limits of
4812 image area, disk space, open files, heap memory, memory map, number of threads
4813 of execution, and maximum elapsed time in seconds respectively.</p>
4814
4815 <p> Inquisitive users can try adding <a href="command-line-options.html#debug">-debug cache</a> to
4816 their commands and then scouring the generated output for references to the
4817 pixel cache, in order to determine how the pixel cache was allocated and how
4818 resources were consumed. Advanced Unix/Linux users can pipe that output
4819 through <kbd>grep memory|open|destroy|disk</kbd> for more readable sifting.
4820 </p>
4821
4822 <p>For more about ImageMagick's use of resources, see the section <b>Cache
4823 Storage and Resource Requirements</b> on the <a href="architecture.html#cache
4824 ">Architecture</a> page.  </p>
4825
4826 <div style="margin: auto;">
4827   <h4><a id="linear-stretch"></a>-linear-stretch <em class="arg">black-point</em><br />-linear-stretch <em class="arg">black-point</em>{x<em class="arg">white-point</em>}{<em class="arg">%</em>}}</h4>
4828 </div>
4829
4830 <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>
4831
4832 <p>This is very similar to <a href="command-line-options.html#contrast-stretch" >-contrast-stretch</a>,
4833 and uses a 'histogram bin' to determine the range of color values that needs to
4834 be stretched.  However it then stretches those colors using the <a
4835 href="command-line-options.html#level" >-level</a> operator.</p>
4836
4837 <p>As such while the initial determination may have 'binning' round off
4838 effects, the image colors are stretched mathematically, rather than using the
4839 histogram bins.  This makes the operator more accurate. </p>
4840
4841 <p>note however that a <a href="command-line-options.html#linear-stretch" >-linear-stretch</a> of
4842 '<kbd>0</kbd>' does nothing, while a value of '<kbd>1</kbd>' does a near
4843 perfect stretch of the color range. </p>
4844
4845 <p>See also <a href="command-line-options.html#auto-level" >-auto-level</a> for a 'perfect'
4846 normalization of mathematical images. </p>
4847
4848 <p>This operator is under review for re-development. </p>
4849
4850
4851 <div style="margin: auto;">
4852   <h4><a id="linewidth"></a>-linewidth</h4>
4853 </div>
4854
4855 <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>
4856
4857 <div style="margin: auto;">
4858   <h4><a id="liquid-rescale"></a>-liquid-rescale <em class="arg">geometry</em></h4>
4859 </div>
4860
4861 <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>
4862
4863 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
4864
4865 <div style="margin: auto;">
4866   <h4><a id="list"></a>-list <em class="arg">type</em></h4>
4867 </div>
4868
4869 <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>
4870
4871 <pre class="text">
4872    Align          Alpha          Boolean        Channel
4873    Class          ClipPath       Coder          Color
4874    Colorspace     Command        Compose        Compress
4875    Configure      DataType       Debug          Decoration
4876    Delegate       Direction      Dispose        Distort
4877    Dither         Endian         Evaluate       FillRule
4878    Filter         Font           Format         Function
4879    Gravity        ImageList      Intent         Interlace
4880    Interpolate    Kernel         Layers         LineCap
4881    LineJoin       List           Locale         LogEvent
4882    Log            Magic          Method         Metric
4883    Mime           Mode           Morphology     Module
4884    Noise          Orientation    Policy         PolicyDomain
4885    PolicyRights   Preview        Primitive      QuantumFormat
4886    Resource       SparseColor    Storage        Stretch
4887    Style          Threshold      Type           Units
4888    Validate       VirtualPixel
4889 </pre>
4890
4891 <p>These lists vary depending on your version of ImageMagick. Use "<kbd>-list
4892 list</kbd>" to get a complete listing of all the "<kbd>-list</kbd>" arguments
4893 available:</p>
4894
4895 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>identify -list list</span></p>
4896 <div style="margin: auto;">
4897   <h4><a id="log"></a>-log <em class="arg">string</em></h4>
4898 </div>
4899
4900 <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>
4901
4902 <p>This option specifies the format for the log printed when the <a
4903 href="command-line-options.html#debug">-debug</a> option is active.</p>
4904
4905 <p>You can display the following components by embedding special format
4906 characters:</p>
4907
4908 <pre class="text">
4909    %d  domain
4910    %e  event
4911    %f  function
4912    %l  line
4913    %m  module
4914    %p  process ID
4915    %r  real CPU time
4916    %t  wall clock time
4917    %u  user CPU time
4918    %%  percent sign
4919    \n  newline
4920    \r  carriage return
4921 </pre>
4922
4923 <p>For example:</p>
4924
4925 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert -debug coders -log "%u %m:%l %e" in.gif out.png</span></p>
4926 <p>The default behavior is to print all of the components.</p>
4927
4928 <div style="margin: auto;">
4929   <h4><a id="loop"></a>-loop <em class="arg">iterations</em></h4>
4930 </div>
4931
4932 <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>
4933
4934 <p>Set iterations to zero to repeat the animation an infinite number of times,
4935 otherwise the animation repeats itself up to <em class="arg">iterations</em>
4936 times.</p>
4937
4938 <div style="margin: auto;">
4939   <h4><a id="lowlight-color"></a>-lowlight-color <em class="arg">color</em></h4>
4940 </div>
4941
4942 <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>
4943
4944 <div style="margin: auto;">
4945   <h4><a id="magnify"></a>-magnify <em class="arg">factor</em></h4>
4946 </div>
4947
4948 <table style='background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%'><tr><td style='width:75%'>magnify the image.</td><td style='text-align:right;'></td></tr></table>
4949
4950
4951 <div style="margin: auto;">
4952   <h4><a id="map"></a>-map <em class="arg">type</em></h4>
4953 </div>
4954
4955 <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>
4956
4957 <p>Choose from these <em class="arg">Standard Colormap</em> types:</p>
4958
4959 <pre class="text">
4960    best
4961    default
4962    gray
4963    red
4964    green
4965    blue
4966 </pre>
4967
4968 <p>The <em class="arg">X server</em> must support the <em class="arg">Standard
4969 Colormap</em> you choose, otherwise an error occurs.  Use <kbd>list</kbd> as
4970 the type and <kbd>display</kbd> searches the list of colormap types in
4971 <kbd>top-to-bottom</kbd> order until one is located. See <em
4972 class="arg">xstdcmap(1)</em> for one way of creating Standard Colormaps.</p>
4973
4974
4975 <div style="margin: auto;">
4976   <h4><a id="map_stream_"></a>-map <em class="arg">components</em></h4>
4977 </div>
4978
4979 <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>
4980
4981 <p>Here are the valid components of a map:</p>
4982
4983 <pre class="text">
4984    r  red pixel component
4985    g  green pixel component
4986    b  blue pixel component
4987    a  alpha pixel component (0 is transparent)
4988    o  opacity pixel component (0 is opaque)
4989    i  grayscale intensity pixel component
4990    c  cyan pixel component
4991    m  magenta pixel component
4992    y  yellow pixel component
4993    k  black pixel component
4994    p  pad component (always 0)
4995 </pre>
4996
4997 <p>You can specify as many of these components as needed in any order (e.g.
4998 bgr).  The components can repeat as well (e.g. rgbr).</p>
4999
5000
5001 <div style="margin: auto;">
5002   <h4><a id="mask"></a>-mask
5003 <em class="arg">filename</em></h4>
5004 </div>
5005
5006 <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>
5007
5008 <p>This the same as using a mask used for composite masking operations, with
5009 grayscale values causing blended updates of the image the mask is attached to.
5010 </P>
5011
5012 <p>Use <a href="command-line-options.html#mask">+mask</a> to remove the mask from images.</p>
5013
5014 <p>Also see <a href="command-line-options.html#clip-mask">-clip-mask</a> which work in the same way,
5015 but with strict boolean masking. </p>
5016
5017 <div style="margin: auto;">
5018   <h4><a id="mattecolor"></a>-mattecolor <em class="arg">color</em></h4>
5019 </div>
5020
5021 <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>
5022
5023 <p>The color is specified using the format described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
5024
5025 <p>The default matte color is <kbd>#BDBDBD</kbd>, <span
5026 style="background-color: #bdbdbd;">this shade of gray</span>.</p>
5027
5028 <div style="margin: auto;">
5029   <h4><a id="maximum"></a>-maximum</h4>
5030 </div>
5031
5032 <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>
5033
5034 <p>Select the 'maximum' value from all the surrounding pixels. </p>
5035
5036 <p>This is legacy option from the <a href="command-line-options.html#statistic" >method</A> of the same
5037 name. </p>
5038
5039 <div style="margin: auto;">
5040   <h4><a id="median"></a>-median <em class="arg">geometry</em></h4>
5041 </div>
5042
5043 <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>
5044
5045 <p>Select the 'middle' value from all the surrounding pixels. </p>
5046
5047 <p>This is legacy option from the <a href="command-line-options.html#statistic" >method</A> of the same
5048 name. </p>
5049
5050 <div style="margin: auto;">
5051   <h4><a id="metric"></a>-metric <em class="arg">type</em></h4>
5052 </div>
5053
5054 <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>
5055
5056 <p>Choose from:</p>
5057
5058 <pre class="text">
5059   AE     absolute error count, number of different pixels (-fuzz effected)
5060   FUZZ   mean color distance
5061   MAE    mean absolute error (normalized), average channel error distance
5062   MEPP   mean error per pixel (normalized mean error, normalized peak error)
5063   MSE    mean error squared, average of the channel error squared
5064   NCC    normalized cross correlation
5065   PAE    peak absolute (normalize peak absolute)
5066   PSNR   peak signal to noise ratio
5067   RMSE   root mean squared (normalized root mean squared)
5068 </pre>
5069
5070 <p>Control the '<kbd>AE</kbd>', or absolute count of pixels that are different,
5071 with the <a href="command-line-options.html#fuzz" >-fuzz</a> factor (ignore pixels which
5072 only changed by a small amount).  Use '<kbd>PAE</kbd>' to find the
5073 size of the <a href="command-line-options.html#fuzz" >-fuzz</a> factor needed to make all pixels
5074 'similar', while '<kbd>MAE</kbd>' determines the factor needed
5075 for about half the pixels to be similar. </p>
5076
5077 <p>The '<kbd>MEPP</kbd>' metric returns three different metrics
5078 ('<kbd>MAE</kbd>', '<kbd>MAE</kbd>' normalized, and '<kbd>PAE</kbd>'
5079 normalized) from a single comparison run. </p>
5080
5081 <p>To print a complete list of metrics, use the <a href="command-line-options.html#list">-list
5082 metrics</a> option.</p>
5083
5084
5085 <div style="margin: auto;">
5086   <h4><a id="minimum"></a>-minimum</h4>
5087 </div>
5088
5089 <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>
5090
5091 <p>Select the 'minimal' value from all the surrounding pixels. </p>
5092
5093 <p>This is legacy option from the <a href="command-line-options.html#statistic" >method</A> of the same
5094 name. </p>
5095
5096
5097
5098 <div style="margin: auto;">
5099   <h4><a id="mode"></a>-mode <em class="arg">geometry</em></h4>
5100 </div>
5101
5102 <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>
5103
5104 <div style="margin: auto;">
5105   <h4>-mode <em class="arg">value</em></h4>
5106 </div>
5107
5108 <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>
5109
5110 <p>Choose the <em class="arg">value</em> from these styles: <kbd>Frame,
5111 Unframe, or Concatenate</kbd></p>
5112
5113 <p>Use the <a href="command-line-options.html#list" >-list</a> option with a '<kbd>Mode</kbd>' argument
5114 for a list of <a href="command-line-options.html#mode" >-mode</a> arguments available in your
5115 ImageMagick installation.</p>
5116
5117
5118 <div style="margin: auto;">
5119   <h4><a id="modulate"></a>-modulate <em class="arg">brightness</em>[,<em class="arg">saturation</em>,<em class="arg">hue</em>]</h4>
5120 </div>
5121
5122 <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
5123 class="arg">saturation</em>, and <em class="arg">hue</em> of an image.</td><td style='text-align:right;'></td></tr></table>
5124
5125 <p>The arguments are given as a percentages of variation. A value of 100 means
5126 no change, and any missing values are taken to mean 100.</p>
5127
5128 <p>The <em class="arg">brightness</em> is a multiplier of the overall
5129 brightness of the image, so 0 means pure black, 50 is half as bright, 200 is
5130 twice as bright. To invert its meaning <a href="command-line-options.html#negate">-negate</a> the image
5131 before and after. </p>
5132
5133 <p>The <em class="arg">saturation</em> controls the amount of color in an
5134 image. For example, 0 produce a grayscale image, while a large value such as
5135 200 produce a very colorful, 'cartoonish' color.</p>
5136
5137 <p>The <em class="arg">hue</em> argument causes a "rotation" of the colors
5138 within the image by the amount specified. For example, 50 results in
5139 a counter-clockwise rotation of 90, mapping red shades to purple, and so on.
5140 A value of either 0 or 200 results in a complete 180 degree rotation of the
5141 image. Using a value of 300 is a 360 degree rotation resulting in no change to
5142 the original image. </p>
5143
5144 <p>For example, to increase the color brightness by 20% and decrease the color
5145 saturation by 10% and leave the hue unchanged, use <a
5146 href="command-line-options.html#modulate">-modulate 120,90</a>.</p>
5147
5148 <p>Use <a href="command-line-options.html#set">-set</a> attribute of '<kbd
5149 class="arg">option:modulate:colorspace</kbd>' to specify which colorspace to
5150 modulate.  Choose from <kbd>HSB</kbd>, <kbd>HSL</kbd> (the default), or
5151 <kbd>HWB</kbd>.  For example,</p>
5152
5153 <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>
5154
5155 <div style="margin: auto;">
5156   <h4><a id="monitor"></a>-monitor</h4>
5157 </div>
5158
5159 <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>
5160
5161
5162 <div style="margin: auto;">
5163   <h4><a id="monochrome"></a>-monochrome</h4>
5164 </div>
5165
5166 <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>
5167
5168 <div style="margin: auto;">
5169   <h4><a id="morph"></a>-morph <em class="arg">frames</em></h4>
5170 </div>
5171
5172 <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>
5173
5174 <p>Both the image pixels and size are linearly interpolated to give the
5175 appearance of a metamorphosis from one image to the next, over all the images
5176 in the current image list. The added images are the equivalent of a <a
5177 href="command-line-options.html#blend">-blend</a> composition. The <em class="arg">frames</em>
5178 argument determine how many images to interpolate between each image. </p>
5179
5180
5181 <div style="margin: auto;">
5182   <h4><a id="morphology"></a>-morphology</h4>
5183   <h4>-morphology <em class="arg">method</em>  <em class="arg">kernel</em></h4>
5184 </div>
5185
5186 <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>
5187
5188 <p>Until I get around to writing an option summary for this, see <a
5189 href="http://www.imagemagick.org/Usage/morphology/" >IM Usage Examples,
5190 Morphology</a>. </p>
5191
5192
5193 <div style="margin: auto;">
5194   <h4><a id="mosaic"></a>-mosaic</h4>
5195 </div>
5196
5197 <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>
5198
5199
5200 <div style="margin: auto;">
5201   <h4><a id="motion-blur"></a>-motion-blur <em class="arg">radius</em><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>
5202 </div>
5203
5204 <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>
5205
5206 <p>Blur with the given radius, standard deviation (sigma), and angle.   The
5207 angle given is the angle toward which the image is blurred.  That is the
5208 direction people would consider the object is coming from. </p>
5209
5210 <p>Note that the blur is not uniform distribution, giving the motion a
5211 definite sense of direction of movement. </p>
5212
5213 <p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
5214 pixels which are outside the image proper are blurred into the final result.
5215 </p>
5216
5217 <div style="margin: auto;">
5218   <h4><a id="name"></a>-name</h4>
5219 </div>
5220
5221 <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>
5222 <div style="margin: auto;">
5223   <h4><a id="negate"></a>-negate</h4>
5224 </div>
5225
5226 <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>
5227
5228 <p>The red, green, and blue intensities of an image are negated. White becomes
5229 black, yellow becomes blue, etc.  Use <a href="command-line-options.html#negate">+negate</a> to only
5230 negate the grayscale pixels of the image.</p>
5231
5232 <div style="margin: auto;">
5233   <h4><a id="noise"></a>-noise <em class="arg">geometry</em><br/>
5234   +noise <em class="arg">type</em></h4>
5235 </div>
5236
5237 <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>
5238
5239 <p>The principal function of noise peak elimination filter is to smooth the
5240 objects within an image without losing edge information and without creating
5241 undesired structures.  The central idea of the algorithm is to replace a pixel
5242 with its next neighbor in value within a pixel window, if this pixel has been
5243 found to be noise. A pixel is defined as noise if and only if this pixel is
5244 a maximum or minimum within the pixel window.</p>
5245
5246 <p>Use <kbd><a href="command-line-options.html#noise">-noise</a> <em class="arg">radius</em></kbd> to
5247 specify the width of the neighborhood when reducing noise.  This is equivelent
5248 to using a <kbd><a href="command-line-options.html#statistic" >-statistic</a> NonPeak</kbd> operation,
5249 which should be used in preference.</p>
5250
5251 <p>Use <a href="command-line-options.html#noise">+noise</a> followed by a noise <em
5252 class="arg">type</em> to add noise to an image. Choose from these noise
5253 types:</p>
5254
5255 <pre class="text">
5256    Gaussian
5257    Impulse
5258    Laplacian
5259    Multiplicative
5260    Poisson
5261    Random
5262    Uniform
5263 </pre>
5264
5265 <p>The amount of noise added can be controled by the <kbd><a
5266 href="command-line-options.html#attunuuate" >-attenuate</a></kbd> setting. If unset the value is
5267 equivelent to 1.0, or a maximum noise addition.</p>
5268
5269 <p>To print a complete list of noises, use the <a href="command-line-options.html#list">-list noise</a> option.</p>
5270
5271 <p>Also see the <a href="command-line-options.html#evaluate">-evaluate</a> noise functions that allows
5272 the use of a controlling value to specify the amount of noise that should be
5273 added to an image. </p>
5274
5275
5276 <div style="margin: auto;">
5277   <h4><a id="normalize"></a>-normalize</h4>
5278 </div>
5279
5280 <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>
5281
5282 <p>The intensity values are stretched to cover the entire range of possible
5283 values. While doing so, black-out at most <em>2%</em> of the pixels and
5284 white-out at most <em>1%</em> of the pixels.</p>
5285
5286 <p>Note that as of ImageMagick 6.4.7-0, <a href="command-line-options.html#normalize" >-normalize</a>
5287 is equivalent to <a href="command-line-options.html#contrast-stretch" >-contrast-stretch 2%x1%</a>.
5288 (Before this version, it was equivalent to <a href="command-line-options.html#contrast-stretch"
5289 >-contrast-stretch 2%x99%</a>).</p>
5290
5291 <p>All the channels are normalized in concert by the came amount so as to
5292 preserve color integrity, when the default <a href="command-line-options.html#channel" >+channel</a>
5293 setting is in use.  Specifying any other <a href="command-line-options.html#channel" >-channel</a>
5294 setting will normalize the RGB channels independently.</p>
5295
5296 <p>See  <a href="command-line-options.html#contrast-stretch" >-contrast-stretch</a> for more details.
5297 Also see <a href="command-line-options.html#auto-level" >-auto-level</a> for a 'perfect' normalization
5298 that is better suited to mathematically generated images. </p>
5299
5300 <p>This operator is under review for re-development. </p>
5301
5302
5303 <div style="margin: auto;">
5304   <h4><a id="ordered-dither"></a>-ordered-dither <em class="arg">threshold_map</em>{,<em class="arg">level</em>...}</h4>
5305 </div>
5306
5307 <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
5308 class="arg">threshold map</em> specified, and a uniform color map with the
5309 given number of <em class="arg">levels</em> per color channel .  </td><td style='text-align:right;'></td></tr></table>
5310
5311 <p>You can choose from these standard threshold maps:</p>
5312
5313 <pre class="text">
5314    threshold   1x1   Threshold 1x1 (non-dither)
5315    checks      2x1   Checkerboard 2x1 (dither)
5316    o2x2        2x2   Ordered 2x2 (dispersed)
5317    o3x3        3x3   Ordered 3x3 (dispersed)
5318    o4x4        4x4   Ordered 4x4 (dispersed)
5319    o8x8        8x8   Ordered 8x8 (dispersed)
5320    h4x4a       4x1   Halftone 4x4 (angled)
5321    h6x6a       6x1   Halftone 6x6 (angled)
5322    h8x8a       8x1   Halftone 8x8 (angled)
5323    h4x4o             Halftone 4x4 (orthogonal)
5324    h6x6o             Halftone 6x6 (orthogonal)
5325    h8x8o             Halftone 8x8 (orthogonal)
5326    h16x16o           Halftone 16x16 (orthogonal)
5327    c5x5b       c5x5  Circles 5x5 (black)
5328    c5x5w             Circles 5x5 (white)
5329    c6x6b       c6x6  Circles 6x6 (black)
5330    c6x6w             Circles 6x6 (white)
5331    c7x7b       c7x7  Circles 7x7 (black)
5332    c7x7w             Circles 7x7 (white)
5333 </pre>
5334
5335 <p> The <kbd>threshold</kbd> generated a simple 50% threshold of the image.
5336 This could be used with <em class="arg" >level</em> to do the equivalent of <a
5337 href="command-line-options.html#posterize" >-posterize</a> to reduce an image to basic primary colors.
5338 </p>
5339
5340 <p>The <kbd>checks</kbd> pattern produces a 3 level checkerboard  dither
5341 pattern. That is a grayscale will become a pattern of solid black, solid
5342 white, and  mid-tone colors into a checkerboard pattern of black and white.
5343 </p>
5344
5345 <p>You can define your own <em class="arg" >threshold map</em> for ordered
5346 dithering and halftoning your images, in either personal or system
5347 <kbd>thresholds.xml</kbd> XML file. See <a href="resources.html" >Resources</A>
5348 for more details of configuration files. </p>
5349
5350 <p>To print a complete list of the thresholds that have been defined, use the
5351 <a href="command-line-options.html#list" >-list threshold</a> option.</p>
5352
5353 <p>Note that at this time the same threshold dithering map is used for all
5354 color channels, no attempt is made to offset or rotate the map for different
5355 channels is made, to create an offset printing effect. Also as the maps are
5356 simple threshold levels, the halftone and circle maps will create incomplete
5357 circles along the edges of a colored area. Also all the effects are purely
5358 on/off boolean effects, without anti-aliasing to make the circles smooth
5359 looking. Large dots can be made to look better with a small amount of blurring
5360 after being created. </p>
5361
5362
5363 <div style="margin: auto;">
5364   <h4><a id="opaque"></a>-opaque <em class="arg">color</em></h4>
5365 </div>
5366
5367 <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>
5368
5369 <p>The <em class="arg">color</em> argument is defined using the format
5370 described under the <a href="command-line-options.html#fill" >-fill</a> option.  The <a href="command-line-options.html#fuzz"
5371 >-fuzz</a> setting can be used to match and replace colors similar to the one
5372 given.</p>
5373
5374 <p>Use <a href="command-line-options.html#opaque">+opaque</a> to paint any pixel that does not match
5375 the target color. </p>
5376
5377 <p>The <a href="command-line-options.html#transparent">-transparent</a>  operator is exactly the same
5378 as <a href="command-line-options.html#opaque" >-opaque</a> but replaces the matching color with
5379 transparency rather than the current <a href="command-line-options.html#fill">-fill</a> color setting.
5380 To ensure that it can do this it also ensures that the image has an alpha
5381 channel enabled, as per "<kbd><a href="command-line-options.html#alpha" >-alpha</a> set</kbd>", for
5382 the new transparent colors, and does not require you to modify the <a
5383 href="command-line-options.html#channel">-channel</a> to enable alpha channel handling. </p>
5384
5385
5386 <div style="margin: auto;">
5387   <h4><a id="orient"></a>-orient <em class="arg">image orientation</em></h4>
5388 </div>
5389
5390 <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>
5391
5392 <p>Choose from these orientations:</p>
5393
5394 <pre class="text">
5395    bottom-left
5396    bottom-right
5397    left-bottom
5398    left-top
5399    right-bottom
5400    right-top
5401    top-left
5402    top-right
5403    undefined
5404 </pre>
5405
5406 <p>To print a complete list of orientations, use the <a href="command-line-options.html#list" >-list
5407 orientation</a> option.</p>
5408
5409
5410 <div style="margin: auto;">
5411   <h4><a id="page"></a>-page <em class="arg">geometry</em><br/>
5412   -page <em class="arg">media</em>[<em class="arg">offset</em>][{<em class="arg">^!&lt;&gt;</em>}]<br/>
5413   +page
5414   </h4>
5415 </div>
5416
5417 <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>
5418
5419 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
5420
5421 <p>For convenience you can specify the page size using <em
5422 class="arg">media</em> (see below). Offsets can then be added as with other
5423 <em class="arg">geometry</em> arguments (e.g. <a
5424 href="command-line-options.html#page">-page</a>&nbsp;<kbd>Letter+43+43</kbd>).</p>
5425
5426 <p>Use <em class="arg">media</em> as shorthand to specify the dimensions (<em
5427 class="arg">width</em>x<em class="arg">height</em>) of the <em
5428 class="arg">PostScript</em> page in dots per inch or a TEXT page in pixels.
5429 The choices for a PostScript page are:</p>
5430
5431 <table id="geometryTable" cellpadding="2" cellspacing="0" border="1"
5432 width="50%" style="margin-left: auto; margin-right: auto;">
5433 <thead>
5434         <tr valign="top">
5435     <th align="center"><em class="arg">media</em></th>
5436     <th align="center"><em class="arg">width</em></th>
5437     <th align="center"><em class="arg">height</em></th>
5438         </tr>
5439 </thead>
5440 <tbody>
5441 <tr><td align="left"> 11x17      </td> <td align="right">  792</td> <td align="right"> 1224</td> </tr>
5442 <tr><td align="left"> Ledger     </td> <td align="right"> 1224</td> <td align="right">  792</td> </tr>
5443 <tr><td align="left"> Legal      </td> <td align="right">  612</td> <td align="right"> 1008</td> </tr>
5444 <tr><td align="left"> Letter     </td> <td align="right">  612</td> <td align="right">  792</td> </tr>
5445 <tr><td align="left"> LetterSmall</td> <td align="right">  612</td> <td align="right">  792</td> </tr>
5446 <tr><td align="left"> ArchE      </td> <td align="right"> 2592</td> <td align="right"> 3456</td> </tr>
5447 <tr><td align="left"> ArchD      </td> <td align="right"> 1728</td> <td align="right"> 2592</td> </tr>
5448 <tr><td align="left"> ArchC      </td> <td align="right"> 1296</td> <td align="right"> 1728</td> </tr>
5449 <tr><td align="left"> ArchB      </td> <td align="right">  864</td> <td align="right"> 1296</td> </tr>
5450 <tr><td align="left"> ArchA      </td> <td align="right">  648</td> <td align="right">  864</td> </tr>
5451 <tr><td align="left"> A0         </td> <td align="right"> 2380</td> <td align="right"> 3368</td> </tr>
5452 <tr><td align="left"> A1         </td> <td align="right"> 1684</td> <td align="right"> 2380</td> </tr>
5453 <tr><td align="left"> A2         </td> <td align="right"> 1190</td> <td align="right"> 1684</td> </tr>
5454 <tr><td align="left"> A3         </td> <td align="right">  842</td> <td align="right"> 1190</td> </tr>
5455 <tr><td align="left"> A4         </td> <td align="right">  595</td> <td align="right">  842</td> </tr>
5456 <tr><td align="left"> A4Small    </td> <td align="right">  595</td> <td align="right">  842</td> </tr>
5457 <tr><td align="left"> A5         </td> <td align="right">  421</td> <td align="right">  595</td> </tr>
5458 <tr><td align="left"> A6         </td> <td align="right">  297</td> <td align="right">  421</td> </tr>
5459 <tr><td align="left"> A7         </td> <td align="right">  210</td> <td align="right">  297</td> </tr>
5460 <tr><td align="left"> A8         </td> <td align="right">  148</td> <td align="right">  210</td> </tr>
5461 <tr><td align="left"> A9         </td> <td align="right">  105</td> <td align="right">  148</td> </tr>
5462 <tr><td align="left"> A10        </td> <td align="right">   74</td> <td align="right">  105</td> </tr>
5463 <tr><td align="left"> B0         </td> <td align="right"> 2836</td> <td align="right"> 4008</td> </tr>
5464 <tr><td align="left"> B1         </td> <td align="right"> 2004</td> <td align="right"> 2836</td> </tr>
5465 <tr><td align="left"> B2         </td> <td align="right"> 1418</td> <td align="right"> 2004</td> </tr>
5466 <tr><td align="left"> B3         </td> <td align="right"> 1002</td> <td align="right"> 1418</td> </tr>
5467 <tr><td align="left"> B4         </td> <td align="right">  709</td> <td align="right"> 1002</td> </tr>
5468 <tr><td align="left"> B5         </td> <td align="right">  501</td> <td align="right">  709</td> </tr>
5469 <tr><td align="left"> C0         </td> <td align="right"> 2600</td> <td align="right"> 3677</td> </tr>
5470 <tr><td align="left"> C1         </td> <td align="right"> 1837</td> <td align="right"> 2600</td> </tr>
5471 <tr><td align="left"> C2         </td> <td align="right"> 1298</td> <td align="right"> 1837</td> </tr>
5472 <tr><td align="left"> C3         </td> <td align="right">  918</td> <td align="right"> 1298</td> </tr>
5473 <tr><td align="left"> C4         </td> <td align="right">  649</td> <td align="right">  918</td> </tr>
5474 <tr><td align="left"> C5         </td> <td align="right">  459</td> <td align="right">  649</td> </tr>
5475 <tr><td align="left"> C6         </td> <td align="right">  323</td> <td align="right">  459</td> </tr>
5476 <tr><td align="left"> Flsa       </td> <td align="right">  612</td> <td align="right">  936</td> </tr>
5477 <tr><td align="left"> Flse       </td> <td align="right">  612</td> <td align="right">  936</td> </tr>
5478 <tr><td align="left"> HalfLetter </td> <td align="right">  396</td> <td align="right">  612</td> </tr>
5479 </tbody>
5480 </table>
5481
5482
5483 <p>This option is also used to place subimages when writing to a multi-image
5484 format that supports offsets, such as GIF89 and MNG. When used for this
5485 purpose the offsets are always measured from the top left corner of the canvas
5486 and are not affected by the <a href="command-line-options.html#gravity">-gravity</a> option. To
5487 position a GIF or MNG image, use <a href="command-line-options.html#page">-page</a><em
5488 class="arg">{+-}x{+-}y</em> (e.g.  -page +100+200). When writing to a MNG
5489 file, a <a href="command-line-options.html#page">-page</a> option appearing ahead of the first image in
5490 the sequence with nonzero width and height defines the width and height values
5491 that are written in the <kbd>MHDR</kbd> chunk.  Otherwise, the MNG width and
5492 height are computed from the bounding box that contains all images in the
5493 sequence. When writing a GIF89 file, only the bounding box method is used to
5494 determine its dimensions.</p>
5495
5496 <p>For a PostScript page, the image is sized as in <a
5497 href="command-line-options.html#geometry">-geometry</a> but positioned relative to the <em>lower
5498 left-hand corner</em> of the page by {+-}<kbd>x</kbd><em
5499 class="arg">offset</em>{+-}<kbd>y</kbd> <em class="arg">offset</em>. Use <a
5500 href="command-line-options.html#page">-page 612x792</a>, for example, to center the image within the
5501 page. If the image size exceeds the PostScript page, it is reduced to fit the
5502 page. The default gravity for the <a href="command-line-options.html#page">-page</a> option is <em
5503 class="arg">NorthWest</em>, i.e., positive <kbd>x</kbd> and <kbd>y</kbd> <em
5504 class="arg">offset</em> are measured rightward and downward from the top left
5505 corner of the page, unless the <a href="command-line-options.html#gravity">-gravity</a> option is
5506 present with a value other than <em class="arg">NorthWest</em>.</p>
5507
5508 <p>The default page dimensions for a TEXT image is 612x792.</p>
5509
5510 <p>This option is used in concert with <a href="command-line-options.html#density">-density</a>.</p>
5511
5512 <p>Use <a href="command-line-options.html#page">+page</a> to remove the page settings for an image.</p>
5513
5514 <div style="margin: auto;">
5515   <h4><a id="paint"></a>-paint <em class="arg">radius</em></h4>
5516 </div>
5517
5518 <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>
5519
5520 <p>Each pixel is replaced by the most frequent color in a circular
5521 neighborhood whose width is specified with <em class="arg">radius</em>.</p>
5522
5523 <div style="margin: auto;">
5524   <h4><a id="path"></a>-path <em class="arg">path</em></h4></div>
5525
5526 <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>
5527
5528 <div style="margin: auto;">
5529   <h4><a id="pause_animate_"></a>-pause <em class="arg">seconds</em></h4>
5530 </div>
5531
5532 <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>
5533
5534 <p>Pause for the specified number of seconds before repeating the animation.</p>
5535
5536 <div style="margin: auto;">
5537   <h4><a id="pause_import_"></a>-pause <em class="arg">seconds</em></h4>
5538 </div>
5539
5540 <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>
5541
5542 <p>Pause for the specified number of seconds before taking the next snapshot.</p>
5543
5544 <div style="margin: auto;">
5545   <h4><a id="ping"></a>-ping</h4>
5546 </div>
5547
5548 <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>
5549
5550 <div style="margin: auto;">
5551   <h4><a id="pointsize"></a>-pointsize <em class="arg">value</em></h4>
5552 </div>
5553
5554 <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>
5555
5556 <div style="margin: auto;">
5557   <h4><a id="polaroid"></a>-polaroid <em class="arg">angle</em></h4>
5558 </div>
5559
5560 <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>
5561
5562 <p>Use <kbd>+polaroid</kbd> to rotate the image at a random angle between -15 and +15 degrees.</p>
5563
5564 <div style="margin: auto;">
5565   <h4><a id="posterize"></a>-posterize <em class="arg">levels</em></h4>
5566 </div>
5567
5568 <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.</td><td style='text-align:right;'></td></tr></table>
5569
5570 <div style="margin: auto;">
5571   <h4><a id="precision"></a>-precision <em class="arg">value</em></h4>
5572 </div>
5573
5574 <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>
5575
5576 <div style="margin: auto;">
5577   <h4><a id="preview"></a>-preview <em class="arg">type</em></h4>
5578 </div>
5579
5580 <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>
5581
5582 <p>Use this option to affect the preview operation of an image (e.g.
5583 <kbd>convert file.png -preview Gamma Preview:gamma.png</kbd>). Choose from
5584 these previews:</p>
5585
5586 <pre class="text">
5587    Rotate           Shear            Roll             Hue
5588    Saturation       Brightness       Gamma            Spiff
5589    Dull             Grayscale        Quantize         Despeckle
5590    ReduceNoise      Add Noise        Sharpen          Blur
5591    Threshold        EdgeDetect       Spread           Shade
5592    Raise            Segment          Solarize         Swirl
5593    Implode          Wave             OilPaint         CharcoalDrawing
5594    JPEG
5595 </pre>
5596
5597 <p>To print a complete list of previews, use the <a href="command-line-options.html#list">-list preview</a> option.</p>
5598
5599 <p>The default preview is <kbd>JPEG</kbd>.</p>
5600
5601 <div style="margin: auto;">
5602   <h4><a id="print"></a>-print <em class="arg">string</em></h4>
5603 </div>
5604
5605 <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>
5606
5607 <div style="margin: auto;">
5608   <h4><a id="process"></a>-process <em class="arg">command</em></h4>
5609 </div>
5610
5611 <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>
5612
5613 <p>The command arguments has the form <kbd>"module arg1 arg2 arg3 ...
5614 argN"</kbd> where <kbd>module</kbd> is the name of the module to invoke (e.g.
5615 "Analyze") and arg1 arg2 arg3 ... argN are an arbitrary number of arguments to
5616 pass to the process module.</p>
5617
5618 <div style="margin: auto;">
5619   <h4><a id="profile"></a>-profile <em class="arg">filename</em><br/>
5620   +profile <em class="arg">profile_name</em></h4>
5621 </div>
5622
5623 <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>
5624
5625 <p>Using <a href="command-line-options.html#profile">-profile</a> <em class="arg">filename</em> adds an
5626 ICM (ICC color management), IPTC (newswire information), or a generic profile
5627 to the image.</p>
5628
5629 <p>Use <a href="command-line-options.html#profile">+profile <em class="arg">profile_name</em></a> to
5630 remove the indicated profile. ImageMagick uses standard filename globbing, so
5631 wildcard expressions may be used to remove more than one profile.  Here we
5632 remove all profiles from the image except for the XMP profile:  <kbd>+profile
5633 "!xmp,*"</kbd>. </p>
5634
5635 <p>Use <kbd>identify -verbose</kbd> to find out which profiles are in the
5636 image file. Use <a href="command-line-options.html#strip">-strip</a> to remove all profiles (and
5637 comments).</p>
5638
5639 <p>To extract a profile, the <a href="command-line-options.html#profile">-profile</a> option is not
5640 used. Instead, simply write the file to an image format such as <em
5641 class="arg">APP1, 8BIM, ICM,</em> or <em class="arg">IPTC</em>.</p>
5642
5643 <p>For example, to extract the Exif data (which is stored in JPEG files in the
5644 <em class="arg">APP1</em> profile), use.</p>
5645
5646 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert cockatoo.jpg profile.exif</span></p>
5647 <p>It is important to note that results may depend on whether or not the
5648 original image already has an included profile. Also, keep in mind that <a
5649 href="command-line-options.html#profile">-profile</a> is an "operator" (as opposed to a "setting") and
5650 therefore a conversion is made each time it is encountered, in order, in the
5651 command-line. For instance, in the following example, if the original image is
5652 CMYK with profile, a CMYK-CMYK-RGB conversion results.</p>
5653
5654 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert CMYK.tif -profile "CMYK.icc" -profile "RGB.icc" RGB.tiff</span></p>
5655 <p>Furthermore, since ICC profiles are not necessarily symmetric, extra
5656 conversion steps can yield unwanted results.  CMYK profiles are often very
5657 asymmetric since they involve 3&minus;&gt;4 and 4&minus;&gt;3 channel mapping.
5658 </p>
5659
5660 <div style="margin: auto;">
5661   <h4><a id="quality"></a>-quality <em class="arg">value</em></h4>
5662 </div>
5663
5664 <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>
5665
5666 <p>For the JPEG and MPEG image formats, quality is 1 (lowest image quality and
5667 highest compression) to 100 (best quality but least effective compression).
5668 The default is to use the estimated quality of your input image if it can
5669 be determined, otherwise 92. When the quality is greater than 90, then the
5670 chroma channels are not downsampled.
5671 Use the <a href="command-line-options.html#sampling-factor">-sampling-factor</a> option to specify the
5672 factors for chroma downsampling.</p>
5673
5674 <p>For the MIFF image format, quality/10 is the zlib compression level, which
5675 is 0 (worst but fastest compression) to 9 (best but slowest). It has no effect
5676 on the image appearance, since the compression is always lossless.</p>
5677
5678 <p>For the JPEG-2000 image format, quality is mapped using a non-linear
5679 equation to the compression ratio required by the Jasper library. This
5680 non-linear equation is intended to loosely approximate the quality provided by
5681 the JPEG v1 format. The default quality value 100, a request for non-lossy
5682 compression.  A quality of 75 results in a request for 16:1 compression.</p>
5683
5684 <p>For the MNG and PNG image formats, the quality value sets the zlib
5685 compression level (quality / 10) and filter-type (quality % 10).  The default
5686 PNG "quality" is 75, which means compression level 7 with adaptive PNG
5687 filtering, unless the image has a color map, in which case it means
5688 compression level 7 with no PNG filtering.</p>
5689
5690 <p>For compression level 0, the Huffman-only strategy is used, which is
5691 fastest but not necessarily the worst compression.</p>
5692
5693 <p>If filter-type is 4 or less, the specified PNG filter-type is used for
5694 all scanlines:</p>
5695
5696 <pre class="text">
5697    0: none
5698    1: sub
5699    2: up
5700    3: average
5701    4: Paeth
5702 </pre>
5703
5704 <p>If filter-type is 5, adaptive filtering is used when quality is greater
5705 than 50 and the image does not have a color map, otherwise no filtering is
5706 used.</p>
5707
5708 <p>If filter-type is 6, adaptive filtering
5709 with <em class="arg">minimum-sum-of-absolute-values</em> is used.</p>
5710
5711 <p>Only if the output is MNG, if filter-type is 7, the LOCO color
5712 transformation (intrapixel differencing) and adaptive filtering
5713 with <em class="arg">minimum-sum-of-absolute-values</em> are used.</p>
5714
5715 <p>If the filter-type is 8 the zlib Z_RLE compression strategy is used with
5716  no PNG filtering.</p>
5717
5718 <p>If the filter-type is 9 the zlib Z_RLE compression strategy is used with
5719  adaptive PNG filtering.</p>
5720
5721 <p>The quality setting has no effect on the appearance or signature of PNG
5722 and MNG images, since the compression is always lossless.</p>
5723
5724 <p>Not all combinations of compression level, strategy, and PNG filter type
5725 can be obtained using the -quality option.  For more precise control,
5726 you can use the PNG:compression-level=N, PNG:compression-strategy=N, and
5727 PNG:compression-filter=N defines, respectively, instead.
5728 See <a href="command-line-options.html#define">-define</a>. Values from the defines take precedence
5729 over values from the -quality option.</p>
5730
5731 <p>For further information, see
5732 the <a href="http://www.w3.org/pub/WWW/TR">PNG</a> specification.</p>
5733
5734 <div style="margin: auto;">
5735   <h4><a id="quantize"></a>-quantize <em class="arg">colorspace</em></h4>
5736 </div>
5737
5738 <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>
5739
5740 <p>This setting defines the colorspace used to sort out and reduce the number
5741 of colors needed by an image (for later dithering) by operators such as <a
5742 href="command-line-options.html#colors" >-colors</a>, Note that color reduction also happens
5743 automatically when saving images to color-limited image file formats, such as
5744 GIF, and PNG8.</p>
5745
5746
5747 <div style="margin: auto;">
5748   <h4><a id="quiet"></a>-quiet</h4>
5749 </div>
5750
5751 <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>
5752
5753 <div style="margin: auto;">
5754   <h4><a id="radial-blur"></a>-radial-blur  <em class="arg">angle</em></h4>
5755 </div>
5756
5757 <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>
5758
5759 <p>Note that this is actually a rotational blur rather than a radial and as
5760 such actually mis-named. </p>
5761
5762 <p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
5763 pixels which are outside the image proper are blurred into the final result.
5764 </p>
5765
5766
5767 <div style="margin: auto;">
5768   <h4><a id="raise"></a>-raise <em class="arg">thickness</em></h4>
5769 </div>
5770
5771 <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>
5772
5773 <p>This will create a 3-D effect. Use <a href="command-line-options.html#raise">-raise</a> to create
5774 a raised effect, otherwise use <a href="command-line-options.html#raise">+raise</a>.  </p>
5775
5776 <p>Unlike the similar <a href="command-line-options.html#frame">-frame</a> option, <a
5777 href="command-line-options.html#raise">-raise</a> does not alter the dimensions of the image.</p>
5778
5779 <div style="margin: auto;">
5780   <h4><a id="random-threshold"></a>-random-threshold <em class="arg">low</em>x<em class="arg">high</em></h4>
5781 </div>
5782
5783 <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>
5784
5785 <div style="margin: auto;">
5786   <h4><a id="red-primary"></a>-red-primary <em class="arg">x,y</em></h4>
5787 </div>
5788
5789 <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>
5790
5791 <div style="margin: auto;">
5792   <h4><a id="regard-warnings"></a>-regard-warnings</h4>
5793 </div>
5794
5795 <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>
5796
5797 <div style="margin: auto;">
5798   <h4><a id="remap"></a>-remap <em class="arg">filename</em></h4>
5799 </div>
5800
5801 <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>
5802
5803 <p>If the <a href="command-line-options.html#dither">-dither</a> setting is enabled (the default) then
5804 the given colors are dithered over the image as necessary, otherwise the closest
5805 color (in RGB colorspace) is selected to replace that pixel in the image. </p>
5806
5807 <p>As a side effect of applying a <a href="command-line-options.html#remap">-remap</a> of colors across all
5808 images in the current image sequence, all the images will have the same color
5809 table.  That means that when saved to a file format such as GIF, it will use
5810 that color table as a single common or global color table, for all the images,
5811 without requiring extra local color tables. </p>
5812
5813 <p>Use <a href="command-line-options.html#remap">+remap</a> to reduce all images in the current image
5814 sequence to use a common color map over all the images. This equivalent to
5815 appending all the images together (without extra background colors) and color
5816 reducing those images using <a href="command-line-options.html#colors">-colors</a> with a 256 color
5817 limit, then <a href="command-line-options.html#remap">-remap</a> those colors over the original list of
5818 images. This ensures all the images follow a single color map. </p>
5819
5820 <p>If the number of colors over all the images is less than 256, then <a
5821 href="command-line-options.html#remap">+remap</a> should not perform any color reduction or dithering, as
5822 no color changes are needed. In that case, its only effect is to force the use
5823 of a global color table.  This recommended after using either <a
5824 href="command-line-options.html#colors">-colors</a> or <a href="command-line-options.html#ordered-dither">-ordered-dither</a> to
5825 reduce the number of colors in an animated image sequence. </p>
5826
5827 <div style="margin: auto;">
5828   <h4><a id="region"></a>-region <em class="arg">geometry</em></h4>
5829 </div>
5830
5831 <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>
5832
5833 <p>The <em class="arg">x</em> and <em class="arg">y</em> offsets are treated
5834 in the same manner as in <a href="command-line-options.html#crop">-crop</a>.</p>
5835
5836 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
5837
5838 <div style="margin: auto;">
5839   <h4><a id="remote"></a>-remote</h4>
5840 </div>
5841
5842 <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>
5843
5844 <p>The only command recognized is the name of an image file to load.</p>
5845
5846 <p>If you have more than one <a href="display.html">display</a> application
5847 running simultaneously, use the <a href="command-line-options.html#window"> window</a> option to
5848 specify which application to control.</p>
5849
5850 <div style="margin: auto;">
5851   <h4><a id="render"></a>-render</h4>
5852 </div>
5853
5854 <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>
5855
5856 <p>Use <a href="command-line-options.html#render">+render</a> to turn off rendering vector operations.
5857 This useful when saving the result to vector formats such as MVG or SVG.</p>
5858
5859 <div style="margin: auto;">
5860 <h4><a id="repage"></a>-repage <em class="arg">geometry</em></h4>
5861 </div>
5862
5863 <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>
5864
5865 <p>This option is like <a href="command-line-options.html#page">-page</a> but acts as an image operator
5866 rather than a setting.  You can separately set the canvas size or the offset
5867 of the image on that canvas by only providing those components. </p>
5868
5869 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
5870
5871 <p>If a <kbd>!</kbd> flag is given the offset given is added to the existing
5872 offset to move the image relative to its previous position. This useful for
5873 animation sequences. </p>
5874
5875 <p>A given a canvas size of zero such as '<kbd>0x0</kbd>' forces it to
5876 recalculate the canvas size so the image (at its current offset) will appear
5877 completely on that canvas (unless it has a negative offset).</p>
5878
5879 <p>Use <a href="command-line-options.html#repage">+repage</a> to completely remove/reset the virtual
5880 canvas meta-data from the images. </p>
5881
5882 <p>The <a href="command-line-options.html#set">-set</a> '<kbd>page</kbd>' option can be used to
5883 directly assign virtual canvas meta-data. </p>
5884
5885
5886 <div style="margin: auto;">
5887   <h4><a id="resample"></a>-resample <em class="arg">horizontal</em>x<em class="arg">vertical</em></h4>
5888 </div>
5889
5890 <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>
5891
5892 <p>Resize the image so that its rendered size remains the same as the original
5893 at the specified target resolution. For example, if a 300 DPI image renders at
5894 3 inches by 2 inches on a 300 DPI device, when the image has been resampled to
5895 72 DPI, it will render at 3 inches by 2 inches on a 72 DPI device.  Note that
5896 only a small number of image formats (e.g. JPEG, PNG, and TIFF) are capable of
5897 storing the image resolution. For formats which do not support an image
5898 resolution, the original resolution of the image must be specified via <a
5899 href="command-line-options.html#density">-density</a> on the command line prior to specifying the
5900 resample resolution.</p>
5901
5902 <p>Note that Photoshop stores and obtains image resolution from a proprietary
5903 embedded profile. If this profile exists in the image, then Photoshop will
5904 continue to treat the image using its former resolution, ignoring the image
5905 resolution specified in the standard file header.</p>
5906
5907 <div style="margin: auto;">
5908   <h4><a id="resize"></a>-resize <em class="arg">geometry</em></h4>
5909 </div>
5910
5911 <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>
5912
5913 <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
5914 ignored, and the <a href="command-line-options.html#gravity">-gravity</a> option has no effect.</p>
5915
5916 <p>If the <a href="command-line-options.html#filter">-filter</a> option precedes the <a
5917 href="command-line-options.html#resize">-resize</a> option, the image is resized with the specified
5918 filter.</p>
5919
5920 <p>Many image processing algorithms assume your image is in a linear-light
5921 coding.  If your image is gamma-corrected, you can remove the nonlinear gamma
5922 correction, apply the transform, then restore it like this:</p>
5923
5924 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert portrait.jpg -gamma .45455 -resize 25% -gamma 2.2  \ <br/> -quality 92 passport.jpg</span></p>
5925 <div style="margin: auto;">
5926   <h4><a id="respect-parentheses"></a>-respect-parentheses</h4>
5927 </div>
5928
5929 <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>
5930
5931 <div style="margin: auto;">
5932   <h4><a id="reverse"></a>-reverse</h4>
5933 </div>
5934
5935 <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>
5936
5937
5938 <div style="margin: auto;">
5939   <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>
5940 </div>
5941
5942 <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>
5943
5944 <p>A negative <em class="arg">x</em> offset rolls the image left-to-right.
5945 A negative <em class="arg">y</em> offset rolls the image top-to-bottom.</p>
5946
5947
5948 <div style="margin: auto;">
5949   <h4><a id="rotate"></a>-rotate <em class="arg">degrees</em>{<em class="arg">&lt;</em>}{<em class="arg">&gt;</em>}</h4>
5950 </div>
5951
5952 <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>
5953
5954 <p>Use <kbd>&gt;</kbd> to rotate the image only if its width exceeds the
5955 height. <kbd>&lt;</kbd> rotates the image <em>only</em> if its width is less
5956 than the height. For example, if you specify <kbd>-rotate "-90&gt;"</kbd> and
5957 the image size is 480x640, the image is not rotated. However, if the image is
5958 640x480, it is rotated by -90 degrees. If you use <kbd>&gt;</kbd> or
5959 <kbd>&lt;</kbd>, enclose it in quotation marks to prevent it from being
5960 misinterpreted as a file redirection.</p>
5961
5962 <p>Empty triangles in the corners, left over from rotating the image, are
5963 filled with the <kbd>background</kbd> color. </p>
5964
5965 <p>See also the <a href="command-line-options.html#distort">-distort</a> operator and specifically the
5966 '<kbd>ScaleRotateTranslate</kbd>' distort method. </p>
5967
5968
5969 <div style="margin: auto;">
5970   <h4><a id="sample"></a>-sample <em class="arg">geometry</em></h4>
5971 </div>
5972
5973 <table style='background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%'><tr><td style='width:75%'>minify/magnify the image using pixel subsampling and pixel replication, respectively.</td><td style='text-align:right;'></td></tr></table>
5974
5975 <p>Change the image size simply by directly sampling the pixels original
5976 image.  When magnifying, pixels are replicated in blocks.  When minifying,
5977 pixels are sub-sampled (i.e., some rows and columns are skipped over). </p>
5978
5979 <p>The results are thus equivalent to using <a href="command-line-options.html#resize">-resize</a> with
5980 a <a href="command-line-options.html#filter">-filter</a> setting of <kbd>point</kbd> (nearest
5981 neighbour), though <a href="command-line-options.html#sample">-sample</a> is a lot faster, as it
5982 avoids all the filter processing of the image. As such it completely ignores
5983 the current <a href="command-line-options.html#filter">-filter</a> setting. </p>
5984
5985 <p>The key feature of the <a href="command-line-options.html#sample">-sample</a> is that no new colors
5986 will be added to the resulting image, though some colors may disappear. </p>
5987
5988 <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
5989 ignored, unlike <a href="command-line-options.html#resize">-resize</a>. </p>
5990
5991
5992 <div style="margin: auto;">
5993   <h4><a id="sampling-factor"></a>-sampling-factor <em class="arg">horizontal-factor</em>x<em class="arg">vertical-factor</em></h4>
5994 </div>
5995
5996 <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>
5997
5998 <p>This option specifies the sampling factors to be used by the JPEG encoder
5999 for chroma downsampling. If this option is omitted, the JPEG library will use
6000 its own default values. When reading or writing the YUV format and when
6001 writing the M2V (MPEG-2) format, use <a
6002 href="command-line-options.html#sampling-factor">-sampling-factor 2x1</a> or <a
6003 href="command-line-options.html#sampling-factor">-sampling-factor 4:2:2</a> to specify the 4:2:2
6004 downsampling method.</p>
6005
6006 <div style="margin: auto;">
6007   <h4><a id="scale"></a>-scale <em class="arg">geometry</em></h4>
6008 </div>
6009
6010 <table style='background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%'><tr><td style='width:75%'>minify/magnify the image using pixel block averaging and pixel replication, respectively.</td><td style='text-align:right;'></td></tr></table>
6011
6012 <p>Change the image size simply by replacing pixels by averaging pixels
6013 together when minifying, or replacing pixels when magnifying.  </p>
6014
6015 <p>The results are thus equivalent to using <a href="command-line-options.html#resize">-resize</a> with
6016 a <a href="command-line-options.html#filter">-filter</a> setting of <kbd>box</kbd>.  Though it is a lot
6017 faster, as it avoids all the filter processing of the image. As such it
6018 completely ignores the current <a href="command-line-options.html#filter">-filter</a> setting. </p>
6019
6020 <p>If when shrinking (minifying) images the original image is some integer
6021 multiple of the new image size, the number of pixels averaged together to
6022 produce the new pixel color is the same across the whole image. This is
6023 a special case known as 'binning' and is often used as a method of reducing
6024 noise in image such as those generated by digital cameras, especially in low
6025 light conditions. </p>
6026
6027
6028 <div style="margin: auto;">
6029   <h4><a id="scene"></a>-scene <em class="arg">value</em></h4>
6030 </div>
6031
6032 <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>
6033
6034 <p>This option sets the scene number of an image or the first image in an image sequence.</p>
6035
6036 <div style="margin: auto;">
6037   <h4><a id="screen"></a>-screen</h4>
6038 </div>
6039
6040 <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>
6041
6042 <p>This option indicates that the GetImage request used to obtain the image
6043 should be done on the root window, rather than directly on the specified
6044 window. In this way, you can obtain pieces of other windows that overlap the
6045 specified window, and more importantly, you can capture menus or other popups
6046 that are independent windows but appear over the specified window.</p>
6047
6048 <div style="margin: auto;">
6049   <h4><a id="seed"></a>-seed</h4>
6050 </div>
6051
6052 <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>
6053
6054 <div style="margin: auto;">
6055   <h4><a id="segment"></a>-segment <em class="arg">cluster-threshold</em>x<em class="arg">smoothing-threshold</em></h4>
6056 </div>
6057
6058 <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>
6059
6060 <p>Segment an image by analyzing the histograms of the color components and
6061 identifying units that are homogeneous with the fuzzy c-means technique. This
6062 is part of the ImageMagick color quantization routines. </p>
6063
6064 <p>Specify <em class="arg">cluster threshold</em> as the number of pixels in
6065 each cluster that must exceed the cluster threshold to be considered valid.
6066 <em class="arg">Smoothing threshold</em> eliminates noise in the second
6067 derivative of the histogram. As the value is increased, you can expect
6068 a smoother second derivative.  The default is 1.5.</p>
6069
6070 <p>If the <a href="command-line-options.html#verbose">-verbose</a> setting is defined, a detailed report
6071 of the color clusters is returned.</p>
6072
6073
6074 <div style="margin: auto;">
6075   <h4><a id="selective-blur"></a>-selective-blur <em class="arg">radius</em><br />-selective-blur <em class="arg">radius</em>x<em class="arg">sigma</em>{<em class="arg">+threshold</em>}</h4>
6076 </div>
6077
6078 <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>
6079
6080 <p>Blurs those pixels that are less than or equal to the threshold in
6081 contrast. The threshold may be expressed as a fraction of <em
6082 class="QR">QuantumRange</em> or as a percentage.</p>
6083
6084 <div style="margin: auto;">
6085   <h4><a id="separate"></a>-separate</h4>
6086 </div>
6087
6088 <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>
6089
6090 <div style="margin: auto;">
6091   <h4><a id="sepia-tone"></a>-sepia-tone <em class="arg">threshold</em></h4>
6092 </div>
6093
6094 <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>
6095
6096 <p>Specify <em class="arg">threshold</em> as the percent threshold of the intensity (0 - 99.9%).</p>
6097
6098 <p>This option applies a special effect to the image, similar to the effect
6099 achieved in a photo darkroom by sepia toning.  Threshold ranges from 0 to <em
6100 class="QR">QuantumRange</em> and is a measure of the extent of the sepia
6101 toning.  A threshold of 80% is a good starting point for a reasonable
6102 tone.</p>
6103
6104
6105
6106 <div style="margin: auto;">
6107   <h4><a id="set"></a>-set <em class="arg">key value</em></h4>
6108   <h4>+set <em class="arg">key</em></h4>
6109 </div>
6110
6111 <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
6112 image sequence.</td><td style='text-align:right;'></td></tr></table>
6113
6114 <p>This will assign (or modify) specific settings attached to all the images
6115 in the current image sequence.  Using the <a href="command-line-options.html#set">+set</a> form of the
6116 option will either remove, or reset that setting to a default state, as
6117 appropriate.  </p>
6118
6119 <p>For example, it will modify specific well known image meta-data
6120 'attributes' such as those normally overridden by: the options <a
6121 href="command-line-options.html#delay" >-delay</a>, <a href="command-line-options.html#dispose" >-dispose</a>, and <a
6122 href="command-line-options.html#page" >-page</a>, <a href="command-line-options.html#colorspace" >-colorspace</a>; generally
6123 assigned before the image is read in, by using a <em class="arg">key</em> of
6124 the same name. </p>
6125
6126 <p>If the given <em class="arg">key</em> does not match a specific known
6127 'attribute ', such as shown above, the setting is stored as a a free form
6128 'property' string.  Such settings are listed in <a href="command-line-options.html#verbose"
6129 >-verbose</a> information ("<kbd>info:</kbd>" output format) as "Properties".
6130 </p>
6131
6132 <p>This includes string 'properties' that are set by and assigned to images
6133 using the options <a href="command-line-options.html#comment" >-comment</a>, <a href="command-line-options.html#label"
6134 >-label</a>, <a href="command-line-options.html#caption" >-caption</a>. These options actually assign
6135 a global 'artifact' which are automatically assigned (and any <a href="escape.html" >Format Percent
6136 Escapes</a> expanded) to images as they are read in.  For example:</p>
6137
6138 <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>
6139 <p>The set value can also make use of <a href="escape.html" >Format and Print Image
6140 Properties</a> in the defined value.  For example:</p>
6141
6142 <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>
6143 <p>Other well known 'properties' that are availible include:
6144 '<kbd>date:create</kbd>' and '<kbd>date:modify</kbd>' and
6145 '<kbd>signature</kbd>'. </p>
6146
6147 <p>The <a href="command-line-options.html#repage">-repage</a> operator will also allow you to modify
6148 the '<kbd>page</kbd>' attribute of an image for images already in memory (also
6149 see <a href="command-line-options.html#repage">-page</a>).  However it is designed to provide a finer
6150 control of the sub-parts of this 'attribute'. The <a href="command-line-options.html#set">-set page</a>
6151 option will only provide a direct, unmodified assignment of  '<kbd>page</kbd>'
6152 attribute. </p>
6153
6154 <p>This option can also associate a colorspace or profile with your image.
6155 For example,</p>
6156
6157 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert image.psd -set profile ISOcoated_v2_eci.icc image-icc.psd</span></p>
6158 <p>Some 'properties' must be defined in a specific way to be used. For
6159 example only 'properties' prefixed with "<kbd>filename:</kbd>" can be used to
6160 modify the output filename of an image. For example</p>
6161
6162 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert rose: -set filename:mysize '%wx%h' 'rose_%[filename:mysize].png'</span></p>
6163 <p>If the setting value is prefixed with "<kbd>option:</kbd>" the setting will
6164 be saved as a global "Artifact" exactly as if it was set using the <a
6165 href="command-line-options.html#define" >-define</a> option. As such settings are global in scope, they
6166 can be used to pass 'attributes' and 'properties' of one specific image,
6167 in a way that allows you to use them in a completely different image, even if
6168 the original image has long since been modified or destroyed. For example: </p>
6169
6170 <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>
6171 <p>Note that <a href="escape.html" >Format Percent Escapes</a> will only match
6172 a 'artifact' if the given <em class="arg">key</em> does not match an existing
6173 'attribute' or 'property'.  </p>
6174
6175 <p>You can set the attributes of the image registry by prefixing the value
6176 with <kbd>registry:</kbd>.</p>
6177
6178 <p>The <a href="command-line-options.html#set">-set profile</a> option can also be used to inject
6179 previously-formatted ancillary chunks into the output PNG file, using
6180 the commandline option as shown below or by setting the profile via a
6181 programming interface:</p>
6182
6183 <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>
6184 <p>where <em>x</em> is a location flag and
6185 <em class="arg">filename</em> is a file containing the chunk
6186 name in the first 4 bytes, then a colon (":"), followed by the chunk data.
6187 This encoder will compute the chunk length and CRC, so those must not
6188 be included in the file.</p>
6189
6190 <p>"x" can be "b" (before PLTE), "m" (middle, i.e., between PLTE and IDAT),
6191 or "e" (end, i.e., after IDAT).  If you want to write multiple chunks
6192 of the same type, then add a short unique string after the "x" to prevent
6193 subsequent profiles from overwriting the preceding ones, e.g.,</p>
6194
6195
6196 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert in.png -set profile PNG-chunk-b01:file01 / <br/>
6197             -profile PNG-chunk-b02:file02 out.png</span></p>
6198 <p>&nbsp;</p>
6199
6200
6201 <div style="margin: auto;">
6202   <h4><a id="shade"></a>-shade <em class="arg">azimuth</em>x<em class="arg">elevation</em></h4>
6203 </div>
6204
6205 <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>
6206
6207 <p>Specify <em class="arg">azimuth</em> and <em class="arg">elevation</em> as
6208 the position of the light source. Use <a href="command-line-options.html#shade">+shade</a> to return
6209 the shading results as a grayscale image.</p>
6210
6211 <div style="margin: auto;">
6212   <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>
6213 </div>
6214
6215 <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>
6216
6217 <div style="margin: auto;">
6218   <h4><a
6219 id="shared-memory"></a>-shared-memory</h4>
6220 </div>
6221
6222 <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>
6223
6224 <p>This option specifies whether the utility should attempt to use shared
6225 memory for pixmaps. ImageMagick must be compiled with shared memory support,
6226 and the display must support the <em class="arg">MIT-SHM</em> extension.
6227 Otherwise, this option is ignored. The default is <kbd>True</kbd>.</p>
6228
6229 <div style="margin: auto;">
6230   <h4><a id="sharpen"></a>-sharpen <em class="arg">radius</em><br />-sharpen <em class="arg">radius</em>x<em class="arg">sigma</em>+<em class="arg">bias</em></h4>
6231 </div>
6232
6233 <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>
6234
6235 <p>Use a Gaussian operator of the given radius and standard deviation (sigma).</p>
6236
6237 <div style="margin: auto;">
6238   <h4><a id="shave"></a>-shave <em class="arg">geometry</em></h4>
6239 </div>
6240
6241 <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>
6242
6243 <p>The <em class="arg">size</em> portion of the <em class="arg">geometry</em>
6244 argument specifies the width of the region to be removed from both sides of
6245 the image and the height of the regions to be removed from top and bottom.
6246 Offsets are ignored.</p>
6247
6248 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
6249
6250 <div style="margin: auto;">
6251   <h4><a id="shear"></a>-shear <em class="arg">Xdegrees</em>[x<em class="arg">Ydegrees</em>]</h4>
6252 </div>
6253
6254 <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>
6255
6256 <p>The shear angles may be positive, negative, or zero. When <em
6257 class="arg">Ydegrees</em> is omitted it defaults to 0. When both angles are
6258 given, the horizontal component of the shear is performed before the vertical
6259 component.</p>
6260
6261 <p>Shearing slides one edge of an image along the x-axis or y-axis (i.e.,
6262 horizontally or vertically, respectively),creating a parallelogram. The amount
6263 of each is controlled by the respective shear angle. For horizontal shears,
6264 <em class="arg">Xdegrees</em> is measured clockwise relative to "up" (the
6265 negative y-axis), sliding the top edge to the right when 0&deg;&lt;<em
6266 class="arg">Xdegrees</em>&lt;90&deg; and to the left when 90&deg;&lt;<em
6267 class="arg">Xdegrees</em>&lt;180&deg;.  For vertical shears <em
6268 class="arg">Ydegrees</em> is measured clockwise relative to "right" (the
6269 positive x-axis), sliding the right edge down when 0&deg;&lt;<em
6270 class="arg">Ydegrees</em>&lt;90&deg; and up when 90&deg;&lt;<em
6271 class="arg">Ydegrees</em>&lt;180&deg;.</p>
6272
6273 <p>Empty triangles left over from shearing the image are filled with the color
6274 defined by the <a href="command-line-options.html#fill">-background</a> option. The color is specified
6275 using the format described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
6276
6277 <p>The horizontal shear is performed before the vertical part. This is
6278 important to note, since horizontal and vertical shears do not
6279 <em>commute</em>, i.e., the order matters in a sequence of shears. For
6280 example, the following two commands are not equivalent.</p>
6281
6282 <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>
6283 <p>The first of the two commands above is equivalent to the following, except
6284 for the amount of empty space created; the command that follows generates
6285 a smaller image, and so is a better choice in terms of time and space.</p>
6286
6287 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert logo: -shear 20x60 logo-sheared.png</span></p>
6288 <div style="margin: auto;">
6289   <h4><a id="sigmoidal-contrast"></a>-sigmoidal-contrast <em class="arg">contrast</em>x<em class="arg">mid-point</em></h4>
6290 </div>
6291
6292 <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>
6293
6294 <p>Increase the contrast of the image using a sigmoidal transfer function
6295 without saturating highlights or shadows. <em class="arg">Contrast</em>
6296 indicates how much to increase the contrast. For example, near 0 is none, 3 is
6297 typical and 20 is a lot. Note that exactly zero is invalid, but 0.0001 is
6298 negligibly different from no change in contrast. <em
6299 class="arg">mid-point</em> indicates where midtones fall in the resultant
6300 image (0 is white; 50% is middle-gray; 100% is black).  By default the image
6301 contrast is increased, use <em class="arg">+sigmoidal-contrast</em> to
6302 decrease the contrast.</p>
6303
6304 <p>To achieve the equivalent of a sigmoidal brightness change, use <em
6305 class="arg">-sigmoidal-contrast brightnessx0%</em> to increase brightness and
6306 class="arg">+sigmoidal-contrast brightnessx0%</em> to decrease brightness.</p>
6307
6308 <div style="margin: auto;">
6309   <h4><a id="silent"></a>-silent</h4>
6310 </div>
6311
6312 <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>
6313
6314 <div style="margin: auto;">
6315   <h4><a id="size"></a>-size <em class="arg">width</em>[x<em class="arg">height</em>][<em class="arg">+offset</em>]</h4>
6316 </div>
6317
6318 <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>
6319
6320 <p>Use this option to specify the width and height of raw images whose
6321 dimensions are unknown such as <kbd>GRAY</kbd>, <kbd>RGB</kbd>, or
6322 <kbd>CMYK</kbd>. In addition to width and height, use <a
6323 href="command-line-options.html#size">-size</a> with an offset to skip any header information in the
6324 image or tell the number of colors in a <kbd>MAP</kbd> image file, (e.g. -size
6325 640x512+256).</p>
6326
6327 <p>For Photo CD images, choose from these sizes:</p>
6328
6329 <pre class="text">
6330    192x128
6331    384x256
6332    768x512
6333    1536x1024
6334    3072x2048
6335 </pre>
6336
6337 <div style="margin: auto;">
6338   <h4><a id="sketch"></a>-sketch <em class="arg">radius</em><br />-sketch <em class="arg">radius</em>x<em class="arg">sigma</em>+<em class="arg">angle</em></h4>
6339 </div>
6340
6341 <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>
6342
6343 <p>Sketch with the given radius, standard deviation (sigma), and angle.   The
6344 angle given is the angle toward which the image is sketched.  That is the
6345 direction people would consider the object is coming from.  </p>
6346
6347 <div style="margin: auto;">
6348   <h4><a id="smush"></a>-smush <em class="arg">offset</em></h4>
6349 </div>
6350
6351 <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>
6352
6353 <div style="margin: auto;">
6354   <h4><a id="snaps"></a>-snaps <em class="arg">value</em></h4>
6355 </div>
6356
6357 <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>
6358
6359 <p>Use this option to grab more than one image from the X server screen, to create an animation sequence.</p>
6360
6361 <div style="margin: auto;">
6362   <h4><a id="solarize"></a>-solarize <em class="arg">threshold</em></h4>
6363 </div>
6364
6365 <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>
6366
6367 <p>Specify <em class="arg">factor</em> as the percent threshold of the intensity (0 - 99.9%).</p>
6368
6369 <p>This option produces a <em class="arg">solarization</em> effect seen when
6370 exposing a photographic film to light during the development process.</p>
6371
6372 <div style="margin: auto;">
6373   <h4><a id="sparse-color"></a>-sparse-color <em
6374   class="arg">method</em>  '<em class="arg">x</em>,<em class="arg">y</em> <em class="arg">color</em>  ...'</h4>
6375 </div>
6376
6377 <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>
6378
6379
6380 <table class="doc">
6381   <tbody>
6382   <tr valign="top">
6383     <th align="left" style="width: 8%">Method</th>
6384     <th align="left">Description</th>
6385   </tr>
6386
6387   <tr valign="top">
6388     <td valign="top">barycentric</td>
6389     <td valign="top">three point triangle of color given 3 points.
6390         Giving only 2 points will form a linear gradient between those points.
6391         The gradient generated extends beyond the triangle created by those
6392         3 points. </td>
6393   </tr>
6394
6395   <tr valign="top">
6396     <td valign="top">bilinear</td>
6397     <td valign="top">Like barycentric but for 4 points. Less than 4 points
6398         fall back to barycentric. </td>
6399   </tr>
6400   <tr valign="top">
6401     <td valign="top">voronoi</td>
6402     <td valign="top">Simply map each pixel to the to nearest color point
6403         given. The result are polygonal 'cells' of solid color. </td>
6404   </tr>
6405
6406   <tr valign="top">
6407     <td valign="top">shepards</td>
6408     <td valign="top">Colors points biased on the ratio of inverse distance
6409         squared. Generating spots of color in a sea of the average of
6410         colors. </td>
6411   </tr>
6412
6413   <tr valign="top">
6414     <td valign="top">inverse</td>
6415     <td valign="top">Colors points biased on the ratio of inverse distance.
6416         This generates sharper points of color rather than rounded spots of
6417         '<kbd>shepards</kbd>'  Generating spots of color in a sea of the
6418         average of colors. </td>
6419   </tr>
6420
6421   </tbody>
6422 </table>
6423
6424 <p>The points are placed according to the images location on the virtual
6425 canvas (<a href="command-line-options.html#page" >-page</a> or <a href="command-line-options.html#repage" >-repage</a>
6426 offset), and do not actually have to exist on the given image, but may be
6427 some point beyond the edge of the image. All points are floating point values.
6428 </p>
6429
6430 <p>Only the color channels defined by the <a href="command-line-options.html#channel" >-channel</a> are
6431 modified, which means that by default matte/alpha transparency channel is not
6432 effected. Typically transparency channel is turned off either before or after
6433 the operation. </P>
6434
6435 Of course if some color points are transparent to generate a transparent
6436 gradient, then the image also requires transparency enabled to store the
6437 values. </p>
6438
6439 <p>All the above methods when given a single point of color will replace all
6440 the colors in the image with the color given, regardless of the point. This is
6441 logical, and provides an alternative technique to recolor a image to some
6442 default value. </p>
6443
6444
6445 <div style="margin: auto;">
6446   <h4><a id="splice"></a>-splice <em class="arg">geometry</em></h4>
6447 </div>
6448
6449 <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>
6450
6451 <p>This will add rows and columns of the current <a
6452 href="command-line-options.html#background">-background</a> color into the given image according to the
6453 given  <a href="command-line-options.html#gravity">-gravity</a> geometry setting.  >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
6454 image into four quadrants, separating them by the inserted rows and columns.
6455 </P>
6456
6457 If a dimension of geometry is zero no rows or columns will be added for that
6458 dimension.  Similarly using a zero offset with the appropriate <a
6459 href="command-line-options.html#gravity">-gravity</a> setting will add rows and columns to the edges of
6460 the image, padding the image only along that one edge. Edge padding is what <a
6461 href="command-line-options.html#splice">-splice</a> is most commonly used for. </p>
6462
6463 <p>If the exact same  <em class="arg">geometry</em> and <a
6464 href="command-line-options.html#gravity">-gravity</a> is later used with <a href="command-line-options.html#chop">-chop</a> the
6465 added added all splices removed. </p>
6466
6467 <div style="margin: auto;">
6468   <h4><a id="spread"></a>-spread <em class="arg">amount</em></h4>
6469 </div>
6470
6471 <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>
6472
6473 <p>The argument <em class="arg">amount</em> defines the size of the
6474 neighborhood around each pixel from which to choose a candidate pixel to
6475 swap.</p>
6476
6477 <div style="margin: auto;">
6478   <h4><a id="statistic"></a>-statistic <em class="arg">type</em> <em class="arg">geometry</em></h4>
6479 </div>
6480
6481 <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>
6482
6483 <p>Choose from these statistic types:</p>
6484 <pre class="text">
6485    Gradient   maximum difference in area
6486    Maximum    maximum value per channel in neighborhood
6487    Minimum    minimum value per channel in neighborhood
6488    Mean       average value per channel in neighborhood
6489    Median     median value per channel in neighborhood
6490    Mode       mode (most frequent) value per channel in neighborhood
6491    Nonpeak    value just before or after the median value per channel in neighborhood
6492 </pre>
6493
6494 <div style="margin: auto;">
6495   <h4><a id="stegano"></a>-stegano <em class="arg">offset</em></h4>
6496 </div>
6497
6498 <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>
6499
6500 <p>Use an offset to start the image hiding some number of pixels from the
6501 beginning of the image. Note this offset and the image size. You will need
6502 this information to recover the steganographic image (e.g. display -size
6503 320x256+35 stegano:image.png).</p>
6504
6505 <div style="margin: auto;">
6506   <h4><a id="stereo"></a>-stereo <em class="arg">+x</em>{<em class="arg">+y</em>}</h4>
6507 </div>
6508
6509 <table style='background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%'><tr><td style='width:75%'>composite two images to create a stereo anaglyph.</td><td style='text-align:right;'>[<a href="composite.html">composite</a>]</td></tr></table>
6510
6511 <p>The left side of the stereo pair is saved as the red channel of the output
6512 image. The right side is saved as the green channel. Red-green stereo glasses
6513 are required to properly view the stereo image.</p>
6514
6515 <div style="margin: auto;">
6516   <h4><a id="storage-type"></a>-storage-type <em class="arg">type</em></h4>
6517 </div>
6518
6519 <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>
6520
6521 <pre class="text">
6522    char     unsigned characters
6523    double   doubles
6524    float    floats
6525    integer  integers
6526    long     longs
6527    quantum  pixels in the native depth of your ImageMagick distribution
6528    short    unsigned shorts
6529 </pre>
6530
6531 <p>Float and double types are normalized from 0.0 to 1.0 otherwise the pixels
6532 values range from 0 to the maximum value the storage type can support.</p>
6533
6534 <div style="margin: auto;">
6535   <h4><a id="stretch"></a>-stretch <em class="arg">fontStretch</em></h4>
6536 </div>
6537
6538 <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>
6539
6540 <p>This setting suggests a type of stretch that ImageMagick should try to
6541 apply to the currently selected font family. Select <em
6542 class="arg">fontStretch</em> from the following.</p>
6543
6544 <pre class="text">
6545    Any
6546    Condensed
6547    Expanded
6548    ExtraCondensed
6549    ExtraExpanded
6550    Normal
6551    SemiCondensed
6552    SemiExpanded
6553    UltraCondensed
6554    UltraExpanded
6555 </pre>
6556
6557 <p>To print a complete list of stretch types, use <a href="command-line-options.html#list">-list
6558 stretch</a>.</p>
6559
6560 <p>For other settings that affect fonts, see the options <a
6561 href="command-line-options.html#font">-font</a>, <a href="command-line-options.html#family">-family</a>, <a
6562 href="command-line-options.html#style">-style</a>, and <a href="command-line-options.html#weight">-weight</a>. </p>
6563
6564 <div style="margin: auto;">
6565   <h4><a id="strip"></a>-strip</h4>
6566 </div>
6567
6568 <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>
6569
6570 <div style="margin: auto;">
6571   <h4><a id="stroke"></a>-stroke <em class="arg">color</em></h4>
6572 </div>
6573
6574 <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>
6575
6576 <p>The color is specified using the format described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
6577
6578 <p>See <a href="command-line-options.html#draw">-draw</a> for further details.</p>
6579
6580 <div style="margin: auto;">
6581   <h4><a id="strokewidth"></a>-strokewidth <em class="arg">value</em></h4>
6582 </div>
6583
6584 <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>
6585
6586 <p>See <a href="command-line-options.html#draw">-draw</a> for further details.</p>
6587
6588 <div style="margin: auto;">
6589   <h4><a id="style"></a>-style <em class="arg">fontStyle</em></h4>
6590 </div>
6591
6592 <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>
6593
6594 <p>This setting suggests a font style that ImageMagick should try to apply to
6595 the currently selected font family. Select <em class="arg">fontStyle</em> from
6596 the following.</p>
6597
6598 <pre class="text">
6599    Any
6600    Italic
6601    Normal
6602    Oblique
6603 </pre>
6604
6605 <p>For other settings that affect fonts, see the options <a
6606 href="command-line-options.html#font">-font</a>, <a href="command-line-options.html#family">-family</a>, <a
6607 href="command-line-options.html#stretch">-stretch</a>, and <a href="command-line-options.html#weight">-weight</a>. </p>
6608
6609 <div style="margin: auto;">
6610   <h4><a id="subimage-search"></a>-subimage-search</h4>
6611 </div>
6612
6613 <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>
6614
6615 <p>This option is required to have compare search for the best match location
6616 of a small image within a larger image. This search will produce two images
6617 (or two frames). The first is the "difference" image and the second will
6618 be the "match score" image.</p>
6619
6620 <p>The "match-score" image is smaller containing a pixel for ever possible
6621 position of the top-left corner of the given sub-image. that is its size will
6622 be the size of the larger_image - sub_image + 1.  The brightest location in
6623 this image is the location s the locate on the best match that is also
6624 reported. Note that this may or may nor be a perfect match, and the actual
6625 brightness will reflect this. Other bright 'peaks' can be used to locate other
6626 possible matching locations. </p>
6627
6628 <p>Note that the search will try to compare the sub-image at every possible
6629 location in the larger image, as such it can be very slow.  The smaller the
6630 sub-image the faster this search is. </p>
6631
6632
6633 <div style="margin: auto;">
6634   <h4><a id="swap"></a>-swap <em class="arg">index,index</em></h4>
6635 </div>
6636
6637 <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>
6638
6639 <p>For example, <a href="command-line-options.html#swap">-swap 0,2</a> swaps the first and the third
6640 images in the current image sequence. Use <a href="command-line-options.html#swap">+swap</a> to switch
6641 the last two images in the sequence.</p>
6642
6643 <div style="margin: auto;">
6644   <h4><a id="swirl"></a>-swirl <em class="arg">degrees</em></h4>
6645 </div>
6646
6647 <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>
6648
6649 <p><em class="arg">Degrees</em> defines the tightness of the swirl.</p>
6650
6651 <div style="margin: auto;">
6652   <h4><a id="synchronize"></a>-synchronize</h4>
6653 </div>
6654
6655 <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>
6656
6657 <div style="margin: auto;">
6658   <h4><a id="taint"></a>-taint</h4>
6659 </div>
6660
6661 <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>
6662
6663 <div style="margin: auto;">
6664   <h4><a id="text-font"></a>-text-font <em class="arg">name</em></h4>
6665 </div>
6666
6667 <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>
6668
6669 <p>Specifies the name of the preferred font to use in fixed (typewriter style)
6670 formatted text. The default is 14 point <em class="arg">Courier</em>.</p>
6671
6672 <p>You can tag a font to specify whether it is a PostScript, TrueType, or
6673 OPTION1 font. For example, <kbd>Courier.ttf</kbd> is a TrueType font and
6674 <kbd>x:fixed</kbd> is OPTION1.</p>
6675
6676 <div style="margin: auto;">
6677   <h4><a id="texture"></a>-texture <em class="arg">filename</em></h4>
6678 </div>
6679
6680 <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>
6681
6682 <div style="margin: auto;">
6683   <h4><a id="threshold"></a>-threshold <em class="arg">value</em>{<em class="arg">%</em>}</h4>
6684 </div>
6685
6686 <!-- {<em class="arg">green,blue,opacity</em>}
6687 <p>If the green or blue value is omitted, these channels use the same value as
6688 the first one provided. If all three color values are the same, the result is
6689 a bi-level image. If the opacity threshold is omitted, OpaqueOpacity is used
6690 and any partially transparent pixel becomes fully transparent.</p>
6691 -->
6692
6693 <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>
6694
6695 <p>Any pixel values (more specifically, those channels set using <a href="command-line-options.html#channel">&#x2011;channel</a>) that exceed the specified threshold are reassigned the
6696 maximum channel value, while all other values are assigned the minimum.</p>
6697
6698 <p> The threshold value can be given as a percentage or as an absolute integer
6699 value corresponding to the desired channel value. When given as an integer,
6700 the minimum attainable value is 0 (corresponding to black when all channels
6701 are affected), but the maximum value (corresponding to white) is that of the
6702 <kbd>quantum depth</kbd> of the particular build of ImageMagick, and is
6703 therefore dependent on the installation. For that reason, a reasonable
6704 recommendation for most applications is to specify the threshold values as
6705 a percentage.  </p>
6706
6707 <p> The following would force pixels with red values above 50% to have 100%
6708 red values, while those at or below 50% red would be set to 0 in the red
6709 channel. The green, blue, and alpha channels (if present) would be unchanged.
6710 </p>
6711
6712 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert in.png -channel red -threshold 50% out.png</span></p>
6713 <p>As (possibly) impractical but instructive examples, the following would
6714 generate an all-black and an all-white image with the same dimensions as the
6715 input image.</p>
6716
6717
6718 <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>
6719 <p>Note that the values of the transparency channel is treated as 'matte'
6720 values (0 is opaque) and not as 'alpha' values (0 is transparent).</p>
6721
6722 <p> See also <a href="command-line-options.html#black-threshold">&#x2011;black&#x2011;threshold</a> and <a href="command-line-options.html#white-threshold">&#x2011;white&#x2011;threshold</a>.
6723 </p>
6724
6725 <div style="margin: auto;">
6726   <h4><a id="thumbnail"></a>-thumbnail <em class="arg">geometry</em></h4>
6727 </div>
6728
6729 <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>
6730
6731 <p>This is similar to <a href="command-line-options.html#resize">-resize</a>, except it is optimized
6732 for speed and any image profile, other than a color profile, is removed to
6733 reduce the thumbnail size.  To strip the color profiles as well, add <a
6734 href="command-line-options.html#strip">-strip</a> just before of after this option.</p>
6735
6736 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
6737
6738 <div style="margin: auto;">
6739   <h4><a id="tile"></a>-tile <em class="arg">filename</em></h4>
6740 </div>
6741
6742 <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>
6743
6744 <div style="margin: auto;">
6745   <h4>-tile <em class="arg">geometry</em></h4>
6746 </div>
6747
6748 <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>
6749
6750 <p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
6751
6752 <div style="margin: auto;">
6753   <h4>-tile</h4>
6754 </div>
6755
6756 <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>
6757
6758 <div style="margin: auto;">
6759   <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>
6760 </div>
6761
6762 <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>
6763
6764 <p>This should be set before the tiling image is set by <a href="command-line-options.html#tile"
6765 >-tile</a> or <a href="command-line-options.html#texture" >-texture</a>, or directly applied for
6766 creating a tiled canvas using <kbd>TILE:</kbd> or <kbd>PATTERN:</kbd> input
6767 formats. </p>
6768
6769 <p>Internally ImageMagick does a <a href="command-line-options.html#roll" >-roll</a> of the tile image
6770 by the arguments given when the tile image is set. </p>
6771
6772 <div style="margin: auto;">
6773   <h4><a id="tint"></a>-tint <em class="arg">value</em></h4>
6774 </div>
6775
6776 <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>
6777
6778 <p>Tint the image with the fill color.</p>
6779
6780 <p>Specify the amount of tinting as a percentage.  Pure colors like black,
6781 white red, yellow, will not be affected by -tint. Only mid-range colors such
6782 as the various shades of grey.</p>
6783
6784 <div style="margin: auto;">
6785   <h4><a id="title"></a>-title <em class="arg">string</em></h4>
6786 </div>
6787
6788 <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>
6789
6790 <p>Use this option to assign a specific title to the image. This assigned to
6791 the image window and is typically displayed in the window title bar.
6792 Optionally you can include the image filename, type, width, height, Exif data,
6793 or other image attribute by embedding special format characters described
6794 under the <a href="command-line-options.html#format">-format</a> option.</p>
6795
6796 <p>For example,</p>
6797
6798 <p class="crtsnip">
6799   -title "%m:%f %wx%h"
6800 </p>
6801
6802 <p>produces an image title of <kbd>MIFF:bird.miff 512x480</kbd> for an image
6803 titled <kbd>bird.miff</kbd> and whose width is 512 and height is 480.</p>
6804
6805
6806 <div style="margin: auto;">
6807   <h4><a id="transform"></a>-transform</h4>
6808 </div>
6809
6810 <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>
6811
6812 <p>This option applies the transformation matrix from a previous <a href="command-line-options.html#affine">-affine</a> option.</p>
6813
6814 <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>
6815
6816 <p>This operator has been now been superseded by the  <a
6817 href="command-line-options.html#distort">-distort</a> '<kbd>AffineProjection</kbd>' method. </p>
6818
6819
6820 <div style="margin: auto;">
6821   <h4><a id="transparent"></a>-transparent <em class="arg">color</em></h4>
6822 </div>
6823
6824 <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>
6825
6826 <p>The <em class="arg">color</em> argument is defined using the format
6827 described under the <a href="command-line-options.html#fill">-fill</a> option. The <a href="command-line-options.html#fuzz"
6828 >-fuzz</a> setting can be used to match and replace colors similar to the one
6829 given. </p>
6830
6831 <p>Use  <a href="command-line-options.html#transparent" >+transparent</a> to invert the pixels matched.
6832 that is make all non-matching colors transparent. </p>
6833
6834 <p>The <a href="command-line-options.html#opaque">-opaque</a>  operator is exactly the same as <a
6835 href="command-line-options.html#transparent" >-transparent</a> but replaces the matching color with the
6836 current <a href="command-line-options.html#fill">-fill</a> color setting, rather than transparent.
6837 However the <a href="command-line-options.html#transparent" >-transparent</a> operator also ensures
6838 that the image has an alpha channel enabled, as per "<kbd><a href="command-line-options.html#alpha"
6839 >-alpha</a> set</kbd>", and does not require you to modify the <a
6840 href="command-line-options.html#channel">-channel</a> to enable alpha channel handling. </p>
6841
6842 <p>Note that this does not define the color as being the 'transparency color'
6843 used for color-mapped image formats, such as GIF.  For that use <a
6844 href="command-line-options.html#transparent-color" >-transparent-color</a> </p>
6845
6846
6847 <div style="margin: auto;">
6848   <h4><a id="transparent-color"></a>-transparent-color <em class="arg">color</em></h4>
6849 </div>
6850
6851 <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>
6852
6853 <p>Sometimes this is used for saving to image formats such as
6854 GIF and PNG8 which uses this color to represent boolean transparency.  This
6855 does not make a color transparent, it only defines what color the transparent
6856 color is in the color palette of the saved image. Use <a
6857 href="command-line-options.html#transparent">-transparent</a> to make an opaque color transparent.</p>
6858
6859 <p>This option allows you to have both an opaque visible color, as well as a
6860 transparent color of the same color value without conflict.  That is, you can
6861 use the same color for both the transparent and opaque color areas within an
6862 image.  This, in turn, frees to you to select a transparent color that is
6863 appropriate when an image is displayed by an application that does not handle a
6864 transparent color index, while allowing ImageMagick to correctly handle images of this
6865 type. </p>
6866
6867 <p>The default transparent color is <kbd>#00000000</kbd>, which is fully transparent black.</p>
6868
6869 <div style="margin: auto;">
6870   <h4><a id="transpose"></a>-transpose</h4>
6871 </div>
6872
6873 <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>
6874
6875 <p> This option mathematically transposes the pixel array.  It is equivalent to the sequence <kbd>-flip -rotate 90</kbd>.
6876 </p>
6877
6878 <div style="margin: auto;">
6879   <h4><a id="transverse"></a>-transverse</h4>
6880 </div>
6881
6882 <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 <kbd>-flop -rotate 90</kbd>.</td><td style='text-align:right;'></td></tr></table>
6883
6884
6885 <div style="margin: auto;">
6886   <h4><a id="treedepth"></a>-treedepth <em class="arg">value</em></h4>
6887 </div>
6888
6889 <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>
6890
6891 <p>Normally, this integer value is zero or one. A value of zero or one causes
6892 the use of an optimal tree depth for the color reduction algorithm.</p>
6893
6894 <p>An optimal depth generally allows the best representation of the source
6895 image with the fastest computational speed and the least amount of memory.
6896 However, the default depth is inappropriate for some images. To assure the
6897 best representation, try values between 2 and 8 for this parameter.  Refer to
6898 the <a href="quantize.html"
6899 >color reduction algorithm</a> for more details.</p>
6900
6901 <p>The <a href="command-line-options.html#colors">-colors</a> or <a href="command-line-options.html#monochrome">-monochrome</a>
6902 option, or writing to an image format which requires color reduction, is
6903 required for this option to take effect.</p>
6904
6905 <div style="margin: auto;">
6906   <h4><a id="trim"></a>-trim</h4>
6907 </div>
6908
6909 <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>
6910
6911 <p>This option removes any edges that are exactly the same color as the corner
6912 pixels. Use <a href="command-line-options.html#fuzz">-fuzz</a> to make <a href="command-line-options.html#trim">-trim</a> remove
6913 edges that are nearly the same color as the corner pixels.</p>
6914
6915 <p>The page or virtual canvas information of the image is preserved allowing
6916 you to extract the result of the <a href="command-line-options.html#trim">-trim</a> operation from the
6917 image.  Use a <a href="command-line-options.html#repage">+repage</a> to remove the virtual canvas page
6918 information if it is unwanted.</p>
6919
6920 <p>If the trimmed image 'disappears' an warning is produced, and a special
6921 single pixel transparent 'missed' image is returned, in the same way as when a
6922 <a href="command-line-options.html#crop">-crop</a> operation 'misses' the image proper. </p>
6923
6924
6925 <div style="margin: auto;">
6926   <h4><a id="type"></a>-type <em class="arg">type</em></h4>
6927 </div>
6928
6929 <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>
6930  <p>Choose from: <kbd>Bilevel</kbd>,
6931 <kbd>Grayscale</kbd>, <kbd>GrayscaleMatte</kbd>, <kbd>Palette</kbd>,
6932 <kbd>PaletteMatte</kbd>, <kbd>TrueColor</kbd>, <kbd>TrueColorMatte</kbd>,
6933 <kbd>ColorSeparation</kbd>, or <kbd>ColorSeparationMatte</kbd>.</p>
6934
6935 <p>Normally, when a format supports different subformats such as grayscale and
6936 truecolor, the encoder will try to choose an efficient subformat. The <a
6937 href="command-line-options.html#type">-type</a> option can be used to override this behavior. For
6938 example, to prevent a JPEG from being written in grayscale format even though
6939 only gray pixels are present, use.</p>
6940
6941 <p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert bird.png -type TrueColor bird.jpg</span></p>
6942 <p>Similarly, use <a href="command-line-options.html#type">-type TrueColorMatte</a> to force the
6943 encoder to write an alpha channel even though the image is opaque, if the
6944 output format supports transparency.</p>
6945
6946 <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>
6947
6948 <div style="margin: auto;">
6949   <h4><a id="undercolor"></a>-undercolor <em class="arg">color</em></h4>
6950 </div>
6951
6952 <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>
6953
6954 <p>The color is specified using the format described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
6955
6956 <p>See <a href="command-line-options.html#draw">-draw</a> for further details.</p>
6957
6958
6959 <div style="margin: auto;">
6960   <h4><a id="update"></a>-update <em class="arg">seconds</em></h4>
6961 </div>
6962
6963 <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>
6964
6965 <p>Suppose that while you are displaying an image the file that is currently
6966 displayed is over-written.  <kbd>display</kbd> will automagically detect that
6967 the input file has been changed and update the displayed image
6968 accordingly.</p>
6969
6970
6971 <div style="margin: auto;">
6972   <h4><a id="unique-colors"></a>-unique-colors</h4>
6973 </div>
6974
6975 <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>
6976
6977
6978 <div style="margin: auto;">
6979   <h4><a id="units"></a>-units <em class="arg">type</em></h4>
6980 </div>
6981
6982 <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>
6983
6984 <p>Choose from: <kbd>Undefined</kbd>, <kbd>PixelsPerInch</kbd>, or
6985 <kbd>PixelsPerCentimeter</kbd>. This option is normally used in conjunction
6986 with the <a href="command-line-options.html#density">-density</a> option.</p>
6987
6988
6989 <div style="margin: auto;">
6990   <h4><a id="unsharp"></a>-unsharp <em class="arg">radius</em><br />-unsharp <em class="arg">radius</em>x<em class="arg">sigma</em>{<em class="arg">+amount</em>}{<em class="arg">+threshold</em>}</h4>
6991 </div>
6992
6993 <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>
6994
6995 <p>The <a href="command-line-options.html#unsharp">-unsharp</a> option sharpens an image. The image is
6996 convolved with a Gaussian operator of the given radius and standard deviation
6997 (sigma). For reasonable results, radius should be larger than sigma. Use
6998 a radius of 0 to have the method select a suitable radius.</p>
6999
7000 <p>The parameters are:</p>
7001
7002 <pre class="text">
7003    radius     The radius of the Gaussian, in pixels,  not counting the center
7004               pixel (default 0).
7005    sigma      The standard deviation of the Gaussian, in pixels (default 1.0).
7006    amount     The fraction of the difference between the original and the blur
7007               image that is added back into the original (default 1.0).
7008    threshold  The threshold, as a fraction of <em class="QR">QuantumRange</em>, needed to apply the
7009               difference amount (default 0.05).
7010 </pre>
7011
7012
7013 <div style="margin: auto;">
7014   <h4><a id="verbose"></a>-verbose</h4>
7015 </div>
7016
7017 <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
7018 precedes the <a href="command-line-options.html#identify">-identify</a> option or
7019 <kbd>info:</kbd>.</td><td style='text-align:right;'></td></tr></table>
7020
7021
7022 <div style="margin: auto;">
7023   <h4><a id="version"></a>-version</h4>
7024 </div>
7025
7026 <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>
7027
7028
7029 <div style="margin: auto;">
7030   <h4><a id="view"></a>-view <em class="arg">string</em></h4>
7031 </div>
7032
7033 <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>
7034
7035
7036 <div style="margin: auto;">
7037   <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>
7038 </div>
7039
7040 <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>
7041
7042
7043 <div style="margin: auto;">
7044   <h4><a id="virtual-pixel"></a>-virtual-pixel <em class="arg">method</em></h4>
7045 </div>
7046
7047 <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>
7048
7049 <p>This option defines what color source should be used if and when a color
7050 lookup completely 'misses' the source image. The color(s) that appear to
7051 surround the source image.  Generally this color is derived from the source
7052 image, but could also be set to a specify background color. </p>
7053
7054 <p>Choose from these methods:</p>
7055
7056 <pre class="text">
7057    background            the area surrounding the image is the background color
7058    black                 the area surrounding the image is black
7059    checker-tile          alternate squares with image and background color
7060    dither                non-random 32x32 dithered pattern
7061    edge                  extend the edge pixel toward infinity
7062    gray                  the area surrounding the image is gray
7063    horizontal-tile       horizontally tile the image, background color above/below
7064    horizontal-tile-edge  horizontally tile the image and replicate the side edge pixels
7065    mirror                mirror tile the image
7066    random                choose a random pixel from the image
7067    tile                  tile the image (default)
7068    transparent           the area surrounding the image is transparent blackness
7069    vertical-tile         vertically tile the image, sides are background color
7070    vertical-tile-edge    vertically tile the image and replicate the side edge pixels
7071    white                 the area surrounding the image is white
7072 </pre>
7073
7074 <p>The default value is "edge".</p>
7075
7076 <p>This most important for distortion operators such as <a href="command-line-options.html#distort"
7077 >-distort</a>, <a href="command-line-options.html#implode" >-implode</a>, and <a href="command-line-options.html#fx" >-fx</a>.
7078 However it also effects operations that may access pixels just outside the
7079 image proper, such as <a href="command-line-options.html#convolve">-convolve</a>, <a
7080 href="command-line-options.html#blur">-blur</a>, and <a href="command-line-options.html#sharpen">-sharpen</a>. </p>
7081
7082 <p>To print a complete list of virtual pixel types, use the <a
7083 href="command-line-options.html#list">-list virtual-pixel</a> option.</p>
7084
7085
7086 <div style="margin: auto;">
7087   <h4><a id="visual"></a>-visual <em class="arg">type</em></h4>
7088 </div>
7089
7090 <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>
7091
7092 <p>Choose from these visual classes:</p>
7093
7094 <pre class="text">
7095    StaticGray
7096    GrayScale
7097    StaticColor
7098    PseudoColor
7099    TrueColor
7100    DirectColor
7101    default
7102    visual id
7103 </pre>
7104
7105 <p>The X server must support the visual you choose, otherwise an error occurs.
7106 If a visual is not specified, the visual class that can display the most
7107 simultaneous colors on the default screen is chosen.</p>
7108
7109
7110 <div style="margin: auto;">
7111   <h4><a id="watermark"></a>-watermark <em
7112   class="arg">brightness</em>x<em class="arg">saturation</em></h4>
7113 </div>
7114
7115 <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
7116 saturation.</td><td style='text-align:right;'>[<a href="composite.html">composite</a>]</td></tr></table>
7117
7118 <p>Take a grayscale image (with alpha mask) and modify the destination image's
7119 brightness according to watermark image's grayscale value and the <em
7120 class="arg">brightness</em> percentage.  The destinations color saturation
7121 attribute is just direct modified by the <em class="arg">saturation</em>
7122 percentage, which defaults to 100 percent (no color change). </p>
7123
7124
7125 <div style="margin: auto;">
7126   <h4><a id="wave"></a>-wave <em class="arg">amplitude</em><br />-wave <em class="arg">amplitude</em>x<em class="arg">wavelength</em></h4>
7127 </div>
7128
7129 <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>
7130
7131 <p>Specify <em class="arg">amplitude</em> and <em class="arg">wavelength</em>
7132 of the wave.</p>
7133
7134 <div style="margin: auto;">
7135   <h4><a id="weight"></a>-weight <em class="arg">fontWeight</em></h4>
7136 </div>
7137
7138 <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>
7139
7140 <p>This setting suggests a font weight that ImageMagick should try to apply to
7141 the currently selected font family. Use a positive integer for <em
7142 class="arg">fontWeight</em> or select from the following.</p>
7143
7144 <table class="doc">
7145   <col width="25%" />
7146   <col width="75%" />
7147   <thead>
7148   <tr>
7149   <th><em class="arg">fontWeight</em></th>
7150   <th>Description</th>
7151   </tr>
7152   </thead>
7153   <tbody>
7154     <tr><td>All </td>
7155         <td>No effect. </td></tr>
7156     <tr><td>Bold </td>
7157         <td>Same as <em class="arg">fontWeight</em> = 700.</td></tr>
7158     <tr><td>Bolder </td>
7159         <td>Add 100 to font weight if currently &le; 800.</td></tr>
7160     <tr><td>Lighter </td>
7161         <td>Subtract 100 to font weight if currently &le; 100.</td></tr>
7162     <tr><td>Normal </td>
7163         <td>Same as <em class="arg">fontWeight</em> = 400.</td></tr>
7164  </tbody>
7165  </table>
7166
7167 <p>To print a complete list of weight types, use <a href="command-line-options.html#list">-list
7168 weight</a>.</p>
7169
7170 <p>For other settings that affect fonts, see the options <a
7171 href="command-line-options.html#font">-font</a>, <a href="command-line-options.html#family">-family</a>, <a
7172 href="command-line-options.html#stretch">-stretch</a>, and <a href="command-line-options.html#style">-style</a>. </p>
7173
7174 <div style="margin: auto;">
7175   <h4><a id="white-point"></a>-white-point <em class="arg">x,y</em></h4>
7176 </div>
7177
7178 <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>
7179
7180 <div style="margin: auto;">
7181   <h4><a id="white-threshold"></a>-white-threshold <em class="arg">value</em>{<em class="arg">%</em>}</h4>
7182 </div>
7183
7184 <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
7185 pixels at or below the threshold unchanged.</td><td style='text-align:right;'></td></tr></table>
7186
7187 <p> The threshold value can be given as a percentage or as an absolute integer
7188 value within [0,&nbsp;<em class="QR">QuantumRange</em>] corresponding to the
7189 desired <a href="command-line-options.html#channel">&#x2011;channel</a> value. See <a href="command-line-options.html#threshold">&#x2011;threshold</a>for more details on thresholds and resulting values.  </p>
7190
7191 <div style="margin: auto;">
7192   <h4><a id="window"></a>-window <em class="arg">id</em></h4>
7193 </div>
7194
7195 <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>
7196
7197 <p><em class="arg">id</em> can be a window id or name. Specify <kbd>root</kbd>
7198 to select X's root window as the target window.</p>
7199
7200 <p>By default the image is tiled onto the background of the target window. If
7201 <kbd>backdrop</kbd> or <a href="command-line-options.html#geometry">-resize</a> are specified, the
7202 image is surrounded by the background color. Refer to <kbd>X RESOURCES</kbd>
7203 for details.</p>
7204
7205 <p>The image will not display on the root window if the image has more unique
7206 colors than the target window colormap allows. Use <a
7207 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 \r
7228 </div>\r
7229 \r
7230 <div id="linkbar">\r
7231     <span id="linkbar-west">&nbsp;</span>\r
7232     <span id="linkbar-center">\r
7233       <a href="../discourse-server">Discourse Server</a> &bull;\r
7234       <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>\r
7235     </span>\r
7236     <span id="linkbar-east">&nbsp;</span>\r
7237   </div>\r
7238   <div class="footer">\r
7239     <span id="footer-west">&copy; 1999-2012 ImageMagick Studio LLC</span>\r
7240     <span id="footer-east"> <a href="contact.html">Contact the Wizards</a></span>\r
7241   </div>\r
7242   <div style="clear: both; margin: 0; width: 100%; "></div>\r
7243   <script type="text/javascript">\r
7244     var _gaq = _gaq || [];\r
7245     _gaq.push(['_setAccount', 'UA-17690367-1']);\r
7246     _gaq.push(['_trackPageview']);\r
7247 \r
7248     (function() {\r
7249       var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\r
7250       ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\r
7251       var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\r
7252     })();\r
7253   </script>\r
7254 </body>\r
7255 </html>\r