blob: cd394a0691a9142b8049b65277e906d496c20f56 [file] [log] [blame]
cristyad41c0c2012-10-31 00:49:28 +00001
2
3
4
5<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
6 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
7<html version="-//W3C//DTD XHTML 1.1//EN"
8 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
9 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10 xsi:schemaLocation="http://www.w3.org/1999/xhtml
11 http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">
12<head>
13 <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
14 <meta name="google-site-verification" content="MxsMq6bdLOx0KSuz1MY6yG9ZTIJ7_7DVRfl5NCAT5Yg"/>
cristydcca3fa2010-12-29 21:50:07 +000015 <title>ImageMagick: Command-line Options</title>
cristy751980d2012-06-03 23:18:35 +000016 <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"/>
cristy45ef08f2012-12-07 13:13:34 +000030 <meta name="copyright" content="Copyright (c) 1999-2013 ImageMagick Studio LLC"/>
cristy751980d2012-06-03 23:18:35 +000031 <meta name="distribution" content="Global"/>
cristydcca3fa2010-12-29 21:50:07 +000032 <link rel="icon" href="../images/wand.png"/>
cristy3c98a4f2010-08-13 20:09:41 +000033 <link rel="shortcut icon" href="../images/wand.ico" type="images/x-icon"/>
cristyad41c0c2012-10-31 00:49:28 +000034 <link rel="canonical" href="http://www.imagemagick.org" />
35 <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"/>
36 <!-- Add jQuery library -->
37 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
38
39 <!-- Optionaly include easing and/or mousewheel plugins -->
40 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/jquery.easing-1.3.pack.js"></script>
41 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/jquery.mousewheel-3.0.6.pack.js"></script>
42
43 <!-- Add fancyBox -->
44 <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/jquery.fancybox.css?v=2.0.4" type="text/css" media="screen" />
45 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/jquery.fancybox.pack.js?v=2.0.4"></script>
46
47 <!-- Optionaly include button and/or thumbnail helpers -->
48 <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/helpers/jquery.fancybox-buttons.css?v=2.0.4" type="text/css" media="screen" />
49 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/helpers/jquery.fancybox-buttons.js?v=2.0.4"></script>
50
51 <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/helpers/jquery.fancybox-thumbs.css?v=2.0.4" type="text/css" media="screen" />
52 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/helpers/jquery.fancybox-thumbs.js?v=2.0.4"></script>
53 <script type="text/javascript">
54 $(document).ready(function() {
55 $(".fancybox").fancybox();
56 });
57 </script>
58 <!-- ImageMagick style -->
59 <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
60 <style type="text/css" media="all">
61 @import url("../www/magick.css");
62 </style>
63</head>
64
65<body id="www-imagemagick-org">
66<div class="titlebar">
67<div style="margin: 17px auto; float: left;">
68 <script type="text/javascript">
69 <!--
70 google_ad_client = "pub-3129977114552745";
71 google_ad_slot = "5439289906";
72 google_ad_width = 728;
73 google_ad_height = 90;
74 //-->
75 </script>
76 <script type="text/javascript"
77 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
78 </script>
79</div>
80<a href="../discourse-server">
81 <img src="../images/logo.jpg"
82 alt="ImageMagick Logo"
83 style="width: 123px; height: 118px; border: 0px; float: right;" /></a>
84<a href="../index.html">
85 <img src="../images/sprite.jpg"
86 alt="ImageMagick Sprite"
87 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
88</div>
89
90<div class="westbar">
91
cristy3ed852e2009-09-05 21:47:34 +000092<div class="menu">
cristy83a272e2010-05-07 20:40:35 +000093 <a title="About ImageMagick" href="../index.html">About ImageMagick</a>
cristy3ed852e2009-09-05 21:47:34 +000094</div>
cristy3ed852e2009-09-05 21:47:34 +000095<div class="menu">
cristy751980d2012-06-03 23:18:35 +000096 <a title="Binary Releases" href="binary-releases.html">Binary Releases</a>
cristybb503372010-05-27 20:51:26 +000097</div>
98<div class="sub">
cristy751980d2012-06-03 23:18:35 +000099 <a title="Binary Release: Unix" href="binary-releases.html#unix">Unix</a>
cristybb503372010-05-27 20:51:26 +0000100</div>
101<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000102 <a title="Binary Release: MacOS X" href="binary-releases.html#macosx">Mac OS X</a>
cristybb503372010-05-27 20:51:26 +0000103</div>
104<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000105 <a title="Binary Release: iOS" href="binary-releases.html#iOS">iOS</a>
cristyda16f162011-02-19 23:52:17 +0000106</div>
107<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000108 <a title="Binary Release: Windows" href="binary-releases.html#windows">Windows</a>
cristybb503372010-05-27 20:51:26 +0000109</div>
cristyad41c0c2012-10-31 00:49:28 +0000110<div class="sep"></div>
cristybb503372010-05-27 20:51:26 +0000111<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000112 <a title="Command-line Tools" href="command-line-tools.html">Command-line Tools</a>
cristy3ed852e2009-09-05 21:47:34 +0000113</div>
114<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000115 <a title="Command-line Tools: Processing" href="command-line-processing.html">Processing</a>
cristy3ed852e2009-09-05 21:47:34 +0000116</div>
117<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000118 <a title="Command-line Tools: Options" href="command-line-options.html">Options</a>
cristy3ed852e2009-09-05 21:47:34 +0000119</div>
120<div class="sub">
cristy83a272e2010-05-07 20:40:35 +0000121 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
cristy3ed852e2009-09-05 21:47:34 +0000122</div>
123<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000124 <a title="Program Interfaces" href="api.html">Program Interfaces</a>
cristy3ed852e2009-09-05 21:47:34 +0000125</div>
126<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000127 <a title="Program Interface: MagickWand" href="magick-wand.html">MagickWand</a>
cristy3ed852e2009-09-05 21:47:34 +0000128</div>
129<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000130 <a title="Program Interface: MagickCore" href="magick-core.html">MagickCore</a>
cristy3ed852e2009-09-05 21:47:34 +0000131</div>
132<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000133 <a title="Program Interface: PerlMagick" href="perl-magick.html">PerlMagick</a>
cristy3ed852e2009-09-05 21:47:34 +0000134</div>
135<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000136 <a title="Program Interface: Magick++" href="magick++.html">Magick++</a>
cristy3ed852e2009-09-05 21:47:34 +0000137</div>
cristyad41c0c2012-10-31 00:49:28 +0000138<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000139<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000140 <a title="Install from Source" href="install-source.html">Install from Source</a>
cristy3ed852e2009-09-05 21:47:34 +0000141</div>
142<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000143 <a title="Install from Source: Unix" href="install-source.html#unix">Unix</a>
cristy3ed852e2009-09-05 21:47:34 +0000144</div>
145<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000146 <a title="Install from Source: Windows" href="install-source.html#windows">Windows</a>
cristy3ed852e2009-09-05 21:47:34 +0000147 </div>
148<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000149 <a title="Resources" href="resources.html">Resources</a>
cristy3ed852e2009-09-05 21:47:34 +0000150</div>
cristybb503372010-05-27 20:51:26 +0000151<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000152 <a title="Architecture" href="architecture.html">Architecture</a>
cristybb503372010-05-27 20:51:26 +0000153</div>
cristy3ed852e2009-09-05 21:47:34 +0000154<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000155 <a title="Download" href="download.html">Download</a>
cristy3ed852e2009-09-05 21:47:34 +0000156</div>
cristyad41c0c2012-10-31 00:49:28 +0000157<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000158<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000159 <a title="Search" href="search.html">Search</a>
cristy3ed852e2009-09-05 21:47:34 +0000160</div>
cristyad41c0c2012-10-31 00:49:28 +0000161<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000162<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000163 <a title="Site Map" href="sitemap.html">Site Map</a>
cristy3ed852e2009-09-05 21:47:34 +0000164</div>
165<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000166 <a title="Site Map: Links" href="links.html">Links</a>
cristy3ed852e2009-09-05 21:47:34 +0000167</div>
cristyad41c0c2012-10-31 00:49:28 +0000168<div class="sep"></div>
cristyeed6cb62012-01-28 19:38:34 +0000169<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000170 <a rel="follow" title="Sponsors" href="sponsors.html">Sponsors:</a>
cristy3ed852e2009-09-05 21:47:34 +0000171
cristyeed6cb62012-01-28 19:38:34 +0000172 <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>
cristy751980d2012-06-03 23:18:35 +0000173 <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... -->
cristy3ed852e2009-09-05 21:47:34 +0000174<div class="sponsbox">
cristyeed6cb62012-01-28 19:38:34 +0000175<div class="sponsor">
cristy751980d2012-06-03 23:18:35 +0000176 <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... -->
cristy81492d62011-06-07 16:41:42 +0000177</div>
cristyeed6cb62012-01-28 19:38:34 +0000178<div class="sponsor">
cristy751980d2012-06-03 23:18:35 +0000179 <a rel="follow" title="Sponsor: VPS" href="http://www.interdominios.com/vps">VPS</a><!-- 201209010090 barsh@inter... -->
cristy1efc1ab2011-08-01 14:47:02 +0000180</div>
cristyeed6cb62012-01-28 19:38:34 +0000181<div class="sponsor">
cristy751980d2012-06-03 23:18:35 +0000182 <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... -->
cristy84134182011-06-15 22:59:00 +0000195</div>
cristyeed6cb62012-01-28 19:38:34 +0000196<div class="sponsor">
197 <a rel="follow" title="Sponsor: Web Site Hosting" href="http://webhostinggeeks.com">Web Site Hosting</a><!-- 201302010900 funds@enmob... -->
cristy81492d62011-06-07 16:41:42 +0000198</div>
cristyeed6cb62012-01-28 19:38:34 +0000199<div class="sponsor">
cristyeed6cb62012-01-28 19:38:34 +0000200 <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">
cristyeed6cb62012-01-28 19:38:34 +0000203 <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">
cristy10549a12011-05-15 19:04:46 +0000209 <a rel="follow" title="Sponsor: Druckerei" href="http://www.allesdruck.de">Druckerei</a><!-- 201303011500 r.leo -->
cristy4c54bbb2011-03-17 13:53:13 +0000210</div>
cristy751980d2012-06-03 23:18:35 +0000211<div class="sponsor">
212 <a rel="follow" title="Sponsor: Kaffeemaschinen reparatur" href="http://www.kaffeemaschinen-reparatur.de">Kaffeemaschinen reparatur</a><!-- 2012080100030 Temurbas atlas-multimedia-->
cristy4bf6e232011-05-21 01:43:33 +0000213</div>
cristyeed6cb62012-01-28 19:38:34 +0000214<div class="sponsor">
cristy751980d2012-06-03 23:18:35 +0000215 <a rel="follow" title="Sponsor: Web Hosting" href="http://www.hostucan.com">Web Hosting</a><!-- 2012120100150 racent marketing@webhosting...-->
cristyec6b4752011-01-08 03:16:23 +0000216</div>
cristy3ed852e2009-09-05 21:47:34 +0000217</div>
218</div>
cristyad41c0c2012-10-31 00:49:28 +0000219</div>
220
221<div class="eastbar">
222 <div class="g-plusone" id="gplusone"></div>
223 <script type="text/javascript">
224 window.___gcfg = {
225 lang: 'en-US'
226 };
227
228 (function() {
229 var po = document.createElement('script');
230 po.type = 'text/javascript'; po.async = true;
231 po.src = 'https://apis.google.com/js/plusone.js';
232 var script = document.getElementsByTagName('script')[0];
233 script.parentNode.insertBefore(po, script);
234 })();
235 var gplusone = document.getElementById("gplusone");
236 gplusone.setAttribute("data-size","medium");
237 gplusone.setAttribute("data-count","false");
238 </script>
239</div>
240
241<div class="main">
242
cristydcca3fa2010-12-29 21:50:07 +0000243<h1>Create, Edit, or Compose Bitmap Images With These Command-line Options</h1>
cristy5cadd612009-09-21 19:33:41 +0000244<p class="navigation-index">
cristy751980d2012-06-03 23:18:35 +0000245[ <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>
cristy3ed852e2009-09-05 21:47:34 +0000246
cristydcca3fa2010-12-29 21:50:07 +0000247<div class="doc-section">
248
cristyb36feb22010-03-26 16:54:37 +0000249<p>Below is list of command-line options recognized by the ImageMagick <a
cristy751980d2012-06-03 23:18:35 +0000250href="command-line-tools.html">command-line
cristyb36feb22010-03-26 16:54:37 +0000251tools</a>. If you want a description of a particular option, click on the
252option name in the navigation bar above and you will go right to it. Unless
cristy751980d2012-06-03 23:18:35 +0000253otherwise noted, each option is recognized by the commands <a href="convert.html">convert</a>, <a href="mogrify.html">mogrify</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +0000254
255<div style="margin: auto;">
cristy751980d2012-06-03 23:18:35 +0000256 <h4><a id="adaptive-blur"></a>-adaptive-blur <em class="arg">radius</em>[x<em class="arg">sigma</em>]</h4>
cristy3ed852e2009-09-05 21:47:34 +0000257</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>
cristy751980d2012-06-03 23:18:35 +0000260
261<p>A Gaussian operator of the given radius and standard deviation (<em
262class="arg">sigma</em>) is used. If <em class="arg">sigma</em> is not given it
263defaults to 1.</p>
cristy3ed852e2009-09-05 21:47:34 +0000264
265<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000266 <h4><a id="adaptive-resize"></a>-adaptive-resize <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000267</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
cristy751980d2012-06-03 23:18:35 +0000271<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>
272option defaults to data-dependent triangulation. Use the <a
273href="command-line-options.html#filter">-filter</a> to choose a different resampling algorithm.
274Offsets, if present in the geometry string, are ignored, and the <a
275href="command-line-options.html#gravity">-gravity</a> option has no effect.</p>
cristy3ed852e2009-09-05 21:47:34 +0000276
277<div style="margin: auto;">
cristy751980d2012-06-03 23:18:35 +0000278 <h4><a id="adaptive-sharpen"></a>-adaptive-sharpen <em class="arg">radius</em>[x<em class="arg">sigma</em>]</h4>
cristy3ed852e2009-09-05 21:47:34 +0000279</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
cristy751980d2012-06-03 23:18:35 +0000283<p>A Gaussian operator of the given radius and standard deviation (<em
284class="arg">sigma</em>) is used. If <em class="arg">sigma</em> is not given it
285defaults to 1.</p>
cristy3ed852e2009-09-05 21:47:34 +0000286
287<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000288 <h4><a id="adjoin"></a>-adjoin</h4>
cristy3ed852e2009-09-05 21:47:34 +0000289</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
cristy30092792011-02-22 02:06:14 +0000293<p>This option is enabled by default. An attempt is made to save all images of
294an image sequence into the given output file. However, some formats, such as
295JPEG and PNG, do not support more than one image per file, and in that case
296ImageMagick is forced to write each image as a separate file. As such, if
297more than one image needs to be written, the filename given is modified by
cristy751980d2012-06-03 23:18:35 +0000298adding a <a href="command-line-options.html#scene">-scene</a> number before the suffix, in order to
cristy30092792011-02-22 02:06:14 +0000299make distinct names for each image. </p>
cristy3ed852e2009-09-05 21:47:34 +0000300
cristy751980d2012-06-03 23:18:35 +0000301<p>Use <a href="command-line-options.html#adjoin">+adjoin</a> to force each image to be written to
cristy30092792011-02-22 02:06:14 +0000302separate files, whether or not the file format allows multiple images per file
303(for example, GIF, MIFF, and TIFF). </p>
cristy3ed852e2009-09-05 21:47:34 +0000304
cristy30092792011-02-22 02:06:14 +0000305<p>Including a C-style integer format string in the output filename will
cristy751980d2012-06-03 23:18:35 +0000306automagically enable <a href="command-line-options.html#adjoin">+adjoin</a> and are used to specify
307where the <a href="command-line-options.html#scene">-scene</a> number is placed in the filenames. These
cristy30092792011-02-22 02:06:14 +0000308strings, such as '<kbd>%d</kbd>' or '<kbd>%03d</kbd>', are familiar to those
309who have used the standard <kbd>printf()</kbd>' C-library function. As an
310example, the command</p>
cristy3ed852e2009-09-05 21:47:34 +0000311
cristyeed6cb62012-01-28 19:38:34 +0000312<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert logo: rose: -morph 15 my%02dmorph.jpg</span></p>
cristy30092792011-02-22 02:06:14 +0000313<p>will create a sequence of 17 images (the two given plus 15 more created by
cristy751980d2012-06-03 23:18:35 +0000314<a href="command-line-options.html#morph">-morph</a>), named: my00morph.jpg, my01morph.jpg,
cristy30092792011-02-22 02:06:14 +0000315my02morph.jpg, ..., my16morph.jpg. </p>
cristy3ed852e2009-09-05 21:47:34 +0000316
cristy30092792011-02-22 02:06:14 +0000317<p>In summary, ImageMagick tries to write all images to one file, but will
318save 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,
cristy751980d2012-06-03 23:18:35 +0000321<li>the <a href="command-line-options.html#adjoin">+adjoin</a> option is given, or
cristy30092792011-02-22 02:06:14 +0000322<li>a printf() integer format string (eg: "%d") is present in the output
323 filename.
324</ol></p>
cristy3ed852e2009-09-05 21:47:34 +0000325
326
327<div style="margin: auto;">
cristy30092792011-02-22 02:06:14 +0000328 <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
cristye9a32c32011-04-07 01:11:05 +0000331 class="arg">t<sub>x</sub></em>,<em class="arg">t<sub>y</sub></em>]</h4>
cristy3ed852e2009-09-05 21:47:34 +0000332</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
cristy30092792011-02-22 02:06:14 +0000336<p>This option sets a transformation matrix, for use by subsequent <a
cristy751980d2012-06-03 23:18:35 +0000337href="command-line-options.html#draw">-draw</a> or <a href="command-line-options.html#transform">-transform</a> options. </p>
cristy3ed852e2009-09-05 21:47:34 +0000338
cristy30092792011-02-22 02:06:14 +0000339<p>The matrix entries are entered as comma-separated numeric values either in
340quotes or without spaces. </p>
cristy3ed852e2009-09-05 21:47:34 +0000341
cristy30092792011-02-22 02:06:14 +0000342<p>Internally, the transformation matrix has 3x3 elements, but three of them
343are omitted from the input because they are constant. The new (transformed)
344coordinates (<em class="arg">x'</em>, <em class="arg">y'</em>) of a pixel at
345position (<em class="arg">x</em>, <em class="arg">y</em>) in the original
346image are calculated using the following matrix equation.</p>
cristy3ed852e2009-09-05 21:47:34 +0000347
348<div class="eqn">
349<img alt="affine transformation" src="../images/affine.png"/>
350</div>
351
cristy30092792011-02-22 02:06:14 +0000352<p> The size of the resulting image is that of the smallest rectangle that
353contains the transformed source image. The parameters <em
354class="arg">t<sub>x</sub></em> and <em class="arg">t<sub>y</sub></em>
355subsequently shift the image pixels so that those that are moved out of the
356image area are cut off.</p>
cristy3ed852e2009-09-05 21:47:34 +0000357
cristy30092792011-02-22 02:06:14 +0000358<p>The transformation matrix complies with the left-handed pixel coordinate
359system: positive <em class="arg">x</em> and <em class="arg">y</em> directions
360are rightward and downward, resp.; positive rotation is clockwise.</p>
cristy3ed852e2009-09-05 21:47:34 +0000361
cristy30092792011-02-22 02:06:14 +0000362<p> If the translation coefficients <em class="arg">t<sub>x</sub></em> and <em
cristyeed6cb62012-01-28 19:38:34 +0000363class="arg">t<sub>y</sub></em> are omitted they default to 0,0. Therefore,
cristy30092792011-02-22 02:06:14 +0000364four parameters suffice for rotation and scaling without translation.</p>
cristy3ed852e2009-09-05 21:47:34 +0000365
cristy30092792011-02-22 02:06:14 +0000366<p>Scaling by the factors <em class="arg">s<sub>x</sub></em> and <em
367class="arg">s<sub>y</sub></em> in the <em>x</em> and <em>y</em> directions,
368respectively, is accomplished with the following.</p>
369
cristy751980d2012-06-03 23:18:35 +0000370<p>See <a href="command-line-options.html#transform">-transform</a>, and the <a
371href="command-line-options.html#distort">-distort</a> method '<kbd>Affineprojection</kbd> for more
cristy30092792011-02-22 02:06:14 +0000372information </p>
373
cristy3ed852e2009-09-05 21:47:34 +0000374
cristy751980d2012-06-03 23:18:35 +0000375<p class="crtsnip"> -affine <em class="arg">s<sub>x</sub></em>,0,0,<em
376class="arg">s<sub>y</sub></em> </p>
cristy3ed852e2009-09-05 21:47:34 +0000377
cristy751980d2012-06-03 23:18:35 +0000378<p>Translation by a displacement (<em class="arg">t<sub>x</sub></em>, <em
379class="arg">t<sub>y</sub></em>) is accomplished like so:</p>
cristy3ed852e2009-09-05 21:47:34 +0000380
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
cristy751980d2012-06-03 23:18:35 +0000385<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>
cristy3ed852e2009-09-05 21:47:34 +0000388
389<p class="crtsnip">
390 -affine <em>c</em>,<em>s</em>,-<em>s</em>,<em>c</em>
391</p>
392
cristy751980d2012-06-03 23:18:35 +0000393<p>The cumulative effect of a sequence of <a href="command-line-options.html#affine" >-affine</a>
394transformations 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
396of the individual transformations.</p>
cristy3ed852e2009-09-05 21:47:34 +0000397
cristy751980d2012-06-03 23:18:35 +0000398<p>An attempt is made to detect near-singular transformation matrices. If the
399matrix determinant has a sufficiently small absolute value it is rejected.</p>
cristy3ed852e2009-09-05 21:47:34 +0000400
401<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000402 <h4><a id="alpha"></a>-alpha <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000403</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
408channel 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">
cristybac7a162010-06-15 19:57:29 +0000419 <td valign="top"><kbd>Activate</kbd> or <kbd>On</kbd></td>
cristy83a272e2010-05-07 20:40:35 +0000420 <td valign="top">
cristybac7a162010-06-15 19:57:29 +0000421 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>
cristy83a272e2010-05-07 20:40:35 +0000425
426 <tr valign="top">
cristybac7a162010-06-15 19:57:29 +0000427 <td valign="top"><kbd>Deactivate</kbd> or <kbd>Off</kbd></td>
cristy3ed852e2009-09-05 21:47:34 +0000428 <td valign="top">
429 Disables the image's transparency channel. Does not delete or change the
cristy83a272e2010-05-07 20:40:35 +0000430 existing data, just turns off the use of that data.</td></tr>
cristy3ed852e2009-09-05 21:47:34 +0000431
432 <tr valign="top">
433 <td valign="top"><kbd>Set</kbd></td>
434 <td valign="top">
cristybac7a162010-06-15 19:57:29 +0000435 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>
cristy3ed852e2009-09-05 21:47:34 +0000438
439 <tr valign="top">
440 <td valign="top"><kbd>Opaque</kbd></td>
441 <td valign="top">
cristybac7a162010-06-15 19:57:29 +0000442 Enables the alpha/matte channel and forces it to be fully opaque.
443 </td></tr>
cristy3ed852e2009-09-05 21:47:34 +0000444
445 <tr valign="top">
446 <td valign="top"><kbd>Transparent</kbd></td>
447 <td valign="top">
cristy83a272e2010-05-07 20:40:35 +0000448 Activates the alpha/matte channel and forces it to be fully
cristybac7a162010-06-15 19:57:29 +0000449 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>
cristy3ed852e2009-09-05 21:47:34 +0000452
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
cristybac7a162010-06-15 19:57:29 +0000457 '<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>
cristy3ed852e2009-09-05 21:47:34 +0000461
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
cristybac7a162010-06-15 19:57:29 +0000466 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>
cristy3ed852e2009-09-05 21:47:34 +0000469
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
cristyb36feb22010-03-26 16:54:37 +0000474 the current background color. That is the RGB color channels is
475 replaced, with appropriate alpha shape.
cristy3ed852e2009-09-05 21:47:34 +0000476 </td></tr>
477
478 <tr valign="top">
cristy751980d2012-06-03 23:18:35 +0000479 <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">
cristy3ed852e2009-09-05 21:47:34 +0000485 <td valign="top"><kbd>Background</kbd></td>
486 <td valign="top">
cristyb36feb22010-03-26 16:54:37 +0000487 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.
cristy3ed852e2009-09-05 21:47:34 +0000491 </td></tr>
492 </tbody>
493</table>
494
cristy751980d2012-06-03 23:18:35 +0000495<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>
498Set</kbd>" and not "<kbd><a href="command-line-options.html#alpha" >-alpha</a> On</kbd>". </p>
cristy3ed852e2009-09-05 21:47:34 +0000499
500
501<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000502 <h4><a id="annotate"></a>
cristy3ed852e2009-09-05 21:47:34 +0000503 -annotate <em class="arg">degrees</em> <em class="arg">text</em><br />
cristy751980d2012-06-03 23:18:35 +0000504 -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>
cristy3ed852e2009-09-05 21:47:34 +0000508</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
cristy751980d2012-06-03 23:18:35 +0000512<p>This is a convenience for annotating an image with text. For more precise
513control over text annotations, use <a href="command-line-options.html#draw">-draw</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +0000514
515
cristy751980d2012-06-03 23:18:35 +0000516<p>The values <em class="arg">Xdegrees</em> and <em class="arg">Ydegrees</em>
517control the shears with respect to the , respectively, applied to the text,
518while <em class="arg">t<sub>x</sub></em> and <em
519class="arg">t<sub>y</sub></em> are offsets that give the location of the text
520relative to the upper left corner of the image.</p>
cristy3ed852e2009-09-05 21:47:34 +0000521
cristy751980d2012-06-03 23:18:35 +0000522<p>Using <a href="command-line-options.html#annotate">-annotate</a>&nbsp;<em class="arg">degrees</em>
523or <a href="command-line-options.html#annotate">-annotate</a>&nbsp;<em class="arg">degrees</em>x<em
524class="arg">degrees</em> produces an unsheared rotation of the text. The
525direction of the rotation is positive, which means a clockwise rotation if <em
526class="arg">degrees</em> is positive. (This conforms to the usual mathematical
527convention once it is realized that the positive <em>y</em>&ndash;direction is
528conventionally considered to be <em>downward</em> for images.)</p>
cristy3ed852e2009-09-05 21:47:34 +0000529
cristy751980d2012-06-03 23:18:35 +0000530<p>The new (transformed) coordinates (<em class="arg">x'</em>, <em
531class="arg">y'</em>) of a pixel at position (<em class="arg">x</em>, <em
532class="arg">y</em>) in the image are calculated using the following matrix
533equation.</p> <div class="eqn"><img alt="annotate transformation" src="../images/annotate.png"/></div>
cristy3ed852e2009-09-05 21:47:34 +0000534
cristy751980d2012-06-03 23:18:35 +0000535<p>If <em class="arg">t<sub>x</sub></em> and <em
536class="arg">t<sub>y</sub></em> are omitted, they default to 0. This makes the
537bottom-left of the text becomes the upper-left corner of the image, which is
538probably undesirable. Adding a <a href="command-line-options.html#gravity" >-gravity</a> option in this
539case leads to nice results.</p>
cristy3ed852e2009-09-05 21:47:34 +0000540
cristy751980d2012-06-03 23:18:35 +0000541<p>Text is any UTF-8 encoded character sequence. If <em class="arg">text</em>
542is 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
544formatting characters are recognized.</p>
cristy3ed852e2009-09-05 21:47:34 +0000545
546<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000547 <h4><a id="antialias"></a>-antialias</h4>
cristy3ed852e2009-09-05 21:47:34 +0000548</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
551drawing 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
cristy751980d2012-06-03 23:18:35 +0000554drawn. Use <a href="command-line-options.html#antialias">+antialias</a> to disable the addition of
cristy3ed852e2009-09-05 21:47:34 +0000555antialiasing edge pixels. This will then reduce the number of colors added to
556an image to just the colors being directly drawn. That is, no mixed colors
cristyd0bd44a2010-09-24 12:38:11 +0000557are added when drawing such objects. </p>
cristy3ed852e2009-09-05 21:47:34 +0000558
559<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000560 <h4><a id="append"></a>-append</h4>
cristy3ed852e2009-09-05 21:47:34 +0000561</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
cristy751980d2012-06-03 23:18:35 +0000566images in sequence top-to-bottom. Use <a href="command-line-options.html#append">+append</a> to
cristy3ed852e2009-09-05 21:47:34 +0000567stack images left-to-right. </p>
568
569<p>If they are not of the same width, narrower images are padded with the
cristy751980d2012-06-03 23:18:35 +0000570current <a href="command-line-options.html#background">-background</a> color setting, and their
cristyd0bda5e2010-09-21 16:22:45 +0000571position relative to each other can be controlled by the current <a
cristy751980d2012-06-03 23:18:35 +0000572href="command-line-options.html#gravity">-gravity</a> setting. </p>
cristy3ed852e2009-09-05 21:47:34 +0000573
574
575<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000576 <h4><a id="attenuate"></a>-attenuate <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000577</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
cristy751980d2012-06-03 23:18:35 +0000581<p>If unset the value is equivelent to 1.0, or a maximum noise addition</p>
cristy3ed852e2009-09-05 21:47:34 +0000582
583<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000584 <h4><a id="authenticate"></a>-authenticate <em class="arg">password</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000585</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
cristy751980d2012-06-03 23:18:35 +0000589<p>Use this option to supply a <em class="arg">password</em> for decrypting
590a PDF that has been encrypted using Microsoft Crypto API (MSC API). The
591encrypting using the MSC API is not supported.</p>
cristy3ed852e2009-09-05 21:47:34 +0000592
cristy751980d2012-06-03 23:18:35 +0000593<p>For a different encryption method, see <a href="command-line-options.html#encipher">-encipher</a>
594and <a href="command-line-options.html#decipher">-decipher</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +0000595
cristyd934d102009-10-10 12:55:13 +0000596
597
cristy3ed852e2009-09-05 21:47:34 +0000598<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000599 <h4><a id="auto-gamma"></a>-auto-gamma</h4>
cristy3ed852e2009-09-05 21:47:34 +0000600</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
cristyd934d102009-10-10 12:55:13 +0000604<p>This calculates the mean values of an image, then applies a calculated <a
cristy751980d2012-06-03 23:18:35 +0000605href="command-line-options.html#gamma" >-gamma</a> adjustment so that is the mean color exists in the
cristyd934d102009-10-10 12:55:13 +0000606image it will get a have a value of 50%. </p>
607
cristyd0bd44a2010-09-24 12:38:11 +0000608<p>This means that any solid 'gray' image becomes 50% gray. </p>
cristyd934d102009-10-10 12:55:13 +0000609
610<p>This works well for real-life images with little or no extreme dark and
611light areas, but tend to fail for images with large amounts of bright sky or
cristyd0bda5e2010-09-21 16:22:45 +0000612dark shadows. It also does not work well for diagrams or cartoon like images.
cristyd934d102009-10-10 12:55:13 +0000613</p>
614
cristy751980d2012-06-03 23:18:35 +0000615<p>It uses the <a href="command-line-options.html#channel" >-channel</a> setting, (including the
cristy2dcd6822011-06-13 16:21:20 +0000616'<em>sync</em>' flag for channel synchronization), to determine which color
cristy751980d2012-06-03 23:18:35 +0000617values is used and modified. As the default <a href="command-line-options.html#channel"
cristydcca3fa2010-12-29 21:50:07 +0000618>-channel</a> setting is '<em>RGB,sync</em>', channels are modified
cristyd934d102009-10-10 12:55:13 +0000619together by the same gamma value, preserving colors. </p>
620
621
622
cristy3ed852e2009-09-05 21:47:34 +0000623<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000624 <h4><a id="auto-level"></a>-auto-level</h4>
cristy3ed852e2009-09-05 21:47:34 +0000625</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
cristyd934d102009-10-10 12:55:13 +0000629<p>This is a 'perfect' image normalization operator. It finds the exact
cristyd0bda5e2010-09-21 16:22:45 +0000630minimum and maximum color values in the image and then applies a <a
cristy751980d2012-06-03 23:18:35 +0000631href="command-line-options.html#level" >-level</a> operator to stretch the values to the full range of
cristyd934d102009-10-10 12:55:13 +0000632values. </p>
633
cristy83543962009-10-16 19:04:28 +0000634<p>The operator is not typically used for real-life images, image scans, or
cristyd934d102009-10-10 12:55:13 +0000635JPEG format images, as a single 'out-rider' pixel can set a bad min/max values
cristy751980d2012-06-03 23:18:35 +0000636for the <a href="command-line-options.html#level" >-level</a> operation. On the other hand it is the
cristyd934d102009-10-10 12:55:13 +0000637right operator to use for color stretching gradient images being used to
638generate Color lookup tables, distortion maps, or other 'mathematically'
639defined images. </p>
640
cristy751980d2012-06-03 23:18:35 +0000641<p>The operator is very similar to the <a href="command-line-options.html#normalize">-normalize</a>, <a
642href="command-line-options.html#contrast-stretch" >-contrast-stretch</a>, and <a href="command-line-options.html#linear-stretch"
cristyd934d102009-10-10 12:55:13 +0000643>-linear-stretch</a> operators, but without 'histogram binning' or 'clipping'
cristy751980d2012-06-03 23:18:35 +0000644problems that these operators may have. That is <a href="command-line-options.html#auto-level"
cristy83543962009-10-16 19:04:28 +0000645>-auto-level</a> is the perfect or ideal version these operators. </p>
cristyd934d102009-10-10 12:55:13 +0000646
cristy751980d2012-06-03 23:18:35 +0000647<p>It uses the <a href="command-line-options.html#channel" >-channel</a> setting, (including the
cristy2dcd6822011-06-13 16:21:20 +0000648special '<em>sync</em>' flag for channel synchronization), to determine
cristyd0bd44a2010-09-24 12:38:11 +0000649which color values are used and modified. As the default <a
cristy751980d2012-06-03 23:18:35 +0000650href="command-line-options.html#channel" >+channel</a> setting is '<em>RGB,sync</em>', the
cristydcca3fa2010-12-29 21:50:07 +0000651'<em>sync</em>' ensures that the color channels will are modified
cristy83543962009-10-16 19:04:28 +0000652together by the same gamma value, preserving colors, and ignoring
653transparency. </p>
cristyd934d102009-10-10 12:55:13 +0000654
655
cristy3ed852e2009-09-05 21:47:34 +0000656<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000657 <h4><a id="auto-orient"></a>-auto-orient</h4>
cristy3ed852e2009-09-05 21:47:34 +0000658</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
cristy83543962009-10-16 19:04:28 +0000662<p>This operator reads and resets the EXIF image profile setting 'Orientation'
663and then performs the appropriate 90 degree rotation on the image to orient
664the image, for correct viewing. </p>
665
666<p>This EXIF profile setting is usually set using a gravity sensor in digital
cristyeed6cb62012-01-28 19:38:34 +0000667camera, however photos taken directly downward or upward may not have an
cristy83543962009-10-16 19:04:28 +0000668appropriate value. Also images that have been orientation 'corrected' without
669reseting this setting, may be 'corrected' again resulting in a incorrect
cristyeed6cb62012-01-28 19:38:34 +0000670result. If the EXIF profile was previously stripped, the <a
cristy751980d2012-06-03 23:18:35 +0000671href="command-line-options.html#auto-orient" >-auto-orient</a> operator will do nothing. </p>
cristy83543962009-10-16 19:04:28 +0000672
673
cristy3ed852e2009-09-05 21:47:34 +0000674<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000675 <h4><a id="average"></a>-average</h4>
cristy3ed852e2009-09-05 21:47:34 +0000676</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
cristy3ed852e2009-09-05 21:47:34 +0000682
683<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000684 <h4><a id="backdrop"></a>-backdrop</h4>
cristy3ed852e2009-09-05 21:47:34 +0000685</div>
686
cristy751980d2012-06-03 23:18:35 +0000687<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>
cristy3ed852e2009-09-05 21:47:34 +0000688
cristy751980d2012-06-03 23:18:35 +0000689<p>This backdrop covers the entire workstation screen and is useful for hiding
690other X window activity while viewing the image. The color of the backdrop is
691specified as the background color. The color is specified using the format
692described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +0000693
694<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000695 <h4><a id="background"></a>-background <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000696</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
cristy751980d2012-06-03 23:18:35 +0000700<p>The color is specified using the format described under the <a
701href="command-line-options.html#fill">-fill</a> option. The default background color (if none is
702specified or found in the image) is white.</p>
cristy3ed852e2009-09-05 21:47:34 +0000703
704<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000705 <h4><a id="bench"></a>-bench <em class="arg">iterations</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000706</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
cristy751980d2012-06-03 23:18:35 +0000710<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,
712consider 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
714to run the benchmark in parallel (requires the OpenMP feature).</p>
cristy3ed852e2009-09-05 21:47:34 +0000715
cristyeed6cb62012-01-28 19:38:34 +0000716<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>
cristy751980d2012-06-03 23:18:35 +0000717<p>In this example, 5 iterations were completed at 0.875657 iterations per
718second, using 4 threads and 6.88 seconds of the user's allotted time, for
719a total elapsed time of 5.71 seconds.</p>
cristy3ed852e2009-09-05 21:47:34 +0000720
721<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000722 <h4><a id="bias"></a>-bias <em class="arg">value</em>{<em class="arg">%</em>}</h4>
cristy3ed852e2009-09-05 21:47:34 +0000723</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
cristy751980d2012-06-03 23:18:35 +0000727<p>This option shifts the output of <a href="command-line-options.html#convolve">&#x2011;convolve</a> so that
728positive and negative results are relative to the specified bias value. </p>
cristy3ed852e2009-09-05 21:47:34 +0000729
cristy751980d2012-06-03 23:18:35 +0000730<p>This is important for non-HDRI compilations of ImageMagick when dealing
731with convolutions that contain negative as well as positive values. This is
732especially the case with convolutions involving high pass filters or edge
733detection. Without an output bias, the negative values are clipped at
734zero.</p>
cristy3ed852e2009-09-05 21:47:34 +0000735
cristy751980d2012-06-03 23:18:35 +0000736<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
cristy3ed852e2009-09-05 21:47:34 +0000737negative results without clipping to the color value range
738(0..QuantumRange).</p>
739
cristy751980d2012-06-03 23:18:35 +0000740<p>See the discussion on HDRI implementations of ImageMagick on the page <a
741href="high-dynamic-range.html" >High Dynamic-Range Images</a>. For more
742about HDRI go the ImageMagick <a
743href="http://www.imagemagick.org/Usage/basics/#hdri" >Usage</a> pages or this
744<a
745href="http://en.wikipedia.org/wiki/High_dynamic_range_imaging">Wikipedia</a>
746entry. </p>
cristy3ed852e2009-09-05 21:47:34 +0000747
748<div style="margin: auto;">
cristy37e0dfd2011-03-06 16:35:34 +0000749 <h4><a id="black-point-compensation"></a>-black-point-compensation</h4>
cristy3ed852e2009-09-05 21:47:34 +0000750</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;">
cristydcca3fa2010-12-29 21:50:07 +0000755 <h4><a id="black-threshold"></a>-black-threshold <em class="arg">value</em>{<em class="arg">%</em>}</h4>
cristy3ed852e2009-09-05 21:47:34 +0000756</div>
757
cristy5cadd612009-09-21 19:33:41 +0000758<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
cristy751980d2012-06-03 23:18:35 +0000760<p> The threshold value can be given as a percentage or as an absolute integer
761value within [0,&nbsp;<em class="QR">QuantumRange</em>] corresponding to the
762desired <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>
cristy3ed852e2009-09-05 21:47:34 +0000763
764
765<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000766 <h4><a id="blend"></a>-blend <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000767</div>
768
cristy751980d2012-06-03 23:18:35 +0000769<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>
cristy3ed852e2009-09-05 21:47:34 +0000770
771<p>Blend will average the images together ('plus') according to the
772percentages given and each pixels transparency. If only a single percentage
773value is given it sets the weight of the composite or 'source' image, while
774the background image is weighted by the exact opposite amount. That is a
cristy83a272e2010-05-07 20:40:35 +0000775<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>
cristy3ed852e2009-09-05 21:47:34 +0000777
778
779<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000780 <h4><a id="blue-primary"></a>-blue-primary <em class="arg">x</em>,<em class="arg">y</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000781</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;">
cristydcca3fa2010-12-29 21:50:07 +0000786 <h4><a id="blue-shift"></a>-blue-shift <em class="arg">factor</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000787</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;">
cristy751980d2012-06-03 23:18:35 +0000794 <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>
cristy3ed852e2009-09-05 21:47:34 +0000795</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
cristyb15553d2010-07-03 22:53:14 +0000799<p>Convolve the image with a Gaussian or normal distribution using the given
800<em class="arg" >Sigma</em> value. The formula is:</p>
cristy3ed852e2009-09-05 21:47:34 +0000801
802<div class="eqn"><img alt="gaussian distribution" width="243px" height="42px" src="../images/gaussian-blur.png"/>
803</div>
804
cristyb15553d2010-07-03 22:53:14 +0000805<p>The <em class="arg" >Sigma</em> value is the important argument, and
cristyefb2bdb2010-11-20 19:35:22 +0000806determines the actual amount of blurring that will take place. </p>
cristy3ed852e2009-09-05 21:47:34 +0000807
cristyb15553d2010-07-03 22:53:14 +0000808<p>The <em class="arg" >Radius</em> is only used to determine the size of the
cristyefb2bdb2010-11-20 19:35:22 +0000809array which will hold the calculated Gaussian distribution. It should be an
cristyd0bda5e2010-09-21 16:22:45 +0000810integer. If not given, or set to zero, IM will calculate the largest possible
cristyb15553d2010-07-03 22:53:14 +0000811radius that will provide meaningful results for the Gaussian distribution.
812</p>
813
cristyeed6cb62012-01-28 19:38:34 +0000814<p>The larger the <em class="arg" >Radius</em> the slower the
cristyb15553d2010-07-03 22:53:14 +0000815operation is. However too small a <em class="arg" >Radius</em>, and sever
816aliasing effects may result. As a guideline, <em class="arg" >Radius</em>
817should be at least twice the <em class="arg" >Sigma</em> value, though three
cristyeed6cb62012-01-28 19:38:34 +0000818times will produce a more accurate result. </p>
cristyb15553d2010-07-03 22:53:14 +0000819
cristy751980d2012-06-03 23:18:35 +0000820<p>This option differs from <a href="command-line-options.html#gaussian-blur">-gaussian-blur</a> simply
cristyb15553d2010-07-03 22:53:14 +0000821by taking advantage of the separability properties of the distribution. Here
822we apply a single-dimensional Gaussian matrix in the horizontal direction,
823then repeat the process in the vertical direction.</p>
cristy3ed852e2009-09-05 21:47:34 +0000824
cristy751980d2012-06-03 23:18:35 +0000825<p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
cristy3ed852e2009-09-05 21:47:34 +0000826pixels which are outside the image proper are blurred into the final result.
827</p>
828
829
830<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000831 <h4>-blur <em class="arg">Width</em>[x<em class="arg">Height</em>[+<em class="arg">Angle</em>]]</h4>
cristy3ed852e2009-09-05 21:47:34 +0000832</div>
833
cristy751980d2012-06-03 23:18:35 +0000834<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>
cristy3ed852e2009-09-05 21:47:34 +0000835
836<p>Each pixel in the overlaid region is replaced with an Elliptical Weighted
837Average (EWA) of the source image, scaled according to the grayscale
838mapping. </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>
cristyeed6cb62012-01-28 19:38:34 +0000842defaults to the <em class="arg" >Width</em> for a normal circular Gaussian
cristy3ed852e2009-09-05 21:47:34 +0000843weighting. The <em class="arg" >Angle</em> will rotate the ellipse from
844horizontal clock-wise. </p>
845
cristy751980d2012-06-03 23:18:35 +0000846<p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
cristy3ed852e2009-09-05 21:47:34 +0000847pixels which are outside the image proper are blurred into the final result.
848</p>
849
850
851<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000852 <h4><a id="border"></a>-border <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000853</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
cristybc9539a2010-08-16 18:06:20 +0000857<p>Set the width and height using the <em class="arg">size</em> portion of the
cristy751980d2012-06-03 23:18:35 +0000858<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
cristybc9539a2010-08-16 18:06:20 +0000859ignored. </p>
cristy3ed852e2009-09-05 21:47:34 +0000860
cristybc9539a2010-08-16 18:06:20 +0000861<p>Set the border color by preceding with the <a
cristy751980d2012-06-03 23:18:35 +0000862href="command-line-options.html#bordercolor">-bordercolor</a> setting.</p>
cristy3ed852e2009-09-05 21:47:34 +0000863
cristy751980d2012-06-03 23:18:35 +0000864<p>The <a href="command-line-options.html#border">-border</a> operation is affected by the current <a
865href="command-line-options.html#compose">-compose</a> setting and assumes that this is using the default
cristybc9539a2010-08-16 18:06:20 +0000866'<kbd>Over</kbd>' composition method. It generates a image of the appropriate
cristy751980d2012-06-03 23:18:35 +0000867size colors by the current <a href="command-line-options.html#bordercolor">-bordercolor</a> before
cristybc9539a2010-08-16 18:06:20 +0000868overlaying the original image in the center of this net image. This means that
869with the default compose method of '<kbd>Over</kbd>' any transparent parts may
cristy751980d2012-06-03 23:18:35 +0000870be 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
cristybc9539a2010-08-16 18:06:20 +0000872functionality.</p>
cristy3ed852e2009-09-05 21:47:34 +0000873
874<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000875 <h4><a id="bordercolor"></a>-bordercolor <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000876</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
cristy751980d2012-06-03 23:18:35 +0000880<p>The color is specified using the format described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +0000881
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;">
cristydcca3fa2010-12-29 21:50:07 +0000885 <h4><a id="borderwidth"></a>-borderwidth <em class="arg">geometry</em> </h4>
cristy3ed852e2009-09-05 21:47:34 +0000886</div>
887
cristy751980d2012-06-03 23:18:35 +0000888<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>
cristy3ed852e2009-09-05 21:47:34 +0000889
890<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000891 <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>
cristy16ff93c2010-01-13 23:18:07 +0000892</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
cristyefb2bdb2010-11-20 19:35:22 +0000896<p>Brightness and Contrast values apply changes to the input image. They are
897not absolute settings. A brightness or contrast value of zero means no change.
898The range of values is -100 to +100 on each. Positive values increase the
899brightness or contrast and negative values decrease the brightness or contrast.
900To control only contrast, set the brightness=0. To control only brightness,
901set contrast=0 or just leave it off.</p>
cristy16ff93c2010-01-13 23:18:07 +0000902
cristy751980d2012-06-03 23:18:35 +0000903<p>You may also use <a href="command-line-options.html#fill">-channel</a> to control which channels to
cristyefb2bdb2010-11-20 19:35:22 +0000904apply the brightness and/or contrast change. The default is to apply the same
905transformation to all channels.</p>
cristy16ff93c2010-01-13 23:18:07 +0000906
cristyefb2bdb2010-11-20 19:35:22 +0000907<p>Brightness and Contrast arguments are converted to offset and slope of a
908linear transform and applied
cristy751980d2012-06-03 23:18:35 +0000909using <a href="command-line-options.html#fill">-function polynomial "slope,offset"</a>.</p>
cristy16ff93c2010-01-13 23:18:07 +0000910
cristyefb2bdb2010-11-20 19:35:22 +0000911<p>The slope varies from 0 at contrast=-100 to almost vertical at
912contrast=+100. For brightness=0 and contrast=-100, the result are totally
913midgray. For brightness=0 and contrast=+100, the result will approach but
914not quite reach a threshold at midgray; that is the linear transformation
915is a very steep vertical line at mid gray.</p>
cristy16ff93c2010-01-13 23:18:07 +0000916
cristyefb2bdb2010-11-20 19:35:22 +0000917<p>Negative slopes, i.e. negating the image, are not possible with this
918function. All achievable slopes are zero or positive.</p>
cristy16ff93c2010-01-13 23:18:07 +0000919
cristyefb2bdb2010-11-20 19:35:22 +0000920<p>The offset varies from -0.5 at brightness=-100 to 0 at brightness=0 to +0.5
921at brightness=+100. Thus, when contrast=0 and brightness=100, the result is
922totally white. Similarly, when contrast=0 and brightness=-100, the result is
923totally black.</p>
cristy16ff93c2010-01-13 23:18:07 +0000924
cristyefb2bdb2010-11-20 19:35:22 +0000925<p>As the range of values for the arguments are -100 to +100, adding the '%'
926symbol is no different than leaving it off.</p>
cristy16ff93c2010-01-13 23:18:07 +0000927
928<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000929 <h4><a id="cache"></a>-cache <em class="arg">threshold</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000930</div>
931
cristy751980d2012-06-03 23:18:35 +0000932<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>
cristy3ed852e2009-09-05 21:47:34 +0000933
934<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000935 <h4><a id="caption"></a>-caption <em class="arg">string</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000936</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
cristy71a3f602010-09-15 12:38:16 +0000940<p>This option sets the caption meta-data of an image read in after this
941option has been given. To modify a caption of images already in memory use
cristy751980d2012-06-03 23:18:35 +0000942"<kbd><a href="command-line-options.html#set">-set</a> caption</kbd>". </p>
cristy71a3f602010-09-15 12:38:16 +0000943
944<p>The caption can contain special format characters listed in the <a
cristy751980d2012-06-03 23:18:35 +0000945href="escape.html">Format and
cristyd0bd44a2010-09-24 12:38:11 +0000946Print Image Properties</a>. These attributes are expanded when the caption
cristy71a3f602010-09-15 12:38:16 +0000947is finally assigned to the individual images. </p>
948
949<p>If the first character of <em class="arg">string</em> is <em
950class="arg">@</em>, the image caption is read from a file titled by the
951remaining characters in the string. Comments read in from a file are literal;
952no embedded formatting characters are recognized.</p>
953
cristyeed6cb62012-01-28 19:38:34 +0000954<p>Caption meta-data is not visible on the image itself. To do that use the
cristy751980d2012-06-03 23:18:35 +0000955<a href="command-line-options.html#annotate">-annotate</a> or <a href="command-line-options.html#draw">-draw</a> options
cristy71a3f602010-09-15 12:38:16 +0000956instead.</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
965that the image <kbd>bird.miff</kbd> has a width of 512 and a height of
966480.</p>
967
968
cristy3ed852e2009-09-05 21:47:34 +0000969<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000970 <h4><a id="cdl"></a>-cdl <em class="arg">filename</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000971</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">
cristybac7a162010-06-15 19:57:29 +0000978&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;
cristy3ed852e2009-09-05 21:47:34 +0000991</pre>
992
993<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000994 <h4><a id="channel"></a>-channel <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000995</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
cristyefb2bdb2010-11-20 19:35:22 +0000999<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>
cristy3ed852e2009-09-05 21:47:34 +00001003
cristy83a272e2010-05-07 20:40:35 +00001004<p>The channels above can also be specified as a comma-separated list or can be
cristyd934d102009-10-10 12:55:13 +00001005abbreviated 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>'.
cristy3ed852e2009-09-05 21:47:34 +00001008
cristy83a272e2010-05-07 20:40:35 +00001009For example, to only select the <kbd>Red</kbd> and <kbd>Blue</kbd> channels
1010you can either use </p>
cristy3ed852e2009-09-05 21:47:34 +00001011<p class="crtsnip">
cristy83a272e2010-05-07 20:40:35 +00001012 -channel Red,Blue
1013</p>
1014<p>or you can use the short hand form</p>
1015<p class="crtsnip">
1016 -channel RB
cristy3ed852e2009-09-05 21:47:34 +00001017</p>
1018
cristy2dcd6822011-06-13 16:21:20 +00001019<p>All the channels that are present in an image can be specified using the
cristybac7a162010-06-15 19:57:29 +00001020special channel type <kbd>All</kbd>. Not all operators are 'channel capable',
1021but generally any operators that are generally 'grey-scale' image operators,
1022will understand this setting. See individual operator documentation. </p>
1023
cristydcca3fa2010-12-29 21:50:07 +00001024<br />
cristy83a272e2010-05-07 20:40:35 +00001025
cristy2dcd6822011-06-13 16:21:20 +00001026<p>On top of the normal channel selection an extra flag can be specified,
cristy83a272e2010-05-07 20:40:35 +00001027'<kbd>Sync</kbd>'. This is turned on by default and if set means that
cristybac7a162010-06-15 19:57:29 +00001028operators that understand this flag should perform: cross-channel
cristy2dcd6822011-06-13 16:21:20 +00001029synchronization of the channels. If not specified, then most grey-scale
cristybac7a162010-06-15 19:57:29 +00001030operators will apply their image processing operations to each individual
cristy751980d2012-06-03 23:18:35 +00001031channel (as specified by the rest of the <a href="command-line-options.html#channel">-channel</a>
cristyd0bda5e2010-09-21 16:22:45 +00001032setting) completely independently from each other. </p>
cristy83a272e2010-05-07 20:40:35 +00001033
cristy751980d2012-06-03 23:18:35 +00001034<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
cristy83a272e2010-05-07 20:40:35 +00001036together in exactly the same way so that colors will remain in-sync. Without
cristyd0bd44a2010-09-24 12:38:11 +00001037it being set, then each channel is modified separately and
cristyd0bda5e2010-09-21 16:22:45 +00001038independently, which may produce color distortion. </p>
cristy83a272e2010-05-07 20:40:35 +00001039
cristy751980d2012-06-03 23:18:35 +00001040<p>The <a href="command-line-options.html#morphology">-morphology</a> '<kbd>Convolve</kbd>' method
1041and the <a href="command-line-options.html#compose">-compose</a> mathematical methods, also understands
cristybac7a162010-06-15 19:57:29 +00001042the '<kbd>Sync</kbd>' flag to modify the behaviour of pixel colors according
1043to the alpha channel (if present). That is to say it will modify the image
1044processing with the understanding that fully-transparent colors should not
1045contribute to the final result. </p>
1046
cristy2dcd6822011-06-13 16:21:20 +00001047<p>Basically, by default, operators work with color channels in synchronous, and
cristy751980d2012-06-03 23:18:35 +00001048treats transparency as special, unless the <a href="command-line-options.html#channel">-channel</a>
cristybac7a162010-06-15 19:57:29 +00001049setting is modified so as to remove the effect of the '<kbd>Sync</kbd>' flag.
1050How each operator does this depends on that operators current implementation.
1051Not all operators understands this flag at this time, but that is changing.
1052</p>
cristy83a272e2010-05-07 20:40:35 +00001053
cristy751980d2012-06-03 23:18:35 +00001054<p>To print a complete list of channel types, use <a href="command-line-options.html#list">-list
cristy83a272e2010-05-07 20:40:35 +00001055channel</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00001056
cristydcca3fa2010-12-29 21:50:07 +00001057<br />
cristyd934d102009-10-10 12:55:13 +00001058
cristy751980d2012-06-03 23:18:35 +00001059<p>By default, ImageMagick sets <a href="command-line-options.html#channel">-channel</a> to the value
cristybac7a162010-06-15 19:57:29 +00001060'<kbd>RGBK,sync</kbd>', which specifies that operators act on all color
1061channels except the transparency channel, and that all the color channels are
cristyeed6cb62012-01-28 19:38:34 +00001062to be modified in exactly the same way, with an understanding of transparency
cristybac7a162010-06-15 19:57:29 +00001063(depending on the operation being applied). The 'plus' form <a
cristy751980d2012-06-03 23:18:35 +00001064href="command-line-options.html#channel" >+channel</a> will reset the value back to this default. </p>
cristyd934d102009-10-10 12:55:13 +00001065
cristy751980d2012-06-03 23:18:35 +00001066<p>Options that are affected by the <a href="command-line-options.html#channel" >-channel</a> setting
cristyd934d102009-10-10 12:55:13 +00001067include the following.
1068
cristy751980d2012-06-03 23:18:35 +00001069<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>.
cristy3ed852e2009-09-05 21:47:34 +00001094</p>
1095
cristy751980d2012-06-03 23:18:35 +00001096<p>Warning, some operators behave differently when the <a href="command-line-options.html#channel"
cristyd934d102009-10-10 12:55:13 +00001097>+channel</a> default setting is in effect, verses ANY user defined <a
cristy751980d2012-06-03 23:18:35 +00001098href="command-line-options.html#channel" >-channel</a> setting (including the equivalent of the
cristy83a272e2010-05-07 20:40:35 +00001099default). These operators have yet to be made to understand the newer 'Sync'
1100flag. </p>
1101
cristy751980d2012-06-03 23:18:35 +00001102<p>For example <a href="command-line-options.html#threshold">-threshold</a> will by default gray-scale
1103the image before thresholding, if no <a href="command-line-options.html#channel" >-channel</a> setting
cristybac7a162010-06-15 19:57:29 +00001104has been defined. This is not 'Sync flag controlled, yet. </p>
cristyd934d102009-10-10 12:55:13 +00001105
cristy751980d2012-06-03 23:18:35 +00001106<p>Also some operators such as <a href="command-line-options.html#blur">-blur</a>, <a
1107href="command-line-options.html#gaussian-blur">-gaussian-blur</a>, will modify their handling of the
cristyd934d102009-10-10 12:55:13 +00001108color channels if the '<kbd>alpha</kbd>' channel is also enabled by <a
cristy751980d2012-06-03 23:18:35 +00001109href="command-line-options.html#channel" >-channel</a>. Generally this done to ensure that
cristyd934d102009-10-10 12:55:13 +00001110fully-transparent colors are treated as being fully-transparent, and thus any
1111underlying 'hidden' color has no effect on the final results. Typically
cristy751980d2012-06-03 23:18:35 +00001112resulting in 'halo' effects. The newer <a href="command-line-options.html#morphology">-morphology</a>
cristyd0bda5e2010-09-21 16:22:45 +00001113convolution equivalents however does have a understanding of the 'Sync' flag
cristybac7a162010-06-15 19:57:29 +00001114and will thus handle transparency correctly by default. </p>
cristyd934d102009-10-10 12:55:13 +00001115
cristybac7a162010-06-15 19:57:29 +00001116<p>As a alpha channel is optional within images, some operators will read the
cristyd934d102009-10-10 12:55:13 +00001117color channels of an image as a greyscale alpha mask, when the image has no
cristy751980d2012-06-03 23:18:35 +00001118alpha channel present, and the <a href="command-line-options.html#channel" >-channel</a> setting tells
cristybac7a162010-06-15 19:57:29 +00001119the operator to apply the operation using alpha channels. The <a
cristy751980d2012-06-03 23:18:35 +00001120href="command-line-options.html#clut">-clut</a> operator is a good example of this. </p>
1121
cristyd934d102009-10-10 12:55:13 +00001122
cristy3ed852e2009-09-05 21:47:34 +00001123
1124<div style="margin: auto;">
cristy751980d2012-06-03 23:18:35 +00001125 <h4><a id="charcoal"></a>-charcoal <em class="arg">factor</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001126</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;">
cristydcca3fa2010-12-29 21:50:07 +00001131 <h4><a id="chop"></a>-chop <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001132</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
cristy751980d2012-06-03 23:18:35 +00001136<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>
cristyefb2bdb2010-11-20 19:35:22 +00001137and <em class="arg">height</em> given in the of the <em class="arg">size</em>
1138portion of the <em class="arg">geometry</em> argument give the number of
1139columns and rows to remove. The <em class="arg">offset</em> portion of
1140the <em class="arg">geometry</em> argument is influenced by
cristy751980d2012-06-03 23:18:35 +00001141a <a href="command-line-options.html#gravity">-gravity</a> setting, if present.</p>
cristy3ed852e2009-09-05 21:47:34 +00001142
cristy751980d2012-06-03 23:18:35 +00001143<p>The <a href="command-line-options.html#chop">-chop</a> option removes entire rows and columns,
cristyefb2bdb2010-11-20 19:35:22 +00001144and moves the remaining corner blocks leftward and upward to close the gaps.</p>
cristy3ed852e2009-09-05 21:47:34 +00001145
cristyacc04882011-05-04 23:03:43 +00001146<p>While it can remove internal rows and columns of pixels, it is more
cristy751980d2012-06-03 23:18:35 +00001147typically used with as <a href="command-line-options.html#gravity">-gravity</a> setting and zero
cristyacc04882011-05-04 23:03:43 +00001148offsets so as to remove a single edge from an image. Compare this to <a
cristy751980d2012-06-03 23:18:35 +00001149href="command-line-options.html#shave" >-shave</a> which removes equal numbers of pixels from oppisite
cristyacc04882011-05-04 23:03:43 +00001150sides of the image. </p>
cristydcca3fa2010-12-29 21:50:07 +00001151
cristy751980d2012-06-03 23:18:35 +00001152<p>Using <a href="command-line-options.html#chop">-chop</a> effectively undoes the results of a <a
1153href="command-line-options.html#splice">-splice</a> that was given the same <em
1154class="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>
cristydcca3fa2010-12-29 21:50:07 +00001161
1162
cristy3ed852e2009-09-05 21:47:34 +00001163<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001164 <h4><a id="clip"></a>-clip</h4>
cristy3ed852e2009-09-05 21:47:34 +00001165</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
cristyeed6cb62012-01-28 19:38:34 +00001173<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert -clip -negate cockatoo.tif negated.tif</span></p>
cristy3ed852e2009-09-05 21:47:34 +00001174<p>only the pixels within the clipping path are negated.</p>
1175
cristy751980d2012-06-03 23:18:35 +00001176<p>The <a href="command-line-options.html#clip">-clip</a> feature requires the XML library. If the XML
1177library is not present, the option is ignored.</p>
cristy3ed852e2009-09-05 21:47:34 +00001178
1179<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001180 <h4><a id="clip-mask"></a>-clip-mask</h4>
cristy3ed852e2009-09-05 21:47:34 +00001181</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
cristy30092792011-02-22 02:06:14 +00001185<p>Use the given image as a 'do-not-modify' mask of the current images in the
1186current image sequence. Assuming the clipmask is a greyscale image the same
1187size at the one already in memory, any areas that is white will not be
1188modified by any of the 'image processing operators' that follow, until the
1189mask is removed. Pixels in the black areas of the clip mask will be modified
1190as normal. </p>
1191
1192<p>In some ways this is similar to (though not the same) as defining
cristy751980d2012-06-03 23:18:35 +00001193a rectangular <a href="command-line-options.html#region" >-region</a>, or using the negative of the
1194mask (thrid) image in a three image <a href="command-line-options.html#composite" >-composite</a>,
cristy30092792011-02-22 02:06:14 +00001195operation. </p>
1196
1197
cristy3ed852e2009-09-05 21:47:34 +00001198<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001199 <h4><a id="clip-path"></a>-clip-path <em class="arg">id</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001200</div>
1201
cristyeed6cb62012-01-28 19:38:34 +00001202<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>
cristy3ed852e2009-09-05 21:47:34 +00001203
cristy751980d2012-06-03 23:18:35 +00001204<p>This is almost identical to <a href="command-line-options.html#clip">-clip</a>. </p>
cristy30092792011-02-22 02:06:14 +00001205
1206
cristy3ed852e2009-09-05 21:47:34 +00001207<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001208 <h4><a id="clone"></a>-clone <em class="arg">index(s)</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001209</div>
1210
cristy8b9dd952011-03-21 22:56:18 +00001211<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>
cristy3ed852e2009-09-05 21:47:34 +00001212
cristydcca3fa2010-12-29 21:50:07 +00001213<p>Inside parenthesis (where the operator is normally used) it will make a
1214clone of the images from the last 'pushed' image sequence, and adds them to
1215the end of the current image sequence. Outside parenthesis
1216(not recommended) it clones the images from the current image sequence. </p>
1217
cristy3ed852e2009-09-05 21:47:34 +00001218<p>Specify the image by its index in the sequence. The first image is index
cristyefb2bdb2010-11-20 19:35:22 +000012190. Negative indexes are relative to the end of the sequence; for
cristydcca3fa2010-12-29 21:50:07 +00001220example, <kbd>&minus;1</kbd>
cristy3ed852e2009-09-05 21:47:34 +00001221represents the last image of the sequence. Specify a range of images with a
cristydcca3fa2010-12-29 21:50:07 +00001222dash (e.g. <kbd>0&minus;4</kbd>). Separate multiple indexes with commas but no
1223spaces (e.g. <kbd>0,2,5</kbd>). A value of '<kbd>0&minus;&minus;1</kbd> will
cristy8b9dd952011-03-21 22:56:18 +00001224effectively clone all the images. </p>
cristydcca3fa2010-12-29 21:50:07 +00001225
cristy751980d2012-06-03 23:18:35 +00001226<p>The <a href="command-line-options.html#clone">+clone</a> will simply make a copy of the last image
cristybaacd172011-04-30 23:11:03 +00001227in the image sequence, and is thus equivalent to using a argument of
cristydcca3fa2010-12-29 21:50:07 +00001228'<kbd>&minus;1</kbd>'. </p>
cristy3ed852e2009-09-05 21:47:34 +00001229
1230<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001231 <h4><a id="clut"></a>-clut</h4>
cristy3ed852e2009-09-05 21:47:34 +00001232</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
1235corresponding 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
1239histogram mapping of how each channel should be modified. Typically it is a
1240either a single row or column image of replacement color values. If larger
1241than a single row or column, values are taken from a diagonal line from
1242top-left to bottom-right corners.</p>
1243
1244<p>The lookup is further controlled by the <a
cristy751980d2012-06-03 23:18:35 +00001245href="command-line-options.html#interpolate">-interpolate</a> setting, which is especially handy for an
cristy3ed852e2009-09-05 21:47:34 +00001246LUT 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
1249gradients, and the '<kbd>integer</kbd>' setting for a direct, unsmoothed
1250lookup of color values. </p>
1251
1252<p>This operator is especially suited to replacing a grayscale image with a
1253specific color gradient from the CLUT image. </p>
1254
cristy751980d2012-06-03 23:18:35 +00001255<p>Only the channel values defined by the <a href="command-line-options.html#channel">-channel</a>
cristy3ed852e2009-09-05 21:47:34 +00001256setting will have their values replaced. In particular, since the default <a
cristy751980d2012-06-03 23:18:35 +00001257href="command-line-options.html#channel">-channel</a> setting is <kbd>RGB</kbd>, this means that
cristy3ed852e2009-09-05 21:47:34 +00001258transparency (alpha/matte channel) is not affected, unless the <a
cristy751980d2012-06-03 23:18:35 +00001259href="command-line-options.html#channel">-channel</a> setting is modified. When the alpha channel is
1260set, it is treated by the <a href="command-line-options.html#clut" >-clut</a> operator in the same way
cristy3ed852e2009-09-05 21:47:34 +00001261as the other channels, implying that alpha/matte values are replaced using the
1262alpha/matte values of the original image. </p>
1263
cristyd0bda5e2010-09-21 16:22:45 +00001264<p>If either the image being modified, or the lookup image, contains no
cristy751980d2012-06-03 23:18:35 +00001265transparency (i.e. <a href="command-line-options.html#alpha" >-alpha</a> is turned 'off') but the <a
1266href="command-line-options.html#channel">-channel</a> setting includes alpha replacement, then it is
cristyd0bd44a2010-09-24 12:38:11 +00001267assumed that image represents a gray-scale gradient which is used for the
cristy3ed852e2009-09-05 21:47:34 +00001268replacement alpha values. That is you can use a gray-scale CLUT image to
1269adjust a existing images alpha channel, or you can color a gray-scale image
1270using colors form CLUT containing the desired colors, including transparency.
1271</p>
1272
cristy751980d2012-06-03 23:18:35 +00001273<p>See also <a href="command-line-options.html#hald-clut" >-hald-clut</a> which replaces colors
cristyefb2bdb2010-11-20 19:35:22 +00001274according to the lookup of the full color RGB value from a 2D representation
1275of a 3D color cube. </p>
cristy3ed852e2009-09-05 21:47:34 +00001276
1277
1278<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001279 <h4><a id="coalesce"></a>-coalesce</h4>
cristy3ed852e2009-09-05 21:47:34 +00001280</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
cristyefb2bdb2010-11-20 19:35:22 +00001284<p>Overlay each image in an image sequence according to
cristy751980d2012-06-03 23:18:35 +00001285its <a href="command-line-options.html#dispose">-dispose</a> meta-data, to reproduce the look of
cristyefb2bdb2010-11-20 19:35:22 +00001286an animation at each point in the animation sequence. All images should be
1287the same size, and are assigned appropriate GIF disposal settings for the
1288animation to continue working as expected as a GIF animation. Such frames
1289are more easily viewed and processed than the highly optimized GIF overlay
1290images. </p>
cristy3ed852e2009-09-05 21:47:34 +00001291
cristyefb2bdb2010-11-20 19:35:22 +00001292<p>The animation can be re-optimized after processing using
cristy751980d2012-06-03 23:18:35 +00001293the <a href="command-line-options.html#layers">-layers</a> method '<kbd>optimize</kbd>', although
cristyefb2bdb2010-11-20 19:35:22 +00001294there is no guarantee that the restored GIF animation optimization is
1295better than the original. </p>
cristy3ed852e2009-09-05 21:47:34 +00001296
1297
1298<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001299 <h4><a id="colorize"></a>-colorize <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001300</div>
1301
cristy751980d2012-06-03 23:18:35 +00001302<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>
cristy3ed852e2009-09-05 21:47:34 +00001303
cristyefb2bdb2010-11-20 19:35:22 +00001304<p>Specify the amount of colorization as a percentage. Separate colorization
1305values can be applied to the red, green, and blue channels of the image with
1306a comma-delimited list of colorization
1307values (e.g., <kbd>-colorize 0,0,50</kbd>).</p>
cristy3ed852e2009-09-05 21:47:34 +00001308
1309<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001310 <h4><a id="colormap"></a>-colormap <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001311</div>
1312
cristy751980d2012-06-03 23:18:35 +00001313<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>
cristy3ed852e2009-09-05 21:47:34 +00001314
1315<p>The <em class="arg">type</em> can be <kbd>shared</kbd> or <kbd>private</kbd>.</p>
1316
cristyefb2bdb2010-11-20 19:35:22 +00001317<p>This option only applies when the default X server visual
1318is <kbd>PseudoColor</kbd> or <kbd>GrayScale</kbd>. Refer
cristy751980d2012-06-03 23:18:35 +00001319to <a href="command-line-options.html#visual">-visual</a> for more details. By default,
cristyefb2bdb2010-11-20 19:35:22 +00001320a shared colormap is allocated. The image shares colors with
1321other X clients. Some image colors could be approximated,
1322therefore your image may look very different than intended.
1323If <kbd>private</kbd> is chosen, the image colors appear exactly
1324as they are defined. However, other clients may go <em>technicolor</em>
1325when the image colormap is installed.</p>
cristy3ed852e2009-09-05 21:47:34 +00001326
1327<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001328 <h4><a id="colors"></a>-colors <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001329</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
cristyefb2bdb2010-11-20 19:35:22 +00001333<p>The actual number of colors in the image may be less than your request,
1334but never more. Note that this a color reduction option. Images with fewer
1335unique colors than specified by <em class="arg">value</em> will have any
1336duplicate or unused colors removed. The ordering of an existing color
1337palette may be altered. When converting an image from color to grayscale,
1338it is more efficient to convert the image to the gray colorspace before
1339reducing the number of colors. Refer to
cristy751980d2012-06-03 23:18:35 +00001340the <a href="quantize.html">
cristyefb2bdb2010-11-20 19:35:22 +00001341color reduction algorithm</a> for more details.</p>
cristy3ed852e2009-09-05 21:47:34 +00001342
1343<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001344 <h4><a id="color-matrix"></a>-color-matrix <em class="arg">matrix</em></h4>
cristy2c839602010-04-03 02:32:08 +00001345</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
cristyefb2bdb2010-11-20 19:35:22 +00001349<p>This option permits saturation changes, hue rotation, luminance to alpha,
1350and various other effects. Although variable-sized transformation matrices
1351can be used, typically one uses a 5x5 matrix for an RGBA image and a 6x6
1352for CMYKA (or RGBA with offsets). The matrix is similar to those used by
1353Adobe Flash except offsets are in column 6 rather than 5 (in support of
1354CMYKA images) and offsets are normalized (divide Flash offset by 255).</p>
cristy2c839602010-04-03 02:32:08 +00001355
1356<p>As an example, to add contrast to an image with offsets, try this command:</p>
1357
1358<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00001359 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
cristy2c839602010-04-03 02:32:08 +00001366</pre>
1367<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001368 <h4><a id="colorspace"></a>-colorspace <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001369</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">
cristye9a32c32011-04-07 01:11:05 +00001376 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
cristy3ed852e2009-09-05 21:47:34 +00001382</pre>
1383
cristy751980d2012-06-03 23:18:35 +00001384<p>To print a complete list of colorspaces, use <a href="command-line-options.html#list">-list
1385colorspace</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00001386
cristy751980d2012-06-03 23:18:35 +00001387<p>For a more accurate color conversion to or from the RGB, CMYK, or grayscale
1388colorspaces, use the <a href="command-line-options.html#profile">-profile</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00001389
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>
cristy751980d2012-06-03 23:18:35 +00001452 <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>
cristy3ed852e2009-09-05 21:47:34 +00001455
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;">
cristydcca3fa2010-12-29 21:50:07 +00001488 <h4><a id="combine"></a>-combine</h4>
cristy3ed852e2009-09-05 21:47:34 +00001489</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
cristy751980d2012-06-03 23:18:35 +00001493<p>The channels (previously set by <a href="command-line-options.html#channel">-channel</a>) of the
1494combined image are taken from the grayscale values of each image in the
1495sequence, in order. For the default -channel setting of <kbd>RGB</kbd>, this
1496means the first image is assigned to the <kbd>Red</kbd> channel, the second
1497to the <kbd>Green</kbd> channel, the third to the <kbd>Blue</kbd>.</p>
cristy3ed852e2009-09-05 21:47:34 +00001498
cristy751980d2012-06-03 23:18:35 +00001499<p>This option can be thought of as the inverse to <a
1500href="command-line-options.html#separate">-separate</a>, so long as the channel settings are the same.
1501Thus, in the following example, the final image should be a copy of the
1502original. </p>
cristy3ed852e2009-09-05 21:47:34 +00001503
cristyeed6cb62012-01-28 19:38:34 +00001504<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>
cristy3ed852e2009-09-05 21:47:34 +00001505<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001506 <h4><a id="comment"></a>-comment <em class="arg">string</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001507</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
cristyd0bda5e2010-09-21 16:22:45 +00001511<p>This option sets the comment meta-data of an image read in after this
cristy71a3f602010-09-15 12:38:16 +00001512option has been given. To modify a comment of images already in memory use
cristy751980d2012-06-03 23:18:35 +00001513"<kbd><a href="command-line-options.html#set">-set</a> comment</kbd>". </p>
cristy3ed852e2009-09-05 21:47:34 +00001514
cristy71a3f602010-09-15 12:38:16 +00001515<p>The comment can contain special format characters listed in the <a
cristy751980d2012-06-03 23:18:35 +00001516href="escape.html">Format and
cristyd0bd44a2010-09-24 12:38:11 +00001517Print Image Properties</a>. These attributes are expanded when the comment
cristy71a3f602010-09-15 12:38:16 +00001518is finally assigned to the individual images. </p>
1519
1520<p>If the first character of <em class="arg">string</em> is <em
1521class="arg">@</em>, the image comment is read from a file titled by the
1522remaining characters in the string. Comments read in from a file are literal;
1523no embedded formatting characters are recognized.</p>
1524
1525<p>Comment meta-data are not visible on the image itself. To do that use the
cristy751980d2012-06-03 23:18:35 +00001526<a href="command-line-options.html#annotate">-annotate</a> or <a href="command-line-options.html#draw">-draw</a> options
cristy71a3f602010-09-15 12:38:16 +00001527instead.</p>
cristy3ed852e2009-09-05 21:47:34 +00001528
1529<p>For example,</p>
1530
1531<p class="crtsnip">
cristy71a3f602010-09-15 12:38:16 +00001532 -comment "%m:%f %wx%h" bird.miff
cristy3ed852e2009-09-05 21:47:34 +00001533</p>
1534
cristy71a3f602010-09-15 12:38:16 +00001535<p>produces an image comment of <kbd>MIFF:bird.miff 512x480</kbd> (assuming
1536that the image <kbd>bird.miff</kbd> has a width of 512 and a height of
1537480.</p>
cristy3ed852e2009-09-05 21:47:34 +00001538
1539<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001540 <h4><a id="compose"></a>-compose <em class="arg">operator</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001541</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
cristy751980d2012-06-03 23:18:35 +00001545<p>See <a href="compose.html">Alpha Compositing</a> for
cristybc9539a2010-08-16 18:06:20 +00001546a detailed discussion of alpha compositing.</p>
cristy3ed852e2009-09-05 21:47:34 +00001547
cristybc9539a2010-08-16 18:06:20 +00001548<p>This setting effects image processing operators that merge two (or more)
1549images together in some way. This includes the operators,
cristy751980d2012-06-03 23:18:35 +00001550<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>,
1557and <a href="command-line-options.html#extent">-extent</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00001558
cristybc9539a2010-08-16 18:06:20 +00001559<p>It is also one of the primary options for the "<kbd>composite</kbd>"
1560command. </p>
cristy3ed852e2009-09-05 21:47:34 +00001561
1562
1563<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001564 <h4><a id="composite"></a>-composite</h4>
cristy3ed852e2009-09-05 21:47:34 +00001565</div>
1566
cristybc9539a2010-08-16 18:06:20 +00001567<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>
cristy3ed852e2009-09-05 21:47:34 +00001568
1569<p>Take the first image 'destination' and overlay the second 'source' image
cristy751980d2012-06-03 23:18:35 +00001570according to the current <a href="command-line-options.html#compose">-compose</a> setting. The location
cristy3ed852e2009-09-05 21:47:34 +00001571of the 'source' or 'overlay' image is controlled according to <a
cristy751980d2012-06-03 23:18:35 +00001572href="command-line-options.html#geometry" >-geometry</a>, and <a href="command-line-options.html#geometry" >-geometry</a>
cristy3ed852e2009-09-05 21:47:34 +00001573settings. </p>
1574
1575<p>If a third image is given this is treated as a gray-scale 'mask' image
1576relative to the first 'destination' image. This mask will limit what parts of
1577the 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
1579Y-displacement image instead. </p>
1580
cristy751980d2012-06-03 23:18:35 +00001581<p>If a <a href="command-line-options.html#compose">-compose</a> method requires extra numerical
cristy3ed852e2009-09-05 21:47:34 +00001582arguments or flags these can be provided by setting the <a
cristy751980d2012-06-03 23:18:35 +00001583href="command-line-options.html#set">-set</a> '<kbd class="arg">option:compose:args</kbd>'
cristyd0bda5e2010-09-21 16:22:45 +00001584appropriately for the compose method. </p>
cristy3ed852e2009-09-05 21:47:34 +00001585
cristy751980d2012-06-03 23:18:35 +00001586<p>Some <a href="command-line-options.html#compose">-compose</a> methods can modify the 'destination'
cristy3ed852e2009-09-05 21:47:34 +00001587image outside the overlay area. You can disable this by setting the special <a
cristy751980d2012-06-03 23:18:35 +00001588href="command-line-options.html#set">-set</a> '<kbd class="arg">option:compose:outside-overlay</kbd>'
cristy3ed852e2009-09-05 21:47:34 +00001589to '<kbd>false</kbd>'. </p>
1590
1591
1592<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001593 <h4><a id="compress"></a>-compress <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001594</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
cristy751980d2012-06-03 23:18:35 +00001598<p>Choices are: <kbd class="arg">None</kbd>, <kbd class="arg">BZip</kbd>, <kbd
1599class="arg">Fax</kbd>, <kbd class="arg">Group4</kbd>, <kbd
1600class="arg">JPEG</kbd>, <kbd class="arg">JPEG2000</kbd>, <kbd
1601class="arg">Lossless</kbd>, <kbd class="arg">LZW</kbd>, <kbd
1602class="arg">RLE</kbd> or <kbd class="arg">Zip</kbd>.</p>
cristy3ed852e2009-09-05 21:47:34 +00001603
cristy751980d2012-06-03 23:18:35 +00001604<p>To print a complete list of compression types, use <a href="command-line-options.html#list">-list
1605compress</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00001606
cristy751980d2012-06-03 23:18:35 +00001607<p>Specify <a href="command-line-options.html#compress">+compress</a> to store the binary image in an
1608uncompressed format. The default is the compression type of the specified
1609image file.</p>
cristy3ed852e2009-09-05 21:47:34 +00001610
cristy751980d2012-06-03 23:18:35 +00001611<p>If <kbd>LZW</kbd> compression is specified but LZW compression has not been
1612enabled, the image data is written in an uncompressed LZW format that can be
1613read by LZW decoders. This may result in larger-than-expected GIF files.</p>
cristy3ed852e2009-09-05 21:47:34 +00001614
cristyeed6cb62012-01-28 19:38:34 +00001615<p><kbd>Lossless</kbd> refers to lossless JPEG, which is only available if the
1616JPEG library has been patched to support it. Use of lossless JPEG is generally
1617not recommended.</p>
cristy3ed852e2009-09-05 21:47:34 +00001618
cristyeed6cb62012-01-28 19:38:34 +00001619<p>
1620When writing an ICO file, you may request that the images be encoded in
1621PNG format, by specifying <kbd>Zip</kbd> compression.</p>
1622
1623<p>
1624When writing a JNG file, specify <kbd>Zip</kbd> compression to request that
1625the alpha channel be encoded in PNG "IDAT" format, or <kbd>JPEG</kbd>
1626to request that it be encoded in JPG "JDAA" format.</p>
1627
cristy751980d2012-06-03 23:18:35 +00001628<p>Use the <a href="command-line-options.html#quality">-quality</a> option to set the compression level
cristyeed6cb62012-01-28 19:38:34 +00001629to be used by JPEG, PNG, MIFF, and MPEG encoders.
cristy751980d2012-06-03 23:18:35 +00001630Use the <a href="command-line-options.html#sampling-factor">-sampling-factor</a> option to set the
cristyeed6cb62012-01-28 19:38:34 +00001631sampling factor to be used by JPEG, MPEG, and YUV encoders for down-sampling
1632the chroma channels.</p>
cristy3ed852e2009-09-05 21:47:34 +00001633
1634<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001635 <h4><a id="contrast"></a>-contrast</h4>
cristy3ed852e2009-09-05 21:47:34 +00001636</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
cristy751980d2012-06-03 23:18:35 +00001640<p>This option enhances the intensity differences between the lighter and
1641darker elements of the image. Use <a href="command-line-options.html#contrast">-contrast</a> to enhance
1642the image or <a href="command-line-options.html#contrast">+contrast</a> to reduce the image
1643contrast.</p>
cristy3ed852e2009-09-05 21:47:34 +00001644
1645<p>For a more pronounced effect you can repeat the option:</p>
1646
cristyeed6cb62012-01-28 19:38:34 +00001647<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert rose: -contrast -contrast rose_c2.png</span></p>
cristy3ed852e2009-09-05 21:47:34 +00001648<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001649 <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>
cristy3ed852e2009-09-05 21:47:34 +00001650</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
cristyd934d102009-10-10 12:55:13 +00001654<p>While performing the stretch, black-out at most <em
1655class="arg" >black-point</em> pixels and white-out at most <em
1656class="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
1658class="arg" >white-point %</em> pixels.</p>
cristy3ed852e2009-09-05 21:47:34 +00001659
cristy751980d2012-06-03 23:18:35 +00001660<p>Prior to ImageMagick 6.4.7-0, <a href="command-line-options.html#contrast-stretch"
cristyd934d102009-10-10 12:55:13 +00001661>-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
1663minus white-point</em> pixels. Or, if percent is used, black-out at most <em
1664class="arg">black-point %</em> pixels and white-out at most <em class="arg"
1665>100% minus white-point %</em> pixels.</p>
cristy3ed852e2009-09-05 21:47:34 +00001666
cristyd934d102009-10-10 12:55:13 +00001667<p>Note that <kbd>-contrast-stretch 0</kbd> will modify the image such that
1668the 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
cristy751980d2012-06-03 23:18:35 +00001670clipping at either end. This is not the same as <a href="command-line-options.html#normalize"
cristyd4d64ed2010-08-22 22:19:33 +00001671>-normalize</a>, which is equivalent to <kbd>-contrast-stretch 0.15x0.05%</kbd> (or
cristyd934d102009-10-10 12:55:13 +00001672prior to ImageMagick 6.4.7-0, <kbd>-contrast-stretch 2%x99%</kbd>).</p>
cristy3ed852e2009-09-05 21:47:34 +00001673
cristyd934d102009-10-10 12:55:13 +00001674<p>Internally operator works by creating a histogram bin, and then uses that
1675bin to modify the image. As such some colors may be merged together when they
1676originally fell into the same 'bin'. </p>
1677
1678<p>All the channels are normalized in concert by the came amount so as to
cristy751980d2012-06-03 23:18:35 +00001679preserve color integrity, when the default <a href="command-line-options.html#channel" >+channel</a>
1680setting is in use. Specifying any other <a href="command-line-options.html#channel" >-channel</a>
cristyd934d102009-10-10 12:55:13 +00001681setting will normalize the RGB channels independently.</p>
1682
cristy751980d2012-06-03 23:18:35 +00001683<p>See also <a href="command-line-options.html#auto-level" >-auto-level</a> for a 'perfect'
cristyd934d102009-10-10 12:55:13 +00001684normalization of mathematical images. </p>
1685
1686<p>This operator is under review for re-development. </p>
cristy3ed852e2009-09-05 21:47:34 +00001687
1688
1689<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001690 <h4><a id="convolve"></a>-convolve <em class="arg">kernel</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001691</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
cristy16ff93c2010-01-13 23:18:07 +00001695<p>The <em class="arg">kernel</em> is a matrix specified as
cristyd934d102009-10-10 12:55:13 +00001696a comma-separated list of integers (with no spaces), ordered left-to right,
1697starting with the top row. Presently, only odd-dimensioned kernels are
1698supported, and therefore the number of entries in the specified <em
1699class="arg">kernel</em> must be 3<sup>2</sup>=9, 5<sup>2</sup>=25,
17007<sup>2</sup>=49, etc. </p>
cristy3ed852e2009-09-05 21:47:34 +00001701
cristy751980d2012-06-03 23:18:35 +00001702<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
cristyd934d102009-10-10 12:55:13 +00001703positive and negative results are relative to a user-specified bias value.
1704This is important for non-HDRI compilations of ImageMagick when dealing with
1705convolutions that contain negative as well as positive values. This is
1706especially the case with convolutions involving high pass filters or edge
1707detection. Without an output bias, the negative values is clipped at zero.
cristy3ed852e2009-09-05 21:47:34 +00001708</p>
1709
cristy751980d2012-06-03 23:18:35 +00001710<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
cristyd934d102009-10-10 12:55:13 +00001711negative results without clipping to the color value range (0..QuantumRange).
1712See the discussion on HDRI implementations of ImageMagick on the page <a
cristy751980d2012-06-03 23:18:35 +00001713href="high-dynamic-range.html">High
cristyd934d102009-10-10 12:55:13 +00001714Dynamic-Range Images</a>. For more about HDRI go the ImageMagick <a
1715href="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>
1717entry. </p>
cristy3ed852e2009-09-05 21:47:34 +00001718
cristy3ed852e2009-09-05 21:47:34 +00001719
1720<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001721 <h4><a id="crop"></a>-crop <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001722</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
cristy751980d2012-06-03 23:18:35 +00001726<p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
cristy3ed852e2009-09-05 21:47:34 +00001727
cristy751980d2012-06-03 23:18:35 +00001728<p>The <em class="arg">width</em> and <em class="arg">height</em> of the <em
1729class="arg">geometry</em> argument give the size of the image that remains
1730after 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
1732corner of the cropped image with respect to the original image. To specify the
1733amount to be removed, use <a href="command-line-options.html#shave">-shave</a> instead.</p>
cristy3ed852e2009-09-05 21:47:34 +00001734
cristy751980d2012-06-03 23:18:35 +00001735<p>If the <em class="arg">x</em> and <em class="arg">y</em> offsets are
1736present, a single image is generated, consisting of the pixels from the
1737cropping region. The offsets specify the location of the upper left corner of
1738the cropping region measured downward and rightward with respect to the upper
1739left corner of the image. If the <a href="command-line-options.html#gravity">-gravity</a> option is
1740present with <kbd>NorthEast</kbd>, <kbd>East</kbd>, or <kbd>SouthEast</kbd>
1741gravity, it gives the distance leftward from the right edge of the image to
1742the right edge of the cropping region. Similarly, if the <a
1743href="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
1745upward between the bottom edges.</p>
cristy3ed852e2009-09-05 21:47:34 +00001746
cristy751980d2012-06-03 23:18:35 +00001747<p>If the <em class="arg">x</em> and <em class="arg">y</em> offsets are
1748omitted, a set of tiles of the specified geometry, covering the entire input
1749image, is generated. The rightmost tiles and the bottom tiles are smaller if
1750the specified geometry extends beyond the dimensions of the input image.</p>
cristy3ed852e2009-09-05 21:47:34 +00001751
1752<p>By adding a exclamation character flag to the geometry argument, the
1753cropped images virtual canvas page size and offset is set as if the
1754geometry argument was a viewport or window. This means the canvas page size
1755is set to exactly the same size you specified, the image offset set
1756relative top left corner of the region cropped. </p>
1757
1758<p>If the cropped image 'missed' the actual image on its virtual canvas, a
1759special single pixel transparent 'missed' image is returned, and a 'crop
1760missed' warning given. </p>
1761
cristy751980d2012-06-03 23:18:35 +00001762<p>It might be necessary to <a href="command-line-options.html#repage" >+repage</a> the image prior to
cristyeed6cb62012-01-28 19:38:34 +00001763cropping the image to ensure the crop coordinate frame is relocated to the
cristy751980d2012-06-03 23:18:35 +00001764upper-left corner of the visible image.
1765
1766Similarly you may want to use <a href="command-line-options.html#repage" >+repage</a> after cropping to
1767remove the page offset that will be left behind. This is especially true when
1768you are going to write to an image format such as PNG that supports an image
cristyeed6cb62012-01-28 19:38:34 +00001769offset.</p>
cristy3ed852e2009-09-05 21:47:34 +00001770
1771<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001772 <h4><a id="cycle"></a>-cycle <em class="arg">amount</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001773</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
1778colormap entry is shifted.</p>
1779
1780
1781<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001782 <h4><a id="debug"></a>-debug <em class="arg">events</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001783</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
cristy751980d2012-06-03 23:18:35 +00001787<p>The <kbd>events</kbd> parameter specifies which events are to be logged. It
1788can be either <kbd>None</kbd>, <kbd>All</kbd>, <kbd>Trace</kbd>, or
1789a 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>
cristy3ed852e2009-09-05 21:47:34 +00001795
1796
1797<p>For example, to log cache and blob events, use.</p>
1798
cristyeed6cb62012-01-28 19:38:34 +00001799<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert -debug "Cache,Blob" rose: rose.png</span></p>
cristy751980d2012-06-03 23:18:35 +00001800<p>The <kbd>User</kbd> domain is normally empty, but developers can log user
1801events in their private copy of ImageMagick.</p>
cristy3ed852e2009-09-05 21:47:34 +00001802
cristy751980d2012-06-03 23:18:35 +00001803<p>To print the complete list of debug methods, use <a href="command-line-options.html#list">-list
1804debug</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00001805
cristy751980d2012-06-03 23:18:35 +00001806<p>Use the <a href="command-line-options.html#log">-log</a> option to specify the format for debugging
1807output.</p>
cristy3ed852e2009-09-05 21:47:34 +00001808
cristy751980d2012-06-03 23:18:35 +00001809<p>Use <a href="command-line-options.html#debug">+debug</a> to turn off all logging.</p>
cristy3ed852e2009-09-05 21:47:34 +00001810
cristy751980d2012-06-03 23:18:35 +00001811<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>
1813environment variable are the same as for the <a href="command-line-options.html#debug">-debug</a>
1814option.</p>
cristy3ed852e2009-09-05 21:47:34 +00001815
1816
1817<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001818 <h4><a id="decipher"></a>-decipher <em class="arg">filename</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001819</div>
1820
cristy751980d2012-06-03 23:18:35 +00001821<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>
cristy3ed852e2009-09-05 21:47:34 +00001823
cristy751980d2012-06-03 23:18:35 +00001824<p>Get the passphrase from the file specified by <em
1825class="arg">filename</em>.</p>
cristy3ed852e2009-09-05 21:47:34 +00001826
cristy751980d2012-06-03 23:18:35 +00001827<p>For more information, see the webpage, <a
1828href="../www/cipher.html">ImageMagick: Encipher or
1829Decipher an Image</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00001830
1831
1832<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001833 <h4><a id="deconstruct"></a>-deconstruct</h4>
cristy3ed852e2009-09-05 21:47:34 +00001834</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
cristy751980d2012-06-03 23:18:35 +00001838<p>Given a sequence of images all the same size, such as produced by <a
1839href="command-line-options.html#coalesce">-coalesce</a>, replace the second and later images, with
1840a smaller image of just the area that changed relative to the previous image.
1841</p>
cristy3ed852e2009-09-05 21:47:34 +00001842
cristy751980d2012-06-03 23:18:35 +00001843<p>The resulting sequence of images can be used to optimize an animation
1844sequence, though will not work correctly for GIF animations when parts of the
1845animation can go from opaque to transparent. </p>
cristy3ed852e2009-09-05 21:47:34 +00001846
cristy751980d2012-06-03 23:18:35 +00001847<p>This option is actually equivalent to the <a href="command-line-options.html#layers">-layers</a>
1848method '<kbd>compare-any</kbd>'. </p>
cristy3ed852e2009-09-05 21:47:34 +00001849
1850
1851<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001852 <h4><a id="define"></a>-define <em class="arg">key</em>{<em class="arg">=value</em>}<em class="arg">...</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001853</div>
1854
cristyd0bd44a2010-09-24 12:38:11 +00001855<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
cristyd0bda5e2010-09-21 16:22:45 +00001856coders and image processing operations.</td><td style='text-align:right;'></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00001857
cristyd0bda5e2010-09-21 16:22:45 +00001858<p>This option creates one or more definitions for coders and decoders to use
1859while reading and writing image data. Definitions are generally used to
1860control image file format coder modules, and image processing operations,
1861beyond what is provided by normal means. Defined settings are listed in <a
cristy751980d2012-06-03 23:18:35 +00001862href="command-line-options.html#verbose" >-verbose</a> information ("<kbd>info:</kbd>" output format)
cristyd0bda5e2010-09-21 16:22:45 +00001863as "Artifacts". </p>
cristy3ed852e2009-09-05 21:47:34 +00001864
cristyd0bda5e2010-09-21 16:22:45 +00001865<p>If <em class="arg">value</em> is missing for a definition, an empty-valued
1866definition of a flag is created with that name. This used to control on/off
cristy751980d2012-06-03 23:18:35 +00001867options. Use <a href="command-line-options.html#define">+define key</a> to remove definitions
1868previously created. Use <a href="command-line-options.html#define">+define "*"</a> to remove all
cristyd0bda5e2010-09-21 16:22:45 +00001869existing definitions.</p>
1870
cristyd0bd44a2010-09-24 12:38:11 +00001871<p>The same 'artifact' settings can also be defined using the <a
cristy751980d2012-06-03 23:18:35 +00001872href="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
cristyd0bda5e2010-09-21 16:22:45 +00001874Properties</a> in the defined value. </p>
1875
cristyefb2bdb2010-11-20 19:35:22 +00001876<p>The <em>option</em> and <em>key</em> are case-independent (they are
1877converted to lowercase for use within the decoders) while the <em>value</em>
1878is case-dependent.</p>
1879
cristyd0bda5e2010-09-21 16:22:45 +00001880<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
1883available:</p>
cristy3ed852e2009-09-05 21:47:34 +00001884
cristydcca3fa2010-12-29 21:50:07 +00001885<dl>
cristyeed6cb62012-01-28 19:38:34 +00001886
1887<dt>compose:args=<em class="arg">arguments</em></dt>
cristy751980d2012-06-03 23:18:35 +00001888<dd>Sets certain compose argument values when using convert ... -compose ...
1889 -composite. See <a href="compose.html"
1890 >Image Composition</a></dd>
cristyeed6cb62012-01-28 19:38:34 +00001891
1892<dt>distort:scale=<em class="arg">value</em></dt>
cristy751980d2012-06-03 23:18:35 +00001893 <dd>Sets the output scaling factor for use with <a href="command-line-options.html#distort"
1894 >-distort</a></dd>
cristyeed6cb62012-01-28 19:38:34 +00001895
1896<dt>distort:viewport=WxH+X+Y</dt>
cristy751980d2012-06-03 23:18:35 +00001897 <dd>Sets the viewport for use with <a href="command-line-options.html#distort">-distort</a></dd>
cristyeed6cb62012-01-28 19:38:34 +00001898
cristy045bd902010-01-30 18:56:24 +00001899<dt>dcm:display-range=reset</dt>
cristyd0bda5e2010-09-21 16:22:45 +00001900<dd>Set the display range to the minimum and maximum pixel values for the
cristydcca3fa2010-12-29 21:50:07 +00001901 DCM image format.</dd>
cristyd0bda5e2010-09-21 16:22:45 +00001902
cristy045bd902010-01-30 18:56:24 +00001903<dt>dot:layout-engine=<em class="arg">value</em></dt>
cristyd0bda5e2010-09-21 16:22:45 +00001904<dd>Set the specify the layout engine for the DOT image format (e.g.
cristydcca3fa2010-12-29 21:50:07 +00001905 <kbd>neato</kbd>).</dd>
cristyd0bda5e2010-09-21 16:22:45 +00001906
cristy045bd902010-01-30 18:56:24 +00001907<dt>jpeg:extent=<em class="arg">value</em></dt>
cristyd0bda5e2010-09-21 16:22:45 +00001908<dd>Restrict the maximum JPEG file size, for example <kbd>-define
cristydcca3fa2010-12-29 21:50:07 +00001909 jpeg:extent=400kb</kbd>.</dd>
cristyd0bda5e2010-09-21 16:22:45 +00001910
cristy045bd902010-01-30 18:56:24 +00001911<dt>jpeg:size=<em class="arg">geometry</em></dt>
cristyd0bda5e2010-09-21 16:22:45 +00001912<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
cristydcca3fa2010-12-29 21:50:07 +00001914 requirements when reducing the size of a large JPEG image.</dd>
cristyd0bda5e2010-09-21 16:22:45 +00001915
cristy045bd902010-01-30 18:56:24 +00001916<dt>jp2:rate=<em class="arg">value</em></dt>
cristyd0bda5e2010-09-21 16:22:45 +00001917<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
cristydcca3fa2010-12-29 21:50:07 +00001921 results in a rate value of 0.06641.</dd>
cristyd0bda5e2010-09-21 16:22:45 +00001922
cristy3ed852e2009-09-05 21:47:34 +00001923<dt>mng:need-cacheoff</dt>
cristydcca3fa2010-12-29 21:50:07 +00001924 <dd>turn playback caching off for streaming MNG.</dd>
cristyd0bda5e2010-09-21 16:22:45 +00001925
cristy045bd902010-01-30 18:56:24 +00001926<dt>png:bit-depth=<em class="arg">value</em></dt>
1927<dt>png:color-type=<em class="arg">value</em></dt>
cristyd0bda5e2010-09-21 16:22:45 +00001928<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
cristy751980d2012-06-03 23:18:35 +00001936 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
cristyd0bda5e2010-09-21 16:22:45 +00001938 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,
cristyefb2bdb2010-11-20 19:35:22 +00001940 which can be 1, 2, 4, or 8. In such files, the color samples always have
cristydcca3fa2010-12-29 21:50:07 +00001941 8-bit depth.</dd>
1942
cristya4dfb122011-07-07 19:01:57 +00001943<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
cristy751980d2012-06-03 23:18:35 +00001946 adaptive filtering for all images, 7 means MNG "loco" compression.</dd>
cristya4dfb122011-07-07 19:01:57 +00001947
cristy87a7f072011-07-01 00:08:52 +00001948<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,
cristya4dfb122011-07-07 19:01:57 +00001954 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>
cristy87a7f072011-07-01 00:08:52 +00001958
cristyeed6cb62012-01-28 19:38:34 +00001959<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
cristydcca3fa2010-12-29 21:50:07 +00001966<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
cristyd241f442011-03-29 13:50:49 +00001977 <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
cristydcca3fa2010-12-29 21:50:07 +00001980 <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">
cristye9a32c32011-04-07 01:11:05 +00001988 -define png:include-chunk=none,gAMA
cristydcca3fa2010-12-29 21:50:07 +00001989</pre>
1990
cristyeed6cb62012-01-28 19:38:34 +00001991 <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
cristydcca3fa2010-12-29 21:50:07 +00001998 <p>The critical PNG chunks <kbd>IHDR</kbd>, <kbd>PLTE</kbd>,
cristya4dfb122011-07-07 19:01:57 +00001999 <kbd>IDAT</kbd>, and <kbd>IEND</kbd> cannot be excluded. Any such
2000 entries appearing in the list will be ignored.</p>
cristydcca3fa2010-12-29 21:50:07 +00002001
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
cristy751980d2012-06-03 23:18:35 +00002008 <p>The <a href="command-line-options.html#strip">-strip</a> option does the equivalent of the
cristydcca3fa2010-12-29 21:50:07 +00002009 following for PNG output:</p>
2010
2011<pre class="text">
cristyeed6cb62012-01-28 19:38:34 +00002012 -define png:include-chunk=none,trns,gama
cristydcca3fa2010-12-29 21:50:07 +00002013</pre>
2014
2015 <p>The default behavior is to include all known PNG ancillary chunks
cristyf7964272011-01-30 03:49:12 +00002016 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>
cristyd241f442011-03-29 13:50:49 +00002020
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
cristyf9a6c462011-04-24 14:01:11 +00002028 <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>
cristyd0bda5e2010-09-21 16:22:45 +00002039
cristy3ed852e2009-09-05 21:47:34 +00002040<dt>ps:imagemask</dt>
cristyd0bda5e2010-09-21 16:22:45 +00002041<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
cristydcca3fa2010-12-29 21:50:07 +00002043 operator instead of the image operator.</dd>
cristyd0bda5e2010-09-21 16:22:45 +00002044
cristy045bd902010-01-30 18:56:24 +00002045<dt>quantum:format=<em class="arg">type</em></dt>
cristyd0bda5e2010-09-21 16:22:45 +00002046<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
cristy751980d2012-06-03 23:18:35 +00002048 to preserve negative values. If <a href="command-line-options.html#depth">-depth</a> 16 is
cristyd0bd44a2010-09-24 12:38:11 +00002049 included, the result is a single precision floating point format.
cristy751980d2012-06-03 23:18:35 +00002050 If <a href="command-line-options.html#depth">-depth</a> 32 is included, the result is
cristyd0bda5e2010-09-21 16:22:45 +00002051 double precision floating point format.</dd>
2052
cristyeed6cb62012-01-28 19:38:34 +00002053<dt>showkernel=1</em></dt>
cristy751980d2012-06-03 23:18:35 +00002054<dd>Outputs (to 'standard error') all the information about a generated <a
2055 href="command-line-options.html#morphology" >-morphology</a> kernel.</dd>
cristyeed6cb62012-01-28 19:38:34 +00002056
2057<dt>tiff:quantum:polarity=min-is-black
2058<br />
2059tiff: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>
cristy751980d2012-06-03 23:18:35 +00002066<dd>Sets the tile size for pyramid tiffs. Requires the suffix PTIF: before the
2067 outputname</dd>
cristyeed6cb62012-01-28 19:38:34 +00002068
2069
cristydcca3fa2010-12-29 21:50:07 +00002070</dl>
cristy3ed852e2009-09-05 21:47:34 +00002071
cristyd0bda5e2010-09-21 16:22:45 +00002072<p>For example, to create a postscript file that will render only the black
2073pixels of a bilevel image, use:</p>
cristy3ed852e2009-09-05 21:47:34 +00002074
cristyeed6cb62012-01-28 19:38:34 +00002075<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert bilevel.tif -define ps:imagemask eps3:stencil.ps</span></p>
cristyd0bda5e2010-09-21 16:22:45 +00002076<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,
2078use:</p>
cristy3ed852e2009-09-05 21:47:34 +00002079
2080<p class="crtsnip">
2081-define registry:temporary-path=/data/tmp
2082</p>
2083
cristyd0bda5e2010-09-21 16:22:45 +00002084
2085
cristy3ed852e2009-09-05 21:47:34 +00002086<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002087 <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>
cristy3ed852e2009-09-05 21:47:34 +00002088</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
cristy751980d2012-06-03 23:18:35 +00002092<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
2094next image. The default is no delay between each showing of the image
2095sequence. The default ticks-per-second is 100.</p>
cristy3ed852e2009-09-05 21:47:34 +00002096
cristy751980d2012-06-03 23:18:35 +00002097<p>Use <kbd>&gt;</kbd> to change the image delay <em>only</em> if its current
2098value 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
2100you specify <kbd>30&gt;</kbd> and the image delay is 20, the image delay does
2101not change. However, if the image delay is 40 or 50, the delay it is changed
2102to 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
2104a file redirection.</p>
cristy3ed852e2009-09-05 21:47:34 +00002105
2106
2107<div style="margin: auto;">
cristy323f35b2011-03-24 23:05:13 +00002108 <h4><a id="delete"></a>-delete <em class="arg">indexes</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002109</div>
2110
cristy751980d2012-06-03 23:18:35 +00002111<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>
cristy3ed852e2009-09-05 21:47:34 +00002112
cristy751980d2012-06-03 23:18:35 +00002113<p>Specify the image by its index in the sequence. The first image is index
21140. Negative indexes are relative to the end of the sequence, for example, -1
2115represents the last image of the sequence. Specify a range of images with
2116a 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>
cristy3ed852e2009-09-05 21:47:34 +00002118
2119
2120<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002121 <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>
cristy3ed852e2009-09-05 21:47:34 +00002122</div>
2123
cristy751980d2012-06-03 23:18:35 +00002124<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
2125rendering to devices.</td><td style='text-align:right;'></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00002126
cristy751980d2012-06-03 23:18:35 +00002127<p>This option specifies the image resolution to store while encoding a raster
2128image or the canvas resolution while rendering (reading) vector formats such
2129as Postscript, PDF, WMF, and SVG into a raster image. Image resolution
2130provides the unit of measure to apply when rendering to an output device or
2131raster image. The default unit of measure is in dots per inch (DPI). The <a
2132href="command-line-options.html#units">-units</a> option may be used to select dots per centimeter
2133instead.</p>
cristy3ed852e2009-09-05 21:47:34 +00002134
cristy751980d2012-06-03 23:18:35 +00002135<p>The default resolution is 72 dots per inch, which is equivalent to one
2136point per pixel (Macintosh and Postscript standard). Computer screens are
2137normally 72 or 96 dots per inch, while printers typically support 150, 300,
2138600, or 1200 dots per inch. To determine the resolution of your display, use
2139a ruler to measure the width of your screen in inches, and divide by the
2140number of horizontal pixels (1024 on a 1024x768 display).</p>
cristy3ed852e2009-09-05 21:47:34 +00002141
cristy751980d2012-06-03 23:18:35 +00002142<p>If the file format supports it, this option may be used to update the
2143stored image resolution. Note that Photoshop stores and obtains image
2144resolution from a proprietary embedded profile. If this profile is not
2145stripped from the image, then Photoshop will continue to treat the image using
2146its former resolution, ignoring the image resolution specified in the standard
2147file header.</p>
cristy3ed852e2009-09-05 21:47:34 +00002148
cristy751980d2012-06-03 23:18:35 +00002149<p>The <a href="command-line-options.html#density">-density</a> option sets an <em>attribute</em> and
2150does not alter the underlying raster image. It may be used to adjust the
2151rendered size for desktop publishing purposes by adjusting the scale applied
2152to the pixels. To resize the image so that it is the same size at a different
2153resolution, use the <a href="command-line-options.html#resample">-resample</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00002154
2155<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002156 <h4><a id="depth"></a>-depth <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002157</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
cristy751980d2012-06-03 23:18:35 +00002161<p>This the number of bits in a color sample within a pixel. Use this option
2162to specify the depth of raw images whose depth is unknown such as GRAY, RGB,
2163or CMYK, or to change the depth of any image after it has been read.</p>
cristy3ed852e2009-09-05 21:47:34 +00002164
2165<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002166 <h4><a id="descend"></a>-descend</h4>
cristy3ed852e2009-09-05 21:47:34 +00002167</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;">
cristydcca3fa2010-12-29 21:50:07 +00002172 <h4><a id="deskew"></a>-deskew <em class="arg">threshold</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002173</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
cristy751980d2012-06-03 23:18:35 +00002177<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
2179width of the image background (e.g 40).</p>
cristy3ed852e2009-09-05 21:47:34 +00002180
2181<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002182 <h4><a id="despeckle"></a>-despeckle</h4>
cristy3ed852e2009-09-05 21:47:34 +00002183</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;">
cristydcca3fa2010-12-29 21:50:07 +00002188 <h4><a id="direction"></a>-direction <em class="arg">type</em></h4>
cristy2c839602010-04-03 02:32:08 +00002189</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;">
cristydcca3fa2010-12-29 21:50:07 +00002194 <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>
cristy3ed852e2009-09-05 21:47:34 +00002195</div>
2196
cristy751980d2012-06-03 23:18:35 +00002197<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>
cristy3ed852e2009-09-05 21:47:34 +00002198
2199<p>With this option, the 'overlay' image, and optionally the 'mask' image,
cristyd0bd44a2010-09-24 12:38:11 +00002200is used as a displacement map, which is used to displace the lookup of
cristy3ed852e2009-09-05 21:47:34 +00002201what part of the 'background' image is seen at each point of the overlaid
2202area. Much like the displacement map is a 'lens' that redirects light shining
2203through it so as to present a distorted view the original 'background' image
2204behind it. </p>
2205
2206<p>Any perfect grey areas of the displacement map produce a zero
2207displacement of the image. Black areas produce the given maximum negative
2208displacement of the lookup point, while white produce a maximum positive
2209displacement of the lookup. </p>
2210
2211<p>Note that it is the lookup of the 'background' that is displaced, not a
2212displacement of the image itself. As such an area of the displacement map
2213containing 'white' will have the lookup point 'shifted' by a positive amount,
2214and thus generating a copy of the destination image to the right/downward from
2215the 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
2217important in understanding how displacement maps work. </p>
2218
2219<p>The given arguments define the maximum amount of displacement in pixels
2220that a particular map can produce. If the displacement scale is large enough
cristyd0bda5e2010-09-21 16:22:45 +00002221it is also possible to lookup parts of the 'background' image that lie well
cristy3ed852e2009-09-05 21:47:34 +00002222outside the bounds of the displacement map itself. That is you could very
cristyd0bda5e2010-09-21 16:22:45 +00002223easily copy a section of the original image from outside the overlay area
cristy3ed852e2009-09-05 21:47:34 +00002224into the overlay area. </p>
2225
2226<p>The '%' flag makes the displacement scale relative to the size of the
2227overlay image (100% = half width/height of image). Using '!' switches
2228percentage arguments to refer to the destination image size instead.
2229these 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
2232given scaling values will determine a single direction (vector) in which
cristyd0bda5e2010-09-21 16:22:45 +00002233displacements can occur (positively or negatively). However, if you also
cristy3ed852e2009-09-05 21:47:34 +00002234specify a third image which is normally used as a <em class="arg">mask</em>,
cristyd0bd44a2010-09-24 12:38:11 +00002235the <em class="arg">composite image</em> is used for horizontal X
cristy3ed852e2009-09-05 21:47:34 +00002236displacement, while the <em class="arg">mask image</em> is used for vertical Y
2237displacement. This allows you to define completely different displacement
2238values for the X and Y directions, and allowing you to lookup any point within
2239the <em class="arg">scale</em> bounds. In other words each pixel can lookup
cristyd0bda5e2010-09-21 16:22:45 +00002240any other nearby pixel, producing complex 2 dimensional displacements, rather
2241than a simple 1 dimensional vector displacements. </p>
cristy3ed852e2009-09-05 21:47:34 +00002242
cristyeed6cb62012-01-28 19:38:34 +00002243<p>Alternatively rather than supplying two separate images, as of IM v6.4.4-0,
cristy3ed852e2009-09-05 21:47:34 +00002244you can use the 'red' channel of the overlay image to specify the horizontal
2245or X displacement, and the 'green' channel for the vertical or Y displacement.
2246</p>
2247
cristyd0bd44a2010-09-24 12:38:11 +00002248<p>As of IM v6.5.3-5 any alpha channel in the overlay image is used as a
cristy3ed852e2009-09-05 21:47:34 +00002249mask the transparency of the destination image. However areas outside the
2250overlaid areas will not be effected. </p>
2251
2252
2253<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002254 <h4><a id="display"></a>-display <em class="arg">host:display[.screen]</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002255</div>
2256
cristy751980d2012-06-03 23:18:35 +00002257<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>
cristy3ed852e2009-09-05 21:47:34 +00002258
cristy751980d2012-06-03 23:18:35 +00002259<p>This option is used with convert for obtaining image or font from this
2260X server. See <em class="arg">X(1)</em>.</p>
cristy3ed852e2009-09-05 21:47:34 +00002261
2262<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002263 <h4><a id="dispose"></a>-dispose <em class="arg">method</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002264</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
2269modified after the current 'frame' of an animation has finished being
2270displayed (after its 'delay' period), but before the next frame on an
2271animation is to be overlaid onto the display. </p>
2272
2273<p>Here are the valid methods:</p>
2274
2275<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00002276 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.
cristy3ed852e2009-09-05 21:47:34 +00002280</pre>
2281
2282<p>You can also use the numbers given above, which is what the GIF format
2283uses internally to represent the above settings. </p>
2284
cristy751980d2012-06-03 23:18:35 +00002285<p>To print a complete list of dispose methods, use <a href="command-line-options.html#list">-list dispose</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00002286
cristy751980d2012-06-03 23:18:35 +00002287<p>Use <a href="command-line-options.html#dispose" >+dispose</a>, turn off the setting and prevent
cristy3ed852e2009-09-05 21:47:34 +00002288resetting the layer disposal methods of images being read in. </p>
2289
cristy751980d2012-06-03 23:18:35 +00002290<p>Use <a href="command-line-options.html#set">-set</a> '<kbd>dispose</kbd>' method to set the image
cristy3ed852e2009-09-05 21:47:34 +00002291disposal method for images already in memory.</p>
2292
2293<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002294 <h4><a id="dissimilarity-threshold"></a>-dissimilarity-threshold <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002295</div>
2296
cristy751980d2012-06-03 23:18:35 +00002297<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>
cristy3ed852e2009-09-05 21:47:34 +00002298
2299
2300<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002301 <h4><a id="dissolve"></a>-dissolve <em class="arg">src_percent</em>[x<em class="arg">dst_percent</em>]</h4>
cristy3ed852e2009-09-05 21:47:34 +00002302</div>
2303
cristy751980d2012-06-03 23:18:35 +00002304<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>
cristy3ed852e2009-09-05 21:47:34 +00002305
2306<p>The opacity of the composite image is multiplied by the given percent, then
2307it is composited 'over' the main image. If <em class="arg">src_percent</em>
cristyd0bd44a2010-09-24 12:38:11 +00002308is greater than 100, start dissolving the main image so it becomes
cristy3ed852e2009-09-05 21:47:34 +00002309transparent at a value of '<kbd class="arg">200</kbd>'. If both percentages
2310are 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
2314images, you would need to use dissolve values of '50,100'. </p>
2315
2316<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002317 <h4><a id="distort"></a>-distort <em class="arg">method arguments</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002318</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
2323of floating point numbers separated by commas or spaces. The number of
2324and meaning of the floating point values depends on the distortion <em
2325class="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>
cristydcca3fa2010-12-29 21:50:07 +00002353 <tr><td>3:</td><td><em>X,Y &nbsp; &nbsp; Angle</em></td></tr>
cristy3ed852e2009-09-05 21:47:34 +00002354 <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
cristyd0bda5e2010-09-21 16:22:45 +00002364 This is actually an alternative way of specifying a 2 dimensional linear
cristy3ed852e2009-09-05 21:47:34 +00002365 '<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
cristyd0bda5e2010-09-21 16:22:45 +00002371 of control points (as defined below). Ideally 3 sets or 12 floating
cristy3ed852e2009-09-05 21:47:34 +00002372 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
cristyeed6cb62012-01-28 19:38:34 +00002378 squares fitted to best match a linear affine distortion. If only 2
cristy3ed852e2009-09-05 21:47:34 +00002379 control point pairs (8 numbers) are given a two point image translation
cristyd0bda5e2010-09-21 16:22:45 +00002380 rotation and scaling is performed, without any possible shearing,
cristy3ed852e2009-09-05 21:47:34 +00002381 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
cristy751980d2012-06-03 23:18:35 +00002403 See <a href="command-line-options.html#affine" >-affine</a> setting for more detail, and
cristy3ed852e2009-09-05 21:47:34 +00002404 meanings of these coefficients. <br/>
2405
2406 The distortions '<kbd>Affine</kbd>' and '<kbd>SRT</kbd>' provide
cristyd0bd44a2010-09-24 12:38:11 +00002407 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
cristy751980d2012-06-03 23:18:35 +00002410 href="command-line-options.html#verbose" >-verbose</a> setting with those other variants. </td>
cristy3ed852e2009-09-05 21:47:34 +00002411
2412 </tr>
2413
cristy3ed852e2009-09-05 21:47:34 +00002414 <tr valign="top">
cristyd0bd44a2010-09-24 12:38:11 +00002415 <td valign="top"><kbd>BilinearForward</kbd><br/>
2416 <kbd>BilinearReverse</kbd></td>
cristy3ed852e2009-09-05 21:47:34 +00002417 <td valign="top">
cristyd0bd44a2010-09-24 12:38:11 +00002418 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
cristyeed6cb62012-01-28 19:38:34 +00002425 quadrilateral to a rectangle, while preserving the straight line edges
cristyd0bd44a2010-09-24 12:38:11 +00002426 in each case. <br/>
2427
2428 Note that '<kbd>BilinearForward</kbd>' can generate invalid pixels
cristy751980d2012-06-03 23:18:35 +00002429 which will be colored using the <a href="command-line-options.html#mattecolor" >-mattecolor</a>
cristyeed6cb62012-01-28 19:38:34 +00002430 color setting. Also if the quadrilateral becomes 'flipped' the image
2431 may disappear. <br/>
cristyd0bd44a2010-09-24 12:38:11 +00002432
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>
cristy3ed852e2009-09-05 21:47:34 +00002438 </tr>
cristy3ed852e2009-09-05 21:47:34 +00002439
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
cristyeed6cb62012-01-28 19:38:34 +00002446 distortions (for the purposes of image registration and panorama
cristy3ed852e2009-09-05 21:47:34 +00002447 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
cristy751980d2012-06-03 23:18:35 +00002453 <a href="command-line-options.html#mattecolor" >-mattecolor</a> setting. </td>
cristy3ed852e2009-09-05 21:47:34 +00002454 </tr>
2455
2456 <tr valign="top">
2457 <td valign="top"><kbd>PerspectiveProjection</kbd>&nbsp;&nbsp;</td>
2458 <td valign="top">
cristyd0bda5e2010-09-21 16:22:45 +00002459 Do a '<kbd>Perspective</kbd>' distortion biased on a set of 8
cristy3ed852e2009-09-05 21:47:34 +00002460 pre-calculated coefficients. You can get these coefficients by looking
cristy751980d2012-06-03 23:18:35 +00002461 at the <a href="command-line-options.html#verbose" >-verbose</a> output of a
cristyeed6cb62012-01-28 19:38:34 +00002462 '<kbd>Perspective</kbd>' distortion, or by calculating them yourself.
cristy3ed852e2009-09-05 21:47:34 +00002463 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,
cristy751980d2012-06-03 23:18:35 +00002487 (as if using <a href="command-line-options.html#distort" >+distort</a>) while attempting to
cristy3ed852e2009-09-05 21:47:34 +00002488 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
cristy751980d2012-06-03 23:18:35 +00002518 If the plus form of distort (<a href="command-line-options.html#distort" >+distort</a>) is used
cristy3ed852e2009-09-05 21:47:34 +00002519 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.
cristyd0bda5e2010-09-21 16:22:45 +00002540 As such the normal EWA filters are turned off. It is recommended some
cristy3ed852e2009-09-05 21:47:34 +00002541 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
cristy6bcf48e2011-02-15 19:09:04 +00002550 href="http://wiki.panotools.org/Lens_correction_model" >Helmut
cristyeed6cb62012-01-28 19:38:34 +00002551 Dersch</a>, perform a barrel or pin-cushion distortion appropriate to
cristy3ed852e2009-09-05 21:47:34 +00002552 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">
cristyeed6cb62012-01-28 19:38:34 +00002575 This is very similar to '<kbd>Barrel</kbd>' with the same set of
cristy3ed852e2009-09-05 21:47:34 +00002576 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> +
cristyd0bd44a2010-09-24 12:38:11 +00002580 <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
cristy3ed852e2009-09-05 21:47:34 +00002584 </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
cristyd0bd44a2010-09-24 12:38:11 +00002592 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/>
cristy3ed852e2009-09-05 21:47:34 +00002599
cristyd0bd44a2010-09-24 12:38:11 +00002600 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
cristyeed6cb62012-01-28 19:38:34 +00002602 position, distorting the surface of the jelly. <br/>
cristy3ed852e2009-09-05 21:47:34 +00002603
cristybaacd172011-04-30 23:11:03 +00002604 Internally it is equivalent to generating a displacement map (see <a
cristy751980d2012-06-03 23:18:35 +00002605 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.
cristyd0bd44a2010-09-24 12:38:11 +00002607
2608 </td>
cristy3ed852e2009-09-05 21:47:34 +00002609 </tr>
2610
2611</table>
2612
cristy751980d2012-06-03 23:18:35 +00002613<p>To print a complete list of distortion methods, use <a href="command-line-options.html#list">-list
cristyd0bd44a2010-09-24 12:38:11 +00002614distort</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00002615
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
2618defining how these points in the given image should be distorted in the
2619destination image. Each set of four floating point values represent a source
2620image coordinate, followed immediately by the destination image coordinate.
2621This 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
2630destination image. </p>
2631
2632<p>For example, to warp an image using '<kbd>perspective</kbd>' distortion,
2633needs a list of at least 4 sets of coordinates, or 16 numbers. Here is the
2634perspective distortion of the built-in "rose:" image. Note how spaces were
2635used to group the 4 sets of coordinate pairs, to make it easier to read and
2636understand.</p>
2637
cristyeed6cb62012-01-28 19:38:34 +00002638<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>
cristyd0bd44a2010-09-24 12:38:11 +00002639convert 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
2643a distortion, the distortion method is 'least squares' fitted to produce the
2644best result for all the coordinate pairs given. If less than the ideal number
2645of points are given, the distort will generally fall back to a simpler form of
cristyeed6cb62012-01-28 19:38:34 +00002646distortion that can handles the smaller number of coordinates (usually a linear
cristyd0bd44a2010-09-24 12:38:11 +00002647'<kbd>Affine</kbd>' distortion). </p>
cristy3ed852e2009-09-05 21:47:34 +00002648
cristyd0bda5e2010-09-21 16:22:45 +00002649<p>By using more coordinates you can make use of image registration tool to
cristyd0bd44a2010-09-24 12:38:11 +00002650find 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>
cristy3ed852e2009-09-05 21:47:34 +00002653
2654<p>Colors are acquired from the source image according to the <a
cristy751980d2012-06-03 23:18:35 +00002655href="command-line-options.html#interpolate" >-interpolate</a> color lookup setting, when the image is
cristyd0bd44a2010-09-24 12:38:11 +00002656magnified. However if the viewed image is minified (image becomes smaller),
2657a special area resampling function (added ImageMagick v6.3.5-9), is used to
2658produce a higher quality image. For example you can use
2659a '<kbd>perspective</kbd>' distortion to view a infinitely tiled 'plane' all
2660the way to the horizon. </p>
cristy3ed852e2009-09-05 21:47:34 +00002661
cristyeed6cb62012-01-28 19:38:34 +00002662<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>
cristyd0bd44a2010-09-24 12:38:11 +00002663convert -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>
cristy3ed852e2009-09-05 21:47:34 +00002666<p>Note that a infinitely tiled perspective images involving the horizon can
2667be very slow to generate due to the use of the high quality 'area resampling'
2668function (added ImageMagick v6.3.5-9). You can turn off 'area resampling'
cristy751980d2012-06-03 23:18:35 +00002669using a <a href="command-line-options.html#filter" >-filter</a> setting of '<kbd>point</kbd>'
cristy3ed852e2009-09-05 21:47:34 +00002670(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
cristy751980d2012-06-03 23:18:35 +00002673'<kbd>perspective</kbd>' distortion example, <a href="command-line-options.html#distort" >-distort</a>
2674will use the current <a href="command-line-options.html#mattecolor" >-mattecolor</a> setting for these
cristy3ed852e2009-09-05 21:47:34 +00002675pixels. If you do not what these pixels to be visible, set the color to match
2676the rest of the ground. </p>
2677
2678<p>The output image size will by default be the same as the input image. This
2679means that if the part of the distorted image falls outside the viewed area of
cristyd0bd44a2010-09-24 12:38:11 +00002680the 'distorted space', those parts is clipped and lost. However if you use
cristy751980d2012-06-03 23:18:35 +00002681the plus form of the operator (<a href="command-line-options.html#distort" >+distort</a>) the operator
cristyd0bd44a2010-09-24 12:38:11 +00002682will attempt (if possible) to show the whole of the distorted image, while
2683retaining a correct 'virtual canvas' offset, for image layering. This offset
cristy751980d2012-06-03 23:18:35 +00002684may need to be removed using <a href="command-line-options.html#repage" >+repage</a>, to remove if it
cristyd0bd44a2010-09-24 12:38:11 +00002685is unwanted. </p>
cristy3ed852e2009-09-05 21:47:34 +00002686
cristy751980d2012-06-03 23:18:35 +00002687<p>You can alternatively specify a special "<kbd><a href="command-line-options.html#set" >-set</a>
cristy3ed852e2009-09-05 21:47:34 +00002688option:distort:viewport {geometry_string}</kbd>" setting which will specify
2689the size and the offset of the generated 'viewport' image of the distorted
2690image space.</p>
2691
cristy751980d2012-06-03 23:18:35 +00002692<p>Adding a "<kbd><a href="command-line-options.html#set" >-set</a> option:distort:scale
cristy3ed852e2009-09-05 21:47:34 +00002693{scale_factor}</kbd>" will scale the output image (viewport or otherwise) by
2694that factor without changing the viewed contents of the distorted image. This
2695can be used either for 'super-sampling' the image for a higher quality result,
2696or for panning and zooming around the image (with appropriate viewport
2697changes, or post-distort cropping and resizing). </p>
2698
cristy751980d2012-06-03 23:18:35 +00002699<p>Setting <a href="command-line-options.html#verbose" >-verbose</a> setting, will cause <a
2700href="command-line-options.html#distort" >-distort</a> to attempt to output the internal coefficients,
2701and the <a href="command-line-options.html#fx" >-fx</a> equivalent to the distortion, for expert study,
cristy3ed852e2009-09-05 21:47:34 +00002702and 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
cristy751980d2012-06-03 23:18:35 +00002705produce a cleaner result that the equivalent <a href="command-line-options.html#rotate" >-rotate</a>
2706and/or <a href="command-line-options.html#shear" >-shear</a> operation, with more control of due to the
cristyd0bd44a2010-09-24 12:38:11 +00002707above settings. It is algorithmically slower however, though that may not be
2708the case in ImageMagick's implementation. </p>
cristy3ed852e2009-09-05 21:47:34 +00002709
2710
2711<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002712 <h4><a id="dither"></a>-dither <em class="arg">method</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002713</div>
2714
cristy751980d2012-06-03 23:18:35 +00002715<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
2716images when general color reduction is applied via an option, or automagically
2717when saving to specific formats. This enabled by default. </td><td style='text-align:right;'></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00002718
cristy751980d2012-06-03 23:18:35 +00002719<p>Dithering places two or more colors in neighboring pixels so that to the
2720eye a closer approximation of the images original color is reproduced. This
2721reduces the number of colors needed to reproduce the image but at the cost of
2722a lower level pattern of colors. Error diffusion dithers can use any set of
2723colors (generated or user defined) to an image. </p>
cristy3ed852e2009-09-05 21:47:34 +00002724
2725<p>Dithering is turned on by default, to turn it off use the plus form of the
cristy751980d2012-06-03 23:18:35 +00002726setting, <a href="command-line-options.html#dither">+dither</a>. This will also also render PostScript
cristy3ed852e2009-09-05 21:47:34 +00002727without text or graphic aliasing. Disabling dithering often (but not always)
2728leads to faster process, a smaller number of colors, but more cartoon like
2729image coloring. Generally resulting in 'color banding' effects in areas with
2730color gradients. </p>
2731
cristy751980d2012-06-03 23:18:35 +00002732<p>The color reduction operators <a href="command-line-options.html#colors">-colors</a>, <a
2733href="command-line-options.html#monochrome">-monochrome</a>, <a href="command-line-options.html#remap ">-remap</a>, and <a
2734href="command-line-options.html#posterize">-posterize</a>, apply dithering to images using the reduced
2735color set they created. These operators are also used as part of automatic
2736color reduction when saving images to formats with limited color support, such
2737as <kbd>GIF:</kbd>, <kbd>XBM:</kbd>, and others, so dithering may also be used
2738in these cases. </p>
cristy3ed852e2009-09-05 21:47:34 +00002739
cristy751980d2012-06-03 23:18:35 +00002740<p>Alternatively you can use <a href="command-line-options.html#random-threshold">-random-threshold</a>
2741to generate purely random dither. Or use <a
2742href="command-line-options.html#ordered-dither">-ordered-dither</a> to apply threshold mapped dither
2743patterns, using uniform color maps, rather than specific color maps. </p>
cristy3ed852e2009-09-05 21:47:34 +00002744
2745
2746<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002747 <h4><a id="draw"></a>-draw <em class="arg">string</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002748</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
cristy751980d2012-06-03 23:18:35 +00002752<p>Use this option to annotate or decorate an image with one or more graphic
2753primitives. The primitives include shapes, text, transformations, and pixel
2754operations.</p>
cristy3ed852e2009-09-05 21:47:34 +00002755
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
cristy751980d2012-06-03 23:18:35 +00002785<p>The text gravity primitive only affects the placement of text and does not
2786interact with the other primitives. It is equivalent to using the <a
2787href="command-line-options.html#gravity">-gravity</a> command-line option, except that it is limited in
2788scope to the <a href="command-line-options.html#draw">-draw</a> option in which it appears.</p>
cristy3ed852e2009-09-05 21:47:34 +00002789
2790<p>The transformation primitives:</p>
2791
2792<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00002793 rotate degrees
2794 translate dx,dy
2795 scale sx,sy
2796 skewX degrees
2797 skewY degrees
cristy3ed852e2009-09-05 21:47:34 +00002798</pre>
2799
2800<p>The pixel operation primitives:</p>
2801
2802<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00002803 color x0,y0 method
2804 matte x0,y0 method
cristy3ed852e2009-09-05 21:47:34 +00002805</pre>
2806
cristy751980d2012-06-03 23:18:35 +00002807<p>The shape primitives are drawn in the color specified by the preceding <a
2808href="command-line-options.html#fill">-fill</a> setting. For unfilled shapes, use <a
2809href="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
2811href="command-line-options.html#strokewidth">-strokewidth</a> settings.</p>
cristy3ed852e2009-09-05 21:47:34 +00002812
cristy751980d2012-06-03 23:18:35 +00002813<p>A <kbd>point</kbd> primitive is specified by a single <em>point</em> in the
2814pixel 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>
2816primitive is not affected by <a href="command-line-options.html#stroke">-stroke</a> or <a
2817href="command-line-options.html#strokewidth">-strokewidth</a>.)</p>
cristy3ed852e2009-09-05 21:47:34 +00002818
2819<p>A <kbd>line</kbd> primitive requires a start point and end point.</p>
2820
cristy751980d2012-06-03 23:18:35 +00002821<p>A <kbd>rectangle</kbd> primitive is specified by the pair of points at the
2822upper left and lower right corners.</p>
cristy3ed852e2009-09-05 21:47:34 +00002823
cristy751980d2012-06-03 23:18:35 +00002824<p>A <kbd>roundRectangle</kbd> primitive takes the same corner points as
2825a <kbd>rectangle</kbd> followed by the width and height of the rounded corners
2826to be removed.</p>
cristy3ed852e2009-09-05 21:47:34 +00002827
cristy751980d2012-06-03 23:18:35 +00002828<p>The <kbd>circle</kbd> primitive makes a disk (filled) or circle (unfilled).
2829Give the center and any point on the perimeter (boundary).</p>
cristy3ed852e2009-09-05 21:47:34 +00002830
cristy751980d2012-06-03 23:18:35 +00002831<p>The <kbd>arc</kbd> primitive is used to inscribe an elliptical segment in
2832to 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
2834arc of the segment segment (e.g. 130,30 200,100 45,90). The start and end
2835points produced are then joined with a line segment and the resulting segment
2836of an ellipse is filled.</p>
cristy3ed852e2009-09-05 21:47:34 +00002837
cristy751980d2012-06-03 23:18:35 +00002838<p>Use <kbd>ellipse</kbd> to draw a partial (or whole) ellipse. Give the
2839center point, the horizontal and vertical "radii" (the <em>semi-axes</em> of
2840the ellipse) and start and end angles in degrees (e.g. 100,100 100,150
28410,360).</p>
cristy3ed852e2009-09-05 21:47:34 +00002842
cristy751980d2012-06-03 23:18:35 +00002843<p>The <kbd>polyline</kbd> and <kbd>polygon</kbd> primitives require three or
2844more points to define their perimeters. A <kbd>polyline</kbd> is simply
2845a <kbd>polygon</kbd> in which the final point is not stroked to the start
2846point. When unfilled, this is a <em>polygonal line</em>. If the <a
2847href="command-line-options.html#stroke">-stroke</a> setting is <kbd>none</kbd> (the default), then
2848a <kbd>polyline</kbd> is identical to a <kbd>polygon</kbd>. </p>
cristy3ed852e2009-09-05 21:47:34 +00002849
cristy751980d2012-06-03 23:18:35 +00002850<p>A <em>coordinate</em> is a pair of integers separated by a space or
2851optional comma. </p>
cristy3ed852e2009-09-05 21:47:34 +00002852
cristy751980d2012-06-03 23:18:35 +00002853<p>As an example, to define a circle centered at 100,100 that extends to
2854150,150 use:</p>
cristy3ed852e2009-09-05 21:47:34 +00002855
2856<p class="crtsnip">
2857 -draw 'circle 100,100 150,150'
2858</p>
2859
cristy751980d2012-06-03 23:18:35 +00002860<p>The <kbd>Bezier</kbd> primitive creates a spline curve and requires three
2861or 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
2863intermediate coordinates are <em>control points</em>. If two control points
2864are specified, the line between each end knot and its sequentially respective
2865control point determines the tangent direction of the curve at that end. If
2866one control point is specified, the lines from the end knots to the one
2867control point determines the tangent directions of the curve at each end. If
2868more than two control points are specified, then the additional control points
2869act in combination to determine the intermediate shape of the curve. In order
2870to 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
2872the start and end knots of each successive segment repeated. For example:</p>
cristy3ed852e2009-09-05 21:47:34 +00002873
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
cristy751980d2012-06-03 23:18:35 +00002882<p>A <kbd>path</kbd> represents an outline of an object, defined in terms of
2883moveto (set a new current point), lineto (draw a straight line), curveto (draw
2884a Bezier curve), arc (elliptical or circular arc) and closepath (close the
2885current 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
2887one or more line or curve operations) are possible to allow effects such as
2888<em>donut holes</em> in objects. (See <a
2889href="http://www.w3.org/TR/SVG/paths.html">Paths</a>.)</p>
cristy3ed852e2009-09-05 21:47:34 +00002890
cristy751980d2012-06-03 23:18:35 +00002891<p>Use <kbd>image</kbd> to composite an image with another image. Follow the
2892image keyword with the composite operator, image location, image size, and
2893filename:</p>
cristy3ed852e2009-09-05 21:47:34 +00002894
2895<p class="crtsnip">
2896 -draw 'image SrcOver 100,100 225,225 image.jpg'
2897</p>
2898
cristybc9539a2010-08-16 18:06:20 +00002899<p>You can use 0,0 for the image size, which means to use the actual
2900dimensions found in the image header. Otherwise, it is scaled to the given
cristy751980d2012-06-03 23:18:35 +00002901dimensions. See <a href="compose.html">Alpha Compositing</a> for
2902a detailed discussion of alpha composition methods that are available. </p>
2903
cristy29c5c992011-06-25 13:58:49 +00002904The "special augmented compose operators" such as "dissolve" that require
2905arguments cannot be used at present with the <kbd>-draw image</kbd> option.
2906 </p>
cristy3ed852e2009-09-05 21:47:34 +00002907
cristy751980d2012-06-03 23:18:35 +00002908<p>Use <kbd>text</kbd> to annotate an image with text. Follow the text
2909coordinates with a string. If the string has embedded spaces, enclose it in
2910single or double quotes.</p>
2911
2912<p>For example, the following annotates the image with <kbd>Works like
2913magick!</kbd> for an image titled <kbd>bird.miff</kbd>. </p>
cristy3ed852e2009-09-05 21:47:34 +00002914
2915<p class="crtsnip">
cristy4bf6e232011-05-21 01:43:33 +00002916 -draw "text 100,100 'Works like magick!' "
cristy3ed852e2009-09-05 21:47:34 +00002917</p>
2918
cristy751980d2012-06-03 23:18:35 +00002919<p>See the <a href="command-line-options.html#annotate">-annotate</a> option for another convenient way
2920to annotate an image with text.</p>
cristy3ed852e2009-09-05 21:47:34 +00002921
cristy751980d2012-06-03 23:18:35 +00002922<p>The <kbd>rotate</kbd> primitive rotates subsequent shape primitives and
2923text primitives about the origin of the main image. If the <a
2924href="command-line-options.html#region">-region</a> option precedes the <a href="command-line-options.html#draw">-draw</a>
2925option, the origin for transformations is the upper left corner of the
2926region.</p>
cristy3ed852e2009-09-05 21:47:34 +00002927
cristy751980d2012-06-03 23:18:35 +00002928<p>The <kbd>translate</kbd> primitive translates subsequent shape and text
2929primitives.</p>
cristy3ed852e2009-09-05 21:47:34 +00002930
2931<p>The <kbd>scale</kbd> primitive scales them.</p>
2932
cristy751980d2012-06-03 23:18:35 +00002933<p>The <kbd>skewX</kbd> and <kbd>skewY</kbd> primitives skew them with respect
2934to the origin of the main image or the region.</p>
cristy3ed852e2009-09-05 21:47:34 +00002935
cristy751980d2012-06-03 23:18:35 +00002936<p>The transformations modify the current affine matrix, which is initialized
2937from the initial affine matrix defined by the <a href="command-line-options.html#affine">-affine</a>
2938option. Transformations are cumulative within the <a href="command-line-options.html#draw">-draw</a>
2939option. The initial affine matrix is not affected; that matrix is only changed
2940by 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
2942reinitialized from the initial affine matrix.</p>
cristy3ed852e2009-09-05 21:47:34 +00002943
cristy751980d2012-06-03 23:18:35 +00002944<p>Use the <kbd>color</kbd> primitive to change the color of a pixel to the
2945fill color (see <a href="command-line-options.html#fill">-fill</a>). Follow the pixel coordinate with
2946a method:</p>
cristy3ed852e2009-09-05 21:47:34 +00002947
2948<pre class="text">
2949 point
2950 replace
2951 floodfill
2952 filltoborder
2953 reset
2954</pre>
2955
cristy751980d2012-06-03 23:18:35 +00002956<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>
2958method 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
2960pixel and is a neighbor, whereas <kbd>filltoborder</kbd> recolors any neighbor
2961pixel that is not the border color. Finally, <kbd>reset</kbd> recolors all
2962pixels.</p>
cristy3ed852e2009-09-05 21:47:34 +00002963
cristy751980d2012-06-03 23:18:35 +00002964<p>Use <kbd>matte</kbd> to the change the pixel matte value to transparent.
2965Follow the pixel coordinate with a method (see the <kbd>color</kbd> primitive
2966for a description of methods). The <kbd>point</kbd> method changes the matte
2967value of the target pixel. The <kbd>replace</kbd> method changes the matte
2968value 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
2970color of the target pixel and is a neighbor, whereas <kbd>filltoborder</kbd>
2971changes the matte value of any neighbor pixel that is not the border color (<a
2972href="command-line-options.html#bordercolor">-bordercolor</a>). Finally <kbd>reset</kbd> changes the
2973matte value of all pixels.</p>
cristy3ed852e2009-09-05 21:47:34 +00002974
cristy751980d2012-06-03 23:18:35 +00002975<p>You can set the primitive color, font, and font bounding box color with <a
2976href="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>
2977respectively. Options are processed in command line order so be sure to use
2978these options <em>before</em> the <a href="command-line-options.html#draw">-draw</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00002979
cristy751980d2012-06-03 23:18:35 +00002980<p>Strings that begin with a number must be quoted (e.g. use '1.png' rather
2981than 1.png).</p>
cristy3ed852e2009-09-05 21:47:34 +00002982
cristy751980d2012-06-03 23:18:35 +00002983<p>Drawing primitives conform to the <a href="magick-vector-graphics.html" >Magick
2984Vector Graphics</a> format.</p>
cristy3ed852e2009-09-05 21:47:34 +00002985
cristy2dcd6822011-06-13 16:21:20 +00002986
cristy8b9dd952011-03-21 22:56:18 +00002987<div style="margin: auto;">
cristy323f35b2011-03-24 23:05:13 +00002988 <h4><a id="duplicate"></a>-duplicate <em class="arg">count,indexes</em></h4>
cristy8b9dd952011-03-21 22:56:18 +00002989</div>
2990
cristy323f35b2011-03-24 23:05:13 +00002991<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>
cristy8b9dd952011-03-21 22:56:18 +00002992
cristy751980d2012-06-03 23:18:35 +00002993<p>Specify the count and the image to duplicate by its index in the sequence.
2994The first image is index 0. Negative indexes are relative to the end of the
2995sequence, for example, -1 represents the last image of the sequence. Specify
2996a range of images with a dash (e.g. 0-4). Separate indexes with a comma (e.g.
29970,2). Use <kbd>+duplicate</kbd> to duplicate the last image in the current
2998image sequence.</p>
cristy3ed852e2009-09-05 21:47:34 +00002999
3000<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003001 <h4><a id="edge"></a>-edge <em class="arg">radius</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003002</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;">
cristydcca3fa2010-12-29 21:50:07 +00003007 <h4><a id="emboss"></a>-emboss <em class="arg">radius</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003008</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;">
cristydcca3fa2010-12-29 21:50:07 +00003013 <h4><a id="encipher"></a>-encipher <em class="arg">filename</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003014</div>
3015
cristy751980d2012-06-03 23:18:35 +00003016<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>
cristy3ed852e2009-09-05 21:47:34 +00003017
cristy751980d2012-06-03 23:18:35 +00003018<p>Get the passphrase from the file specified by <em class="arg"
3019>filename</em>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003020
cristy751980d2012-06-03 23:18:35 +00003021<p>For more information, see the webpage, <a
3022href="../www/cipher.html">ImageMagick: Encipher or
3023Decipher an Image</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003024
cristyd0bda5e2010-09-21 16:22:45 +00003025
3026
cristy3ed852e2009-09-05 21:47:34 +00003027<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003028 <h4><a id="encoding"></a>-encoding <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003029</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
cristy751980d2012-06-03 23:18:35 +00003033<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>
cristy3ed852e2009-09-05 21:47:34 +00003037
3038<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003039 <h4><a id="endian"></a>-endian <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003040</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
cristy751980d2012-06-03 23:18:35 +00003044<p>To print a complete list of endian types, use the <a href="command-line-options.html#list">-list endian</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00003045
cristy751980d2012-06-03 23:18:35 +00003046<p>Use <a href="command-line-options.html#endian">+endian</a> to revert to unspecified endianness.</p>
cristy3ed852e2009-09-05 21:47:34 +00003047
3048
3049<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003050 <h4><a id="enhance"></a>-enhance</h4>
cristy3ed852e2009-09-05 21:47:34 +00003051</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;">
cristydcca3fa2010-12-29 21:50:07 +00003057 <h4><a id="equalize"></a>-equalize</h4>
cristy3ed852e2009-09-05 21:47:34 +00003058</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
cristy751980d2012-06-03 23:18:35 +00003062<p>To perform histogram equalization on all channels in concert, transform the
3063image into some other color space, such as HSL, OHTA, YIQ or YUV, then
3064equalize the appropriate intensity-like channel, then convert back to RGB.</p>
cristy3ed852e2009-09-05 21:47:34 +00003065
cristy751980d2012-06-03 23:18:35 +00003066<p>For example using HSL, we have: ... <kbd>-colorspace HSL -channel lightness
3067-equalize -colorspace RGB</kbd> ...</p>
cristy3ed852e2009-09-05 21:47:34 +00003068
cristy751980d2012-06-03 23:18:35 +00003069<p>For YIQ, YUV and OHTA use the red channel. For example, OHTA is a principal
3070components transformation that puts most of the information in the first
3071channel. Here we have ... <kbd>-colorspace OHTA -channel red -equalize
3072-colorspace RGB</kbd> ...</p>
cristy3ed852e2009-09-05 21:47:34 +00003073
3074<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003075 <h4><a id="evaluate"></a>-evaluate <em class="arg">operator value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003076</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
cristy751980d2012-06-03 23:18:35 +00003080<p>(See the <a href="command-line-options.html#function" >-function</a> operator for some
3081multi-parameter functions. See the <a href="command-line-options.html#fx" >-fx</a> operator if more
3082elaborate calculations are needed.)</p>
cristy3ed852e2009-09-05 21:47:34 +00003083
cristy751980d2012-06-03 23:18:35 +00003084<p>The behaviors of each <em class="arg">operator</em> are summarized in the
3085following list. For brevity, the numerical value of a "pixel" referred to
3086below is the value of the corresponding channel of that pixel, while
3087a "normalized pixel" is that number divided by the maximum
3088(installation-dependent) value <em class="QR">QuantumRange</em>. (If
3089normalized pixels are used, they are restored, following the other
3090calculations, to the full range by multiplying by <em
3091class="QR">QuantumRange</em>.)</p>
cristy3ed852e2009-09-05 21:47:34 +00003092
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
cristy3c98a4f2010-08-13 20:09:41 +00003104 <tr><td>Abs </td> <td>Add <em class="arg">value</em> to pixels and return absolute value. </td></tr>
cristy3ed852e2009-09-05 21:47:34 +00003105 <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>
cristy5063d812010-10-19 16:28:10 +00003110 <tr><td>Exp </td> <td>base-e exponential function</td></tr>
3111 <tr><td>Exponential </td> <td>base-e exponential function</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00003112 <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>
cristy63fed272010-03-07 19:08:45 +00003115 <tr><td>Mean </td> <td>Add the <em class="arg">value</em> and divide by 2.</td></tr>
cristy61365ad2010-11-28 02:38:34 +00003116 <tr><td>Median </td> <td>Choose the median value from an image sequence.</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00003117 <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>
cristy751980d2012-06-03 23:18:35 +00003132 <tr><td>Multiplicative-noise</td> <td>(These are equivalent to the corresponding <a href="command-line-options.html#noise" >-noise</a> operators.)</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00003133 <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
cristy751980d2012-06-03 23:18:35 +00003145href="command-line-options.html#channel" >-channel</a> in the image. If necessary, the results of the
cristy3ed852e2009-09-05 21:47:34 +00003146calculations are truncated (clipped) to fit in the interval [0,&nbsp;<em
3147class="QR">QuantumRange</em>]. The transparency channel of the image is
3148represented 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
3150semi-transparent. Append the percent symbol '<kbd>%</kbd>' to specify a value
3151as a percentage of the <em class="QR">QuantumRange</em>.</p>
3152
cristy751980d2012-06-03 23:18:35 +00003153<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>
cristy3ed852e2009-09-05 21:47:34 +00003155
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
cristy751980d2012-06-03 23:18:35 +00003158href="command-line-options.html#level" >-level</a> or the <a href="command-line-options.html#level" >+level</a> operator, with
cristy3ed852e2009-09-05 21:47:34 +00003159appropriate argument, to linearly modify the overall range of color values.
cristy751980d2012-06-03 23:18:35 +00003160Please 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
cristy3ed852e2009-09-05 21:47:34 +00003162'alpha' values.</p>
3163
cristy751980d2012-06-03 23:18:35 +00003164<p><kbd>AddModulus</kbd> has been added as of ImageMagick 6.4.8-4 and provides
3165addition modulo the <em class="QR">QuantumRange</em>. It is therefore
3166equivalent to <kbd>Add</kbd> unless the resulting pixel value is outside the
3167interval [0,&nbsp;<em class="QR">QuantumRange</em>]. </p>
cristy3ed852e2009-09-05 21:47:34 +00003168
cristy751980d2012-06-03 23:18:35 +00003169<p><kbd>Exp or Exponential</kbd> has been added as of ImageMagick 6.6.5-1 and
3170works 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
3172function. Non-negative values will always produce results larger unity and
3173thus outside the interval [0,&nbsp;<em class="QR">QuantumRange</em>]. The
3174formula is expressed below. </p>
cristyce66ab12010-10-21 23:36:32 +00003175
3176 <div style="text-align:center;">
3177 exp(<em class="arg">value</em> &times; <b><em>u</em></b>)
3178 </div>
3179
cristy751980d2012-06-03 23:18:35 +00003180<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
3182the result.</p>
cristyce66ab12010-10-21 23:36:32 +00003183
cristy751980d2012-06-03 23:18:35 +00003184<p><kbd>Log</kbd> has been added as of ImageMagick 6.4.2-1 and works on
3185normalized pixel values. This a <em>scaled</em> log function. The <em
3186class="arg">value</em> used with <kbd>Log</kbd> provides a <em>scaling
3187factor</em> that adjusts the curvature in the graph of the log function. The
3188formula applied to a normalized value <b><em>u</em></b> is below. </p>
cristy3ed852e2009-09-05 21:47:34 +00003189
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
3195normalized pixel values. Note that <kbd>Pow</kbd> is related to the <a
cristy751980d2012-06-03 23:18:35 +00003196href="command-line-options.html#gamma" >-gamma</a> operator. For example, <b>-gamma 2</b> is equivalent
cristy3ed852e2009-09-05 21:47:34 +00003197to <b>-evaluate pow 0.5</b>, i.e., a 'square root' function. The value used
cristy751980d2012-06-03 23:18:35 +00003198with <a href="command-line-options.html#gamma" >-gamma</a> is simply the reciprocal of the value used
cristy3ed852e2009-09-05 21:47:34 +00003199with <kbd>Pow</kbd>.</p>
3200
3201<p><kbd>Cosine</kbd> and <kbd>Sine</kbd> was added as of IM v6.4.8-8 and
3202converts the image values into a value according to a (co)sine wave function.
3203The synonyms <kbd>Cos</kbd> and <kbd>Sin</kbd> may also be used. The output
3204is biased 50% and normalized by 50% so as to fit in the respective color value
3205range. The <em class="arg">value</em> scaling of the <em>period</em> of the
3206function (its frequency), and thus determines the number of 'waves' that will
3207be generated over the input color range. For example, if the <em
3208class="arg">value</em> is&nbsp;1, the effective period is simply the <em
3209class="QR">QuantumRange</em>; but if the <em class="arg">value</em> is&nbsp;2,
3210then the effective period is the <em>half</em> the <em
cristydcca3fa2010-12-29 21:50:07 +00003211class="QR">QuantumRange</em>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003212
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
cristy751980d2012-06-03 23:18:35 +00003217<p>See also the <a href="command-line-options.html#function" >-function</a> operator, which is a
cristydcca3fa2010-12-29 21:50:07 +00003218multi-value version of evaluate. </p>
cristy3ed852e2009-09-05 21:47:34 +00003219
cristy63fed272010-03-07 19:08:45 +00003220<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003221 <h4><a id="evaluate-sequence"></a>-evaluate-sequence <em class="arg">operator</em></h4>
cristy63fed272010-03-07 19:08:45 +00003222</div>
3223
cristy751980d2012-06-03 23:18:35 +00003224<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
3225logical 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
3228href="command-line-options.html#evaluate-sequence">-evaluate-sequence</a> operators, use <a
3229href="command-line-options.html#list">-list evaluate</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003230
3231<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003232 <h4><a id="extent"></a>-extent <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003233</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
cristy751980d2012-06-03 23:18:35 +00003237<p>If the image is enlarged, unfilled areas are set to the background color.
3238To position the image, use offsets in the <em class="arg">geometry</em>
3239specification or precede with a <a href="command-line-options.html#gravity">-gravity</a> setting. To
3240specify how to compose the image with the background, use <a href="command-line-options.html#compose"
3241>-compose</a>.</p>
3242
cristy549177c2010-11-11 13:51:21 +00003243<p>This command reduces or expands a JPEG image to fit on an 800x600
3244display. If the aspect ratio of the input image isn't exactly 4:3, then the
3245image is centered on an 800x600 black canvas: </p>
3246
cristyeed6cb62012-01-28 19:38:34 +00003247<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>
cristy549177c2010-11-11 13:51:21 +00003248
cristy3ed852e2009-09-05 21:47:34 +00003249
cristy751980d2012-06-03 23:18:35 +00003250<p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
cristy3ed852e2009-09-05 21:47:34 +00003251
3252<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003253 <h4><a id="extract"></a>-extract <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003254</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
cristy751980d2012-06-03 23:18:35 +00003258<p>This option is most useful for extracting a subregion of a very large raw
3259image. Note that these two commands are equivalent:</p>
cristy3ed852e2009-09-05 21:47:34 +00003260
cristyeed6cb62012-01-28 19:38:34 +00003261<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>
cristy3ed852e2009-09-05 21:47:34 +00003262
cristyeed6cb62012-01-28 19:38:34 +00003263<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert -size 16000x16000 -depth 8 -extract 640x480 \ <br/> image.rgb image.png</span></p>
cristyd0bd44a2010-09-24 12:38:11 +00003264<p>the image is <em>resized</em> to the specified dimensions instead,
cristy3ed852e2009-09-05 21:47:34 +00003265equivalent to:</p>
3266
cristyeed6cb62012-01-28 19:38:34 +00003267<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert -size 16000x16000 -depth 8 -resize 640x480 image.rgb image.png</span></p>
cristy751980d2012-06-03 23:18:35 +00003268<p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
cristy3ed852e2009-09-05 21:47:34 +00003269
3270<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003271 <h4><a id="family"></a>-family <em class="arg">fontFamily</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003272</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
cristy751980d2012-06-03 23:18:35 +00003276<p>This setting suggests a font family that ImageMagick should try to use for
3277rendering 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>
cristy3ed852e2009-09-05 21:47:34 +00003280
cristy751980d2012-06-03 23:18:35 +00003281<p>For other settings that affect fonts, see the options <a
3282href="command-line-options.html#font">-font</a>, <a href="command-line-options.html#stretch">-stretch</a>, <a
3283href="command-line-options.html#style">-style</a>, and <a href="command-line-options.html#weight">-weight</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00003284
3285<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003286 <h4><a id="features"></a>-features <em class="arg">distance</em></h4>
cristy7396d882010-01-27 02:37:56 +00003287</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;">
cristydcca3fa2010-12-29 21:50:07 +00003292 <h4><a id="fft"></a>-fft</h4>
cristy3ed852e2009-09-05 21:47:34 +00003293</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
cristy751980d2012-06-03 23:18:35 +00003297<p>This option is new as of ImageMagick 6.5.4-3 (and now working for Windows
3298users 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
3300represented as a superposition of complex sinusoidal waves of varying
3301amplitudes. The image x and y coordinates are the possible frequencies along
3302the x and y directions, respectively, and the pixel intensity values are
3303complex numbers that correspond to the sinusoidal wave amplitudes. See for
3304example, <a href="http://en.wikipedia.org/wiki/Fourier_transform">Fourier
3305Transform</a>, <a href="http://en.wikipedia.org/wiki/DFT">Discrete Fourier
3306Transform</a> and <a href="http://en.wikipedia.org/wiki/FFT">Fast Fourier
3307Transform</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003308
cristy751980d2012-06-03 23:18:35 +00003309<p>A single image name is provided as output for this option. However, the
3310output result will have two components. It is either a two-frame image or two
3311separate images, depending upon whether the image format specified supports
3312multi-frame images. The reason that we get a dual output result is because the
3313frequency domain represents an image using complex numbers, which cannot be
3314visualized directly. Therefore, the complex values are automagically separated
3315into a two-component image representation. The first component is the
3316magnitude of the complex number and the second is the phase of the complex
3317number. See for example, <a
3318href="http://en.wikipedia.org/wiki/Complex_numbers">Complex Numbers</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003319
cristy751980d2012-06-03 23:18:35 +00003320<p>The magnitude and phase component images must be specified using image
3321formats that do not limit the color or compress the image. Thus, MIFF, TIF,
3322PFM, EXR and PNG are the recommended image formats to use. All of these
3323formats, except PNG support multi-frame images. So for example,</p>
cristy3ed852e2009-09-05 21:47:34 +00003324
cristyeed6cb62012-01-28 19:38:34 +00003325<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert image.png -fft fft_image.miff</span></p>
cristy751980d2012-06-03 23:18:35 +00003326<p>generates a magnitude image as <kbd>fft_image.miff[0]</kbd> and a phase
3327image as <kbd>fft_image.miff[1]</kbd>. Similarly,</p>
cristy3ed852e2009-09-05 21:47:34 +00003328
cristyeed6cb62012-01-28 19:38:34 +00003329<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert image.png -fft fft_image.png</span></p>
cristy751980d2012-06-03 23:18:35 +00003330<p>generates a magnitude image as <kbd>fft_image-0.png</kbd> and a phase image
3331as <kbd>fft_image-1.png</kbd>. If you prefer this representation, then you can
3332force any of the other formats to produce two output images by including <a
3333href="command-line-options.html#adjoin">+adjoin</a> following -fft in the command line.</p>
cristy3ed852e2009-09-05 21:47:34 +00003334
cristy751980d2012-06-03 23:18:35 +00003335<p>The input image can be any size, but if not square and even-dimensioned, it
3336is padded automagically to the larger of the width or height of the input
3337image and to an even number of pixels. The padding will occur at the bottom
3338and/or right sides of the input image. The resulting output magnitude and
3339phase images is square at this size. The kind of padding relies on the <a
3340href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting.</p>
cristy3ed852e2009-09-05 21:47:34 +00003341
cristy751980d2012-06-03 23:18:35 +00003342<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.
3344Phase values nominally range from 0 to 2*&pi;, but is scaled to span the full
3345dynamic range. (The first few releases had non-HDRI scaled but HDRI not
3346scaled). The magnitude image is not scaled and thus generally will contain
3347very small values. As such, the image normally will appear totally black. In
3348order to view any detail, the magnitude image typically is enhanced with a log
3349function into what is usually called the spectrum. A log function is used to
3350enhance the darker values more in comparison to the lighter values. This can
3351be done, for example, as follows:</p>
cristy3ed852e2009-09-05 21:47:34 +00003352
cristyeed6cb62012-01-28 19:38:34 +00003353<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert fft_image.miff[0] -contrast-stretch 0 \ <br />
cristy3ed852e2009-09-05 21:47:34 +00003354 -evaluate log 1000 fft_image_spectrum.png</span></p>
cristy751980d2012-06-03 23:18:35 +00003355<p>where either <a href="command-line-options.html#contrast-stretch">-contrast-stretch</a> 0 or <a
3356href="command-line-options.html#auto-level">-auto-level</a> is used to scale the image to full dynamic
3357range, first. The argument to the <a href="command-line-options.html#evaluate">-evaluate</a> log
3358typically is specified between 100 and 10,000, depending upon the amount of
3359detail that one wants to bring out in the spectrum. Larger values produce more
3360visible detail. Too much detail, however, may hide the important features.</p>
cristy3ed852e2009-09-05 21:47:34 +00003361
cristy751980d2012-06-03 23:18:35 +00003362<p>The <a href="http://www.fftw.org/">FFTW</a> delegate library is required to
3363use <a href="command-line-options.html#fft">-fft</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003364
cristy751980d2012-06-03 23:18:35 +00003365<p>Use <a href="command-line-options.html#fft">+fft</a> to produce two output images that are the real
3366and imaginary components of the complex valued Fourier transform.</p>
cristy3ed852e2009-09-05 21:47:34 +00003367
cristy751980d2012-06-03 23:18:35 +00003368<p>However, as the real and imaginary components can contain negative values,
3369this requires that IM be configured with HDRI enabled. In this case, you must
3370use either MIFF, TIF, PFM or MPC formats for the real and imaginary component
3371results, since they are formats that preserve both negative and fractional
3372values without clipping them or truncating the fractional part. With either
3373MIFF or TIF, one should add -define quantum:format=32, to allow those image
cristyeed6cb62012-01-28 19:38:34 +00003374types to work properly in HDRI mode without clipping.</p>
cristy3ed852e2009-09-05 21:47:34 +00003375
cristy751980d2012-06-03 23:18:35 +00003376<p>The real and imaginary component images resulting from <a
3377href="command-line-options.html#fft">+fft</a> are also square, even dimensioned images due to the same
3378padding that was discussed above for the magnitude and phase component
3379images.</p>
cristy3ed852e2009-09-05 21:47:34 +00003380
cristy751980d2012-06-03 23:18:35 +00003381<p>See the discussion on HDRI implementations of ImageMagick on the page <a
3382href="high-dynamic-range.html" >High Dynamic-Range Images</a>. For more
3383about HDRI go the ImageMagick <a
3384href="http://www.imagemagick.org/Usage/basics/#hdri" >Usage</a> pages, <a
3385href="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>
cristy3ed852e2009-09-05 21:47:34 +00003389
3390
3391<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003392 <h4><a id="fill"></a>-fill <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003393</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
cristy751980d2012-06-03 23:18:35 +00003397<p>This option accepts a color name, a hex color, or a numerical RGB, RGBA,
3398HSL, HSLA, CMYK, or CMYKA specification. See <a href="color.html" >Color Names</a> for
3399a description of how to properly specify the color argument.</p>
cristy3ed852e2009-09-05 21:47:34 +00003400
cristy751980d2012-06-03 23:18:35 +00003401<p>Enclose the color specification in quotation marks to prevent the "#" or
3402the parentheses from being interpreted by your shell.</p>
cristy3ed852e2009-09-05 21:47:34 +00003403
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
cristy751980d2012-06-03 23:18:35 +00003416<p>See <a href="command-line-options.html#draw">-draw</a> for further details.</p>
cristy3ed852e2009-09-05 21:47:34 +00003417
cristy751980d2012-06-03 23:18:35 +00003418<p>To print a complete list of color names, use the <a href="command-line-options.html#list">-list color</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00003419
3420<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003421 <h4><a id="filter"></a>-filter <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003422</div>
3423
cristyd0bda5e2010-09-21 16:22:45 +00003424<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
3425distorting an image.</td><td style='text-align:right;'></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00003426
cristyd0bda5e2010-09-21 16:22:45 +00003427<p>Use this option to affect the resizing operation of an image during
cristy751980d2012-06-03 23:18:35 +00003428operations such as <a href="command-line-options.html#resize">-resize</a> and <a href="command-line-options.html#distort"
cristyd0bda5e2010-09-21 16:22:45 +00003429>-distort</a>. For example you can use a simple resize filter such as:</p>
cristy3ed852e2009-09-05 21:47:34 +00003430
3431<pre class="text">
3432 Point Hermite Cubic
3433 Box Gaussian Catrom
3434 Triangle Quadratic Mitchell
3435</pre>
3436
cristyd0bda5e2010-09-21 16:22:45 +00003437<p>The <kbd>Bessel</kbd> and <kbd>Sinc</kbd> filter is also provided (as well
cristyd0bd44a2010-09-24 12:38:11 +00003438as a faster <kbd>SincFast</kbd> equivalent form). However these filters are
3439generally useless on their own as they are infinite filters that are being
3440clipped to the filters support size. Their direct use is not recommended
3441except via expert settings (see below). </p>
cristyd0bda5e2010-09-21 16:22:45 +00003442
cristydcca3fa2010-12-29 21:50:07 +00003443<p>Instead these special filter functions are typically windowed by a windowing
cristy751980d2012-06-03 23:18:35 +00003444function that the <a href="command-line-options.html#filter" >-filter</a> setting defines. That is
cristyd0bda5e2010-09-21 16:22:45 +00003445using these functions will define a 'Windowed' filter, appropriate to the
3446operator involved. Windowed filters include: </p>
cristy3ed852e2009-09-05 21:47:34 +00003447
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
3456on the current 'support' or 'lobes' expert settings (see below).</p>
3457
cristyd0bda5e2010-09-21 16:22:45 +00003458<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
3460if the image is enlarged. Otherwise the filter default to
3461<kbd>Lanczos</kbd>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003462
cristy751980d2012-06-03 23:18:35 +00003463<p>To print a complete list of resize filters, use the <a href="command-line-options.html#list">-list
cristyd0bda5e2010-09-21 16:22:45 +00003464filter</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00003465
3466<p>You can modify how the filter behaves as it scales your image through the
cristy751980d2012-06-03 23:18:35 +00003467use of these expert settings (see also <a href="command-line-options.html#define" >-define</a> and <a
3468href="command-line-options.html#set" >-set</a>):-</p>
cristy3ed852e2009-09-05 21:47:34 +00003469
3470<dl class="doc">
cristyd0bda5e2010-09-21 16:22:45 +00003471<dt>-define filter:blur=<em>factor</em></dt>
cristy3ed852e2009-09-05 21:47:34 +00003472<dd>Scale the X axis of the filter (and its window). Use &gt; 1.0 for
cristyd0bda5e2010-09-21 16:22:45 +00003473 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>
cristy3ed852e2009-09-05 21:47:34 +00003476
cristyd0bda5e2010-09-21 16:22:45 +00003477<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>
cristy3ed852e2009-09-05 21:47:34 +00003485
cristyd0bda5e2010-09-21 16:22:45 +00003486<dt>-define filter:lobes=<em>count</em></dt>
cristy3ed852e2009-09-05 21:47:34 +00003487<dd>Set the number of lobes to use for the Sinc/Bessel filter. This an
cristyd0bda5e2010-09-21 16:22:45 +00003488 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>
cristy3ed852e2009-09-05 21:47:34 +00003491
cristy751980d2012-06-03 23:18:35 +00003492<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
cristyd0bda5e2010-09-21 16:22:45 +00003500<dt>-define filter:b=<em>b-spline_factor</em></dt>
3501<dt>-define filter:c=<em>keys_alpha_factor</em></dt>
cristy3ed852e2009-09-05 21:47:34 +00003502<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
cristy751980d2012-06-03 23:18:35 +00003504 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
cristydcca3fa2010-12-29 21:50:07 +00003507 Mitchell-Netravali.</dd>
cristy3ed852e2009-09-05 21:47:34 +00003508
cristy751980d2012-06-03 23:18:35 +00003509<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
cristyd0bda5e2010-09-21 16:22:45 +00003524<dt>-define filter:filter=<em>filter_function</em></dt>
cristy751980d2012-06-03 23:18:35 +00003525<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>
cristy3ed852e2009-09-05 21:47:34 +00003533
cristyd0bda5e2010-09-21 16:22:45 +00003534<dt>-define filter:window=<em>filter_function</em></dt>
cristy751980d2012-06-03 23:18:35 +00003535<dd>The IIR (infinite impulse response) filters <kbd>Sinc</kbd> and
3536 <kbd>Jinc</kbd> are windowed (brought down to zero over the defined
cristyd0bda5e2010-09-21 16:22:45 +00003537 support range) with the given filter. This allows you to specify a filter
cristy751980d2012-06-03 23:18:35 +00003538 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>
cristyd0bda5e2010-09-21 16:22:45 +00003543
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>
cristy3ed852e2009-09-05 21:47:34 +00003555
3556</dl>
3557
cristyd0bda5e2010-09-21 16:22:45 +00003558<p>For example, to get a 8 lobe Bessel windowed Bessel filter:</p>
cristy3ed852e2009-09-05 21:47:34 +00003559
cristy751980d2012-06-03 23:18:35 +00003560<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/>
cristy3ed852e2009-09-05 21:47:34 +00003562 -resize 150% image.jpg</span></p>
3563<p>Or a raw un-windowed Sinc filter with 4 lobes:</p>
3564
cristy751980d2012-06-03 23:18:35 +00003565<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert image.png -set filter:filter=sinc -set filter:lobes=4 \<br/>
cristy3ed852e2009-09-05 21:47:34 +00003566 -resize 150% image.jpg</span></p>
cristy751980d2012-06-03 23:18:35 +00003567<p>To extract the data for a raw windowing function, combine it with
3568a '<kbd>Box</kbd>' filter. For example the '<kbd>Welsh</kbd> parabolic
3569windowing 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
3580who have studied and understand how resize filters work. Without this
3581knowledge, and an understanding of the definition of the actual filters
3582involved, using expert settings are more likely to be detrimental to your image
3583resizing.</p>
cristy3ed852e2009-09-05 21:47:34 +00003584
3585
3586<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003587 <h4><a id="flatten"></a>-flatten</h4>
cristy3ed852e2009-09-05 21:47:34 +00003588</div>
3589
cristy751980d2012-06-03 23:18:35 +00003590<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>
cristy3ed852e2009-09-05 21:47:34 +00003591
3592
3593<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003594 <h4><a id="flip"></a>-flip</h4>
cristy3ed852e2009-09-05 21:47:34 +00003595</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
cristy2dcd6822011-06-13 16:21:20 +00003599<p>reflect the scanlines in the vertical direction. The image will be mirrored
3600upside-down. </p>
3601
cristy3ed852e2009-09-05 21:47:34 +00003602
3603<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003604 <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>
cristy3ed852e2009-09-05 21:47:34 +00003605</div>
3606
cristy2dcd6822011-06-13 16:21:20 +00003607<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.
cristy751980d2012-06-03 23:18:35 +00003610Any color that matches within <a href="command-line-options.html#fuzz" >-fuzz</a> color distance of the
cristy2dcd6822011-06-13 16:21:20 +00003611given <em class="arg">color</em> argument, connected to that 'seed point'
cristy751980d2012-06-03 23:18:35 +00003612will be replaced with the current <a href="command-line-options.html#fill" >-fill</a> color. </p>
cristy2dcd6822011-06-13 16:21:20 +00003613
3614<p>Note that if the pixel at the 'seed point' does not itself match the given
cristy751980d2012-06-03 23:18:35 +00003615<em class="arg">color</em> (according to <a href="command-line-options.html#fuzz" >-fuzz</a>), then no
cristy2dcd6822011-06-13 16:21:20 +00003616action will be taken. </p>
3617
cristy751980d2012-06-03 23:18:35 +00003618<p>This operator works more like the <a href="command-line-options.html#opaque" >-opaque</A> option, than
3619a more general flood fill that reads the matching color directly at the 'seed
3620point'. For this form of flood fill, look at <a href="command-line-options.html#draw" >-draw</a> and
3621its 'color floodfill' drawing method. </p>
cristy2dcd6822011-06-13 16:21:20 +00003622
cristy3ed852e2009-09-05 21:47:34 +00003623
3624<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003625 <h4><a id="flop"></a>-flop</h4>
cristy3ed852e2009-09-05 21:47:34 +00003626</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
cristy2dcd6822011-06-13 16:21:20 +00003630<p>Reflect the scanlines in the horizontal direction, just like the image in
3631a vertical mirror. </p>
cristy3ed852e2009-09-05 21:47:34 +00003632
3633
3634<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003635 <h4><a id="font"></a>-font <em class="arg">name</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003636</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
cristy751980d2012-06-03 23:18:35 +00003640<p>To print a complete list of fonts, use the <a href="command-line-options.html#list">-list font</a>
3641option (for versions prior to 6.3.6, use 'type' instead of 'font').</p>
cristy3ed852e2009-09-05 21:47:34 +00003642
3643<p>In addition to the fonts specified by the above pre-defined list, you can
3644also specify a font from a specific source. For example <kbd>Arial.ttf</kbd>
3645is a TrueType font file, <kbd>ps:helvetica</kbd> is PostScript font, and
3646<kbd>x:fixed</kbd> is X11 font.</p>
3647
cristy751980d2012-06-03 23:18:35 +00003648<p>For other settings that affect fonts, see the options <a
3649href="command-line-options.html#family">-family</a>, <a href="command-line-options.html#stretch">-stretch</a>, <a
3650href="command-line-options.html#style">-style</a>, and <a href="command-line-options.html#weight">-weight</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00003651
3652
3653<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003654 <h4><a id="foreground"></a>-foreground <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003655</div>
3656
cristy751980d2012-06-03 23:18:35 +00003657<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>
cristy3ed852e2009-09-05 21:47:34 +00003658
cristy751980d2012-06-03 23:18:35 +00003659<p>The color is specified using the format described under the <a
3660href="command-line-options.html#fill">-fill</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00003661
3662<p>The default foreground color is black.</p>
3663
3664<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003665 <h4><a id="format"></a>-format <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003666</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
cristy751980d2012-06-03 23:18:35 +00003670<p>When used with the <kbd>mogrify</kbd> utility, this option converts any
3671image to the image <a href="formats.html">format</a> you specify.
3672For a list of image format types supported by ImageMagick, use <a
3673href="command-line-options.html#list">-list format</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003674
cristy751980d2012-06-03 23:18:35 +00003675<p>By default the file is written to its original name. However, if the
3676filename extension matches a supported format, the extension is replaced with
3677the image format type specified with <a href="command-line-options.html#format">-format</a>. For
3678example, if you specify <em class="arg">tiff</em> as the format type and the
3679input image filename is <em class="arg">image.gif</em>, the output image
3680filename becomes <em class="arg">image.tiff</em>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003681
3682<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003683 <h4><a id="format_identify_"></a>-format <em class="arg">string</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003684</div>
3685
cristy751980d2012-06-03 23:18:35 +00003686<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>
cristy3ed852e2009-09-05 21:47:34 +00003687
cristy751980d2012-06-03 23:18:35 +00003688<p>See <a href="escape.html">Format and Print Image
3689Properties</a> for an explanation on how to specify the argument to this
3690option.</p>
cristy3ed852e2009-09-05 21:47:34 +00003691
3692<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003693 <h4><a id="frame"></a>-frame <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003694</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
cristy751980d2012-06-03 23:18:35 +00003698<p>The color of the border is specified with the <a href="command-line-options.html#mattecolor"
cristybc9539a2010-08-16 18:06:20 +00003699>-mattecolor</a> command line option. </p>
cristy3ed852e2009-09-05 21:47:34 +00003700
cristy751980d2012-06-03 23:18:35 +00003701<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
cristybc9539a2010-08-16 18:06:20 +00003702class="arg">geometry</em> argument indicates the amount of extra width and
3703height that is added to the dimensions of the image. If no offsets are given
3704in the <em class="arg">geometry</em> argument, then the border added is
3705a solid color. Offsets <em>x</em> and <em>y</em>, if present, specify that
3706the width and height of the border is partitioned to form an outer bevel of
3707thickness <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
cristy751980d2012-06-03 23:18:35 +00003711<p>The <a href="command-line-options.html#frame">-frame</a> option is affected by the current <a
3712href="command-line-options.html#compose">-compose</a> setting and assumes that this is using the default
cristyd0bda5e2010-09-21 16:22:45 +00003713'<kbd>Over</kbd>' composition method. It generates a image of the appropriate
cristy751980d2012-06-03 23:18:35 +00003714size with the current <a href="command-line-options.html#bordercolor">-bordercolor</a> setting, and then
cristybc9539a2010-08-16 18:06:20 +00003715draws the frame of four distinct colors close to the current <a
cristy751980d2012-06-03 23:18:35 +00003716href="command-line-options.html#mattecolor">-mattecolor</a>. The original image is then overlaid onto
cristybc9539a2010-08-16 18:06:20 +00003717center 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
cristy751980d2012-06-03 23:18:35 +00003719href="command-line-options.html#bordercolor">-bordercolor</a> setting.</p>
cristybc9539a2010-08-16 18:06:20 +00003720
3721<p>The image composition is not
cristy751980d2012-06-03 23:18:35 +00003722affected by the <a href="command-line-options.html#gravity">-gravity</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00003723
3724
3725<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003726 <h4><a id="frame_import_"></a>-frame</h4>
cristy3ed852e2009-09-05 21:47:34 +00003727</div>
3728
cristy751980d2012-06-03 23:18:35 +00003729<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>
cristy3ed852e2009-09-05 21:47:34 +00003730
3731<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003732 <h4><a id="function"></a>-function <em class="arg">function</em> <em class="arg">parameters</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003733</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
cristy751980d2012-06-03 23:18:35 +00003737<p>This operator performs calculations based on the given arguments to modify
3738each of the color values for each previously set <a
3739href="command-line-options.html#channel">-channel</a> in the image. See <a
3740href="command-line-options.html#evaluate">-evaluate</a> for details concerning how the results of the
3741calculations are handled.</p>
cristy3ed852e2009-09-05 21:47:34 +00003742
cristy751980d2012-06-03 23:18:35 +00003743<p>This is can be considered a multi-argument version of the <a
3744href="command-line-options.html#evaluate">-evaluate</a> operator. (Added in
3745ImageMagick&nbsp;6.4.8&minus;8.)</p>
cristy3ed852e2009-09-05 21:47:34 +00003746
cristy751980d2012-06-03 23:18:35 +00003747<p>Here, <em class="arg">parameters</em> is a comma-separated list of
3748numerical values. The number of values varies depending on which <em
3749class="arg">function</em> is selected. Choose the <em
3750class="arg">function</em> from:</p>
cristy3ed852e2009-09-05 21:47:34 +00003751
3752<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00003753 Polynomial
3754 Sinusoid
3755 Arcsin
3756 Arctan
cristy3ed852e2009-09-05 21:47:34 +00003757</pre>
3758
cristy751980d2012-06-03 23:18:35 +00003759<p>To print a complete list of <a href="command-line-options.html#function">-function</a> operators,
3760use <a href="command-line-options.html#list">-list function</a>. Descriptions follow.</p>
cristy3ed852e2009-09-05 21:47:34 +00003761
3762<dl class="doc">
3763<dt><kbd>Polynomial</kbd></dt>
3764<dd>
cristy751980d2012-06-03 23:18:35 +00003765
3766<p>The <kbd>Polynomial</kbd> function takes an arbitrary number of parameters,
3767these being the coefficients of a polynomial, in decreasing order of degree.
3768That is, entering</p>
cristy3ed852e2009-09-05 21:47:34 +00003769
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
cristy751980d2012-06-03 23:18:35 +00003784<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>
3787polynomials) of the <a href="command-line-options.html#evaluate">-evaluate</a> operator. The <a
3788href="command-line-options.html#level">-level</a> operator also affects channels linearly. Some
3789correspondences follow.</p>
cristy3ed852e2009-09-05 21:47:34 +00003790
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
cristy751980d2012-06-03 23:18:35 +00003819<p>The <kbd>Polynomial</kbd> function gives great versatility, since
3820polynomials can be used to fit any continuous curve to any degree of accuracy
3821desired.</p>
3822
cristy3ed852e2009-09-05 21:47:34 +00003823</dd>
3824
3825<dt><kbd>Sinusoid</kbd></dt>
3826<dd>
cristy751980d2012-06-03 23:18:35 +00003827<p>The <kbd>Sinusoid</kbd> function can be used to vary the channel values
3828sinusoidally by setting frequency, phase shift, amplitude, and a bias. These
3829values are given as one to four parameters, as follows,</p>
cristy3ed852e2009-09-05 21:47:34 +00003830
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
cristy751980d2012-06-03 23:18:35 +00003835<p>where <em>phase</em> is in degrees. (The domain [0,1] of the function
3836corresponds to 0 through <em class="arg">freq</em>&times;360&nbsp;degrees.)
3837The 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>
cristy3ed852e2009-09-05 21:47:34 +00003839
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
cristy751980d2012-06-03 23:18:35 +00003844<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>
cristy3ed852e2009-09-05 21:47:34 +00003847
3848<p class="crtsnip">
3849 -function Sinusoid 3,-90,.2,.7
3850</p>
3851
cristy751980d2012-06-03 23:18:35 +00003852<p>The default values of <em class="arg">amp</em> and <em
3853class="arg">bias</em> are both .5. The default for <em class="arg">phase</em>
3854is 0.</p>
cristy3ed852e2009-09-05 21:47:34 +00003855
cristy751980d2012-06-03 23:18:35 +00003856<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
3858varying amplitude, phase and bias. The correspondence is as follows.</p>
cristy3ed852e2009-09-05 21:47:34 +00003859
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,
3875and can be used to generate cylindrical distortion and displacement maps.
3876The curve can be adjusted relative to both the input values and output range
cristydcca3fa2010-12-29 21:50:07 +00003877of values.</p>
cristy3ed852e2009-09-05 21:47:34 +00003878
cristydcca3fa2010-12-29 21:50:07 +00003879<p style="text-align: center">
cristy3ed852e2009-09-05 21:47:34 +00003880 -function <kbd>ArcSin</kbd> <em class="arg">width</em>,[<em class="arg">center</em>,[<em class="arg">range</em>,[<em class="arg">bias</em>]]]
cristydcca3fa2010-12-29 21:50:07 +00003881</p>
cristy3ed852e2009-09-05 21:47:34 +00003882
cristyeed6cb62012-01-28 19:38:34 +00003883<p>with all values given in terms of normalized color values (0.0 for black,
cristy3ed852e2009-09-05 21:47:34 +000038841.0 for white). Defaulting to values covering the full range from 0.0 to 1.0
3885for bout input (<em class="arg">width</em>), and output (<em
3886class="arg">width</em>) values. '<code>1.0,0.5,1.0,0.5</code>' </p>
3887
cristydcca3fa2010-12-29 21:50:07 +00003888<p style="text-align: center">
cristy3ed852e2009-09-05 21:47:34 +00003889<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>
cristydcca3fa2010-12-29 21:50:07 +00003890</p>
cristy3ed852e2009-09-05 21:47:34 +00003891
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
3897limit values at infinities, though a center using the given slope value.
cristydcca3fa2010-12-29 21:50:07 +00003898All these values can be adjusted via the arguments.</p>
cristy3ed852e2009-09-05 21:47:34 +00003899
cristydcca3fa2010-12-29 21:50:07 +00003900<p style="text-align: center">
cristy3ed852e2009-09-05 21:47:34 +00003901 -function <kbd>ArcTan</kbd> <em class="arg">slope</em>,[<em class="arg">center</em>,[<em class="arg">range</em>,[<em class="arg">bias</em>]]]
cristydcca3fa2010-12-29 21:50:07 +00003902</p>
cristy3ed852e2009-09-05 21:47:34 +00003903
3904<p>Defaulting to '<code>1.0,0.5,1.0,0.5</code>'.
3905</p>
3906
cristydcca3fa2010-12-29 21:50:07 +00003907<p style="text-align: center">
cristy3ed852e2009-09-05 21:47:34 +00003908<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>
cristydcca3fa2010-12-29 21:50:07 +00003909</p>
cristy3ed852e2009-09-05 21:47:34 +00003910
3911</dd>
3912
3913</dl>
3914
3915
3916<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003917 <h4><a id="fuzz"></a>-fuzz <em class="arg">distance</em>{<em class="arg">%</em>}</h4>
cristy3ed852e2009-09-05 21:47:34 +00003918</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
cristy751980d2012-06-03 23:18:35 +00003922<p>A number of algorithms search for a target color. By default the color must
3923be exact. Use this option to match colors that are close to the target color
3924in RGB space. For example, if you want to automagically trim the edges of an
3925image with <a href="command-line-options.html#trim">-trim</a> but the image was scanned and the target
3926background color may differ by a small amount. This option can account for
3927these differences.</p>
cristy3ed852e2009-09-05 21:47:34 +00003928
cristy751980d2012-06-03 23:18:35 +00003929<p>The <em class="arg">distance</em> can be in absolute intensity units or, by
3930appending <kbd>%</kbd> as a percentage of the maximum possible intensity (255,
393165535, or 4294967295).</p>
cristy3ed852e2009-09-05 21:47:34 +00003932
3933
3934<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003935 <h4><a id="fx"></a>-fx <em class="arg">expression</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003936</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
cristy751980d2012-06-03 23:18:35 +00003940<p>If the first character of <em class="arg">expression</em> is <kbd>@</kbd>,
3941the expression is read from a file titled by the remaining characters in the
3942string.</p>
cristy3ed852e2009-09-05 21:47:34 +00003943
cristy751980d2012-06-03 23:18:35 +00003944<p>See <a href="fx.html">FX,
3945The Special Effects Image Operator</a> for a detailed discussion of this
3946option.</p>
cristy3ed852e2009-09-05 21:47:34 +00003947
3948
3949<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003950 <h4><a id="gamma"></a>-gamma <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003951</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
cristy751980d2012-06-03 23:18:35 +00003955<p>The same color image displayed on two different workstations may look
3956different due to differences in the display monitor. Use gamma correction to
3957adjust 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
3959gamma greater than 1.0 lightens it. Large adjustments to image gamma may
3960result in the loss of some image information if the pixel quantum size is only
3961eight bits (quantum range 0 to 255).</p>
cristy3ed852e2009-09-05 21:47:34 +00003962
cristy751980d2012-06-03 23:18:35 +00003963<p>Gamma adjusts the image's channel values pixel-by-pixel according to
3964a power law, namely, pow(pixel,1/gamma) or pixel^(1/gamma), where pixel is the
3965normalized or 0 to 1 color value. For example, using a value of gamma=2 is the
3966same as taking the square root of the image.</p>
cristy3ed852e2009-09-05 21:47:34 +00003967
cristy751980d2012-06-03 23:18:35 +00003968<p>You can apply separate gamma values to the red, green, and blue channels of
3969the image with a gamma value list delimited with commas (e.g.,
3970<kbd>1.7,2.3,1.2</kbd>).</p>
cristy3ed852e2009-09-05 21:47:34 +00003971
cristy751980d2012-06-03 23:18:35 +00003972<p>Use <a href="command-line-options.html#gamma">+gamma <em class="arg">value</em></a> to set the
cristyeed6cb62012-01-28 19:38:34 +00003973image gamma level without actually adjusting the image pixels. This option
3974is 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
3976display gamma; e.g., if your image is sRGB and you want to write a PNG gAMA
3977chunk, 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>
cristy3ed852e2009-09-05 21:47:34 +00003979
cristy751980d2012-06-03 23:18:35 +00003980<p>Note that gamma adjustments are also available via the <a href="command-line-options.html#level">-level</a> operator.</p>
cristy3ed852e2009-09-05 21:47:34 +00003981
3982<div style="margin: auto;">
cristyeed6cb62012-01-28 19:38:34 +00003983 <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>
cristy3ed852e2009-09-05 21:47:34 +00003984</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
cristyb15553d2010-07-03 22:53:14 +00003988<p>Convolve the image with a Gaussian or normal distribution using the given
3989<em class="arg" >Sigma</em> value. The formula is:</p>
cristy3ed852e2009-09-05 21:47:34 +00003990
3991<div class="eqn"><img alt="gaussian distribution" width="243px" height="42px" src="../images/gaussian-blur.png"/>
3992</div>
3993
cristyb15553d2010-07-03 22:53:14 +00003994<p>The <em class="arg" >Sigma</em> value is the important argument, and
cristyefb2bdb2010-11-20 19:35:22 +00003995determines the actual amount of blurring that will take place. </p>
cristyb15553d2010-07-03 22:53:14 +00003996
3997<p>The <em class="arg" >Radius</em> is only used to determine the size of the
cristyefb2bdb2010-11-20 19:35:22 +00003998array which will hold the calculated Gaussian distribution. It should be an
cristyd0bda5e2010-09-21 16:22:45 +00003999integer. If not given, or set to zero, IM will calculate the largest possible
cristyb15553d2010-07-03 22:53:14 +00004000radius 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
4004operation is. However too small a <em class="arg" >Radius</em>, and sever
4005aliasing effects may result. As a guideline, <em class="arg" >Radius</em>
4006should be at least twice the <em class="arg" >Sigma</em> value, though three
cristyeed6cb62012-01-28 19:38:34 +00004007times will produce a more accurate result. </p>
cristy3ed852e2009-09-05 21:47:34 +00004008
cristy751980d2012-06-03 23:18:35 +00004009<p>This differs from the faster <a href="command-line-options.html#blur">-blur</a> operator in that a
cristyd0bda5e2010-09-21 16:22:45 +00004010full 2-dimensional convolution is used to generate the weighted average of the
4011neighboring pixels. </p>
cristy3ed852e2009-09-05 21:47:34 +00004012
cristy751980d2012-06-03 23:18:35 +00004013<p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
cristy3ed852e2009-09-05 21:47:34 +00004014pixels which are outside the image proper are blurred into the final result.
4015</p>
4016
4017
4018<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004019 <h4><a id="geometry"></a>-geometry <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004020</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
cristy751980d2012-06-03 23:18:35 +00004024<p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
cristy3ed852e2009-09-05 21:47:34 +00004025
4026<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004027 <h4><a id="gravity"></a>-gravity <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004028</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
cristy751980d2012-06-03 23:18:35 +00004032<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
4035href="command-line-options.html#list">-list gravity</a> to get a complete list of <a
4036href="command-line-options.html#gravity">-gravity</a> settings available in your ImageMagick
cristy3ed852e2009-09-05 21:47:34 +00004037installation.</p>
4038
cristy751980d2012-06-03 23:18:35 +00004039<p>The direction you choose specifies where to position text or subimages. For
4040example, a gravity of <kbd>Center</kbd> forces the text to be centered within
4041the image. By default, the image gravity is <kbd>NorthWest</kbd>. See <a
4042href="command-line-options.html#draw">-draw</a> for more details about graphic primitives. Only the
4043text primitive of <a href="command-line-options.html#draw">-draw</a> is affected by the <a
4044href="command-line-options.html#gravity">-gravity</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00004045
cristy751980d2012-06-03 23:18:35 +00004046<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
4048take <em class="arg">geometry</em> as an argument, such as the <a
4049href="command-line-options.html#crop">-crop</a> option. </p>
cristy3ed852e2009-09-05 21:47:34 +00004050
cristy751980d2012-06-03 23:18:35 +00004051<p>If a <a href="command-line-options.html#gravity">-gravity</a> setting occurs before another option
4052or setting having a <em class="arg">geometry</em> argument that specifies an
4053offset, the offset is usually applied to the point within the image suggested
4054by the <a href="command-line-options.html#gravity">-gravity</a> argument. Thus, in the following
4055command, for example, suppose the file <kbd>image.png</kbd> has dimensions
4056200x100. The offset specified by the argument to <a href="command-line-options.html#region">-region</a>
4057is (&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
4061that point. (In addition, the <a href="command-line-options.html#gravity">-gravity</a> affects the
4062region itself, which is <em>centered</em> at the pixel
4063coordinate&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>
cristy3ed852e2009-09-05 21:47:34 +00004064
cristyeed6cb62012-01-28 19:38:34 +00004065<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>
cristy751980d2012-06-03 23:18:35 +00004066<p>When used as an option to <a href="composite.html">composite</a>, <a
4067href="command-line-options.html#gravity">-gravity</a> gives the direction that the image gravitates
4068within the composite.</p>
cristy3ed852e2009-09-05 21:47:34 +00004069
cristy751980d2012-06-03 23:18:35 +00004070<p>When used as an option to <a href="montage.html">montage</a>, <a
4071href="command-line-options.html#gravity">-gravity</a> gives the direction that an image gravitates
4072within a tile. The default gravity is <kbd>Center</kbd> for this purpose.</p>
cristy3ed852e2009-09-05 21:47:34 +00004073
4074
4075<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004076 <h4><a id="green-primary"></a>-green-primary <em class="arg">x,y</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004077</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;">
cristydcca3fa2010-12-29 21:50:07 +00004083 <h4><a id="hald-clut"></a>-hald-clut</h4>
cristy3ed852e2009-09-05 21:47:34 +00004084</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
4089dimensions. Create it with the <kbd>HALD:</kbd> prefix (e.g. HALD:8). You
4090can apply any color transformation to the Hald image and then use this option
4091to apply the transform to the image. </p>
4092
cristyeed6cb62012-01-28 19:38:34 +00004093<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert image.png hald.png -hald-clut transform.png</span></p>
cristy3ed852e2009-09-05 21:47:34 +00004094<p>This option provides a convenient method for you to use Gimp or Photoshop
4095to make color corrections to the Hald CLUT image and subsequently apply them
4096to multiple images using an ImageMagick script. </p>
4097
4098<p>Note that the representation is only of the normal RGB color space and that
4099the whole color value triplet is used for the interpolated lookup of the
4100represented Hald color cube image. Because of this the operation is not <a
cristy751980d2012-06-03 23:18:35 +00004101href="command-line-options.html#channel" >-channel</a> setting effected, nor can it adjust or modify an
cristy3ed852e2009-09-05 21:47:34 +00004102images transparency or alpha/matte channel.</p>
4103
cristy751980d2012-06-03 23:18:35 +00004104<p>See also <a href="command-line-options.html#clut" >-clut</a> which provides color value replacement
cristyeed6cb62012-01-28 19:38:34 +00004105of the individual color channels, usually involving a simpler gray-scale
cristy3ed852e2009-09-05 21:47:34 +00004106image. E.g: gray-scale to color replacement, or modification by a histogram
4107mapping. </p>
4108
4109
4110<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004111 <h4><a id="help"></a>-help</h4>
cristy3ed852e2009-09-05 21:47:34 +00004112</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;">
cristydcca3fa2010-12-29 21:50:07 +00004117 <h4><a id="highlight-color"></a>-highlight-color <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004118</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;">
cristydcca3fa2010-12-29 21:50:07 +00004123 <h4><a id="iconGeometry"></a>-iconGeometry <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004124</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
cristy751980d2012-06-03 23:18:35 +00004128<p>Offsets, if present in the geometry specification, are handled in the same
4129manner as the <a href="command-line-options.html#geometry">-geometry</a> option, using X11 style to
4130handle negative offsets.</p>
cristy3ed852e2009-09-05 21:47:34 +00004131
cristy751980d2012-06-03 23:18:35 +00004132<p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
cristy3ed852e2009-09-05 21:47:34 +00004133
4134<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004135 <h4><a id="iconic"></a>-iconic</h4>
cristy3ed852e2009-09-05 21:47:34 +00004136</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;">
cristydcca3fa2010-12-29 21:50:07 +00004141 <h4><a id="identify"></a>-identify</h4>
cristy3ed852e2009-09-05 21:47:34 +00004142</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
cristy751980d2012-06-03 23:18:35 +00004146<p>This information is printed: image scene number; image name; image size;
4147the image class (<em class="arg">DirectClass</em> or <em
4148class="arg">PseudoClass</em>); the total number of unique colors; and the
4149number of seconds to read and transform the image. Refer to <a href="miff.html">MIFF</a> for
4150a description of the image class.</p>
cristy3ed852e2009-09-05 21:47:34 +00004151
cristy751980d2012-06-03 23:18:35 +00004152<p>If <a href="command-line-options.html#colors">-colors</a> is also specified, the total unique colors
4153in the image and color reduction error values are printed. Refer to <a
4154href="quantize.html">color
4155reduction algorithm</a> for a description of these values.</p>
cristy3ed852e2009-09-05 21:47:34 +00004156
cristy751980d2012-06-03 23:18:35 +00004157<p>If <a href="command-line-options.html#verbose">-verbose</a> precedes this option, copious
cristy3ed852e2009-09-05 21:47:34 +00004158amounts of image properties are displayed including image statistics, profiles,
4159image histogram, and others.</p>
4160
4161<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004162 <h4><a id="ift"></a>-ift</h4>
cristy3ed852e2009-09-05 21:47:34 +00004163</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
cristy751980d2012-06-03 23:18:35 +00004167<p>This option is new as of ImageMagick 6.5.4-3 (and now working for Windows
4168users in ImageMagick 6.6.0-9). It transforms a pair of magnitude and phase
4169images from the frequency domain to a single image in the normal or spatial
4170domain. See for example, <a
4171href="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>
cristy3ed852e2009-09-05 21:47:34 +00004174
cristy751980d2012-06-03 23:18:35 +00004175<p>For example, depending upon the image format used to store the result of
4176the <a href="command-line-options.html#fft">-fft</a>, one would use either</p>
cristy3ed852e2009-09-05 21:47:34 +00004177
cristyeed6cb62012-01-28 19:38:34 +00004178<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert fft_image.miff -ift fft_image_ift.png</span></p>
cristy3ed852e2009-09-05 21:47:34 +00004179<p>or</p>
4180
cristyeed6cb62012-01-28 19:38:34 +00004181<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>
cristy3ed852e2009-09-05 21:47:34 +00004182
cristy751980d2012-06-03 23:18:35 +00004183<p>The resulting image may need to be cropped due to padding introduced when
4184the original image, prior to the <a href="command-line-options.html#fft">-fft</a> or <a
4185href="command-line-options.html#fft">+fft</a>, was not square or even dimensioned. Any padding is at
4186the right and/or bottom sides of the image.</p>
cristy3ed852e2009-09-05 21:47:34 +00004187
cristy751980d2012-06-03 23:18:35 +00004188<p>The <a href="http://www.fftw.org/">FFTW</a> delegate library is required to
4189use <a href="command-line-options.html#ift">-ift</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00004190
cristy751980d2012-06-03 23:18:35 +00004191<p>Use <a href="command-line-options.html#ift">+ift</a> (with HDRI enabled) to transform a pair of real
4192and imaginary images from the frequency domain to a single image in the normal
4193(spatial) domain.</p>
cristy3ed852e2009-09-05 21:47:34 +00004194
4195<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004196 <h4><a id="immutable"></a>-immutable</h4>
cristy3ed852e2009-09-05 21:47:34 +00004197</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;">
cristydcca3fa2010-12-29 21:50:07 +00004202 <h4><a id="implode"></a>-implode <em class="arg">factor</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004203</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;">
cristydcca3fa2010-12-29 21:50:07 +00004208 <h4><a id="insert"></a>-insert <em class="arg">index</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004209</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
cristy751980d2012-06-03 23:18:35 +00004213<p>This option takes last image in the current image sequence and inserts it
4214at the given index. If a negative index is used, the insert position is
4215calculated 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>
cristy3ed852e2009-09-05 21:47:34 +00004217
cristy751980d2012-06-03 23:18:35 +00004218<p>The <kbd>+insert</kbd> option is equivalent to <kbd>-insert -1</kbd>. In
4219other words, insert the last image, at the end of the current image sequence.
4220Consequently this has no effect on the image sequence order.</p>
cristy3ed852e2009-09-05 21:47:34 +00004221
4222<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004223 <h4><a id="intent"></a>-intent <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004224</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
cristy751980d2012-06-03 23:18:35 +00004228<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,
4230Perceptual, Relative, Saturation</kbd>.</p>
cristy3ed852e2009-09-05 21:47:34 +00004231
cristy751980d2012-06-03 23:18:35 +00004232<p>The default intent is Perceptual for the sRGB colorspace and undefined for the RGB and gray colorspaces.</p>
cristy3ed852e2009-09-05 21:47:34 +00004233
cristy751980d2012-06-03 23:18:35 +00004234<p>To print a complete list of rendering intents, use <a href="command-line-options.html#list">-list intent</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00004235
4236<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004237 <h4><a id="interlace"></a>-interlace <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004238</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">
cristye9a32c32011-04-07 01:11:05 +00004245 none
4246 line
4247 plane
4248 partition
4249 JPEG
4250 GIF
4251 PNG
cristy3ed852e2009-09-05 21:47:34 +00004252</pre>
4253
cristy751980d2012-06-03 23:18:35 +00004254<p>This option is used to specify the type of interlacing scheme for raw image
4255formats such as <kbd>RGB</kbd> or <kbd>YUV</kbd>.</p>
cristy3ed852e2009-09-05 21:47:34 +00004256
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
cristy751980d2012-06-03 23:18:35 +00004263<p><kbd>Partition</kbd> is like plane except the different planes are saved to
4264individual files (e.g. image.R, image.G, and image.B).</p>
cristy3ed852e2009-09-05 21:47:34 +00004265
cristy751980d2012-06-03 23:18:35 +00004266<p>Use <kbd>Line</kbd> or <kbd>Plane</kbd> to create an <kbd>interlaced
4267PNG</kbd> or <kbd>GIF</kbd> or <kbd>progressive JPEG</kbd> image.</p>
cristy3ed852e2009-09-05 21:47:34 +00004268
cristy751980d2012-06-03 23:18:35 +00004269<p>To print a complete list of interlacing schemes, use <a href="command-line-options.html#list">-list
4270interlace</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00004271
4272<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004273 <h4><a id="interpolate"></a>-interpolate <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004274</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
cristyd0bda5e2010-09-21 16:22:45 +00004278<p>When looking up the color of a pixel using a non-integer floating point
cristy3ed852e2009-09-05 21:47:34 +00004279value, you typically fall in between the pixel colors defined by the source
4280image. This setting determines how the color is determined from the colors of
4281the pixels surrounding that point. That is how to determine the color of a
4282point that falls between two, or even four different colored pixels. </p>
4283
4284<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00004285 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)
cristy751980d2012-06-03 23:18:35 +00004292 filter Use resize <a href="command-line-options.html#filter">-filter</a> settings
cristy3ed852e2009-09-05 21:47:34 +00004293</pre>
4294
cristy751980d2012-06-03 23:18:35 +00004295<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>
cristy3ed852e2009-09-05 21:47:34 +00004298
cristy751980d2012-06-03 23:18:35 +00004299<p>To print a complete list of interpolation methods, use <a href="command-line-options.html#list">-list interpolate</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00004300
cristy751980d2012-06-03 23:18:35 +00004301<p>See also <a href="command-line-options.html#virtual-pixel" >-virtual-pixel</a>, for control of the
cristy3ed852e2009-09-05 21:47:34 +00004302lookup for positions outside the boundaries of the image. </p>
4303
4304
4305<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004306 <h4><a id="interline-spacing"></a>-interline-spacing <em class="arg">value</em></h4>
cristyf3bb4782009-09-08 13:10:04 +00004307</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;">
cristydcca3fa2010-12-29 21:50:07 +00004312 <h4><a id="interword-spacing"></a>-interword-spacing <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004313</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;">
cristydcca3fa2010-12-29 21:50:07 +00004318 <h4><a id="kerning"></a>-kerning <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004319</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;">
cristydcca3fa2010-12-29 21:50:07 +00004324 <h4><a id="label"></a>-label <em class="arg">name</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004325</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
cristy71a3f602010-09-15 12:38:16 +00004329<p>Use this option to assign a specific label to the image, as it is read in
cristy751980d2012-06-03 23:18:35 +00004330or created. You can use the <a href="command-line-options.html#set" >-set</a> operation to re-assign
cristy71a3f602010-09-15 12:38:16 +00004331a the labels of images already read in. Image formats such as TIFF, PNG,
4332MIFF, supports saving the label information with the image.</p>
cristy3ed852e2009-09-05 21:47:34 +00004333
cristy71a3f602010-09-15 12:38:16 +00004334<p>When saving an image to a <em class="arg">PostScript</em> file, any label
4335assigned to an image is used as a header string to print above the postscript
4336image. </p>
cristy3ed852e2009-09-05 21:47:34 +00004337
cristybc9539a2010-08-16 18:06:20 +00004338<p>You can include the image filename, type, width, height, or other image
cristy751980d2012-06-03 23:18:35 +00004339attribute by embedding special format character. See <a href="escape.html">Format and Print Image
cristybc9539a2010-08-16 18:06:20 +00004340Properties</a> for details of the percent escape codes.</p>
cristy3ed852e2009-09-05 21:47:34 +00004341
4342<p>For example,</p>
4343
4344<p class="crtsnip">
4345 -label "%m:%f %wx%h" bird.miff
4346</p>
4347
cristy71a3f602010-09-15 12:38:16 +00004348<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
cristy751980d2012-06-03 23:18:35 +00004350is read in. If a <a href="command-line-options.html#label">+label</a> option was used instead, any
cristy71a3f602010-09-15 12:38:16 +00004351existing label present in the image would be used. You can remove all labels
4352from an image by assigning the empty string. </p>
cristy3ed852e2009-09-05 21:47:34 +00004353
cristy71a3f602010-09-15 12:38:16 +00004354<p>A label is not drawn on the image, but is embedded in the image datastream
4355via <em>Label</em> tag or similar mechanism. If you want the label to be
cristy751980d2012-06-03 23:18:35 +00004356visible on the image itself, use the <a href="command-line-options.html#draw">-draw</a> option, or
cristy71a3f602010-09-15 12:38:16 +00004357during the final processing in the creation of a image montage.</p>
cristy3ed852e2009-09-05 21:47:34 +00004358
cristy71a3f602010-09-15 12:38:16 +00004359<p>If the first character of <em class="arg">string</em> is <em
4360class="arg">@</em>, the image label is read from a file titled by the
4361remaining characters in the string. Labels in a file are literal, no embedded
4362formatting characters are recognized.</p>
cristy3ed852e2009-09-05 21:47:34 +00004363
4364
4365<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004366 <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>
cristy3ed852e2009-09-05 21:47:34 +00004367</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
4372surrounding window. If the current pixel is lighter than this average plus
4373the optional <kbd>offset</kbd>, then it is made white, otherwise it is made
4374black. Small variations in pixel values such as found in scanned documents
4375can be ignored if offset is positive. A negative offset will make it more
4376sensitive to those small variations. </p>
4377
4378<p>This is commonly used to threshold images with an uneven background. It is
4379based on the assumption that average color of the small window is the
cristyeed6cb62012-01-28 19:38:34 +00004380the local background color, from which to separate the foreground color. </p>
cristy3ed852e2009-09-05 21:47:34 +00004381
4382
4383<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004384 <h4><a id="layers"></a>-layers <em class="arg">method</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004385</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
4390which may represent either a set of overlaid 'image layers', a GIF disposal
4391animation, 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
cristy751980d2012-06-03 23:18:35 +00004404 href="command-line-options.html#dispose" >-dispose</a> methods are taken into account. </td>
cristy3ed852e2009-09-05 21:47:34 +00004405 </tr>
4406
cristy751980d2012-06-03 23:18:35 +00004407 <tr><td></td><td>This exactly the same as the <a href="command-line-options.html#deconstruct"
cristy3ed852e2009-09-05 21:47:34 +00004408 >-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
cristy751980d2012-06-03 23:18:35 +00004427 <tr><td></td><td>This can be used with the <a href="command-line-options.html#compose" >-compose</a> alpha
cristy3ed852e2009-09-05 21:47:34 +00004428 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>
cristy751980d2012-06-03 23:18:35 +00004434 <td valign="top">Equivalent to a call to the <a href="command-line-options.html#coalesce"
cristy3ed852e2009-09-05 21:47:34 +00004435 >-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
cristybac7a162010-06-15 19:57:29 +00004451 <tr><td></td>
cristy751980d2012-06-03 23:18:35 +00004452 <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
cristybac7a162010-06-15 19:57:29 +00004454 canvas size of the first image in each list. Unlike a normal <a
cristy751980d2012-06-03 23:18:35 +00004455 href="command-line-options.html#composite" >-composite</a> operation, the canvas offset is also
cristybac7a162010-06-15 19:57:29 +00004456 added to the final composite positioning of each image. </td> </tr>
cristy3ed852e2009-09-05 21:47:34 +00004457
cristybac7a162010-06-15 19:57:29 +00004458 <tr><td></td>
4459 <td>If one of the image lists only contains one image, that image is
cristy3ed852e2009-09-05 21:47:34 +00004460 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
cristy751980d2012-06-03 23:18:35 +00004471 results from the application of the GIF <a href="command-line-options.html#dispose"
cristy3ed852e2009-09-05 21:47:34 +00004472 >-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
cristy751980d2012-06-03 23:18:35 +00004480 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
cristy3ed852e2009-09-05 21:47:34 +00004482 canvas. Images falling outside that canvas is clipped. Final
4483 image will have a zero virtual canvas offset. </td>
4484 </tr>
4485
cristybac7a162010-06-15 19:57:29 +00004486 <tr><td></td>
cristyeed6cb62012-01-28 19:38:34 +00004487 <td>This usually used as one of the final 'image layering' operations
cristy3ed852e2009-09-05 21:47:34 +00004488 overlaying all the prepared image layers into a final image. </td>
4489 </tr>
4490
cristybac7a162010-06-15 19:57:29 +00004491 <tr><td></td>
4492 <td>For a single image this method can also be used to fillout a virtual
cristy751980d2012-06-03 23:18:35 +00004493 canvas with real pixels, or to underlay an opaque color to remove
cristy3ed852e2009-09-05 21:47:34 +00004494 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
cristy10549a12011-05-15 19:04:46 +00004501 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.
cristy3ed852e2009-09-05 21:47:34 +00004505 </td>
cristy10549a12011-05-15 19:04:46 +00004506 </tr>
cristy3ed852e2009-09-05 21:47:34 +00004507
cristy10549a12011-05-15 19:04:46 +00004508 <tr><td></td><td>Caution is advised when handling image layers with
4509 negative offsets as few image file formats handle them correctly.
cristy751980d2012-06-03 23:18:35 +00004510 Following this operation method with <a href="command-line-options.html#repage" >+repage</a>
cristy10549a12011-05-15 19:04:46 +00004511 will remove the layer offset, and create a image in which all the
4512 overlaid image positions relative to each other is preserved, though
cristyeed6cb62012-01-28 19:38:34 +00004513 not necessarily exactly where you specified them.
cristy10549a12011-05-15 19:04:46 +00004514 </td>
4515 </tr>
4516
cristyeed6cb62012-01-28 19:38:34 +00004517 <tr><td></td><td>See also 'trim-bounds' below which is closely related but
cristy10549a12011-05-15 19:04:46 +00004518 without doing the'flatten' to merge the images together. </td>
cristy3ed852e2009-09-05 21:47:34 +00004519 </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
cristy10549a12011-05-15 19:04:46 +00004524 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
cristy3ed852e2009-09-05 21:47:34 +00004530 </tr>
4531
cristy10549a12011-05-15 19:04:46 +00004532 <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>
cristy3ed852e2009-09-05 21:47:34 +00004536 </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
cristy10549a12011-05-15 19:04:46 +00004556 <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.
cristy3ed852e2009-09-05 21:47:34 +00004558 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
cristy10549a12011-05-15 19:04:46 +00004574 <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>
cristy3ed852e2009-09-05 21:47:34 +00004580 </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
cristy751980d2012-06-03 23:18:35 +00004586 animation by more than the current <a href="command-line-options.html#fuzz" >-fuzz</a> factor.
cristy3ed852e2009-09-05 21:47:34 +00004587 </td>
4588 </tr>
4589
cristy10549a12011-05-15 19:04:46 +00004590 <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>
cristy3ed852e2009-09-05 21:47:34 +00004594 </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
cristy10549a12011-05-15 19:04:46 +00004603 <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>
cristy3ed852e2009-09-05 21:47:34 +00004607 </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
cristy10549a12011-05-15 19:04:46 +00004616 <tr><td></td><td>In a GIF animation, such images are usually frames which
4617 provide partial intermediary updates between the frames that are
cristyeed6cb62012-01-28 19:38:34 +00004618 actually displayed to users. These frames are usually added for
cristy10549a12011-05-15 19:04:46 +00004619 improved frame optimization in GIF animations. </td>
cristy3ed852e2009-09-05 21:47:34 +00004620 </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
cristy10549a12011-05-15 19:04:46 +00004626 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
cristy751980d2012-06-03 23:18:35 +00004636 <a href="command-line-options.html#repage" >+repage</a> option, except that all the images
cristy10549a12011-05-15 19:04:46 +00004637 have been kept separate. If 'flatten' is used after using
4638 'trim-bounds' you will get the same result. </td>
cristy3ed852e2009-09-05 21:47:34 +00004639 </tr>
4640
4641 </tbody>
4642</table>
4643
cristy751980d2012-06-03 23:18:35 +00004644<p>To print a complete list of layer types, use <a href="command-line-options.html#list">-list layers</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00004645
cristy751980d2012-06-03 23:18:35 +00004646<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"
cristy10549a12011-05-15 19:04:46 +00004648>-mosaic</a> are only aliases for the above methods and may be depreciated in
cristy751980d2012-06-03 23:18:35 +00004649the 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
4651GIF <a href="command-line-options.html#dispose" >-dispose</a> and <a href="command-line-options.html#delay" >-delay</a>
cristy10549a12011-05-15 19:04:46 +00004652settings. </p>
cristy3ed852e2009-09-05 21:47:34 +00004653
4654
4655<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004656 <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>
cristy3ed852e2009-09-05 21:47:34 +00004657</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,
4662white-point, gamma (for example: 10,250,1.0 or 2%,98%,0.5). The black and
cristy751980d2012-06-03 23:18:35 +00004663white points range from 0 to <em class="QR">QuantumRange</em>, or from 0 to
4664100%; if the white point is omitted it is set to (<em
4665class="QR">QuantumRange</em> - black_point), so as to center contrast changes.
4666If a <kbd>%</kbd> sign is present anywhere in the string, both black and white
4667points are percentages of the full color range. Gamma will do a <a
4668href="command-line-options.html#gamma">-gamma</a> adjustment of the values. If it is omitted, the
4669default of 1.0 (no gamma correction) is assumed.</p>
cristy3ed852e2009-09-05 21:47:34 +00004670
4671<p>In normal usage (<kbd>-level</kbd>) the image values are stretched so that
cristy751980d2012-06-03 23:18:35 +00004672the 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
4674class="QR">QuantumRange</em> (or white). This provides you with direct
4675contrast adjustments to the image. The '<kbd>gamma</kbd>' of the resulting
4676image will then be adjusted. </p>
cristy3ed852e2009-09-05 21:47:34 +00004677
cristy751980d2012-06-03 23:18:35 +00004678<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
4680list, will cause the operator to do the reverse of the level adjustment. That
4681is a zero, or <em class="QR">QuantumRange</em> value (black, and white, resp.)
4682in the original image, is adjusted to the given level values, allowing you to
4683de-contrast, or compress the channel values within the image. The
4684'<kbd>gamma</kbd>' is adjusted before the level adjustment to de-contrast the
4685image is made. </p>
cristy3ed852e2009-09-05 21:47:34 +00004686
cristy751980d2012-06-03 23:18:35 +00004687<p>Only the channels defined by the current <a href="command-line-options.html#channel">-channel</a>
cristy3ed852e2009-09-05 21:47:34 +00004688setting are adjusted (defaults to RGB color channels only), allowing you to
4689limit the effect of this operator. </p>
4690
4691<p>Please note that the transparency channel is treated as 'matte'
4692values (0 is opaque) and not as 'alpha' values (0 is transparent).</p>
4693
4694
4695<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004696 <h4><a id="level-colors"></a>-level-colors {<em
cristy3ed852e2009-09-05 21:47:34 +00004697 class="arg">black_color</em>}{,}{<em class="arg">white_color</em>}</h4>
4698</div>
4699
cristyd0bda5e2010-09-21 16:22:45 +00004700<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>
cristy3ed852e2009-09-05 21:47:34 +00004701
cristy751980d2012-06-03 23:18:35 +00004702<p>This function is exactly like <a href="command-line-options.html#level">-level</a>, except that the
cristy3ed852e2009-09-05 21:47:34 +00004703value value for each color channel is determined by the
4704'<kbd>black_color</kbd>' and '<kbd>white_color</kbd>' colors given (as
cristy751980d2012-06-03 23:18:35 +00004705described under the <a href="command-line-options.html#fill">-fill</a> option). </p>
cristy3ed852e2009-09-05 21:47:34 +00004706
cristyd0bda5e2010-09-21 16:22:45 +00004707<p>This effectually means the colors provided to <kbd>-level-colors</kbd>
4708is mapped to become 'black' and 'white' respectively, with all the other
cristy3ed852e2009-09-05 21:47:34 +00004709colors linearly adjusted (or clipped) to match that change. Each channel is
cristyd0bda5e2010-09-21 16:22:45 +00004710adjusted separately using the channel values of the colors specified. </p>
cristy3ed852e2009-09-05 21:47:34 +00004711
4712<p>On the other hand the plus form of the operator (<kbd>+level-colors</kbd>)
4713will map the image color 'black' and 'white' to the given colors
cristyd0bda5e2010-09-21 16:22:45 +00004714respectively, resulting in a gradient (de-contrasting) tint of the image to
cristy3ed852e2009-09-05 21:47:34 +00004715those colors. This can also be used to convert a plain gray-scale image into a
4716one using the gradient of colors specified. </p>
4717
4718<p>By supplying a single color with a comma separator either before or after
4719that color, will just replace the respective 'black' or 'white' point
cristyd0bda5e2010-09-21 16:22:45 +00004720respectively. But if no comma separator is provided, the given color is
cristy3ed852e2009-09-05 21:47:34 +00004721used for both the black and white color points, making the operator either
4722threshold the images around that color (- form) or set all colors to that
4723color (+ form). </p>
4724
4725
4726<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004727 <h4><a id="limit"></a>-limit <em class="arg">type value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004728</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
cristy751980d2012-06-03 23:18:35 +00004732<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>
cristy3ed852e2009-09-05 21:47:34 +00004734
cristy751980d2012-06-03 23:18:35 +00004735<p>The value for <kbd>file</kbd> is in number of files. The other limits are
4736in bytes. Define arguments for the memory, map, area, and disk resource limits
4737with SI prefixes (.e.g 100MB).<p>
4738
4739<p>By default the limits are 768 files, 2GB of image area, 1.5GiB memory, 8GiB
4740memory map, and 18.45EB of disk. These limits are adjusted relative to the
4741available resources on your computer if this information is available. When
4742any limit is reached, ImageMagick fails in some fashion but attempts to take
4743compensating actions, if possible. For example, the following limits
4744memory:</p>
cristy3ed852e2009-09-05 21:47:34 +00004745
4746<p class="crtsnip">
cristyd934d102009-10-10 12:55:13 +00004747 -limit memory 32MiB -limit map 64MiB
cristy3ed852e2009-09-05 21:47:34 +00004748</p>
4749
cristy751980d2012-06-03 23:18:35 +00004750<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>
cristy3ed852e2009-09-05 21:47:34 +00004751
cristyeed6cb62012-01-28 19:38:34 +00004752<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>identify -list resource</span><span class='crtout'></span></p><pre class="text">
cristye9a32c32011-04-07 01:11:05 +00004753 File Area Memory Map Disk Thread Time
4754 ------------------------------------------------------------------------------
4755 768 12.404GB 8.6642GiB 23.104GiB 18.446744EB 8 unlimited
cristydcca3fa2010-12-29 21:50:07 +00004756</pre>
4757
cristy751980d2012-06-03 23:18:35 +00004758<p>Requests for pixel storage to keep intermediate images are satisfied by one
4759of three resource categories: in-memory pool, memory-mapped files pool, and
4760disk pool (in that order) depending on the <a href="command-line-options.html#limit">&#x2011;limit</a> settings
4761and whether the system honors a resource request. If the total size of
4762allocated pixel storage in the given pool reaches the corresponding limit, the
4763request is passed to the next pool. Additionally, requests that exceed the
4764<kbd>area</kbd> limit automagically are allocated on disk.</p>
cristy3ed852e2009-09-05 21:47:34 +00004765
cristy751980d2012-06-03 23:18:35 +00004766<p>To illustrate how ImageMagick utilizes resource limits, consider a typical
4767image resource request. First, ImageMagick tries to allocate the pixels in
4768memory. 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
4770a memory request is not honored, the pixels are allocated to disk and the file
4771is memory-mapped. However, if the allocation request exceeds the
4772<kbd>map</kbd> limit, the resource allocation goes to disk. In all cases, if
4773the resource request exceeds the <kbd>area</kbd> limit, the pixels are
4774automagically cached to disk. If the disk has a hard limit, the program
4775fails.</p>
cristy3ed852e2009-09-05 21:47:34 +00004776
cristy751980d2012-06-03 23:18:35 +00004777<p>In most cases you simply do not need to concern yourself with resource
4778limits. ImageMagick chooses reasonable defaults and most images do not tax
4779your computer resources. Where limits do come in handy is when you process
4780images that are large or on shared systems where ImageMagick can consume all
4781or most of the available memory. In this case, the ImageMagick workflow slows
4782other processes or, in extreme cases, brings the system to a halt. Under
4783these circumstances, setting limits give some assurances that the ImageMagick
4784workflow will not interfere with other concurrent uses of the computer. For
4785example, assume you have a web interface that processes images uploaded from
4786the Internet. To assure ImageMagick does not exceed 10mb of memory you can
4787simply set the area limit to 10mb:</p>
cristy3ed852e2009-09-05 21:47:34 +00004788
4789<p class="crtsnip">
4790-limit area 10mb
4791</p>
4792
cristy751980d2012-06-03 23:18:35 +00004793<p>Now whenever a large image is processed, the pixels are automagically
4794cached to disk instead of memory. This of course implies that large images
4795typically process very slowly, simply because pixel processing in memory can
4796be an order of magnitude faster than on disk. Because your web site users
4797might inadvertently upload a huge image to process, you should set a disk
4798limit as well:</p>
cristy3ed852e2009-09-05 21:47:34 +00004799
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
cristy751980d2012-06-03 23:18:35 +00004806<p>In addition to command-line resource limit option, resources can be set
4807with <a href="resources.html#environment" >environment variables</a>. Set the
4808environment 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
4812image area, disk space, open files, heap memory, memory map, number of threads
4813of execution, and maximum elapsed time in seconds respectively.</p>
cristy3ed852e2009-09-05 21:47:34 +00004814
cristy751980d2012-06-03 23:18:35 +00004815<p> Inquisitive users can try adding <a href="command-line-options.html#debug">-debug cache</a> to
4816their commands and then scouring the generated output for references to the
4817pixel cache, in order to determine how the pixel cache was allocated and how
4818resources were consumed. Advanced Unix/Linux users can pipe that output
4819through <kbd>grep memory|open|destroy|disk</kbd> for more readable sifting.
cristy3ed852e2009-09-05 21:47:34 +00004820</p>
4821
cristy751980d2012-06-03 23:18:35 +00004822<p>For more about ImageMagick's use of resources, see the section <b>Cache
4823Storage and Resource Requirements</b> on the <a href="architecture.html#cache
4824">Architecture</a> page. </p>
cristy3ed852e2009-09-05 21:47:34 +00004825
4826<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004827 <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>
cristy3ed852e2009-09-05 21:47:34 +00004828</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
cristy751980d2012-06-03 23:18:35 +00004832<p>This is very similar to <a href="command-line-options.html#contrast-stretch" >-contrast-stretch</a>,
cristyd934d102009-10-10 12:55:13 +00004833and uses a 'histogram bin' to determine the range of color values that needs to
cristyeed6cb62012-01-28 19:38:34 +00004834be stretched. However it then stretches those colors using the <a
cristy751980d2012-06-03 23:18:35 +00004835href="command-line-options.html#level" >-level</a> operator.</p>
cristyd934d102009-10-10 12:55:13 +00004836
4837<p>As such while the initial determination may have 'binning' round off
4838effects, the image colors are stretched mathematically, rather than using the
4839histogram bins. This makes the operator more accurate. </p>
4840
cristy751980d2012-06-03 23:18:35 +00004841<p>note however that a <a href="command-line-options.html#linear-stretch" >-linear-stretch</a> of
cristyd934d102009-10-10 12:55:13 +00004842'<kbd>0</kbd>' does nothing, while a value of '<kbd>1</kbd>' does a near
4843perfect stretch of the color range. </p>
4844
cristy751980d2012-06-03 23:18:35 +00004845<p>See also <a href="command-line-options.html#auto-level" >-auto-level</a> for a 'perfect'
cristyd934d102009-10-10 12:55:13 +00004846normalization of mathematical images. </p>
4847
4848<p>This operator is under review for re-development. </p>
4849
4850
cristy3ed852e2009-09-05 21:47:34 +00004851<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004852 <h4><a id="linewidth"></a>-linewidth</h4>
cristy3ed852e2009-09-05 21:47:34 +00004853</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;">
cristydcca3fa2010-12-29 21:50:07 +00004858 <h4><a id="liquid-rescale"></a>-liquid-rescale <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004859</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
cristy751980d2012-06-03 23:18:35 +00004863<p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
cristy3ed852e2009-09-05 21:47:34 +00004864
4865<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004866 <h4><a id="list"></a>-list <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004867</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">
cristye9a32c32011-04-07 01:11:05 +00004872 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
cristy3ed852e2009-09-05 21:47:34 +00004889</pre>
4890
cristybac7a162010-06-15 19:57:29 +00004891<p>These lists vary depending on your version of ImageMagick. Use "<kbd>-list
4892list</kbd>" to get a complete listing of all the "<kbd>-list</kbd>" arguments
4893available:</p>
cristy3ed852e2009-09-05 21:47:34 +00004894
cristyeed6cb62012-01-28 19:38:34 +00004895<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>identify -list list</span></p>
cristy3ed852e2009-09-05 21:47:34 +00004896<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004897 <h4><a id="log"></a>-log <em class="arg">string</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004898</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
cristybac7a162010-06-15 19:57:29 +00004902<p>This option specifies the format for the log printed when the <a
cristy751980d2012-06-03 23:18:35 +00004903href="command-line-options.html#debug">-debug</a> option is active.</p>
cristy3ed852e2009-09-05 21:47:34 +00004904
cristybac7a162010-06-15 19:57:29 +00004905<p>You can display the following components by embedding special format
4906characters:</p>
cristy3ed852e2009-09-05 21:47:34 +00004907
4908<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00004909 %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
cristy3ed852e2009-09-05 21:47:34 +00004921</pre>
4922
4923<p>For example:</p>
4924
cristyeed6cb62012-01-28 19:38:34 +00004925<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert -debug coders -log "%u %m:%l %e" in.gif out.png</span></p>
cristy3ed852e2009-09-05 21:47:34 +00004926<p>The default behavior is to print all of the components.</p>
4927
4928<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004929 <h4><a id="loop"></a>-loop <em class="arg">iterations</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004930</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
cristybac7a162010-06-15 19:57:29 +00004934<p>Set iterations to zero to repeat the animation an infinite number of times,
4935otherwise the animation repeats itself up to <em class="arg">iterations</em>
4936times.</p>
cristy3ed852e2009-09-05 21:47:34 +00004937
4938<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004939 <h4><a id="lowlight-color"></a>-lowlight-color <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004940</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;">
cristydcca3fa2010-12-29 21:50:07 +00004945 <h4><a id="magnify"></a>-magnify <em class="arg">factor</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004946</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;">
cristydcca3fa2010-12-29 21:50:07 +00004952 <h4><a id="map"></a>-map <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004953</div>
4954
cristy751980d2012-06-03 23:18:35 +00004955<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>
cristy3ed852e2009-09-05 21:47:34 +00004956
4957<p>Choose from these <em class="arg">Standard Colormap</em> types:</p>
4958
4959<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00004960 best
4961 default
4962 gray
4963 red
4964 green
4965 blue
cristy3ed852e2009-09-05 21:47:34 +00004966</pre>
4967
cristybac7a162010-06-15 19:57:29 +00004968<p>The <em class="arg">X server</em> must support the <em class="arg">Standard
4969Colormap</em> you choose, otherwise an error occurs. Use <kbd>list</kbd> as
4970the 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
4972class="arg">xstdcmap(1)</em> for one way of creating Standard Colormaps.</p>
cristy3ed852e2009-09-05 21:47:34 +00004973
4974
4975<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004976 <h4><a id="map_stream_"></a>-map <em class="arg">components</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004977</div>
4978
cristy751980d2012-06-03 23:18:35 +00004979<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>
cristy3ed852e2009-09-05 21:47:34 +00004980
4981<p>Here are the valid components of a map:</p>
4982
4983<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00004984 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)
cristy3ed852e2009-09-05 21:47:34 +00004995</pre>
4996
cristybac7a162010-06-15 19:57:29 +00004997<p>You can specify as many of these components as needed in any order (e.g.
4998bgr). The components can repeat as well (e.g. rgbr).</p>
4999
cristy3ed852e2009-09-05 21:47:34 +00005000
5001<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005002 <h4><a id="mask"></a>-mask
cristy3ed852e2009-09-05 21:47:34 +00005003<em class="arg">filename</em></h4>
5004</div>
5005
cristyacc04882011-05-04 23:03:43 +00005006<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>
cristy3ed852e2009-09-05 21:47:34 +00005007
cristyacc04882011-05-04 23:03:43 +00005008<p>This the same as using a mask used for composite masking operations, with
5009grayscale values causing blended updates of the image the mask is attached to.
5010</P>
5011
cristy751980d2012-06-03 23:18:35 +00005012<p>Use <a href="command-line-options.html#mask">+mask</a> to remove the mask from images.</p>
cristyacc04882011-05-04 23:03:43 +00005013
cristy751980d2012-06-03 23:18:35 +00005014<p>Also see <a href="command-line-options.html#clip-mask">-clip-mask</a> which work in the same way,
cristyacc04882011-05-04 23:03:43 +00005015but with strict boolean masking. </p>
cristy3ed852e2009-09-05 21:47:34 +00005016
5017<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005018 <h4><a id="mattecolor"></a>-mattecolor <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005019</div>
5020
cristy751980d2012-06-03 23:18:35 +00005021<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>
cristy3ed852e2009-09-05 21:47:34 +00005022
cristy751980d2012-06-03 23:18:35 +00005023<p>The color is specified using the format described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00005024
cristybac7a162010-06-15 19:57:29 +00005025<p>The default matte color is <kbd>#BDBDBD</kbd>, <span
5026style="background-color: #bdbdbd;">this shade of gray</span>.</p>
cristy3ed852e2009-09-05 21:47:34 +00005027
5028<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005029 <h4><a id="maximum"></a>-maximum</h4>
cristyd2baf7d2010-03-06 04:26:44 +00005030</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
cristyacc04882011-05-04 23:03:43 +00005034<p>Select the 'maximum' value from all the surrounding pixels. </p>
5035
cristy751980d2012-06-03 23:18:35 +00005036<p>This is legacy option from the <a href="command-line-options.html#statistic" >method</A> of the same
cristyacc04882011-05-04 23:03:43 +00005037name. </p>
5038
cristyd2baf7d2010-03-06 04:26:44 +00005039<div style="margin: auto;">
cristye9a32c32011-04-07 01:11:05 +00005040 <h4><a id="median"></a>-median <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005041</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
cristyacc04882011-05-04 23:03:43 +00005045<p>Select the 'middle' value from all the surrounding pixels. </p>
5046
cristy751980d2012-06-03 23:18:35 +00005047<p>This is legacy option from the <a href="command-line-options.html#statistic" >method</A> of the same
cristyacc04882011-05-04 23:03:43 +00005048name. </p>
5049
cristy3ed852e2009-09-05 21:47:34 +00005050<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005051 <h4><a id="metric"></a>-metric <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005052</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">
cristye9a32c32011-04-07 01:11:05 +00005059 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)
cristy3ed852e2009-09-05 21:47:34 +00005068</pre>
5069
cristy771f7a72010-11-27 21:42:59 +00005070<p>Control the '<kbd>AE</kbd>', or absolute count of pixels that are different,
cristy751980d2012-06-03 23:18:35 +00005071with the <a href="command-line-options.html#fuzz" >-fuzz</a> factor (ignore pixels which
cristy771f7a72010-11-27 21:42:59 +00005072only changed by a small amount). Use '<kbd>PAE</kbd>' to find the
cristy751980d2012-06-03 23:18:35 +00005073size of the <a href="command-line-options.html#fuzz" >-fuzz</a> factor needed to make all pixels
cristyeed6cb62012-01-28 19:38:34 +00005074'similar', while '<kbd>MAE</kbd>' determines the factor needed
cristybac7a162010-06-15 19:57:29 +00005075for about half the pixels to be similar. </p>
cristy3ed852e2009-09-05 21:47:34 +00005076
5077<p>The '<kbd>MEPP</kbd>' metric returns three different metrics
5078('<kbd>MAE</kbd>', '<kbd>MAE</kbd>' normalized, and '<kbd>PAE</kbd>'
cristyd0bda5e2010-09-21 16:22:45 +00005079normalized) from a single comparison run. </p>
cristy3ed852e2009-09-05 21:47:34 +00005080
cristy751980d2012-06-03 23:18:35 +00005081<p>To print a complete list of metrics, use the <a href="command-line-options.html#list">-list
cristybac7a162010-06-15 19:57:29 +00005082metrics</a> option.</p>
5083
cristy3ed852e2009-09-05 21:47:34 +00005084
cristyd2baf7d2010-03-06 04:26:44 +00005085<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005086 <h4><a id="minimum"></a>-minimum</h4>
cristyd2baf7d2010-03-06 04:26:44 +00005087</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
cristyacc04882011-05-04 23:03:43 +00005091<p>Select the 'minimal' value from all the surrounding pixels. </p>
5092
cristy751980d2012-06-03 23:18:35 +00005093<p>This is legacy option from the <a href="command-line-options.html#statistic" >method</A> of the same
cristyacc04882011-05-04 23:03:43 +00005094name. </p>
5095
5096
cristy3ed852e2009-09-05 21:47:34 +00005097
5098<div style="margin: auto;">
cristye9a32c32011-04-07 01:11:05 +00005099 <h4><a id="mode"></a>-mode <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005100</div>
5101
cristy751980d2012-06-03 23:18:35 +00005102<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>
cristybe3c5be2011-03-05 17:35:07 +00005103
5104<div style="margin: auto;">
5105 <h4>-mode <em class="arg">value</em></h4>
5106</div>
5107
cristy751980d2012-06-03 23:18:35 +00005108<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>
cristy3ed852e2009-09-05 21:47:34 +00005109
cristybac7a162010-06-15 19:57:29 +00005110<p>Choose the <em class="arg">value</em> from these styles: <kbd>Frame,
5111Unframe, or Concatenate</kbd></p>
cristy3ed852e2009-09-05 21:47:34 +00005112
cristy751980d2012-06-03 23:18:35 +00005113<p>Use the <a href="command-line-options.html#list" >-list</a> option with a '<kbd>Mode</kbd>' argument
5114for a list of <a href="command-line-options.html#mode" >-mode</a> arguments available in your
cristybac7a162010-06-15 19:57:29 +00005115ImageMagick installation.</p>
cristy3ed852e2009-09-05 21:47:34 +00005116
5117
5118<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005119 <h4><a id="modulate"></a>-modulate <em class="arg">brightness</em>[,<em class="arg">saturation</em>,<em class="arg">hue</em>]</h4>
cristy3ed852e2009-09-05 21:47:34 +00005120</div>
5121
cristybac7a162010-06-15 19:57:29 +00005122<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
5123class="arg">saturation</em>, and <em class="arg">hue</em> of an image.</td><td style='text-align:right;'></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00005124
cristyb36feb22010-03-26 16:54:37 +00005125<p>The arguments are given as a percentages of variation. A value of 100 means
5126no change, and any missing values are taken to mean 100.</p>
cristy3ed852e2009-09-05 21:47:34 +00005127
cristyb36feb22010-03-26 16:54:37 +00005128<p>The <em class="arg">brightness</em> is a multiplier of the overall
5129brightness of the image, so 0 means pure black, 50 is half as bright, 200 is
cristy751980d2012-06-03 23:18:35 +00005130twice as bright. To invert its meaning <a href="command-line-options.html#negate">-negate</a> the image
cristyb36feb22010-03-26 16:54:37 +00005131before and after. </p>
cristy3ed852e2009-09-05 21:47:34 +00005132
cristyb36feb22010-03-26 16:54:37 +00005133<p>The <em class="arg">saturation</em> controls the amount of color in an
5134image. For example, 0 produce a grayscale image, while a large value such as
5135200 produce a very colorful, 'cartoonish' color.</p>
cristy3ed852e2009-09-05 21:47:34 +00005136
cristyb36feb22010-03-26 16:54:37 +00005137<p>The <em class="arg">hue</em> argument causes a "rotation" of the colors
5138within the image by the amount specified. For example, 50 results in
5139a counter-clockwise rotation of 90, mapping red shades to purple, and so on.
5140A value of either 0 or 200 results in a complete 180 degree rotation of the
5141image. Using a value of 300 is a 360 degree rotation resulting in no change to
5142the original image. </p>
cristy3ed852e2009-09-05 21:47:34 +00005143
cristyb36feb22010-03-26 16:54:37 +00005144<p>For example, to increase the color brightness by 20% and decrease the color
5145saturation by 10% and leave the hue unchanged, use <a
cristy751980d2012-06-03 23:18:35 +00005146href="command-line-options.html#modulate">-modulate 120,90</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00005147
cristy751980d2012-06-03 23:18:35 +00005148<p>Use <a href="command-line-options.html#set">-set</a> attribute of '<kbd
cristyb36feb22010-03-26 16:54:37 +00005149class="arg">option:modulate:colorspace</kbd>' to specify which colorspace to
5150modulate. Choose from <kbd>HSB</kbd>, <kbd>HSL</kbd> (the default), or
5151<kbd>HWB</kbd>. For example,</p>
cristy3ed852e2009-09-05 21:47:34 +00005152
cristyeed6cb62012-01-28 19:38:34 +00005153<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>
cristyb36feb22010-03-26 16:54:37 +00005154
cristy3ed852e2009-09-05 21:47:34 +00005155<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005156 <h4><a id="monitor"></a>-monitor</h4>
cristy3ed852e2009-09-05 21:47:34 +00005157</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;">
cristydcca3fa2010-12-29 21:50:07 +00005163 <h4><a id="monochrome"></a>-monochrome</h4>
cristy3ed852e2009-09-05 21:47:34 +00005164</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
cristy3ed852e2009-09-05 21:47:34 +00005168<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005169 <h4><a id="morph"></a>-morph <em class="arg">frames</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005170</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
cristyeed6cb62012-01-28 19:38:34 +00005175appearance of a metamorphosis from one image to the next, over all the images
cristy3ed852e2009-09-05 21:47:34 +00005176in the current image list. The added images are the equivalent of a <a
cristy751980d2012-06-03 23:18:35 +00005177href="command-line-options.html#blend">-blend</a> composition. The <em class="arg">frames</em>
cristy3ed852e2009-09-05 21:47:34 +00005178argument determine how many images to interpolate between each image. </p>
5179
5180
5181<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005182 <h4><a id="morphology"></a>-morphology</h4>
5183 <h4>-morphology <em class="arg">method</em> <em class="arg">kernel</em></h4>
cristy488844c2010-01-22 14:02:05 +00005184</div>
5185
cristy2c839602010-04-03 02:32:08 +00005186<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>
cristy488844c2010-01-22 14:02:05 +00005187
cristy751980d2012-06-03 23:18:35 +00005188<p>Until I get around to writing an option summary for this, see <a
cristydcca3fa2010-12-29 21:50:07 +00005189href="http://www.imagemagick.org/Usage/morphology/" >IM Usage Examples,
5190Morphology</a>. </p>
cristy83a272e2010-05-07 20:40:35 +00005191
5192
cristy488844c2010-01-22 14:02:05 +00005193<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005194 <h4><a id="mosaic"></a>-mosaic</h4>
cristy3ed852e2009-09-05 21:47:34 +00005195</div>
5196
cristy751980d2012-06-03 23:18:35 +00005197<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>
cristy3ed852e2009-09-05 21:47:34 +00005198
5199
5200<div style="margin: auto;">
cristyeed6cb62012-01-28 19:38:34 +00005201 <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>
cristy3ed852e2009-09-05 21:47:34 +00005202</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
5207angle given is the angle toward which the image is blurred. That is the
5208direction people would consider the object is coming from. </p>
5209
5210<p>Note that the blur is not uniform distribution, giving the motion a
cristyd0bda5e2010-09-21 16:22:45 +00005211definite sense of direction of movement. </p>
cristy3ed852e2009-09-05 21:47:34 +00005212
cristy751980d2012-06-03 23:18:35 +00005213<p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
cristy3ed852e2009-09-05 21:47:34 +00005214pixels which are outside the image proper are blurred into the final result.
5215</p>
5216
5217<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005218 <h4><a id="name"></a>-name</h4>
cristy3ed852e2009-09-05 21:47:34 +00005219</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;">
cristydcca3fa2010-12-29 21:50:07 +00005223 <h4><a id="negate"></a>-negate</h4>
cristy3ed852e2009-09-05 21:47:34 +00005224</div>
5225
cristyb29bc032010-02-01 20:29:43 +00005226<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>
cristy3ed852e2009-09-05 21:47:34 +00005227
cristy751980d2012-06-03 23:18:35 +00005228<p>The red, green, and blue intensities of an image are negated. White becomes
5229black, yellow becomes blue, etc. Use <a href="command-line-options.html#negate">+negate</a> to only
5230negate the grayscale pixels of the image.</p>
cristy3ed852e2009-09-05 21:47:34 +00005231
5232<div style="margin: auto;">
cristye9a32c32011-04-07 01:11:05 +00005233 <h4><a id="noise"></a>-noise <em class="arg">geometry</em><br/>
cristy3ed852e2009-09-05 21:47:34 +00005234 +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
cristy751980d2012-06-03 23:18:35 +00005239<p>The principal function of noise peak elimination filter is to smooth the
5240objects within an image without losing edge information and without creating
5241undesired structures. The central idea of the algorithm is to replace a pixel
5242with its next neighbor in value within a pixel window, if this pixel has been
5243found to be noise. A pixel is defined as noise if and only if this pixel is
5244a maximum or minimum within the pixel window.</p>
cristy3ed852e2009-09-05 21:47:34 +00005245
cristy751980d2012-06-03 23:18:35 +00005246<p>Use <kbd><a href="command-line-options.html#noise">-noise</a> <em class="arg">radius</em></kbd> to
5247specify the width of the neighborhood when reducing noise. This is equivelent
5248to using a <kbd><a href="command-line-options.html#statistic" >-statistic</a> NonPeak</kbd> operation,
5249which should be used in preference.</p>
cristy3ed852e2009-09-05 21:47:34 +00005250
cristy751980d2012-06-03 23:18:35 +00005251<p>Use <a href="command-line-options.html#noise">+noise</a> followed by a noise <em
5252class="arg">type</em> to add noise to an image. Choose from these noise
5253types:</p>
cristy3ed852e2009-09-05 21:47:34 +00005254
5255<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00005256 Gaussian
5257 Impulse
5258 Laplacian
5259 Multiplicative
5260 Poisson
5261 Random
5262 Uniform
cristy3ed852e2009-09-05 21:47:34 +00005263</pre>
5264
cristy751980d2012-06-03 23:18:35 +00005265<p>The amount of noise added can be controled by the <kbd><a
5266href="command-line-options.html#attunuuate" >-attenuate</a></kbd> setting. If unset the value is
5267equivelent to 1.0, or a maximum noise addition.</p>
cristy3ed852e2009-09-05 21:47:34 +00005268
cristy751980d2012-06-03 23:18:35 +00005269<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
cristyeed6cb62012-01-28 19:38:34 +00005272the use of a controlling value to specify the amount of noise that should be
cristy83543962009-10-16 19:04:28 +00005273added to an image. </p>
5274
cristy3ed852e2009-09-05 21:47:34 +00005275
5276<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005277 <h4><a id="normalize"></a>-normalize</h4>
cristy3ed852e2009-09-05 21:47:34 +00005278</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
cristyd934d102009-10-10 12:55:13 +00005282<p>The intensity values are stretched to cover the entire range of possible
5283values. While doing so, black-out at most <em>2%</em> of the pixels and
5284white-out at most <em>1%</em> of the pixels.</p>
cristy3ed852e2009-09-05 21:47:34 +00005285
cristy751980d2012-06-03 23:18:35 +00005286<p>Note that as of ImageMagick 6.4.7-0, <a href="command-line-options.html#normalize" >-normalize</a>
5287is 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"
cristyd934d102009-10-10 12:55:13 +00005289>-contrast-stretch 2%x99%</a>).</p>
cristy3ed852e2009-09-05 21:47:34 +00005290
cristyd934d102009-10-10 12:55:13 +00005291<p>All the channels are normalized in concert by the came amount so as to
cristy751980d2012-06-03 23:18:35 +00005292preserve color integrity, when the default <a href="command-line-options.html#channel" >+channel</a>
5293setting is in use. Specifying any other <a href="command-line-options.html#channel" >-channel</a>
cristyd934d102009-10-10 12:55:13 +00005294setting will normalize the RGB channels independently.</p>
5295
cristy751980d2012-06-03 23:18:35 +00005296<p>See <a href="command-line-options.html#contrast-stretch" >-contrast-stretch</a> for more details.
5297Also see <a href="command-line-options.html#auto-level" >-auto-level</a> for a 'perfect' normalization
cristy83543962009-10-16 19:04:28 +00005298that is better suited to mathematically generated images. </p>
cristyd934d102009-10-10 12:55:13 +00005299
5300<p>This operator is under review for re-development. </p>
cristy3ed852e2009-09-05 21:47:34 +00005301
5302
5303<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005304 <h4><a id="ordered-dither"></a>-ordered-dither <em class="arg">threshold_map</em>{,<em class="arg">level</em>...}</h4>
cristy3ed852e2009-09-05 21:47:34 +00005305</div>
5306
cristyd934d102009-10-10 12:55:13 +00005307<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
5308class="arg">threshold map</em> specified, and a uniform color map with the
5309given number of <em class="arg">levels</em> per color channel . </td><td style='text-align:right;'></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00005310
5311<p>You can choose from these standard threshold maps:</p>
5312
5313<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00005314 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)
cristy3ed852e2009-09-05 21:47:34 +00005333</pre>
5334
cristy945bb352011-04-01 15:39:28 +00005335<p> The <kbd>threshold</kbd> generated a simple 50% threshold of the image.
cristybaacd172011-04-30 23:11:03 +00005336This could be used with <em class="arg" >level</em> to do the equivalent of <a
cristy751980d2012-06-03 23:18:35 +00005337href="command-line-options.html#posterize" >-posterize</a> to reduce an image to basic primary colors.
cristy945bb352011-04-01 15:39:28 +00005338</p>
cristy3ed852e2009-09-05 21:47:34 +00005339
cristyeed6cb62012-01-28 19:38:34 +00005340<p>The <kbd>checks</kbd> pattern produces a 3 level checkerboard dither
cristy945bb352011-04-01 15:39:28 +00005341pattern. That is a grayscale will become a pattern of solid black, solid
5342white, and mid-tone colors into a checkerboard pattern of black and white.
5343</p>
cristy3ed852e2009-09-05 21:47:34 +00005344
cristy945bb352011-04-01 15:39:28 +00005345<p>You can define your own <em class="arg" >threshold map</em> for ordered
5346dithering and halftoning your images, in either personal or system
5347<kbd>thresholds.xml</kbd> XML file. See <a href="resources.html" >Resources</A>
5348for more details of configuration files. </p>
cristy3ed852e2009-09-05 21:47:34 +00005349
cristy945bb352011-04-01 15:39:28 +00005350<p>To print a complete list of the thresholds that have been defined, use the
cristy751980d2012-06-03 23:18:35 +00005351<a href="command-line-options.html#list" >-list threshold</a> option.</p>
cristy945bb352011-04-01 15:39:28 +00005352
5353<p>Note that at this time the same threshold dithering map is used for all
5354color channels, no attempt is made to offset or rotate the map for different
5355channels is made, to create an offset printing effect. Also as the maps are
5356simple threshold levels, the halftone and circle maps will create incomplete
5357circles along the edges of a colored area. Also all the effects are purely
5358on/off boolean effects, without anti-aliasing to make the circles smooth
5359looking. Large dots can be made to look better with a small amount of blurring
5360after being created. </p>
cristy3ed852e2009-09-05 21:47:34 +00005361
5362
5363<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005364 <h4><a id="opaque"></a>-opaque <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005365</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
cristyc54f5d42009-11-27 21:36:31 +00005369<p>The <em class="arg">color</em> argument is defined using the format
cristy751980d2012-06-03 23:18:35 +00005370described under the <a href="command-line-options.html#fill" >-fill</a> option. The <a href="command-line-options.html#fuzz"
cristyd934d102009-10-10 12:55:13 +00005371>-fuzz</a> setting can be used to match and replace colors similar to the one
5372given.</p>
cristy3ed852e2009-09-05 21:47:34 +00005373
cristy751980d2012-06-03 23:18:35 +00005374<p>Use <a href="command-line-options.html#opaque">+opaque</a> to paint any pixel that does not match
cristyb36feb22010-03-26 16:54:37 +00005375the target color. </p>
cristy3ed852e2009-09-05 21:47:34 +00005376
cristy751980d2012-06-03 23:18:35 +00005377<p>The <a href="command-line-options.html#transparent">-transparent</a> operator is exactly the same
5378as <a href="command-line-options.html#opaque" >-opaque</a> but replaces the matching color with
5379transparency rather than the current <a href="command-line-options.html#fill">-fill</a> color setting.
cristyb36feb22010-03-26 16:54:37 +00005380To ensure that it can do this it also ensures that the image has an alpha
cristy751980d2012-06-03 23:18:35 +00005381channel enabled, as per "<kbd><a href="command-line-options.html#alpha" >-alpha</a> set</kbd>", for
cristyb36feb22010-03-26 16:54:37 +00005382the new transparent colors, and does not require you to modify the <a
cristy751980d2012-06-03 23:18:35 +00005383href="command-line-options.html#channel">-channel</a> to enable alpha channel handling. </p>
cristyd934d102009-10-10 12:55:13 +00005384
cristy3ed852e2009-09-05 21:47:34 +00005385
5386<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005387 <h4><a id="orient"></a>-orient <em class="arg">image orientation</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005388</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">
cristye9a32c32011-04-07 01:11:05 +00005395 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
cristy3ed852e2009-09-05 21:47:34 +00005404</pre>
5405
cristy751980d2012-06-03 23:18:35 +00005406<p>To print a complete list of orientations, use the <a href="command-line-options.html#list" >-list
cristyd934d102009-10-10 12:55:13 +00005407orientation</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00005408
5409
5410<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005411 <h4><a id="page"></a>-page <em class="arg">geometry</em><br/>
cristy3ed852e2009-09-05 21:47:34 +00005412 -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
cristy751980d2012-06-03 23:18:35 +00005419<p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
cristy3ed852e2009-09-05 21:47:34 +00005420
cristy751980d2012-06-03 23:18:35 +00005421<p>For convenience you can specify the page size using <em
5422class="arg">media</em> (see below). Offsets can then be added as with other
5423<em class="arg">geometry</em> arguments (e.g. <a
5424href="command-line-options.html#page">-page</a>&nbsp;<kbd>Letter+43+43</kbd>).</p>
cristy3ed852e2009-09-05 21:47:34 +00005425
cristy751980d2012-06-03 23:18:35 +00005426<p>Use <em class="arg">media</em> as shorthand to specify the dimensions (<em
5427class="arg">width</em>x<em class="arg">height</em>) of the <em
5428class="arg">PostScript</em> page in dots per inch or a TEXT page in pixels.
5429The choices for a PostScript page are:</p>
5430
5431<table id="geometryTable" cellpadding="2" cellspacing="0" border="1"
5432width="50%" style="margin-left: auto; margin-right: auto;">
cristy3ed852e2009-09-05 21:47:34 +00005433<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
cristy751980d2012-06-03 23:18:35 +00005483<p>This option is also used to place subimages when writing to a multi-image
5484format that supports offsets, such as GIF89 and MNG. When used for this
5485purpose the offsets are always measured from the top left corner of the canvas
5486and are not affected by the <a href="command-line-options.html#gravity">-gravity</a> option. To
5487position a GIF or MNG image, use <a href="command-line-options.html#page">-page</a><em
5488class="arg">{+-}x{+-}y</em> (e.g. -page +100+200). When writing to a MNG
5489file, a <a href="command-line-options.html#page">-page</a> option appearing ahead of the first image in
5490the sequence with nonzero width and height defines the width and height values
5491that are written in the <kbd>MHDR</kbd> chunk. Otherwise, the MNG width and
5492height are computed from the bounding box that contains all images in the
5493sequence. When writing a GIF89 file, only the bounding box method is used to
5494determine its dimensions.</p>
cristy3ed852e2009-09-05 21:47:34 +00005495
cristy751980d2012-06-03 23:18:35 +00005496<p>For a PostScript page, the image is sized as in <a
5497href="command-line-options.html#geometry">-geometry</a> but positioned relative to the <em>lower
5498left-hand corner</em> of the page by {+-}<kbd>x</kbd><em
5499class="arg">offset</em>{+-}<kbd>y</kbd> <em class="arg">offset</em>. Use <a
5500href="command-line-options.html#page">-page 612x792</a>, for example, to center the image within the
5501page. If the image size exceeds the PostScript page, it is reduced to fit the
5502page. The default gravity for the <a href="command-line-options.html#page">-page</a> option is <em
5503class="arg">NorthWest</em>, i.e., positive <kbd>x</kbd> and <kbd>y</kbd> <em
5504class="arg">offset</em> are measured rightward and downward from the top left
5505corner of the page, unless the <a href="command-line-options.html#gravity">-gravity</a> option is
5506present with a value other than <em class="arg">NorthWest</em>.</p>
cristy3ed852e2009-09-05 21:47:34 +00005507
5508<p>The default page dimensions for a TEXT image is 612x792.</p>
5509
cristy751980d2012-06-03 23:18:35 +00005510<p>This option is used in concert with <a href="command-line-options.html#density">-density</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00005511
cristy751980d2012-06-03 23:18:35 +00005512<p>Use <a href="command-line-options.html#page">+page</a> to remove the page settings for an image.</p>
cristy3ed852e2009-09-05 21:47:34 +00005513
5514<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005515 <h4><a id="paint"></a>-paint <em class="arg">radius</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005516</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
cristy751980d2012-06-03 23:18:35 +00005520<p>Each pixel is replaced by the most frequent color in a circular
5521neighborhood whose width is specified with <em class="arg">radius</em>.</p>
cristy3ed852e2009-09-05 21:47:34 +00005522
5523<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005524 <h4><a id="path"></a>-path <em class="arg">path</em></h4></div>
cristy3ed852e2009-09-05 21:47:34 +00005525
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;">
cristydcca3fa2010-12-29 21:50:07 +00005529 <h4><a id="pause_animate_"></a>-pause <em class="arg">seconds</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005530</div>
5531
cristy751980d2012-06-03 23:18:35 +00005532<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>
cristy3ed852e2009-09-05 21:47:34 +00005533
5534<p>Pause for the specified number of seconds before repeating the animation.</p>
5535
5536<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005537 <h4><a id="pause_import_"></a>-pause <em class="arg">seconds</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005538</div>
5539
cristy751980d2012-06-03 23:18:35 +00005540<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>
cristy3ed852e2009-09-05 21:47:34 +00005541
5542<p>Pause for the specified number of seconds before taking the next snapshot.</p>
5543
5544<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005545 <h4><a id="ping"></a>-ping</h4>
cristy3ed852e2009-09-05 21:47:34 +00005546</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;">
cristydcca3fa2010-12-29 21:50:07 +00005551 <h4><a id="pointsize"></a>-pointsize <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005552</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;">
cristydcca3fa2010-12-29 21:50:07 +00005557 <h4><a id="polaroid"></a>-polaroid <em class="arg">angle</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005558</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;">
cristydcca3fa2010-12-29 21:50:07 +00005565 <h4><a id="posterize"></a>-posterize <em class="arg">levels</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005566</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;">
cristydcca3fa2010-12-29 21:50:07 +00005571 <h4><a id="precision"></a>-precision <em class="arg">value</em></h4>
cristyd43a46b2010-01-21 02:13:41 +00005572</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;">
cristydcca3fa2010-12-29 21:50:07 +00005577 <h4><a id="preview"></a>-preview <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005578</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
cristy751980d2012-06-03 23:18:35 +00005582<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
5584these previews:</p>
cristy3ed852e2009-09-05 21:47:34 +00005585
5586<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00005587 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
cristy3ed852e2009-09-05 21:47:34 +00005595</pre>
5596
cristy751980d2012-06-03 23:18:35 +00005597<p>To print a complete list of previews, use the <a href="command-line-options.html#list">-list preview</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00005598
5599<p>The default preview is <kbd>JPEG</kbd>.</p>
5600
5601<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005602 <h4><a id="print"></a>-print <em class="arg">string</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005603</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;">
cristydcca3fa2010-12-29 21:50:07 +00005608 <h4><a id="process"></a>-process <em class="arg">command</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005609</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
cristy751980d2012-06-03 23:18:35 +00005613<p>The command arguments has the form <kbd>"module arg1 arg2 arg3 ...
5614argN"</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
5616pass to the process module.</p>
cristy3ed852e2009-09-05 21:47:34 +00005617
5618<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005619 <h4><a id="profile"></a>-profile <em class="arg">filename</em><br/>
cristy3ed852e2009-09-05 21:47:34 +00005620 +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
cristy751980d2012-06-03 23:18:35 +00005625<p>Using <a href="command-line-options.html#profile">-profile</a> <em class="arg">filename</em> adds an
5626ICM (ICC color management), IPTC (newswire information), or a generic profile
5627to the image.</p>
cristy3ed852e2009-09-05 21:47:34 +00005628
cristy751980d2012-06-03 23:18:35 +00005629<p>Use <a href="command-line-options.html#profile">+profile <em class="arg">profile_name</em></a> to
5630remove the indicated profile. ImageMagick uses standard filename globbing, so
5631wildcard expressions may be used to remove more than one profile. Here we
5632remove all profiles from the image except for the XMP profile: <kbd>+profile
5633"!xmp,*"</kbd>. </p>
cristy3ed852e2009-09-05 21:47:34 +00005634
cristy751980d2012-06-03 23:18:35 +00005635<p>Use <kbd>identify -verbose</kbd> to find out which profiles are in the
5636image file. Use <a href="command-line-options.html#strip">-strip</a> to remove all profiles (and
5637comments).</p>
cristy3ed852e2009-09-05 21:47:34 +00005638
cristy751980d2012-06-03 23:18:35 +00005639<p>To extract a profile, the <a href="command-line-options.html#profile">-profile</a> option is not
5640used. Instead, simply write the file to an image format such as <em
5641class="arg">APP1, 8BIM, ICM,</em> or <em class="arg">IPTC</em>.</p>
cristy3ed852e2009-09-05 21:47:34 +00005642
cristy751980d2012-06-03 23:18:35 +00005643<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>
cristy3ed852e2009-09-05 21:47:34 +00005645
cristyeed6cb62012-01-28 19:38:34 +00005646<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert cockatoo.jpg profile.exif</span></p>
cristy751980d2012-06-03 23:18:35 +00005647<p>It is important to note that results may depend on whether or not the
5648original image already has an included profile. Also, keep in mind that <a
5649href="command-line-options.html#profile">-profile</a> is an "operator" (as opposed to a "setting") and
5650therefore a conversion is made each time it is encountered, in order, in the
5651command-line. For instance, in the following example, if the original image is
5652CMYK with profile, a CMYK-CMYK-RGB conversion results.</p>
cristy3ed852e2009-09-05 21:47:34 +00005653
cristyeed6cb62012-01-28 19:38:34 +00005654<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert CMYK.tif -profile "CMYK.icc" -profile "RGB.icc" RGB.tiff</span></p>
cristy751980d2012-06-03 23:18:35 +00005655<p>Furthermore, since ICC profiles are not necessarily symmetric, extra
5656conversion steps can yield unwanted results. CMYK profiles are often very
5657asymmetric since they involve 3&minus;&gt;4 and 4&minus;&gt;3 channel mapping.
cristy3ed852e2009-09-05 21:47:34 +00005658</p>
5659
5660<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005661 <h4><a id="quality"></a>-quality <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005662</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
cristy87a7f072011-07-01 00:08:52 +00005666<p>For the JPEG and MPEG image formats, quality is 1 (lowest image quality and
5667highest compression) to 100 (best quality but least effective compression).
5668The default is to use the estimated quality of your input image if it can
5669be determined, otherwise 92. When the quality is greater than 90, then the
5670chroma channels are not downsampled.
cristy751980d2012-06-03 23:18:35 +00005671Use the <a href="command-line-options.html#sampling-factor">-sampling-factor</a> option to specify the
cristy87a7f072011-07-01 00:08:52 +00005672factors for chroma downsampling.</p>
cristy3ed852e2009-09-05 21:47:34 +00005673
cristy751980d2012-06-03 23:18:35 +00005674<p>For the MIFF image format, quality/10 is the zlib compression level, which
5675is 0 (worst but fastest compression) to 9 (best but slowest). It has no effect
5676on the image appearance, since the compression is always lossless.</p>
cristy3ed852e2009-09-05 21:47:34 +00005677
cristy751980d2012-06-03 23:18:35 +00005678<p>For the JPEG-2000 image format, quality is mapped using a non-linear
5679equation to the compression ratio required by the Jasper library. This
5680non-linear equation is intended to loosely approximate the quality provided by
5681the JPEG v1 format. The default quality value 100, a request for non-lossy
5682compression. A quality of 75 results in a request for 16:1 compression.</p>
cristy3ed852e2009-09-05 21:47:34 +00005683
cristy87a7f072011-07-01 00:08:52 +00005684<p>For the MNG and PNG image formats, the quality value sets the zlib
5685compression level (quality / 10) and filter-type (quality % 10). The default
5686PNG "quality" is 75, which means compression level 7 with adaptive PNG
5687filtering, unless the image has a color map, in which case it means
5688compression level 7 with no PNG filtering.</p>
5689
cristy751980d2012-06-03 23:18:35 +00005690<p>For compression level 0, the Huffman-only strategy is used, which is
5691fastest but not necessarily the worst compression.</p>
cristy3ed852e2009-09-05 21:47:34 +00005692
cristya4dfb122011-07-07 19:01:57 +00005693<p>If filter-type is 4 or less, the specified PNG filter-type is used for
5694all scanlines:</p>
cristy3ed852e2009-09-05 21:47:34 +00005695
5696<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00005697 0: none
5698 1: sub
5699 2: up
5700 3: average
5701 4: Paeth
cristy3ed852e2009-09-05 21:47:34 +00005702</pre>
5703
cristy87a7f072011-07-01 00:08:52 +00005704<p>If filter-type is 5, adaptive filtering is used when quality is greater
5705than 50 and the image does not have a color map, otherwise no filtering is
5706used.</p>
cristy3ed852e2009-09-05 21:47:34 +00005707
cristy87a7f072011-07-01 00:08:52 +00005708<p>If filter-type is 6, adaptive filtering
5709with <em class="arg">minimum-sum-of-absolute-values</em> is used.</p>
cristy3ed852e2009-09-05 21:47:34 +00005710
cristy87a7f072011-07-01 00:08:52 +00005711<p>Only if the output is MNG, if filter-type is 7, the LOCO color
5712transformation (intrapixel differencing) and adaptive filtering
5713with <em class="arg">minimum-sum-of-absolute-values</em> are used.</p>
cristy3ed852e2009-09-05 21:47:34 +00005714
cristy87a7f072011-07-01 00:08:52 +00005715<p>If the filter-type is 8 the zlib Z_RLE compression strategy is used with
5716 no PNG filtering.</p>
cristy3ed852e2009-09-05 21:47:34 +00005717
cristy87a7f072011-07-01 00:08:52 +00005718<p>If the filter-type is 9 the zlib Z_RLE compression strategy is used with
5719 adaptive PNG filtering.</p>
5720
cristya4dfb122011-07-07 19:01:57 +00005721<p>The quality setting has no effect on the appearance or signature of PNG
5722and MNG images, since the compression is always lossless.</p>
5723
5724<p>Not all combinations of compression level, strategy, and PNG filter type
5725can be obtained using the -quality option. For more precise control,
5726you can use the PNG:compression-level=N, PNG:compression-strategy=N, and
5727PNG:compression-filter=N defines, respectively, instead.
cristy751980d2012-06-03 23:18:35 +00005728See <a href="command-line-options.html#define">-define</a>. Values from the defines take precedence
cristya4dfb122011-07-07 19:01:57 +00005729over values from the -quality option.</p>
cristy87a7f072011-07-01 00:08:52 +00005730
5731<p>For further information, see
5732the <a href="http://www.w3.org/pub/WWW/TR">PNG</a> specification.</p>
cristy3ed852e2009-09-05 21:47:34 +00005733
cristy3ed852e2009-09-05 21:47:34 +00005734<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005735 <h4><a id="quantize"></a>-quantize <em class="arg">colorspace</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005736</div>
5737
cristy3c98a4f2010-08-13 20:09:41 +00005738<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>
cristy3ed852e2009-09-05 21:47:34 +00005739
cristy3c98a4f2010-08-13 20:09:41 +00005740<p>This setting defines the colorspace used to sort out and reduce the number
5741of colors needed by an image (for later dithering) by operators such as <a
cristy751980d2012-06-03 23:18:35 +00005742href="command-line-options.html#colors" >-colors</a>, Note that color reduction also happens
cristy3c98a4f2010-08-13 20:09:41 +00005743automatically when saving images to color-limited image file formats, such as
5744GIF, and PNG8.</p>
cristy3ed852e2009-09-05 21:47:34 +00005745
5746
5747<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005748 <h4><a id="quiet"></a>-quiet</h4>
cristy3ed852e2009-09-05 21:47:34 +00005749</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;">
cristy751980d2012-06-03 23:18:35 +00005754 <h4><a id="radial-blur"></a>-radial-blur <em class="arg">angle</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005755</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
5760such actually mis-named. </p>
5761
cristy751980d2012-06-03 23:18:35 +00005762<p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
cristy3ed852e2009-09-05 21:47:34 +00005763pixels which are outside the image proper are blurred into the final result.
5764</p>
5765
5766
5767<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005768 <h4><a id="raise"></a>-raise <em class="arg">thickness</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005769</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
cristy751980d2012-06-03 23:18:35 +00005773<p>This will create a 3-D effect. Use <a href="command-line-options.html#raise">-raise</a> to create
5774a raised effect, otherwise use <a href="command-line-options.html#raise">+raise</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00005775
cristy751980d2012-06-03 23:18:35 +00005776<p>Unlike the similar <a href="command-line-options.html#frame">-frame</a> option, <a
5777href="command-line-options.html#raise">-raise</a> does not alter the dimensions of the image.</p>
cristy3ed852e2009-09-05 21:47:34 +00005778
5779<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005780 <h4><a id="random-threshold"></a>-random-threshold <em class="arg">low</em>x<em class="arg">high</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005781</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;">
cristydcca3fa2010-12-29 21:50:07 +00005786 <h4><a id="red-primary"></a>-red-primary <em class="arg">x,y</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005787</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;">
cristydcca3fa2010-12-29 21:50:07 +00005792 <h4><a id="regard-warnings"></a>-regard-warnings</h4>
cristy3ed852e2009-09-05 21:47:34 +00005793</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;">
cristydcca3fa2010-12-29 21:50:07 +00005798 <h4><a id="remap"></a>-remap <em class="arg">filename</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005799</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
cristy751980d2012-06-03 23:18:35 +00005803<p>If the <a href="command-line-options.html#dither">-dither</a> setting is enabled (the default) then
cristy3ed852e2009-09-05 21:47:34 +00005804the given colors are dithered over the image as necessary, otherwise the closest
5805color (in RGB colorspace) is selected to replace that pixel in the image. </p>
5806
cristy751980d2012-06-03 23:18:35 +00005807<p>As a side effect of applying a <a href="command-line-options.html#remap">-remap</a> of colors across all
cristy3ed852e2009-09-05 21:47:34 +00005808images in the current image sequence, all the images will have the same color
5809table. That means that when saved to a file format such as GIF, it will use
5810that color table as a single common or global color table, for all the images,
5811without requiring extra local color tables. </p>
5812
cristy751980d2012-06-03 23:18:35 +00005813<p>Use <a href="command-line-options.html#remap">+remap</a> to reduce all images in the current image
cristy3ed852e2009-09-05 21:47:34 +00005814sequence to use a common color map over all the images. This equivalent to
5815appending all the images together (without extra background colors) and color
cristy751980d2012-06-03 23:18:35 +00005816reducing those images using <a href="command-line-options.html#colors">-colors</a> with a 256 color
5817limit, then <a href="command-line-options.html#remap">-remap</a> those colors over the original list of
cristy3ed852e2009-09-05 21:47:34 +00005818images. 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
cristy751980d2012-06-03 23:18:35 +00005821href="command-line-options.html#remap">+remap</a> should not perform any color reduction or dithering, as
cristy3ed852e2009-09-05 21:47:34 +00005822no color changes are needed. In that case, its only effect is to force the use
5823of a global color table. This recommended after using either <a
cristy751980d2012-06-03 23:18:35 +00005824href="command-line-options.html#colors">-colors</a> or <a href="command-line-options.html#ordered-dither">-ordered-dither</a> to
cristy3ed852e2009-09-05 21:47:34 +00005825reduce the number of colors in an animated image sequence. </p>
5826
5827<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005828 <h4><a id="region"></a>-region <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005829</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
cristy751980d2012-06-03 23:18:35 +00005833<p>The <em class="arg">x</em> and <em class="arg">y</em> offsets are treated
5834in the same manner as in <a href="command-line-options.html#crop">-crop</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00005835
cristy751980d2012-06-03 23:18:35 +00005836<p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
cristy3ed852e2009-09-05 21:47:34 +00005837
5838<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005839 <h4><a id="remote"></a>-remote</h4>
cristy3ed852e2009-09-05 21:47:34 +00005840</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
cristy751980d2012-06-03 23:18:35 +00005846<p>If you have more than one <a href="display.html">display</a> application
5847running simultaneously, use the <a href="command-line-options.html#window"> window</a> option to
5848specify which application to control.</p>
cristy3ed852e2009-09-05 21:47:34 +00005849
5850<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005851 <h4><a id="render"></a>-render</h4>
cristy3ed852e2009-09-05 21:47:34 +00005852</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
cristy751980d2012-06-03 23:18:35 +00005856<p>Use <a href="command-line-options.html#render">+render</a> to turn off rendering vector operations.
5857This useful when saving the result to vector formats such as MVG or SVG.</p>
cristy3ed852e2009-09-05 21:47:34 +00005858
5859<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005860<h4><a id="repage"></a>-repage <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005861</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
cristy751980d2012-06-03 23:18:35 +00005865<p>This option is like <a href="command-line-options.html#page">-page</a> but acts as an image operator
cristy3ed852e2009-09-05 21:47:34 +00005866rather than a setting. You can separately set the canvas size or the offset
5867of the image on that canvas by only providing those components. </p>
5868
cristy751980d2012-06-03 23:18:35 +00005869<p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
cristy3ed852e2009-09-05 21:47:34 +00005870
5871<p>If a <kbd>!</kbd> flag is given the offset given is added to the existing
5872offset to move the image relative to its previous position. This useful for
5873animation sequences. </p>
5874
5875<p>A given a canvas size of zero such as '<kbd>0x0</kbd>' forces it to
5876recalculate the canvas size so the image (at its current offset) will appear
5877completely on that canvas (unless it has a negative offset).</p>
5878
cristy751980d2012-06-03 23:18:35 +00005879<p>Use <a href="command-line-options.html#repage">+repage</a> to completely remove/reset the virtual
cristy3ed852e2009-09-05 21:47:34 +00005880canvas meta-data from the images. </p>
5881
cristy751980d2012-06-03 23:18:35 +00005882<p>The <a href="command-line-options.html#set">-set</a> '<kbd>page</kbd>' option can be used to
cristy3ed852e2009-09-05 21:47:34 +00005883directly assign virtual canvas meta-data. </p>
5884
5885
5886<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005887 <h4><a id="resample"></a>-resample <em class="arg">horizontal</em>x<em class="arg">vertical</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005888</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
cristy751980d2012-06-03 23:18:35 +00005892<p>Resize the image so that its rendered size remains the same as the original
5893at the specified target resolution. For example, if a 300 DPI image renders at
58943 inches by 2 inches on a 300 DPI device, when the image has been resampled to
589572 DPI, it will render at 3 inches by 2 inches on a 72 DPI device. Note that
5896only a small number of image formats (e.g. JPEG, PNG, and TIFF) are capable of
5897storing the image resolution. For formats which do not support an image
5898resolution, the original resolution of the image must be specified via <a
5899href="command-line-options.html#density">-density</a> on the command line prior to specifying the
5900resample resolution.</p>
cristy3ed852e2009-09-05 21:47:34 +00005901
cristy751980d2012-06-03 23:18:35 +00005902<p>Note that Photoshop stores and obtains image resolution from a proprietary
5903embedded profile. If this profile exists in the image, then Photoshop will
5904continue to treat the image using its former resolution, ignoring the image
5905resolution specified in the standard file header.</p>
cristy3ed852e2009-09-05 21:47:34 +00005906
5907<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005908 <h4><a id="resize"></a>-resize <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005909</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
cristy751980d2012-06-03 23:18:35 +00005913<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
5914ignored, and the <a href="command-line-options.html#gravity">-gravity</a> option has no effect.</p>
cristy3ed852e2009-09-05 21:47:34 +00005915
cristy751980d2012-06-03 23:18:35 +00005916<p>If the <a href="command-line-options.html#filter">-filter</a> option precedes the <a
5917href="command-line-options.html#resize">-resize</a> option, the image is resized with the specified
5918filter.</p>
cristy3ed852e2009-09-05 21:47:34 +00005919
cristy751980d2012-06-03 23:18:35 +00005920<p>Many image processing algorithms assume your image is in a linear-light
5921coding. If your image is gamma-corrected, you can remove the nonlinear gamma
5922correction, apply the transform, then restore it like this:</p>
cristy13538962010-02-26 17:53:04 +00005923
cristyeed6cb62012-01-28 19:38:34 +00005924<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>
cristy3ed852e2009-09-05 21:47:34 +00005925<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005926 <h4><a id="respect-parentheses"></a>-respect-parentheses</h4>
cristy3ed852e2009-09-05 21:47:34 +00005927</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;">
cristydcca3fa2010-12-29 21:50:07 +00005932 <h4><a id="reverse"></a>-reverse</h4>
cristy3ed852e2009-09-05 21:47:34 +00005933</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;">
cristydcca3fa2010-12-29 21:50:07 +00005939 <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>
cristy3ed852e2009-09-05 21:47:34 +00005940</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
cristy751980d2012-06-03 23:18:35 +00005944<p>A negative <em class="arg">x</em> offset rolls the image left-to-right.
5945A negative <em class="arg">y</em> offset rolls the image top-to-bottom.</p>
cristy3ed852e2009-09-05 21:47:34 +00005946
5947
5948<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005949 <h4><a id="rotate"></a>-rotate <em class="arg">degrees</em>{<em class="arg">&lt;</em>}{<em class="arg">&gt;</em>}</h4>
cristy3ed852e2009-09-05 21:47:34 +00005950</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
cristy751980d2012-06-03 23:18:35 +00005954<p>Use <kbd>&gt;</kbd> to rotate the image only if its width exceeds the
5955height. <kbd>&lt;</kbd> rotates the image <em>only</em> if its width is less
5956than the height. For example, if you specify <kbd>-rotate "-90&gt;"</kbd> and
5957the image size is 480x640, the image is not rotated. However, if the image is
5958640x480, 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
5960misinterpreted as a file redirection.</p>
cristy3ed852e2009-09-05 21:47:34 +00005961
5962<p>Empty triangles in the corners, left over from rotating the image, are
5963filled with the <kbd>background</kbd> color. </p>
5964
cristy751980d2012-06-03 23:18:35 +00005965<p>See also the <a href="command-line-options.html#distort">-distort</a> operator and specifically the
cristy3ed852e2009-09-05 21:47:34 +00005966'<kbd>ScaleRotateTranslate</kbd>' distort method. </p>
5967
5968
5969<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005970 <h4><a id="sample"></a>-sample <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005971</div>
5972
cristyd0bd44a2010-09-24 12:38:11 +00005973<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>
cristy3ed852e2009-09-05 21:47:34 +00005974
cristyd0bd44a2010-09-24 12:38:11 +00005975<p>Change the image size simply by directly sampling the pixels original
5976image. When magnifying, pixels are replicated in blocks. When minifying,
5977pixels are sub-sampled (i.e., some rows and columns are skipped over). </p>
cristy3ed852e2009-09-05 21:47:34 +00005978
cristy751980d2012-06-03 23:18:35 +00005979<p>The results are thus equivalent to using <a href="command-line-options.html#resize">-resize</a> with
5980a <a href="command-line-options.html#filter">-filter</a> setting of <kbd>point</kbd> (nearest
5981neighbour), though <a href="command-line-options.html#sample">-sample</a> is a lot faster, as it
cristyd0bd44a2010-09-24 12:38:11 +00005982avoids all the filter processing of the image. As such it completely ignores
cristy751980d2012-06-03 23:18:35 +00005983the current <a href="command-line-options.html#filter">-filter</a> setting. </p>
cristyd0bd44a2010-09-24 12:38:11 +00005984
cristy751980d2012-06-03 23:18:35 +00005985<p>The key feature of the <a href="command-line-options.html#sample">-sample</a> is that no new colors
cristyd0bd44a2010-09-24 12:38:11 +00005986will be added to the resulting image, though some colors may disappear. </p>
5987
cristy751980d2012-06-03 23:18:35 +00005988<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
5989ignored, unlike <a href="command-line-options.html#resize">-resize</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00005990
5991
5992<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005993 <h4><a id="sampling-factor"></a>-sampling-factor <em class="arg">horizontal-factor</em>x<em class="arg">vertical-factor</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005994</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
cristy751980d2012-06-03 23:18:35 +00005998<p>This option specifies the sampling factors to be used by the JPEG encoder
5999for chroma downsampling. If this option is omitted, the JPEG library will use
6000its own default values. When reading or writing the YUV format and when
6001writing the M2V (MPEG-2) format, use <a
6002href="command-line-options.html#sampling-factor">-sampling-factor 2x1</a> or <a
6003href="command-line-options.html#sampling-factor">-sampling-factor 4:2:2</a> to specify the 4:2:2
6004downsampling method.</p>
cristy3ed852e2009-09-05 21:47:34 +00006005
6006<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006007 <h4><a id="scale"></a>-scale <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006008</div>
6009
cristyd0bd44a2010-09-24 12:38:11 +00006010<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>
cristy3ed852e2009-09-05 21:47:34 +00006011
cristyd0bd44a2010-09-24 12:38:11 +00006012<p>Change the image size simply by replacing pixels by averaging pixels
cristyeed6cb62012-01-28 19:38:34 +00006013together when minifying, or replacing pixels when magnifying. </p>
cristyd0bd44a2010-09-24 12:38:11 +00006014
cristy751980d2012-06-03 23:18:35 +00006015<p>The results are thus equivalent to using <a href="command-line-options.html#resize">-resize</a> with
6016a <a href="command-line-options.html#filter">-filter</a> setting of <kbd>box</kbd>. Though it is a lot
cristyd0bd44a2010-09-24 12:38:11 +00006017faster, as it avoids all the filter processing of the image. As such it
cristy751980d2012-06-03 23:18:35 +00006018completely ignores the current <a href="command-line-options.html#filter">-filter</a> setting. </p>
cristyd0bd44a2010-09-24 12:38:11 +00006019
6020<p>If when shrinking (minifying) images the original image is some integer
cristyeed6cb62012-01-28 19:38:34 +00006021multiple of the new image size, the number of pixels averaged together to
cristyd0bd44a2010-09-24 12:38:11 +00006022produce the new pixel color is the same across the whole image. This is
6023a special case known as 'binning' and is often used as a method of reducing
6024noise in image such as those generated by digital cameras, especially in low
6025light conditions. </p>
6026
cristy3ed852e2009-09-05 21:47:34 +00006027
6028<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006029 <h4><a id="scene"></a>-scene <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006030</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;">
cristydcca3fa2010-12-29 21:50:07 +00006037 <h4><a id="screen"></a>-screen</h4>
cristy3ed852e2009-09-05 21:47:34 +00006038</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
cristy751980d2012-06-03 23:18:35 +00006042<p>This option indicates that the GetImage request used to obtain the image
6043should be done on the root window, rather than directly on the specified
6044window. In this way, you can obtain pieces of other windows that overlap the
6045specified window, and more importantly, you can capture menus or other popups
6046that are independent windows but appear over the specified window.</p>
cristy3ed852e2009-09-05 21:47:34 +00006047
6048<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006049 <h4><a id="seed"></a>-seed</h4>
cristy3ed852e2009-09-05 21:47:34 +00006050</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;">
cristydcca3fa2010-12-29 21:50:07 +00006055 <h4><a id="segment"></a>-segment <em class="arg">cluster-threshold</em>x<em class="arg">smoothing-threshold</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006056</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
cristy751980d2012-06-03 23:18:35 +00006060<p>Segment an image by analyzing the histograms of the color components and
6061identifying units that are homogeneous with the fuzzy c-means technique. This
6062is part of the ImageMagick color quantization routines. </p>
cristy3ed852e2009-09-05 21:47:34 +00006063
cristy751980d2012-06-03 23:18:35 +00006064<p>Specify <em class="arg">cluster threshold</em> as the number of pixels in
6065each cluster that must exceed the cluster threshold to be considered valid.
6066<em class="arg">Smoothing threshold</em> eliminates noise in the second
6067derivative of the histogram. As the value is increased, you can expect
6068a smoother second derivative. The default is 1.5.</p>
cristy3ed852e2009-09-05 21:47:34 +00006069
cristy751980d2012-06-03 23:18:35 +00006070<p>If the <a href="command-line-options.html#verbose">-verbose</a> setting is defined, a detailed report
cristy3ed852e2009-09-05 21:47:34 +00006071of the color clusters is returned.</p>
6072
6073
6074<div style="margin: auto;">
cristy751980d2012-06-03 23:18:35 +00006075 <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>
cristy2e2662a2010-10-09 14:29:37 +00006076</div>
6077
cristy3ed852e2009-09-05 21:47:34 +00006078<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
cristy751980d2012-06-03 23:18:35 +00006080<p>Blurs those pixels that are less than or equal to the threshold in
6081contrast. The threshold may be expressed as a fraction of <em
6082class="QR">QuantumRange</em> or as a percentage.</p>
cristy2e2662a2010-10-09 14:29:37 +00006083
cristy3ed852e2009-09-05 21:47:34 +00006084<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006085 <h4><a id="separate"></a>-separate</h4>
cristy3ed852e2009-09-05 21:47:34 +00006086</div>
6087
cristy751980d2012-06-03 23:18:35 +00006088<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>
cristy3ed852e2009-09-05 21:47:34 +00006089
6090<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006091 <h4><a id="sepia-tone"></a>-sepia-tone <em class="arg">threshold</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006092</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
cristy751980d2012-06-03 23:18:35 +00006098<p>This option applies a special effect to the image, similar to the effect
6099achieved in a photo darkroom by sepia toning. Threshold ranges from 0 to <em
6100class="QR">QuantumRange</em> and is a measure of the extent of the sepia
6101toning. A threshold of 80% is a good starting point for a reasonable
6102tone.</p>
cristy3ed852e2009-09-05 21:47:34 +00006103
cristyd0bda5e2010-09-21 16:22:45 +00006104
6105
cristy3ed852e2009-09-05 21:47:34 +00006106<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006107 <h4><a id="set"></a>-set <em class="arg">key value</em></h4>
6108 <h4>+set <em class="arg">key</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006109</div>
6110
cristyd0bd44a2010-09-24 12:38:11 +00006111<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
cristyd0bda5e2010-09-21 16:22:45 +00006112image sequence.</td><td style='text-align:right;'></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00006113
cristyd0bd44a2010-09-24 12:38:11 +00006114<p>This will assign (or modify) specific settings attached to all the images
cristy751980d2012-06-03 23:18:35 +00006115in the current image sequence. Using the <a href="command-line-options.html#set">+set</a> form of the
cristyd0bd44a2010-09-24 12:38:11 +00006116option will either remove, or reset that setting to a default state, as
6117appropriate. </p>
cristy3ed852e2009-09-05 21:47:34 +00006118
cristyd0bd44a2010-09-24 12:38:11 +00006119<p>For example, it will modify specific well known image meta-data
6120'attributes' such as those normally overridden by: the options <a
cristy751980d2012-06-03 23:18:35 +00006121href="command-line-options.html#delay" >-delay</a>, <a href="command-line-options.html#dispose" >-dispose</a>, and <a
6122href="command-line-options.html#page" >-page</a>, <a href="command-line-options.html#colorspace" >-colorspace</a>; generally
cristyd0bd44a2010-09-24 12:38:11 +00006123assigned before the image is read in, by using a <em class="arg">key</em> of
6124the same name. </p>
cristy3ed852e2009-09-05 21:47:34 +00006125
cristyd0bd44a2010-09-24 12:38:11 +00006126<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
cristy751980d2012-06-03 23:18:35 +00006128'property' string. Such settings are listed in <a href="command-line-options.html#verbose"
cristyd0bda5e2010-09-21 16:22:45 +00006129>-verbose</a> information ("<kbd>info:</kbd>" output format) as "Properties".
6130</p>
6131
cristy84134182011-06-15 22:59:00 +00006132<p>This includes string 'properties' that are set by and assigned to images
cristy751980d2012-06-03 23:18:35 +00006133using 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
6135a global 'artifact' which are automatically assigned (and any <a href="escape.html" >Format Percent
cristyd0bd44a2010-09-24 12:38:11 +00006136Escapes</a> expanded) to images as they are read in. For example:</p>
cristyd0bda5e2010-09-21 16:22:45 +00006137
cristyeed6cb62012-01-28 19:38:34 +00006138<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>
cristy751980d2012-06-03 23:18:35 +00006139<p>The set value can also make use of <a href="escape.html" >Format and Print Image
cristyd0bd44a2010-09-24 12:38:11 +00006140Properties</a> in the defined value. For example:</p>
6141
cristyeed6cb62012-01-28 19:38:34 +00006142<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>
cristy84134182011-06-15 22:59:00 +00006143<p>Other well known 'properties' that are availible include:
cristyd0bd44a2010-09-24 12:38:11 +00006144'<kbd>date:create</kbd>' and '<kbd>date:modify</kbd>' and
6145'<kbd>signature</kbd>'. </p>
6146
cristy751980d2012-06-03 23:18:35 +00006147<p>The <a href="command-line-options.html#repage">-repage</a> operator will also allow you to modify
cristyd0bd44a2010-09-24 12:38:11 +00006148the '<kbd>page</kbd>' attribute of an image for images already in memory (also
cristy751980d2012-06-03 23:18:35 +00006149see <a href="command-line-options.html#repage">-page</a>). However it is designed to provide a finer
6150control of the sub-parts of this 'attribute'. The <a href="command-line-options.html#set">-set page</a>
cristyd0bd44a2010-09-24 12:38:11 +00006151option will only provide a direct, unmodified assignment of '<kbd>page</kbd>'
6152attribute. </p>
6153
6154<p>This option can also associate a colorspace or profile with your image.
6155For example,</p>
6156
cristyeed6cb62012-01-28 19:38:34 +00006157<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert image.psd -set profile ISOcoated_v2_eci.icc image-icc.psd</span></p>
cristyd0bda5e2010-09-21 16:22:45 +00006158<p>Some 'properties' must be defined in a specific way to be used. For
6159example only 'properties' prefixed with "<kbd>filename:</kbd>" can be used to
6160modify the output filename of an image. For example</p>
6161
cristyeed6cb62012-01-28 19:38:34 +00006162<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert rose: -set filename:mysize '%wx%h' 'rose_%[filename:mysize].png'</span></p>
cristyd0bda5e2010-09-21 16:22:45 +00006163<p>If the setting value is prefixed with "<kbd>option:</kbd>" the setting will
6164be saved as a global "Artifact" exactly as if it was set using the <a
cristy751980d2012-06-03 23:18:35 +00006165href="command-line-options.html#define" >-define</a> option. As such settings are global in scope, they
cristy84134182011-06-15 22:59:00 +00006166can be used to pass 'attributes' and 'properties' of one specific image,
cristyd0bd44a2010-09-24 12:38:11 +00006167in a way that allows you to use them in a completely different image, even if
6168the original image has long since been modified or destroyed. For example: </p>
6169
cristyeed6cb62012-01-28 19:38:34 +00006170<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>
cristy751980d2012-06-03 23:18:35 +00006171<p>Note that <a href="escape.html" >Format Percent Escapes</a> will only match
cristyd0bd44a2010-09-24 12:38:11 +00006172a 'artifact' if the given <em class="arg">key</em> does not match an existing
cristy323f35b2011-03-24 23:05:13 +00006173'attribute' or 'property'. </p>
cristyd0bda5e2010-09-21 16:22:45 +00006174
6175<p>You can set the attributes of the image registry by prefixing the value
6176with <kbd>registry:</kbd>.</p>
6177
cristy751980d2012-06-03 23:18:35 +00006178<p>The <a href="command-line-options.html#set">-set profile</a> option can also be used to inject
cristy84134182011-06-15 22:59:00 +00006179previously-formatted ancillary chunks into the output PNG file, using
6180the commandline option as shown below or by setting the profile via a
6181programming interface:</p>
6182
cristyeed6cb62012-01-28 19:38:34 +00006183<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>
cristy84134182011-06-15 22:59:00 +00006184<p>where <em>x</em> is a location flag and
6185<em class="arg">filename</em> is a file containing the chunk
6186name in the first 4 bytes, then a colon (":"), followed by the chunk data.
6187This encoder will compute the chunk length and CRC, so those must not
6188be included in the file.</p>
6189
6190<p>"x" can be "b" (before PLTE), "m" (middle, i.e., between PLTE and IDAT),
6191or "e" (end, i.e., after IDAT). If you want to write multiple chunks
6192of the same type, then add a short unique string after the "x" to prevent
6193subsequent profiles from overwriting the preceding ones, e.g.,</p>
6194
6195
cristyeed6cb62012-01-28 19:38:34 +00006196<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert in.png -set profile PNG-chunk-b01:file01 / <br/>
cristy84134182011-06-15 22:59:00 +00006197 -profile PNG-chunk-b02:file02 out.png</span></p>
6198<p>&nbsp;</p>
cristyd0bda5e2010-09-21 16:22:45 +00006199
cristy3ed852e2009-09-05 21:47:34 +00006200
6201<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006202 <h4><a id="shade"></a>-shade <em class="arg">azimuth</em>x<em class="arg">elevation</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006203</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
cristy751980d2012-06-03 23:18:35 +00006207<p>Specify <em class="arg">azimuth</em> and <em class="arg">elevation</em> as
6208the position of the light source. Use <a href="command-line-options.html#shade">+shade</a> to return
6209the shading results as a grayscale image.</p>
cristy3ed852e2009-09-05 21:47:34 +00006210
6211<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006212 <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>
cristy3ed852e2009-09-05 21:47:34 +00006213</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;">
cristydcca3fa2010-12-29 21:50:07 +00006218 <h4><a
cristy3ed852e2009-09-05 21:47:34 +00006219id="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
cristy751980d2012-06-03 23:18:35 +00006224<p>This option specifies whether the utility should attempt to use shared
6225memory for pixmaps. ImageMagick must be compiled with shared memory support,
6226and the display must support the <em class="arg">MIT-SHM</em> extension.
6227Otherwise, this option is ignored. The default is <kbd>True</kbd>.</p>
cristy3ed852e2009-09-05 21:47:34 +00006228
6229<div style="margin: auto;">
cristyeed6cb62012-01-28 19:38:34 +00006230 <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>
cristy3ed852e2009-09-05 21:47:34 +00006231</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;">
cristydcca3fa2010-12-29 21:50:07 +00006238 <h4><a id="shave"></a>-shave <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006239</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
cristy751980d2012-06-03 23:18:35 +00006243<p>The <em class="arg">size</em> portion of the <em class="arg">geometry</em>
6244argument specifies the width of the region to be removed from both sides of
6245the image and the height of the regions to be removed from top and bottom.
6246Offsets are ignored.</p>
cristy3ed852e2009-09-05 21:47:34 +00006247
cristy751980d2012-06-03 23:18:35 +00006248<p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
cristy3ed852e2009-09-05 21:47:34 +00006249
6250<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006251 <h4><a id="shear"></a>-shear <em class="arg">Xdegrees</em>[x<em class="arg">Ydegrees</em>]</h4>
cristy3ed852e2009-09-05 21:47:34 +00006252</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
cristy751980d2012-06-03 23:18:35 +00006256<p>The shear angles may be positive, negative, or zero. When <em
6257class="arg">Ydegrees</em> is omitted it defaults to 0. When both angles are
6258given, the horizontal component of the shear is performed before the vertical
6259component.</p>
cristy3ed852e2009-09-05 21:47:34 +00006260
cristy751980d2012-06-03 23:18:35 +00006261<p>Shearing slides one edge of an image along the x-axis or y-axis (i.e.,
6262horizontally or vertically, respectively),creating a parallelogram. The amount
6263of each is controlled by the respective shear angle. For horizontal shears,
6264<em class="arg">Xdegrees</em> is measured clockwise relative to "up" (the
6265negative y-axis), sliding the top edge to the right when 0&deg;&lt;<em
6266class="arg">Xdegrees</em>&lt;90&deg; and to the left when 90&deg;&lt;<em
6267class="arg">Xdegrees</em>&lt;180&deg;. For vertical shears <em
6268class="arg">Ydegrees</em> is measured clockwise relative to "right" (the
6269positive x-axis), sliding the right edge down when 0&deg;&lt;<em
6270class="arg">Ydegrees</em>&lt;90&deg; and up when 90&deg;&lt;<em
6271class="arg">Ydegrees</em>&lt;180&deg;.</p>
cristy3ed852e2009-09-05 21:47:34 +00006272
cristy751980d2012-06-03 23:18:35 +00006273<p>Empty triangles left over from shearing the image are filled with the color
6274defined by the <a href="command-line-options.html#fill">-background</a> option. The color is specified
6275using the format described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00006276
cristy751980d2012-06-03 23:18:35 +00006277<p>The horizontal shear is performed before the vertical part. This is
6278important to note, since horizontal and vertical shears do not
6279<em>commute</em>, i.e., the order matters in a sequence of shears. For
6280example, the following two commands are not equivalent.</p>
cristy3ed852e2009-09-05 21:47:34 +00006281
cristyeed6cb62012-01-28 19:38:34 +00006282<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>
cristy751980d2012-06-03 23:18:35 +00006283<p>The first of the two commands above is equivalent to the following, except
6284for the amount of empty space created; the command that follows generates
6285a smaller image, and so is a better choice in terms of time and space.</p>
cristy3ed852e2009-09-05 21:47:34 +00006286
cristyeed6cb62012-01-28 19:38:34 +00006287<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert logo: -shear 20x60 logo-sheared.png</span></p>
cristy3ed852e2009-09-05 21:47:34 +00006288<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006289 <h4><a id="sigmoidal-contrast"></a>-sigmoidal-contrast <em class="arg">contrast</em>x<em class="arg">mid-point</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006290</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
cristy751980d2012-06-03 23:18:35 +00006294<p>Increase the contrast of the image using a sigmoidal transfer function
6295without saturating highlights or shadows. <em class="arg">Contrast</em>
6296indicates how much to increase the contrast. For example, near 0 is none, 3 is
6297typical and 20 is a lot. Note that exactly zero is invalid, but 0.0001 is
6298negligibly different from no change in contrast. <em
6299class="arg">mid-point</em> indicates where midtones fall in the resultant
6300image (0 is white; 50% is middle-gray; 100% is black). By default the image
6301contrast is increased, use <em class="arg">+sigmoidal-contrast</em> to
6302decrease the contrast.</p>
6303
6304<p>To achieve the equivalent of a sigmoidal brightness change, use <em
6305class="arg">-sigmoidal-contrast brightnessx0%</em> to increase brightness and
6306class="arg">+sigmoidal-contrast brightnessx0%</em> to decrease brightness.</p>
cristy3ed852e2009-09-05 21:47:34 +00006307
6308<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006309 <h4><a id="silent"></a>-silent</h4>
cristy3ed852e2009-09-05 21:47:34 +00006310</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;">
cristydcca3fa2010-12-29 21:50:07 +00006315 <h4><a id="size"></a>-size <em class="arg">width</em>[x<em class="arg">height</em>][<em class="arg">+offset</em>]</h4>
cristy3ed852e2009-09-05 21:47:34 +00006316</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
cristy751980d2012-06-03 23:18:35 +00006320<p>Use this option to specify the width and height of raw images whose
6321dimensions are unknown such as <kbd>GRAY</kbd>, <kbd>RGB</kbd>, or
6322<kbd>CMYK</kbd>. In addition to width and height, use <a
6323href="command-line-options.html#size">-size</a> with an offset to skip any header information in the
6324image or tell the number of colors in a <kbd>MAP</kbd> image file, (e.g. -size
6325640x512+256).</p>
cristy3ed852e2009-09-05 21:47:34 +00006326
6327<p>For Photo CD images, choose from these sizes:</p>
6328
6329<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00006330 192x128
6331 384x256
6332 768x512
6333 1536x1024
6334 3072x2048
cristy3ed852e2009-09-05 21:47:34 +00006335</pre>
6336
cristy3ed852e2009-09-05 21:47:34 +00006337<div style="margin: auto;">
cristy751980d2012-06-03 23:18:35 +00006338 <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>
cristy3ed852e2009-09-05 21:47:34 +00006339</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
cristy751980d2012-06-03 23:18:35 +00006343<p>Sketch with the given radius, standard deviation (sigma), and angle. The
6344angle given is the angle toward which the image is sketched. That is the
6345direction people would consider the object is coming from. </p>
cristy3ed852e2009-09-05 21:47:34 +00006346
6347<div style="margin: auto;">
cristy2d67ddd2011-02-13 15:38:23 +00006348 <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;">
cristydcca3fa2010-12-29 21:50:07 +00006354 <h4><a id="snaps"></a>-snaps <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006355</div>
6356
cristy751980d2012-06-03 23:18:35 +00006357<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>
cristy3ed852e2009-09-05 21:47:34 +00006358
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;">
cristydcca3fa2010-12-29 21:50:07 +00006362 <h4><a id="solarize"></a>-solarize <em class="arg">threshold</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006363</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
cristy751980d2012-06-03 23:18:35 +00006369<p>This option produces a <em class="arg">solarization</em> effect seen when
6370exposing a photographic film to light during the development process.</p>
cristy3ed852e2009-09-05 21:47:34 +00006371
6372<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006373 <h4><a id="sparse-color"></a>-sparse-color <em
cristy3ed852e2009-09-05 21:47:34 +00006374 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">
cristyacc04882011-05-04 23:03:43 +00006388 <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">
cristy3ed852e2009-09-05 21:47:34 +00006401 <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>
cristyd0bda5e2010-09-21 16:22:45 +00006408 <td valign="top">Colors points biased on the ratio of inverse distance
cristy3ed852e2009-09-05 21:47:34 +00006409 squared. Generating spots of color in a sea of the average of
6410 colors. </td>
cristy3ed852e2009-09-05 21:47:34 +00006411 </tr>
6412
6413 <tr valign="top">
cristyacc04882011-05-04 23:03:43 +00006414 <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>
cristy3ed852e2009-09-05 21:47:34 +00006419 </tr>
6420
6421 </tbody>
6422</table>
6423
6424<p>The points are placed according to the images location on the virtual
cristy751980d2012-06-03 23:18:35 +00006425canvas (<a href="command-line-options.html#page" >-page</a> or <a href="command-line-options.html#repage" >-repage</a>
cristy3ed852e2009-09-05 21:47:34 +00006426offset), and do not actually have to exist on the given image, but may be
6427some point beyond the edge of the image. All points are floating point values.
6428</p>
6429
cristy751980d2012-06-03 23:18:35 +00006430<p>Only the color channels defined by the <a href="command-line-options.html#channel" >-channel</a> are
cristyacc04882011-05-04 23:03:43 +00006431modified, which means that by default matte/alpha transparency channel is not
6432effected. Typically transparency channel is turned off either before or after
6433the operation. </P>
6434
6435Of course if some color points are transparent to generate a transparent
6436gradient, then the image also requires transparency enabled to store the
6437values. </p>
cristy3ed852e2009-09-05 21:47:34 +00006438
6439<p>All the above methods when given a single point of color will replace all
6440the colors in the image with the color given, regardless of the point. This is
6441logical, and provides an alternative technique to recolor a image to some
6442default value. </p>
6443
6444
6445<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006446 <h4><a id="splice"></a>-splice <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006447</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
cristyacc04882011-05-04 23:03:43 +00006451<p>This will add rows and columns of the current <a
cristy751980d2012-06-03 23:18:35 +00006452href="command-line-options.html#background">-background</a> color into the given image according to the
6453given <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
cristyacc04882011-05-04 23:03:43 +00006454image into four quadrants, separating them by the inserted rows and columns.
6455</P>
6456
6457If a dimension of geometry is zero no rows or columns will be added for that
6458dimension. Similarly using a zero offset with the appropriate <a
cristy751980d2012-06-03 23:18:35 +00006459href="command-line-options.html#gravity">-gravity</a> setting will add rows and columns to the edges of
cristyacc04882011-05-04 23:03:43 +00006460the image, padding the image only along that one edge. Edge padding is what <a
cristy751980d2012-06-03 23:18:35 +00006461href="command-line-options.html#splice">-splice</a> is most commonly used for. </p>
cristyacc04882011-05-04 23:03:43 +00006462
6463<p>If the exact same <em class="arg">geometry</em> and <a
cristy751980d2012-06-03 23:18:35 +00006464href="command-line-options.html#gravity">-gravity</a> is later used with <a href="command-line-options.html#chop">-chop</a> the
cristyacc04882011-05-04 23:03:43 +00006465added added all splices removed. </p>
cristy3ed852e2009-09-05 21:47:34 +00006466
6467<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006468 <h4><a id="spread"></a>-spread <em class="arg">amount</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006469</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
cristy751980d2012-06-03 23:18:35 +00006473<p>The argument <em class="arg">amount</em> defines the size of the
6474neighborhood around each pixel from which to choose a candidate pixel to
6475swap.</p>
cristy3ed852e2009-09-05 21:47:34 +00006476
6477<div style="margin: auto;">
cristy323f35b2011-03-24 23:05:13 +00006478 <h4><a id="statistic"></a>-statistic <em class="arg">type</em> <em class="arg">geometry</em></h4>
cristyb52981c2011-03-19 17:09:31 +00006479</div>
6480
cristy751980d2012-06-03 23:18:35 +00006481<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>
cristyb52981c2011-03-19 17:09:31 +00006482
6483<p>Choose from these statistic types:</p>
6484<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00006485 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
cristyb52981c2011-03-19 17:09:31 +00006492</pre>
6493
6494<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006495 <h4><a id="stegano"></a>-stegano <em class="arg">offset</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006496</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
cristy751980d2012-06-03 23:18:35 +00006500<p>Use an offset to start the image hiding some number of pixels from the
6501beginning of the image. Note this offset and the image size. You will need
6502this information to recover the steganographic image (e.g. display -size
6503320x256+35 stegano:image.png).</p>
cristy3ed852e2009-09-05 21:47:34 +00006504
6505<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006506 <h4><a id="stereo"></a>-stereo <em class="arg">+x</em>{<em class="arg">+y</em>}</h4>
cristy3ed852e2009-09-05 21:47:34 +00006507</div>
6508
cristy751980d2012-06-03 23:18:35 +00006509<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>
cristy3ed852e2009-09-05 21:47:34 +00006510
cristy751980d2012-06-03 23:18:35 +00006511<p>The left side of the stereo pair is saved as the red channel of the output
6512image. The right side is saved as the green channel. Red-green stereo glasses
6513are required to properly view the stereo image.</p>
cristy3ed852e2009-09-05 21:47:34 +00006514
6515<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006516 <h4><a id="storage-type"></a>-storage-type <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006517</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">
cristye9a32c32011-04-07 01:11:05 +00006522 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
cristy3ed852e2009-09-05 21:47:34 +00006529</pre>
6530
6531<p>Float and double types are normalized from 0.0 to 1.0 otherwise the pixels
6532values range from 0 to the maximum value the storage type can support.</p>
6533
6534<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006535 <h4><a id="stretch"></a>-stretch <em class="arg">fontStretch</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006536</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
cristy751980d2012-06-03 23:18:35 +00006540<p>This setting suggests a type of stretch that ImageMagick should try to
6541apply to the currently selected font family. Select <em
6542class="arg">fontStretch</em> from the following.</p>
cristy3ed852e2009-09-05 21:47:34 +00006543
6544<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00006545 Any
6546 Condensed
6547 Expanded
6548 ExtraCondensed
6549 ExtraExpanded
6550 Normal
6551 SemiCondensed
6552 SemiExpanded
6553 UltraCondensed
6554 UltraExpanded
cristy3ed852e2009-09-05 21:47:34 +00006555</pre>
6556
cristy751980d2012-06-03 23:18:35 +00006557<p>To print a complete list of stretch types, use <a href="command-line-options.html#list">-list
6558stretch</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00006559
cristy751980d2012-06-03 23:18:35 +00006560<p>For other settings that affect fonts, see the options <a
6561href="command-line-options.html#font">-font</a>, <a href="command-line-options.html#family">-family</a>, <a
6562href="command-line-options.html#style">-style</a>, and <a href="command-line-options.html#weight">-weight</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00006563
6564<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006565 <h4><a id="strip"></a>-strip</h4>
cristy3ed852e2009-09-05 21:47:34 +00006566</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;">
cristydcca3fa2010-12-29 21:50:07 +00006571 <h4><a id="stroke"></a>-stroke <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006572</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
cristy751980d2012-06-03 23:18:35 +00006576<p>The color is specified using the format described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00006577
cristy751980d2012-06-03 23:18:35 +00006578<p>See <a href="command-line-options.html#draw">-draw</a> for further details.</p>
cristy3ed852e2009-09-05 21:47:34 +00006579
6580<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006581 <h4><a id="strokewidth"></a>-strokewidth <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006582</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
cristy751980d2012-06-03 23:18:35 +00006586<p>See <a href="command-line-options.html#draw">-draw</a> for further details.</p>
cristy3ed852e2009-09-05 21:47:34 +00006587
6588<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006589 <h4><a id="style"></a>-style <em class="arg">fontStyle</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006590</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
cristy71a3f602010-09-15 12:38:16 +00006594<p>This setting suggests a font style that ImageMagick should try to apply to
6595the currently selected font family. Select <em class="arg">fontStyle</em> from
6596the following.</p>
cristy3ed852e2009-09-05 21:47:34 +00006597
6598<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00006599 Any
6600 Italic
6601 Normal
6602 Oblique
cristy3ed852e2009-09-05 21:47:34 +00006603</pre>
6604
cristy751980d2012-06-03 23:18:35 +00006605<p>For other settings that affect fonts, see the options <a
6606href="command-line-options.html#font">-font</a>, <a href="command-line-options.html#family">-family</a>, <a
6607href="command-line-options.html#stretch">-stretch</a>, and <a href="command-line-options.html#weight">-weight</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00006608
6609<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006610 <h4><a id="subimage-search"></a>-subimage-search</h4>
cristyae6203d2010-08-09 01:12:14 +00006611</div>
6612
cristy751980d2012-06-03 23:18:35 +00006613<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>
cristyd4d64ed2010-08-22 22:19:33 +00006614
cristy71a3f602010-09-15 12:38:16 +00006615<p>This option is required to have compare search for the best match location
6616of a small image within a larger image. This search will produce two images
cristyd0bd44a2010-09-24 12:38:11 +00006617(or two frames). The first is the "difference" image and the second will
cristy71a3f602010-09-15 12:38:16 +00006618be the "match score" image.</p>
6619
cristyd0bd44a2010-09-24 12:38:11 +00006620<p>The "match-score" image is smaller containing a pixel for ever possible
cristy71a3f602010-09-15 12:38:16 +00006621position of the top-left corner of the given sub-image. that is its size will
6622be the size of the larger_image - sub_image + 1. The brightest location in
6623this image is the location s the locate on the best match that is also
6624reported. Note that this may or may nor be a perfect match, and the actual
6625brightness will reflect this. Other bright 'peaks' can be used to locate other
cristyeed6cb62012-01-28 19:38:34 +00006626possible matching locations. </p>
cristy71a3f602010-09-15 12:38:16 +00006627
cristyeed6cb62012-01-28 19:38:34 +00006628<p>Note that the search will try to compare the sub-image at every possible
cristy71a3f602010-09-15 12:38:16 +00006629location in the larger image, as such it can be very slow. The smaller the
cristyd0bd44a2010-09-24 12:38:11 +00006630sub-image the faster this search is. </p>
cristy71a3f602010-09-15 12:38:16 +00006631
cristyae6203d2010-08-09 01:12:14 +00006632
6633<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006634 <h4><a id="swap"></a>-swap <em class="arg">index,index</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006635</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
cristy751980d2012-06-03 23:18:35 +00006639<p>For example, <a href="command-line-options.html#swap">-swap 0,2</a> swaps the first and the third
6640images in the current image sequence. Use <a href="command-line-options.html#swap">+swap</a> to switch
cristy71a3f602010-09-15 12:38:16 +00006641the last two images in the sequence.</p>
cristy3ed852e2009-09-05 21:47:34 +00006642
6643<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006644 <h4><a id="swirl"></a>-swirl <em class="arg">degrees</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006645</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;">
cristydcca3fa2010-12-29 21:50:07 +00006652 <h4><a id="synchronize"></a>-synchronize</h4>
cristy5063d812010-10-19 16:28:10 +00006653</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;">
cristydcca3fa2010-12-29 21:50:07 +00006658 <h4><a id="taint"></a>-taint</h4>
cristy3ed852e2009-09-05 21:47:34 +00006659</div>
6660
cristy5063d812010-10-19 16:28:10 +00006661<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>
cristy3ed852e2009-09-05 21:47:34 +00006662
6663<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006664 <h4><a id="text-font"></a>-text-font <em class="arg">name</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006665</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
cristy751980d2012-06-03 23:18:35 +00006669<p>Specifies the name of the preferred font to use in fixed (typewriter style)
6670formatted text. The default is 14 point <em class="arg">Courier</em>.</p>
cristy3ed852e2009-09-05 21:47:34 +00006671
cristy751980d2012-06-03 23:18:35 +00006672<p>You can tag a font to specify whether it is a PostScript, TrueType, or
6673OPTION1 font. For example, <kbd>Courier.ttf</kbd> is a TrueType font and
6674<kbd>x:fixed</kbd> is OPTION1.</p>
cristy3ed852e2009-09-05 21:47:34 +00006675
6676<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006677 <h4><a id="texture"></a>-texture <em class="arg">filename</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006678</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;">
cristydcca3fa2010-12-29 21:50:07 +00006683 <h4><a id="threshold"></a>-threshold <em class="arg">value</em>{<em class="arg">%</em>}</h4>
cristy3ed852e2009-09-05 21:47:34 +00006684</div>
6685
6686<!-- {<em class="arg">green,blue,opacity</em>}
cristy751980d2012-06-03 23:18:35 +00006687<p>If the green or blue value is omitted, these channels use the same value as
6688the first one provided. If all three color values are the same, the result is
6689a bi-level image. If the opacity threshold is omitted, OpaqueOpacity is used
6690and any partially transparent pixel becomes fully transparent.</p>
cristy3ed852e2009-09-05 21:47:34 +00006691-->
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
cristy751980d2012-06-03 23:18:35 +00006695<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
6696maximum channel value, while all other values are assigned the minimum.</p>
cristy3ed852e2009-09-05 21:47:34 +00006697
cristy751980d2012-06-03 23:18:35 +00006698<p> The threshold value can be given as a percentage or as an absolute integer
6699value corresponding to the desired channel value. When given as an integer,
6700the minimum attainable value is 0 (corresponding to black when all channels
6701are 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
6703therefore dependent on the installation. For that reason, a reasonable
6704recommendation for most applications is to specify the threshold values as
6705a percentage. </p>
6706
6707<p> The following would force pixels with red values above 50% to have 100%
6708red values, while those at or below 50% red would be set to 0 in the red
6709channel. The green, blue, and alpha channels (if present) would be unchanged.
cristy3ed852e2009-09-05 21:47:34 +00006710</p>
6711
cristyeed6cb62012-01-28 19:38:34 +00006712<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert in.png -channel red -threshold 50% out.png</span></p>
cristy751980d2012-06-03 23:18:35 +00006713<p>As (possibly) impractical but instructive examples, the following would
6714generate an all-black and an all-white image with the same dimensions as the
6715input image.</p>
cristy3ed852e2009-09-05 21:47:34 +00006716
6717
cristyeed6cb62012-01-28 19:38:34 +00006718<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>
cristy3ed852e2009-09-05 21:47:34 +00006719<p>Note that the values of the transparency channel is treated as 'matte'
6720values (0 is opaque) and not as 'alpha' values (0 is transparent).</p>
6721
cristy751980d2012-06-03 23:18:35 +00006722<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>.
cristy3ed852e2009-09-05 21:47:34 +00006723</p>
6724
6725<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006726 <h4><a id="thumbnail"></a>-thumbnail <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006727</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
cristy751980d2012-06-03 23:18:35 +00006731<p>This is similar to <a href="command-line-options.html#resize">-resize</a>, except it is optimized
6732for speed and any image profile, other than a color profile, is removed to
6733reduce the thumbnail size. To strip the color profiles as well, add <a
6734href="command-line-options.html#strip">-strip</a> just before of after this option.</p>
cristy3ed852e2009-09-05 21:47:34 +00006735
cristy751980d2012-06-03 23:18:35 +00006736<p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
cristy3ed852e2009-09-05 21:47:34 +00006737
6738<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006739 <h4><a id="tile"></a>-tile <em class="arg">filename</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006740</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
cristy751980d2012-06-03 23:18:35 +00006748<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>
cristy3ed852e2009-09-05 21:47:34 +00006749
cristy751980d2012-06-03 23:18:35 +00006750<p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument.</p>
cristy3ed852e2009-09-05 21:47:34 +00006751
6752<div style="margin: auto;">
6753 <h4>-tile</h4>
6754</div>
6755
cristy751980d2012-06-03 23:18:35 +00006756<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>
cristy3ed852e2009-09-05 21:47:34 +00006757
6758<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006759 <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>
cristy3ed852e2009-09-05 21:47:34 +00006760</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
cristy751980d2012-06-03 23:18:35 +00006764<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
6766creating a tiled canvas using <kbd>TILE:</kbd> or <kbd>PATTERN:</kbd> input
6767formats. </p>
cristy3ed852e2009-09-05 21:47:34 +00006768
cristy751980d2012-06-03 23:18:35 +00006769<p>Internally ImageMagick does a <a href="command-line-options.html#roll" >-roll</a> of the tile image
6770by the arguments given when the tile image is set. </p>
cristy3ed852e2009-09-05 21:47:34 +00006771
6772<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006773 <h4><a id="tint"></a>-tint <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006774</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
cristy751980d2012-06-03 23:18:35 +00006780<p>Specify the amount of tinting as a percentage. Pure colors like black,
6781white red, yellow, will not be affected by -tint. Only mid-range colors such
6782as the various shades of grey.</p>
cristy3ed852e2009-09-05 21:47:34 +00006783
6784<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006785 <h4><a id="title"></a>-title <em class="arg">string</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006786</div>
6787
cristy751980d2012-06-03 23:18:35 +00006788<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>
cristy3ed852e2009-09-05 21:47:34 +00006789
cristy751980d2012-06-03 23:18:35 +00006790<p>Use this option to assign a specific title to the image. This assigned to
6791the image window and is typically displayed in the window title bar.
6792Optionally you can include the image filename, type, width, height, Exif data,
6793or other image attribute by embedding special format characters described
6794under the <a href="command-line-options.html#format">-format</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00006795
6796<p>For example,</p>
6797
6798<p class="crtsnip">
6799 -title "%m:%f %wx%h"
6800</p>
6801
cristy751980d2012-06-03 23:18:35 +00006802<p>produces an image title of <kbd>MIFF:bird.miff 512x480</kbd> for an image
6803titled <kbd>bird.miff</kbd> and whose width is 512 and height is 480.</p>
cristy3ed852e2009-09-05 21:47:34 +00006804
6805
6806<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006807 <h4><a id="transform"></a>-transform</h4>
cristy3ed852e2009-09-05 21:47:34 +00006808</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
cristy751980d2012-06-03 23:18:35 +00006812<p>This option applies the transformation matrix from a previous <a href="command-line-options.html#affine">-affine</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00006813
cristyeed6cb62012-01-28 19:38:34 +00006814<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>
cristy83a272e2010-05-07 20:40:35 +00006815
6816<p>This operator has been now been superseded by the <a
cristy751980d2012-06-03 23:18:35 +00006817href="command-line-options.html#distort">-distort</a> '<kbd>AffineProjection</kbd>' method. </p>
cristy83a272e2010-05-07 20:40:35 +00006818
6819
cristy3ed852e2009-09-05 21:47:34 +00006820<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006821 <h4><a id="transparent"></a>-transparent <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006822</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
cristy751980d2012-06-03 23:18:35 +00006827described under the <a href="command-line-options.html#fill">-fill</a> option. The <a href="command-line-options.html#fuzz"
cristy3ed852e2009-09-05 21:47:34 +00006828>-fuzz</a> setting can be used to match and replace colors similar to the one
6829given. </p>
6830
cristy751980d2012-06-03 23:18:35 +00006831<p>Use <a href="command-line-options.html#transparent" >+transparent</a> to invert the pixels matched.
cristyb36feb22010-03-26 16:54:37 +00006832that is make all non-matching colors transparent. </p>
6833
cristy751980d2012-06-03 23:18:35 +00006834<p>The <a href="command-line-options.html#opaque">-opaque</a> operator is exactly the same as <a
6835href="command-line-options.html#transparent" >-transparent</a> but replaces the matching color with the
6836current <a href="command-line-options.html#fill">-fill</a> color setting, rather than transparent.
6837However the <a href="command-line-options.html#transparent" >-transparent</a> operator also ensures
6838that the image has an alpha channel enabled, as per "<kbd><a href="command-line-options.html#alpha"
cristyb36feb22010-03-26 16:54:37 +00006839>-alpha</a> set</kbd>", and does not require you to modify the <a
cristy751980d2012-06-03 23:18:35 +00006840href="command-line-options.html#channel">-channel</a> to enable alpha channel handling. </p>
cristy3ed852e2009-09-05 21:47:34 +00006841
cristyb36feb22010-03-26 16:54:37 +00006842<p>Note that this does not define the color as being the 'transparency color'
6843used for color-mapped image formats, such as GIF. For that use <a
cristy751980d2012-06-03 23:18:35 +00006844href="command-line-options.html#transparent-color" >-transparent-color</a> </p>
cristy3ed852e2009-09-05 21:47:34 +00006845
6846
6847<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006848 <h4><a id="transparent-color"></a>-transparent-color <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006849</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
6854GIF and PNG8 which uses this color to represent boolean transparency. This
6855does not make a color transparent, it only defines what color the transparent
6856color is in the color palette of the saved image. Use <a
cristy751980d2012-06-03 23:18:35 +00006857href="command-line-options.html#transparent">-transparent</a> to make an opaque color transparent.</p>
cristy3ed852e2009-09-05 21:47:34 +00006858
6859<p>This option allows you to have both an opaque visible color, as well as a
6860transparent color of the same color value without conflict. That is, you can
6861use the same color for both the transparent and opaque color areas within an
6862image. This, in turn, frees to you to select a transparent color that is
6863appropriate when an image is displayed by an application that does not handle a
6864transparent color index, while allowing ImageMagick to correctly handle images of this
6865type. </p>
6866
6867<p>The default transparent color is <kbd>#00000000</kbd>, which is fully transparent black.</p>
6868
6869<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006870 <h4><a id="transpose"></a>-transpose</h4>
cristy3ed852e2009-09-05 21:47:34 +00006871</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;">
cristydcca3fa2010-12-29 21:50:07 +00006879 <h4><a id="transverse"></a>-transverse</h4>
cristy3ed852e2009-09-05 21:47:34 +00006880</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;">
cristydcca3fa2010-12-29 21:50:07 +00006886 <h4><a id="treedepth"></a>-treedepth <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006887</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
cristy751980d2012-06-03 23:18:35 +00006891<p>Normally, this integer value is zero or one. A value of zero or one causes
6892the use of an optimal tree depth for the color reduction algorithm.</p>
cristy3ed852e2009-09-05 21:47:34 +00006893
cristy751980d2012-06-03 23:18:35 +00006894<p>An optimal depth generally allows the best representation of the source
6895image with the fastest computational speed and the least amount of memory.
6896However, the default depth is inappropriate for some images. To assure the
6897best representation, try values between 2 and 8 for this parameter. Refer to
6898the <a href="quantize.html"
6899>color reduction algorithm</a> for more details.</p>
cristy3ed852e2009-09-05 21:47:34 +00006900
cristy751980d2012-06-03 23:18:35 +00006901<p>The <a href="command-line-options.html#colors">-colors</a> or <a href="command-line-options.html#monochrome">-monochrome</a>
6902option, or writing to an image format which requires color reduction, is
6903required for this option to take effect.</p>
cristy3ed852e2009-09-05 21:47:34 +00006904
6905<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006906 <h4><a id="trim"></a>-trim</h4>
cristy3ed852e2009-09-05 21:47:34 +00006907</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
cristy751980d2012-06-03 23:18:35 +00006911<p>This option removes any edges that are exactly the same color as the corner
6912pixels. Use <a href="command-line-options.html#fuzz">-fuzz</a> to make <a href="command-line-options.html#trim">-trim</a> remove
6913edges that are nearly the same color as the corner pixels.</p>
cristy3ed852e2009-09-05 21:47:34 +00006914
6915<p>The page or virtual canvas information of the image is preserved allowing
cristy751980d2012-06-03 23:18:35 +00006916you to extract the result of the <a href="command-line-options.html#trim">-trim</a> operation from the
6917image. Use a <a href="command-line-options.html#repage">+repage</a> to remove the virtual canvas page
cristy3ed852e2009-09-05 21:47:34 +00006918information if it is unwanted.</p>
6919
6920<p>If the trimmed image 'disappears' an warning is produced, and a special
6921single pixel transparent 'missed' image is returned, in the same way as when a
cristy751980d2012-06-03 23:18:35 +00006922<a href="command-line-options.html#crop">-crop</a> operation 'misses' the image proper. </p>
cristy3ed852e2009-09-05 21:47:34 +00006923
6924
6925<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006926 <h4><a id="type"></a>-type <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006927</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>
cristy751980d2012-06-03 23:18:35 +00006930 <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>
cristy3ed852e2009-09-05 21:47:34 +00006934
cristy751980d2012-06-03 23:18:35 +00006935<p>Normally, when a format supports different subformats such as grayscale and
6936truecolor, the encoder will try to choose an efficient subformat. The <a
6937href="command-line-options.html#type">-type</a> option can be used to override this behavior. For
6938example, to prevent a JPEG from being written in grayscale format even though
6939only gray pixels are present, use.</p>
cristy3ed852e2009-09-05 21:47:34 +00006940
cristyeed6cb62012-01-28 19:38:34 +00006941<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>convert bird.png -type TrueColor bird.jpg</span></p>
cristy751980d2012-06-03 23:18:35 +00006942<p>Similarly, use <a href="command-line-options.html#type">-type TrueColorMatte</a> to force the
6943encoder to write an alpha channel even though the image is opaque, if the
6944output format supports transparency.</p>
cristy3ed852e2009-09-05 21:47:34 +00006945
cristy751980d2012-06-03 23:18:35 +00006946<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>
cristy3ed852e2009-09-05 21:47:34 +00006947
6948<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006949 <h4><a id="undercolor"></a>-undercolor <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006950</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
cristy751980d2012-06-03 23:18:35 +00006954<p>The color is specified using the format described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00006955
cristy751980d2012-06-03 23:18:35 +00006956<p>See <a href="command-line-options.html#draw">-draw</a> for further details.</p>
cristy3ed852e2009-09-05 21:47:34 +00006957
6958
6959<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006960 <h4><a id="update"></a>-update <em class="arg">seconds</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006961</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
cristy751980d2012-06-03 23:18:35 +00006965<p>Suppose that while you are displaying an image the file that is currently
6966displayed is over-written. <kbd>display</kbd> will automagically detect that
6967the input file has been changed and update the displayed image
6968accordingly.</p>
cristy3ed852e2009-09-05 21:47:34 +00006969
6970
6971<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006972 <h4><a id="unique-colors"></a>-unique-colors</h4>
cristy3ed852e2009-09-05 21:47:34 +00006973</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;">
cristydcca3fa2010-12-29 21:50:07 +00006979 <h4><a id="units"></a>-units <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006980</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
cristy751980d2012-06-03 23:18:35 +00006984<p>Choose from: <kbd>Undefined</kbd>, <kbd>PixelsPerInch</kbd>, or
6985<kbd>PixelsPerCentimeter</kbd>. This option is normally used in conjunction
6986with the <a href="command-line-options.html#density">-density</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00006987
6988
6989<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006990 <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>
cristy3ed852e2009-09-05 21:47:34 +00006991</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
cristy751980d2012-06-03 23:18:35 +00006995<p>The <a href="command-line-options.html#unsharp">-unsharp</a> option sharpens an image. The image is
6996convolved with a Gaussian operator of the given radius and standard deviation
6997(sigma). For reasonable results, radius should be larger than sigma. Use
6998a radius of 0 to have the method select a suitable radius.</p>
cristy3ed852e2009-09-05 21:47:34 +00006999
7000<p>The parameters are:</p>
7001
7002<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00007003 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).
cristy3ed852e2009-09-05 21:47:34 +00007010</pre>
7011
7012
7013<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007014 <h4><a id="verbose"></a>-verbose</h4>
cristy3ed852e2009-09-05 21:47:34 +00007015</div>
7016
cristy751980d2012-06-03 23:18:35 +00007017<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
7018precedes 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>
cristy3ed852e2009-09-05 21:47:34 +00007020
7021
7022<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007023 <h4><a id="version"></a>-version</h4>
cristy3ed852e2009-09-05 21:47:34 +00007024</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;">
cristydcca3fa2010-12-29 21:50:07 +00007030 <h4><a id="view"></a>-view <em class="arg">string</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00007031</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;">
cristydcca3fa2010-12-29 21:50:07 +00007037 <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>
cristy3ed852e2009-09-05 21:47:34 +00007038</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;">
cristydcca3fa2010-12-29 21:50:07 +00007044 <h4><a id="virtual-pixel"></a>-virtual-pixel <em class="arg">method</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00007045</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
7050lookup completely 'misses' the source image. The color(s) that appear to
7051surround the source image. Generally this color is derived from the source
7052image, but could also be set to a specify background color. </p>
7053
7054<p>Choose from these methods:</p>
7055
7056<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00007057 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
cristy3ed852e2009-09-05 21:47:34 +00007072</pre>
7073
7074<p>The default value is "edge".</p>
7075
cristy751980d2012-06-03 23:18:35 +00007076<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>.
cristy3ed852e2009-09-05 21:47:34 +00007078However it also effects operations that may access pixels just outside the
cristy751980d2012-06-03 23:18:35 +00007079image proper, such as <a href="command-line-options.html#convolve">-convolve</a>, <a
7080href="command-line-options.html#blur">-blur</a>, and <a href="command-line-options.html#sharpen">-sharpen</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00007081
cristy751980d2012-06-03 23:18:35 +00007082<p>To print a complete list of virtual pixel types, use the <a
7083href="command-line-options.html#list">-list virtual-pixel</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00007084
7085
7086<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007087 <h4><a id="visual"></a>-visual <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00007088</div>
7089
cristy751980d2012-06-03 23:18:35 +00007090<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>
cristy3ed852e2009-09-05 21:47:34 +00007091
7092<p>Choose from these visual classes:</p>
7093
7094<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00007095 StaticGray
7096 GrayScale
7097 StaticColor
7098 PseudoColor
7099 TrueColor
7100 DirectColor
7101 default
7102 visual id
cristy3ed852e2009-09-05 21:47:34 +00007103</pre>
7104
cristy751980d2012-06-03 23:18:35 +00007105<p>The X server must support the visual you choose, otherwise an error occurs.
7106If a visual is not specified, the visual class that can display the most
7107simultaneous colors on the default screen is chosen.</p>
cristy3ed852e2009-09-05 21:47:34 +00007108
7109
7110<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007111 <h4><a id="watermark"></a>-watermark <em
cristy3ed852e2009-09-05 21:47:34 +00007112 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
cristy751980d2012-06-03 23:18:35 +00007116saturation.</td><td style='text-align:right;'>[<a href="composite.html">composite</a>]</td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00007117
7118<p>Take a grayscale image (with alpha mask) and modify the destination image's
7119brightness according to watermark image's grayscale value and the <em
7120class="arg">brightness</em> percentage. The destinations color saturation
7121attribute is just direct modified by the <em class="arg">saturation</em>
7122percentage, which defaults to 100 percent (no color change). </p>
7123
7124
7125<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007126 <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>
cristy3ed852e2009-09-05 21:47:34 +00007127</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
cristy751980d2012-06-03 23:18:35 +00007131<p>Specify <em class="arg">amplitude</em> and <em class="arg">wavelength</em>
7132of the wave.</p>
cristy3ed852e2009-09-05 21:47:34 +00007133
7134<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007135 <h4><a id="weight"></a>-weight <em class="arg">fontWeight</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00007136</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
cristy751980d2012-06-03 23:18:35 +00007140<p>This setting suggests a font weight that ImageMagick should try to apply to
7141the currently selected font family. Use a positive integer for <em
7142class="arg">fontWeight</em> or select from the following.</p>
cristy3ed852e2009-09-05 21:47:34 +00007143
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>
cristy751980d2012-06-03 23:18:35 +00007154 <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>
cristy3ed852e2009-09-05 21:47:34 +00007164 </tbody>
7165 </table>
7166
cristy751980d2012-06-03 23:18:35 +00007167<p>To print a complete list of weight types, use <a href="command-line-options.html#list">-list
7168weight</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00007169
cristy751980d2012-06-03 23:18:35 +00007170<p>For other settings that affect fonts, see the options <a
7171href="command-line-options.html#font">-font</a>, <a href="command-line-options.html#family">-family</a>, <a
7172href="command-line-options.html#stretch">-stretch</a>, and <a href="command-line-options.html#style">-style</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00007173
7174<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007175 <h4><a id="white-point"></a>-white-point <em class="arg">x,y</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00007176</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;">
cristydcca3fa2010-12-29 21:50:07 +00007181 <h4><a id="white-threshold"></a>-white-threshold <em class="arg">value</em>{<em class="arg">%</em>}</h4>
cristy3ed852e2009-09-05 21:47:34 +00007182</div>
7183
cristy751980d2012-06-03 23:18:35 +00007184<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
7185pixels at or below the threshold unchanged.</td><td style='text-align:right;'></td></tr></table>
cristy5cadd612009-09-21 19:33:41 +00007186
cristy751980d2012-06-03 23:18:35 +00007187<p> The threshold value can be given as a percentage or as an absolute integer
7188value within [0,&nbsp;<em class="QR">QuantumRange</em>] corresponding to the
7189desired <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>
cristy3ed852e2009-09-05 21:47:34 +00007190
7191<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007192 <h4><a id="window"></a>-window <em class="arg">id</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00007193</div>
7194
cristy751980d2012-06-03 23:18:35 +00007195<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>
cristy3ed852e2009-09-05 21:47:34 +00007196
cristy751980d2012-06-03 23:18:35 +00007197<p><em class="arg">id</em> can be a window id or name. Specify <kbd>root</kbd>
7198to select X's root window as the target window.</p>
cristy3ed852e2009-09-05 21:47:34 +00007199
cristy751980d2012-06-03 23:18:35 +00007200<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
7202image is surrounded by the background color. Refer to <kbd>X RESOURCES</kbd>
7203for details.</p>
cristy3ed852e2009-09-05 21:47:34 +00007204
cristy751980d2012-06-03 23:18:35 +00007205<p>The image will not display on the root window if the image has more unique
7206colors than the target window colormap allows. Use <a
7207href="command-line-options.html#colors">-colors</a> to reduce the number of colors.</p>
cristy3ed852e2009-09-05 21:47:34 +00007208
7209<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007210 <h4><a id="window-group"></a>-window-group</h4>
cristy3ed852e2009-09-05 21:47:34 +00007211</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;">
cristydcca3fa2010-12-29 21:50:07 +00007216 <h4><a id="write"></a>-write <em class="arg">filename</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00007217</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>
cristy751980d2012-06-03 23:18:35 +00007220 <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>
cristy3ed852e2009-09-05 21:47:34 +00007221
cristy751980d2012-06-03 23:18:35 +00007222<p>Use <a href="command-line-options.html#compress">-compress</a> to specify the type of image compression.</p>
cristydcca3fa2010-12-29 21:50:07 +00007223</div>
7224</div>
cristyeed6cb62012-01-28 19:38:34 +00007225
cristy751980d2012-06-03 23:18:35 +00007226
cristyad41c0c2012-10-31 00:49:28 +00007227
7228</div>
7229
7230<div id="linkbar">
7231 <span id="linkbar-west">&nbsp;</span>
7232 <span id="linkbar-center">
7233 <a href="../discourse-server">Discourse Server</a> &bull;
7234 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
7235 </span>
7236 <span id="linkbar-east">&nbsp;</span>
7237 </div>
7238 <div class="footer">
cristy45ef08f2012-12-07 13:13:34 +00007239 <span id="footer-west">&copy; 1999-2013 ImageMagick Studio LLC</span>
cristyad41c0c2012-10-31 00:49:28 +00007240 <span id="footer-east"> <a href="contact.html">Contact the Wizards</a></span>
7241 </div>
7242 <div style="clear: both; margin: 0; width: 100%; "></div>
7243 <script type="text/javascript">
7244 var _gaq = _gaq || [];
7245 _gaq.push(['_setAccount', 'UA-17690367-1']);
7246 _gaq.push(['_trackPageview']);
7247
7248 (function() {
7249 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
7250 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
7251 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
7252 })();
7253 </script>
7254</body>
7255</html>