blob: 615cac0b4200af48c4c5115960d34daf78acb358 [file] [log] [blame]
cristy149d58c2013-08-07 19:44:54 +00001<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="-//W3C//DTD XHTML 1.1//EN" xml:lang="en" xsi:schemaLocation="http://www.w3.org/1999/xhtml http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">
cristyad41c0c2012-10-31 00:49:28 +00003<head>
cristy149d58c2013-08-07 19:44:54 +00004 <meta http-equiv="content-type" content="text/html; charset=UTF-8"></meta>
5 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4"></meta>
cristydcca3fa2010-12-29 21:50:07 +00006 <title>ImageMagick: Command-line Options</title>
cristy149d58c2013-08-07 19:44:54 +00007 <meta http-equiv="content-language" content="en-US"></meta>
8 <meta http-equiv="content-type" content="text/html; charset=utf-8"></meta>
9 <meta http-equiv="reply-to" content="magick-users@imagemagick.org"></meta>
10 <meta name="application-name" content="ImageMagick"></meta>
11 <meta name="description" content="Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats. In addition, resize, rotate, shear, distort or transform images automagically."></meta>
12 <meta name="application-url" content="http://www.imagemagick.org"></meta>
13 <meta name="generator" content="PHP"></meta>
14 <meta name="keywords" content="command-line, options, ImageMagick, PerlMagick, image processing, OpenMP, software development library, image, photo, software, Magick++, MagickWand"></meta>
15 <meta name="rating" content="GENERAL"></meta>
16 <meta name="robots" content="INDEX, FOLLOW"></meta>
17 <meta name="generator" content="ImageMagick Studio LLC"></meta>
18 <meta name="author" content="ImageMagick Studio LLC"></meta>
19 <meta name="revisit-after" content="2 DAYS"></meta>
20 <meta name="resource-type" content="document"></meta>
21 <meta name="copyright" content="Copyright (c) 1999-2012 ImageMagick Studio LLC"></meta>
22 <meta name="distribution" content="Global"></meta>
23 <link rel="icon" href="../images/wand.png"></link>
24 <link rel="shortcut icon" href="../images/wand.ico" type="images/x-icon"></link>
25 <link rel="canonical" href="../index.html"></link>
26 <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"></link>
cristy8ee7f242013-06-20 16:08:44 +000027
cristyad41c0c2012-10-31 00:49:28 +000028 <!-- Add jQuery library -->
cristy417eeb12013-07-28 18:48:22 +000029 <script type="text/javascript" src="http://localhost/ajax/libs/jquery/1.7/jquery.min.js"></script>
cristyad41c0c2012-10-31 00:49:28 +000030
cristy8ee7f242013-06-20 16:08:44 +000031 <!-- Add mousewheel plugin (this is optional) -->
32 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>
cristyad41c0c2012-10-31 00:49:28 +000033
34 <!-- Add fancyBox -->
cristy149d58c2013-08-07 19:44:54 +000035 <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/jquery.fancybox.css?v=2.0.6" type="text/css" media="screen"></link>
cristy8ee7f242013-06-20 16:08:44 +000036 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/jquery.fancybox.pack.js?v=2.0.6"></script>
cristyad41c0c2012-10-31 00:49:28 +000037
cristy8ee7f242013-06-20 16:08:44 +000038 <!-- Optionally add helpers - button, thumbnail and/or media -->
cristy149d58c2013-08-07 19:44:54 +000039 <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.2" type="text/css" media="screen"></link>
cristy8ee7f242013-06-20 16:08:44 +000040 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.2"></script>
41 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.0"></script>
cristyad41c0c2012-10-31 00:49:28 +000042
cristy149d58c2013-08-07 19:44:54 +000043 <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-thumbs.css?v=2.0.6" type="text/css" media="screen"></link>
cristy8ee7f242013-06-20 16:08:44 +000044 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-thumbs.js?v=2.0.6"></script>
45
cristyad41c0c2012-10-31 00:49:28 +000046 <script type="text/javascript">
47 $(document).ready(function() {
48 $(".fancybox").fancybox();
49 });
50 </script>
cristy8ee7f242013-06-20 16:08:44 +000051
cristyad41c0c2012-10-31 00:49:28 +000052 <!-- ImageMagick style -->
cristyad41c0c2012-10-31 00:49:28 +000053 <style type="text/css" media="all">
54 @import url("../www/magick.css");
55 </style>
56</head>
57
58<body id="www-imagemagick-org">
cristy8ee7f242013-06-20 16:08:44 +000059
cristy8ee7f242013-06-20 16:08:44 +000060
cristy8ee7f242013-06-20 16:08:44 +000061
cristyad41c0c2012-10-31 00:49:28 +000062<div class="titlebar">
63<div style="margin: 17px auto; float: left;">
64 <script type="text/javascript">
65 <!--
66 google_ad_client = "pub-3129977114552745";
67 google_ad_slot = "5439289906";
68 google_ad_width = 728;
69 google_ad_height = 90;
70 //-->
71 </script>
cristy149d58c2013-08-07 19:44:54 +000072
cristyad41c0c2012-10-31 00:49:28 +000073</div>
cristy149d58c2013-08-07 19:44:54 +000074<a href="../discourse-server">
75 <img src="../images/logo.jpg" alt="ImageMagick Logo" style="width: 123px; height: 118px; border: 0px; float: right;"></img></a>
cristyad41c0c2012-10-31 00:49:28 +000076<a href="../index.html">
cristy149d58c2013-08-07 19:44:54 +000077 <img src="../images/sprite.jpg" alt="ImageMagick Sprite" style="width: 114px; height: 118px; border: 0px; float: right;"></img></a>
cristyad41c0c2012-10-31 00:49:28 +000078</div>
79
80<div class="westbar">
81
cristy3ed852e2009-09-05 21:47:34 +000082<div class="menu">
cristy83a272e2010-05-07 20:40:35 +000083 <a title="About ImageMagick" href="../index.html">About ImageMagick</a>
cristy3ed852e2009-09-05 21:47:34 +000084</div>
cristy3ed852e2009-09-05 21:47:34 +000085<div class="menu">
cristy751980d2012-06-03 23:18:35 +000086 <a title="Binary Releases" href="binary-releases.html">Binary Releases</a>
cristybb503372010-05-27 20:51:26 +000087</div>
88<div class="sub">
cristy751980d2012-06-03 23:18:35 +000089 <a title="Binary Release: Unix" href="binary-releases.html#unix">Unix</a>
cristybb503372010-05-27 20:51:26 +000090</div>
91<div class="sub">
cristy751980d2012-06-03 23:18:35 +000092 <a title="Binary Release: MacOS X" href="binary-releases.html#macosx">Mac OS X</a>
cristybb503372010-05-27 20:51:26 +000093</div>
94<div class="sub">
cristy751980d2012-06-03 23:18:35 +000095 <a title="Binary Release: iOS" href="binary-releases.html#iOS">iOS</a>
cristyda16f162011-02-19 23:52:17 +000096</div>
97<div class="sub">
cristy751980d2012-06-03 23:18:35 +000098 <a title="Binary Release: Windows" href="binary-releases.html#windows">Windows</a>
cristybb503372010-05-27 20:51:26 +000099</div>
cristyad41c0c2012-10-31 00:49:28 +0000100<div class="sep"></div>
cristybb503372010-05-27 20:51:26 +0000101<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000102 <a title="Command-line Tools" href="command-line-tools.html">Command-line Tools</a>
cristy3ed852e2009-09-05 21:47:34 +0000103</div>
104<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000105 <a title="Command-line Tools: Processing" href="command-line-processing.html">Processing</a>
cristy3ed852e2009-09-05 21:47:34 +0000106</div>
107<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000108 <a title="Command-line Tools: Options" href="command-line-options.html">Options</a>
cristy3ed852e2009-09-05 21:47:34 +0000109</div>
110<div class="sub">
cristy83a272e2010-05-07 20:40:35 +0000111 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
cristy3ed852e2009-09-05 21:47:34 +0000112</div>
113<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000114 <a title="Program Interfaces" href="api.html">Program Interfaces</a>
cristy3ed852e2009-09-05 21:47:34 +0000115</div>
116<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000117 <a title="Program Interface: MagickWand" href="magick-wand.html">MagickWand</a>
cristy3ed852e2009-09-05 21:47:34 +0000118</div>
119<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000120 <a title="Program Interface: MagickCore" href="magick-core.html">MagickCore</a>
cristy3ed852e2009-09-05 21:47:34 +0000121</div>
122<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000123 <a title="Program Interface: PerlMagick" href="perl-magick.html">PerlMagick</a>
cristy3ed852e2009-09-05 21:47:34 +0000124</div>
125<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000126 <a title="Program Interface: Magick++" href="magick++.html">Magick++</a>
cristy3ed852e2009-09-05 21:47:34 +0000127</div>
cristyad41c0c2012-10-31 00:49:28 +0000128<div class="sep"></div>
cristy149d58c2013-08-07 19:44:54 +0000129<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000130 <a title="Install from Source" href="install-source.html">Install from Source</a>
cristy3ed852e2009-09-05 21:47:34 +0000131</div>
132<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000133 <a title="Install from Source: Unix" href="install-source.html#unix">Unix</a>
cristy3ed852e2009-09-05 21:47:34 +0000134</div>
135<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000136 <a title="Install from Source: Windows" href="install-source.html#windows">Windows</a>
cristy3ed852e2009-09-05 21:47:34 +0000137 </div>
138<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000139 <a title="Resources" href="resources.html">Resources</a>
cristy3ed852e2009-09-05 21:47:34 +0000140</div>
cristybb503372010-05-27 20:51:26 +0000141<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000142 <a title="Architecture" href="architecture.html">Architecture</a>
cristybb503372010-05-27 20:51:26 +0000143</div>
cristy3ed852e2009-09-05 21:47:34 +0000144<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000145 <a title="Download" href="download.html">Download</a>
cristy3ed852e2009-09-05 21:47:34 +0000146</div>
cristyad41c0c2012-10-31 00:49:28 +0000147<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000148<div class="menu">
cristy8ee7f242013-06-20 16:08:44 +0000149 <a title="Search" href="search.html">Search</a>
cristy3ed852e2009-09-05 21:47:34 +0000150</div>
cristyad41c0c2012-10-31 00:49:28 +0000151<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000152<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000153 <a title="Site Map" href="sitemap.html">Site Map</a>
cristy3ed852e2009-09-05 21:47:34 +0000154</div>
cristy149d58c2013-08-07 19:44:54 +0000155<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000156 <a title="Site Map: Links" href="links.html">Links</a>
cristy3ed852e2009-09-05 21:47:34 +0000157</div>
cristyad41c0c2012-10-31 00:49:28 +0000158<div class="sep"></div>
cristyeed6cb62012-01-28 19:38:34 +0000159<div class="menu">
cristy8ee7f242013-06-20 16:08:44 +0000160 <a title="Support ImageMagick Development" href="support.html">Support ImageMagick Development</a>
cristy3ed852e2009-09-05 21:47:34 +0000161</div>
cristyad41c0c2012-10-31 00:49:28 +0000162</div>
163
164<div class="eastbar">
cristy149d58c2013-08-07 19:44:54 +0000165
166 <div> <a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="../index.html"></a></div>
cristy8ee7f242013-06-20 16:08:44 +0000167 <noscript>
168 <a href="http://flattr.com/thing/947300/Convert-Edit-And-Compose-Images" target="_blank">
cristy149d58c2013-08-07 19:44:54 +0000169 <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" width="93" height="20" border="0"></img></a>
cristy8ee7f242013-06-20 16:08:44 +0000170 </noscript>
cristy149d58c2013-08-07 19:44:54 +0000171
172
cristyad41c0c2012-10-31 00:49:28 +0000173</div>
174
175<div class="main">
176
cristy8ee7f242013-06-20 16:08:44 +0000177<h1>Command-line Options</h1>
cristy5cadd612009-09-21 19:33:41 +0000178<p class="navigation-index">
cristy149d58c2013-08-07 19:44:54 +0000179[ <a href="command-line-options.html#adaptive-blur">‑adaptive‑blur</a> <span class="bull"></span> <a href="command-line-options.html#adaptive-resize">‑adaptive‑resize</a> <span class="bull"></span> <a href="command-line-options.html#adaptive-sharpen">‑adaptive‑sharpen</a> <span class="bull"></span> <a href="command-line-options.html#adjoin">‑adjoin</a> <span class="bull"></span> <a href="command-line-options.html#affine">‑affine</a> <span class="bull"></span> <a href="command-line-options.html#alpha">‑alpha</a> <span class="bull"></span> <a href="command-line-options.html#annotate">‑annotate</a> <span class="bull"></span> <a href="command-line-options.html#antialias">‑antialias</a> <span class="bull"></span> <a href="command-line-options.html#append">‑append</a> <span class="bull"></span> <a href="command-line-options.html#attenuate">‑attenuate</a> <span class="bull"></span> <a href="command-line-options.html#authenticate">‑authenticate</a> <span class="bull"></span> <a href="command-line-options.html#auto-gamma">‑auto‑gamma</a> <span class="bull"></span> <a href="command-line-options.html#auto-level">‑auto‑level</a> <span class="bull"></span> <a href="command-line-options.html#auto-orient">‑auto‑orient</a> <span class="bull"></span> <a href="command-line-options.html#backdrop">‑backdrop</a> <span class="bull"></span> <a href="command-line-options.html#background">‑background</a> <span class="bull"></span> <a href="command-line-options.html#bench">‑bench</a> <span class="bull"></span> <a href="command-line-options.html#bias">‑bias</a> <span class="bull"></span> <a href="command-line-options.html#black-point-compensation">‑black‑point‑compensation</a> <span class="bull"></span> <a href="command-line-options.html#black-threshold">‑black‑threshold</a> <span class="bull"></span> <a href="command-line-options.html#blend">‑blend</a> <span class="bull"></span> <a href="command-line-options.html#blue-primary">‑blue‑primary</a> <span class="bull"></span> <a href="command-line-options.html#blue-shift">‑blue‑shift</a> <span class="bull"></span> <a href="command-line-options.html#blur">‑blur</a> <span class="bull"></span> <a href="command-line-options.html#border">‑border</a> <span class="bull"></span> <a href="command-line-options.html#bordercolor">‑bordercolor</a> <span class="bull"></span> <a href="command-line-options.html#borderwidth">‑borderwidth</a> <span class="bull"></span> <a href="command-line-options.html#brightness-contrast">‑brightness‑contrast</a> <span class="bull"></span> <a href="command-line-options.html#cache">‑cache</a> <span class="bull"></span> <a href="command-line-options.html#caption">‑caption</a> <span class="bull"></span> <a href="command-line-options.html#cdl">‑cdl</a> <span class="bull"></span> <a href="command-line-options.html#channel">‑channel</a> <span class="bull"></span> <a href="command-line-options.html#charcoal">‑charcoal</a> <span class="bull"></span> <a href="command-line-options.html#chop">‑chop</a> <span class="bull"></span> <a href="command-line-options.html#clamp">‑clamp</a> <span class="bull"></span> <a href="command-line-options.html#clip">‑clip</a> <span class="bull"></span> <a href="command-line-options.html#clip-mask">‑clip‑mask</a> <span class="bull"></span> <a href="command-line-options.html#clip-path">‑clip‑path</a> <span class="bull"></span> <a href="command-line-options.html#clone">‑clone</a> <span class="bull"></span> <a href="command-line-options.html#clut">‑clut</a> <span class="bull"></span> <a href="command-line-options.html#coalesce">‑coalesce</a> <span class="bull"></span> <a href="command-line-options.html#colorize">‑colorize</a> <span class="bull"></span> <a href="command-line-options.html#colormap">‑colormap</a> <span class="bull"></span> <a href="command-line-options.html#color-matrix">‑color‑matrix</a> <span class="bull"></span> <a href="command-line-options.html#colors">‑colors</a> <span class="bull"></span> <a href="command-line-options.html#colorspace">‑colorspace</a> <span class="bull"></span> <a href="command-line-options.html#combine">‑combine</a> <span class="bull"></span> <a href="command-line-options.html#comment">‑comment</a> <span class="bull"></span> <a href="command-line-options.html#compose">‑compose</a> <span class="bull"></span> <a href="command-line-options.html#composite">‑composite</a> <span class="bull"></span> <a href="command-line-options.html#compress">‑compress</a> <span class="bull"></span> <a href="command-line-options.html#contrast">‑contrast</a> <span class="bull"></span> <a href="command-line-options.html#contrast-stretch">‑contrast‑stretch</a> <span class="bull"></span> <a href="command-line-options.html#convolve">‑convolve</a> <span class="bull"></span> <a href="command-line-options.html#crop">‑crop</a> <span class="bull"></span> <a href="command-line-options.html#cycle">‑cycle</a> <span class="bull"></span> <a href="command-line-options.html#debug">‑debug</a> <span class="bull"></span> <a href="command-line-options.html#decipher">‑decipher</a> <span class="bull"></span> <a href="command-line-options.html#deconstruct">‑deconstruct</a> <span class="bull"></span> <a href="command-line-options.html#define">‑define</a> <span class="bull"></span> <a href="command-line-options.html#delay">‑delay</a> <span class="bull"></span> <a href="command-line-options.html#delete">‑delete</a> <span class="bull"></span> <a href="command-line-options.html#density">‑density</a> <span class="bull"></span> <a href="command-line-options.html#depth">‑depth</a> <span class="bull"></span> <a href="command-line-options.html#descend">‑descend</a> <span class="bull"></span> <a href="command-line-options.html#deskew">‑deskew</a> <span class="bull"></span> <a href="command-line-options.html#despeckle">‑despeckle</a> <span class="bull"></span> <a href="command-line-options.html#direction">‑direction</a> <span class="bull"></span> <a href="command-line-options.html#displace">‑displace</a> <span class="bull"></span> <a href="command-line-options.html#display">‑display</a> <span class="bull"></span> <a href="command-line-options.html#dispose">‑dispose</a> <span class="bull"></span> <a href="command-line-options.html#dissimilarity-threshold">‑dissimilarity‑threshold</a> <span class="bull"></span> <a href="command-line-options.html#dissolve">‑dissolve</a> <span class="bull"></span> <a href="command-line-options.html#distort">‑distort</a> <span class="bull"></span> <a href="command-line-options.html#distribute-cache">‑distribute‑cache</a> <span class="bull"></span> <a href="command-line-options.html#dither">‑dither</a> <span class="bull"></span> <a href="command-line-options.html#draw">‑draw</a> <span class="bull"></span> <a href="command-line-options.html#duplicate">‑duplicate</a> <span class="bull"></span> <a href="command-line-options.html#edge">‑edge</a> <span class="bull"></span> <a href="command-line-options.html#emboss">‑emboss</a> <span class="bull"></span> <a href="command-line-options.html#encipher">‑encipher</a> <span class="bull"></span> <a href="command-line-options.html#encoding">‑encoding</a> <span class="bull"></span> <a href="command-line-options.html#endian">‑endian</a> <span class="bull"></span> <a href="command-line-options.html#enhance">‑enhance</a> <span class="bull"></span> <a href="command-line-options.html#equalize">‑equalize</a> <span class="bull"></span> <a href="command-line-options.html#evaluate">‑evaluate</a> <span class="bull"></span> <a href="command-line-options.html#evaluate-sequence">‑evaluate‑sequence</a> <span class="bull"></span> <a href="command-line-options.html#extent">‑extent</a> <span class="bull"></span> <a href="command-line-options.html#extract">‑extract</a> <span class="bull"></span> <a href="command-line-options.html#family">‑family</a> <span class="bull"></span> <a href="command-line-options.html#features">‑features</a> <span class="bull"></span> <a href="command-line-options.html#fft">‑fft</a> <span class="bull"></span> <a href="command-line-options.html#fill">‑fill</a> <span class="bull"></span> <a href="command-line-options.html#filter">‑filter</a> <span class="bull"></span> <a href="command-line-options.html#flatten">‑flatten</a> <span class="bull"></span> <a href="command-line-options.html#flip">‑flip</a> <span class="bull"></span> <a href="command-line-options.html#floodfill">‑floodfill</a> <span class="bull"></span> <a href="command-line-options.html#flop">‑flop</a> <span class="bull"></span> <a href="command-line-options.html#font">‑font</a> <span class="bull"></span> <a href="command-line-options.html#foreground">‑foreground</a> <span class="bull"></span> <a href="command-line-options.html#format">‑format</a> <span class="bull"></span> <a href="command-line-options.html#format_identify_">‑format[identify]</a> <span class="bull"></span> <a href="command-line-options.html#frame">‑frame</a> <span class="bull"></span> <a href="command-line-options.html#frame_import_">‑frame[import]</a> <span class="bull"></span> <a href="command-line-options.html#function">‑function</a> <span class="bull"></span> <a href="command-line-options.html#fuzz">‑fuzz</a> <span class="bull"></span> <a href="command-line-options.html#fx">‑fx</a> <span class="bull"></span> <a href="command-line-options.html#gamma">‑gamma</a> <span class="bull"></span> <a href="command-line-options.html#gaussian-blur">‑gaussian‑blur</a> <span class="bull"></span> <a href="command-line-options.html#geometry">‑geometry</a> <span class="bull"></span> <a href="command-line-options.html#gravity">‑gravity</a> <span class="bull"></span> <a href="command-line-options.html#grayscale">‑grayscale</a> <span class="bull"></span> <a href="command-line-options.html#green-primary">‑green‑primary</a> <span class="bull"></span> <a href="command-line-options.html#hald-clut">‑hald‑clut</a> <span class="bull"></span> <a href="command-line-options.html#help">‑help</a> <span class="bull"></span> <a href="command-line-options.html#highlight-color">‑highlight‑color</a> <span class="bull"></span> <a href="command-line-options.html#iconGeometry">‑iconGeometry</a> <span class="bull"></span> <a href="command-line-options.html#iconic">‑iconic</a> <span class="bull"></span> <a href="command-line-options.html#identify">‑identify</a> <span class="bull"></span> <a href="command-line-options.html#ift">‑ift</a> <span class="bull"></span> <a href="command-line-options.html#immutable">‑immutable</a> <span class="bull"></span> <a href="command-line-options.html#implode">‑implode</a> <span class="bull"></span> <a href="command-line-options.html#insert">‑insert</a> <span class="bull"></span> <a href="command-line-options.html#intensity">‑intensity</a> <span class="bull"></span> <a href="command-line-options.html#intent">‑intent</a> <span class="bull"></span> <a href="command-line-options.html#interlace">‑interlace</a> <span class="bull"></span> <a href="command-line-options.html#interpolate">‑interpolate</a> <span class="bull"></span> <a href="command-line-options.html#interline-spacing">‑interline‑spacing</a> <span class="bull"></span> <a href="command-line-options.html#interword-spacing">‑interword‑spacing</a> <span class="bull"></span> <a href="command-line-options.html#kerning">‑kerning</a> <span class="bull"></span> <a href="command-line-options.html#label">‑label</a> <span class="bull"></span> <a href="command-line-options.html#lat">‑lat</a> <span class="bull"></span> <a href="command-line-options.html#layers">‑layers</a> <span class="bull"></span> <a href="command-line-options.html#level">‑level</a> <span class="bull"></span> <a href="command-line-options.html#level-colors">‑level‑colors</a> <span class="bull"></span> <a href="command-line-options.html#limit">‑limit</a> <span class="bull"></span> <a href="command-line-options.html#linear-stretch">‑linear‑stretch</a> <span class="bull"></span> <a href="command-line-options.html#linewidth">‑linewidth</a> <span class="bull"></span> <a href="command-line-options.html#liquid-rescale">‑liquid‑rescale</a> <span class="bull"></span> <a href="command-line-options.html#list">‑list</a> <span class="bull"></span> <a href="command-line-options.html#log">‑log</a> <span class="bull"></span> <a href="command-line-options.html#loop">‑loop</a> <span class="bull"></span> <a href="command-line-options.html#lowlight-color">‑lowlight‑color</a> <span class="bull"></span> <a href="command-line-options.html#magnify">‑magnify</a> <span class="bull"></span> <a href="command-line-options.html#map">‑map</a> <span class="bull"></span> <a href="command-line-options.html#map_stream_">‑map[stream]</a> <span class="bull"></span> <a href="command-line-options.html#mask">‑mask</a> <span class="bull"></span> <a href="command-line-options.html#mattecolor">‑mattecolor</a> <span class="bull"></span> <a href="command-line-options.html#median">‑median</a> <span class="bull"></span> <a href="command-line-options.html#metric">‑metric</a> <span class="bull"></span> <a href="command-line-options.html#mode">‑mode</a> <span class="bull"></span> <a href="command-line-options.html#modulate">‑modulate</a> <span class="bull"></span> <a href="command-line-options.html#monitor">‑monitor</a> <span class="bull"></span> <a href="command-line-options.html#monochrome">‑monochrome</a> <span class="bull"></span> <a href="command-line-options.html#morph">‑morph</a> <span class="bull"></span> <a href="command-line-options.html#morphology">‑morphology</a> <span class="bull"></span> <a href="command-line-options.html#mosaic">‑mosaic</a> <span class="bull"></span> <a href="command-line-options.html#motion-blur">‑motion‑blur</a> <span class="bull"></span> <a href="command-line-options.html#name">‑name</a> <span class="bull"></span> <a href="command-line-options.html#negate">‑negate</a> <span class="bull"></span> <a href="command-line-options.html#noise">‑noise</a> <span class="bull"></span> <a href="command-line-options.html#normalize">‑normalize</a> <span class="bull"></span> <a href="command-line-options.html#opaque">‑opaque</a> <span class="bull"></span> <a href="command-line-options.html#ordered-dither">‑ordered‑dither</a> <span class="bull"></span> <a href="command-line-options.html#orient">‑orient</a> <span class="bull"></span> <a href="command-line-options.html#page">‑page</a> <span class="bull"></span> <a href="command-line-options.html#paint">‑paint</a> <span class="bull"></span> <a href="command-line-options.html#path">‑path</a> <span class="bull"></span> <a href="command-line-options.html#pause_animate_">‑pause[animate]</a> <span class="bull"></span> <a href="command-line-options.html#pause_import_">‑pause[import]</a> <span class="bull"></span> <a href="command-line-options.html#pen">‑pen</a> <span class="bull"></span> <a href="command-line-options.html#perceptible">‑perceptible</a> <span class="bull"></span> <a href="command-line-options.html#ping">‑ping</a> <span class="bull"></span> <a href="command-line-options.html#pointsize">‑pointsize</a> <span class="bull"></span> <a href="command-line-options.html#polaroid">‑polaroid</a> <span class="bull"></span> <a href="command-line-options.html#poly">‑poly</a> <span class="bull"></span> <a href="command-line-options.html#posterize">‑posterize</a> <span class="bull"></span> <a href="command-line-options.html#precision">‑precision</a> <span class="bull"></span> <a href="command-line-options.html#preview">‑preview</a> <span class="bull"></span> <a href="command-line-options.html#print">‑print</a> <span class="bull"></span> <a href="command-line-options.html#process">‑process</a> <span class="bull"></span> <a href="command-line-options.html#profile">‑profile</a> <span class="bull"></span> <a href="command-line-options.html#quality">‑quality</a> <span class="bull"></span> <a href="command-line-options.html#quantize">‑quantize</a> <span class="bull"></span> <a href="command-line-options.html#quiet">‑quiet</a> <span class="bull"></span> <a href="command-line-options.html#radial-blur">‑radial‑blur</a> <span class="bull"></span> <a href="command-line-options.html#raise">‑raise</a> <span class="bull"></span> <a href="command-line-options.html#random-threshold">‑random‑threshold</a> <span class="bull"></span> <a href="command-line-options.html#red-primary">‑red‑primary</a> <span class="bull"></span> <a href="command-line-options.html#regard-warnings">‑regard‑warnings</a> <span class="bull"></span> <a href="command-line-options.html#region">‑region</a> <span class="bull"></span> <a href="command-line-options.html#remap">‑remap</a> <span class="bull"></span> <a href="command-line-options.html#remote">‑remote</a> <span class="bull"></span> <a href="command-line-options.html#render">‑render</a> <span class="bull"></span> <a href="command-line-options.html#repage">‑repage</a> <span class="bull"></span> <a href="command-line-options.html#resample">‑resample</a> <span class="bull"></span> <a href="command-line-options.html#resize">‑resize</a> <span class="bull"></span> <a href="command-line-options.html#respect-parentheses">‑respect‑parentheses</a> <span class="bull"></span> <a href="command-line-options.html#reverse">‑reverse</a> <span class="bull"></span> <a href="command-line-options.html#roll">‑roll</a> <span class="bull"></span> <a href="command-line-options.html#rotate">‑rotate</a> <span class="bull"></span> <a href="command-line-options.html#sample">‑sample</a> <span class="bull"></span> <a href="command-line-options.html#sampling-factor">‑sampling‑factor</a> <span class="bull"></span> <a href="command-line-options.html#scale">‑scale</a> <span class="bull"></span> <a href="command-line-options.html#scene">‑scene</a> <span class="bull"></span> <a href="command-line-options.html#screen">‑screen</a> <span class="bull"></span> <a href="command-line-options.html#seed">‑seed</a> <span class="bull"></span> <a href="command-line-options.html#segment">‑segment</a> <span class="bull"></span> <a href="command-line-options.html#selective-blur">‑selective‑blur</a> <span class="bull"></span> <a href="command-line-options.html#separate">‑separate</a> <span class="bull"></span> <a href="command-line-options.html#sepia-tone">‑sepia‑tone</a> <span class="bull"></span> <a href="command-line-options.html#set">‑set</a> <span class="bull"></span> <a href="command-line-options.html#shade">‑shade</a> <span class="bull"></span> <a href="command-line-options.html#shadow">‑shadow</a> <span class="bull"></span> <a href="command-line-options.html#shared-memory">‑shared‑memory</a> <span class="bull"></span> <a href="command-line-options.html#sharpen">‑sharpen</a> <span class="bull"></span> <a href="command-line-options.html#shave">‑shave</a> <span class="bull"></span> <a href="command-line-options.html#shear">‑shear</a> <span class="bull"></span> <a href="command-line-options.html#sigmoidal-contrast">‑sigmoidal‑contrast</a> <span class="bull"></span> <a href="command-line-options.html#silent">‑silent</a> <span class="bull"></span> <a href="command-line-options.html#similarity-threshold">‑similarity‑threshold</a> <span class="bull"></span> <a href="command-line-options.html#size">‑size</a> <span class="bull"></span> <a href="command-line-options.html#sketch">‑sketch</a> <span class="bull"></span> <a href="command-line-options.html#smush">‑smush</a> <span class="bull"></span> <a href="command-line-options.html#snaps">‑snaps</a> <span class="bull"></span> <a href="command-line-options.html#solarize">‑solarize</a> <span class="bull"></span> <a href="command-line-options.html#sparse-color">‑sparse‑color</a> <span class="bull"></span> <a href="command-line-options.html#splice">‑splice</a> <span class="bull"></span> <a href="command-line-options.html#spread">‑spread</a> <span class="bull"></span> <a href="command-line-options.html#statistic">‑statistic</a> <span class="bull"></span> <a href="command-line-options.html#stegano">‑stegano</a> <span class="bull"></span> <a href="command-line-options.html#stereo">‑stereo</a> <span class="bull"></span> <a href="command-line-options.html#stretch">‑stretch</a> <span class="bull"></span> <a href="command-line-options.html#strip">‑strip</a> <span class="bull"></span> <a href="command-line-options.html#stroke">‑stroke</a> <span class="bull"></span> <a href="command-line-options.html#strokewidth">‑strokewidth</a> <span class="bull"></span> <a href="command-line-options.html#style">‑style</a> <span class="bull"></span> <a href="command-line-options.html#subimage-search">‑subimage‑search</a> <span class="bull"></span> <a href="command-line-options.html#swap">‑swap</a> <span class="bull"></span> <a href="command-line-options.html#swirl">‑swirl</a> <span class="bull"></span> <a href="command-line-options.html#synchronize">‑synchronize</a> <span class="bull"></span> <a href="command-line-options.html#taint">‑taint</a> <span class="bull"></span> <a href="command-line-options.html#text-font">‑text‑font</a> <span class="bull"></span> <a href="command-line-options.html#texture">‑texture</a> <span class="bull"></span> <a href="command-line-options.html#threshold">‑threshold</a> <span class="bull"></span> <a href="command-line-options.html#thumbnail">‑thumbnail</a> <span class="bull"></span> <a href="command-line-options.html#tile">‑tile</a> <span class="bull"></span> <a href="command-line-options.html#tile-offset">‑tile‑offset</a> <span class="bull"></span> <a href="command-line-options.html#tint">‑tint</a> <span class="bull"></span> <a href="command-line-options.html#title">‑title</a> <span class="bull"></span> <a href="command-line-options.html#transform">‑transform</a> <span class="bull"></span> <a href="command-line-options.html#transparent">‑transparent</a> <span class="bull"></span> <a href="command-line-options.html#transparent-color">‑transparent‑color</a> <span class="bull"></span> <a href="command-line-options.html#transpose">‑transpose</a> <span class="bull"></span> <a href="command-line-options.html#transverse">‑transverse</a> <span class="bull"></span> <a href="command-line-options.html#treedepth">‑treedepth</a> <span class="bull"></span> <a href="command-line-options.html#trim">‑trim</a> <span class="bull"></span> <a href="command-line-options.html#type">‑type</a> <span class="bull"></span> <a href="command-line-options.html#undercolor">‑undercolor</a> <span class="bull"></span> <a href="command-line-options.html#unique-colors">‑unique‑colors</a> <span class="bull"></span> <a href="command-line-options.html#units">‑units</a> <span class="bull"></span> <a href="command-line-options.html#unsharp">‑unsharp</a> <span class="bull"></span> <a href="command-line-options.html#update">‑update</a> <span class="bull"></span> <a href="command-line-options.html#verbose">‑verbose</a> <span class="bull"></span> <a href="command-line-options.html#version">‑version</a> <span class="bull"></span> <a href="command-line-options.html#view">‑view</a> <span class="bull"></span> <a href="command-line-options.html#vignette">‑vignette</a> <span class="bull"></span> <a href="command-line-options.html#virtual-pixel">‑virtual‑pixel</a> <span class="bull"></span> <a href="command-line-options.html#visual">‑visual</a> <span class="bull"></span> <a href="command-line-options.html#watermark">‑watermark</a> <span class="bull"></span> <a href="command-line-options.html#wave">‑wave</a> <span class="bull"></span> <a href="command-line-options.html#weight">‑weight</a> <span class="bull"></span> <a href="command-line-options.html#white-point">‑white‑point</a> <span class="bull"></span> <a href="command-line-options.html#white-threshold">‑white‑threshold</a> <span class="bull"></span> <a href="command-line-options.html#window">‑window</a> <span class="bull"></span> <a href="command-line-options.html#window-group">‑window‑group</a> <span class="bull"></span> <a href="command-line-options.html#write">‑write</a> ] </p>
cristy3ed852e2009-09-05 21:47:34 +0000180
cristydcca3fa2010-12-29 21:50:07 +0000181<div class="doc-section">
182
cristy149d58c2013-08-07 19:44:54 +0000183<p>Below is list of command-line options recognized by the ImageMagick <a href="command-line-tools.html">command-line
cristyb36feb22010-03-26 16:54:37 +0000184tools</a>. If you want a description of a particular option, click on the
185option name in the navigation bar above and you will go right to it. Unless
cristy751980d2012-06-03 23:18:35 +0000186otherwise 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 +0000187
188<div style="margin: auto;">
cristy751980d2012-06-03 23:18:35 +0000189 <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 +0000190</div>
191
cristy149d58c2013-08-07 19:44:54 +0000192<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 +0000193
cristy149d58c2013-08-07 19:44:54 +0000194<p>A Gaussian operator of the given radius and standard deviation (<em class="arg">sigma</em>) is used. If <em class="arg">sigma</em> is not given it
cristy751980d2012-06-03 23:18:35 +0000195defaults to 1.</p>
cristy3ed852e2009-09-05 21:47:34 +0000196
197<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000198 <h4><a id="adaptive-resize"></a>-adaptive-resize <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000199</div>
200
cristy149d58c2013-08-07 19:44:54 +0000201<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>
cristy3ed852e2009-09-05 21:47:34 +0000202
cristy751980d2012-06-03 23:18:35 +0000203<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>
cristy149d58c2013-08-07 19:44:54 +0000204option defaults to data-dependent triangulation. Use the <a href="command-line-options.html#filter">-filter</a> to choose a different resampling algorithm.
205Offsets, if present in the geometry string, are ignored, and the <a href="command-line-options.html#gravity">-gravity</a> option has no effect.</p>
cristy3ed852e2009-09-05 21:47:34 +0000206
207<div style="margin: auto;">
cristy751980d2012-06-03 23:18:35 +0000208 <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 +0000209</div>
210
cristy149d58c2013-08-07 19:44:54 +0000211<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>
cristy3ed852e2009-09-05 21:47:34 +0000212
cristy149d58c2013-08-07 19:44:54 +0000213<p>A Gaussian operator of the given radius and standard deviation (<em class="arg">sigma</em>) is used. If <em class="arg">sigma</em> is not given it
cristy751980d2012-06-03 23:18:35 +0000214defaults to 1.</p>
cristy3ed852e2009-09-05 21:47:34 +0000215
216<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000217 <h4><a id="adjoin"></a>-adjoin</h4>
cristy3ed852e2009-09-05 21:47:34 +0000218</div>
219
cristy149d58c2013-08-07 19:44:54 +0000220<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>
cristy3ed852e2009-09-05 21:47:34 +0000221
cristy30092792011-02-22 02:06:14 +0000222<p>This option is enabled by default. An attempt is made to save all images of
223an image sequence into the given output file. However, some formats, such as
224JPEG and PNG, do not support more than one image per file, and in that case
225ImageMagick is forced to write each image as a separate file. As such, if
226more than one image needs to be written, the filename given is modified by
cristy751980d2012-06-03 23:18:35 +0000227adding a <a href="command-line-options.html#scene">-scene</a> number before the suffix, in order to
cristy30092792011-02-22 02:06:14 +0000228make distinct names for each image. </p>
cristy3ed852e2009-09-05 21:47:34 +0000229
cristy751980d2012-06-03 23:18:35 +0000230<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 +0000231separate files, whether or not the file format allows multiple images per file
232(for example, GIF, MIFF, and TIFF). </p>
cristy3ed852e2009-09-05 21:47:34 +0000233
cristy30092792011-02-22 02:06:14 +0000234<p>Including a C-style integer format string in the output filename will
cristy751980d2012-06-03 23:18:35 +0000235automagically enable <a href="command-line-options.html#adjoin">+adjoin</a> and are used to specify
236where the <a href="command-line-options.html#scene">-scene</a> number is placed in the filenames. These
cristy8ee7f242013-06-20 16:08:44 +0000237strings, such as '<code>%d</code>' or '<code>%03d</code>', are familiar to those
238who have used the standard <code>printf()</code>' C-library function. As an
cristy30092792011-02-22 02:06:14 +0000239example, the command</p>
cristy3ed852e2009-09-05 21:47:34 +0000240
cristy149d58c2013-08-07 19:44:54 +0000241<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 +0000242<p>will create a sequence of 17 images (the two given plus 15 more created by
cristy751980d2012-06-03 23:18:35 +0000243<a href="command-line-options.html#morph">-morph</a>), named: my00morph.jpg, my01morph.jpg,
cristy30092792011-02-22 02:06:14 +0000244my02morph.jpg, ..., my16morph.jpg. </p>
cristy3ed852e2009-09-05 21:47:34 +0000245
cristy30092792011-02-22 02:06:14 +0000246<p>In summary, ImageMagick tries to write all images to one file, but will
cristy149d58c2013-08-07 19:44:54 +0000247save to multiple files, if any of the following conditions exist...</p>
cristy30092792011-02-22 02:06:14 +0000248<ol>
cristy149d58c2013-08-07 19:44:54 +0000249<li>the output image's file format does not allow multi-image files,</li>
250<li>the <a href="command-line-options.html#adjoin">+adjoin</a> option is given, or</li>
cristy30092792011-02-22 02:06:14 +0000251<li>a printf() integer format string (eg: "%d") is present in the output
cristy149d58c2013-08-07 19:44:54 +0000252 filename.</li>
253</ol>
cristy3ed852e2009-09-05 21:47:34 +0000254
255
256<div style="margin: auto;">
cristy30092792011-02-22 02:06:14 +0000257 <h4><a id="affine"></a>-affine
cristy149d58c2013-08-07 19:44:54 +0000258 <em class="arg">s<sub>x</sub></em>,<em class="arg">r<sub>x</sub></em>,<em class="arg">r<sub>y</sub></em>,<em class="arg">s<sub>y</sub></em>[,<em class="arg">t<sub>x</sub></em>,<em class="arg">t<sub>y</sub></em>]</h4>
cristy3ed852e2009-09-05 21:47:34 +0000259</div>
260
cristy149d58c2013-08-07 19:44:54 +0000261<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>
cristy3ed852e2009-09-05 21:47:34 +0000262
cristy149d58c2013-08-07 19:44:54 +0000263<p>This option sets a transformation matrix, for use by subsequent <a href="command-line-options.html#draw">-draw</a> or <a href="command-line-options.html#transform">-transform</a> options. </p>
cristy3ed852e2009-09-05 21:47:34 +0000264
cristy30092792011-02-22 02:06:14 +0000265<p>The matrix entries are entered as comma-separated numeric values either in
266quotes or without spaces. </p>
cristy3ed852e2009-09-05 21:47:34 +0000267
cristy30092792011-02-22 02:06:14 +0000268<p>Internally, the transformation matrix has 3x3 elements, but three of them
269are omitted from the input because they are constant. The new (transformed)
270coordinates (<em class="arg">x'</em>, <em class="arg">y'</em>) of a pixel at
271position (<em class="arg">x</em>, <em class="arg">y</em>) in the original
272image are calculated using the following matrix equation.</p>
cristy3ed852e2009-09-05 21:47:34 +0000273
274<div class="eqn">
cristy149d58c2013-08-07 19:44:54 +0000275<img alt="affine transformation" src="../images/affine.png"></img>
cristy3ed852e2009-09-05 21:47:34 +0000276</div>
277
cristy30092792011-02-22 02:06:14 +0000278<p> The size of the resulting image is that of the smallest rectangle that
cristy149d58c2013-08-07 19:44:54 +0000279contains the transformed source image. The parameters <em class="arg">t<sub>x</sub></em> and <em class="arg">t<sub>y</sub></em>
cristy30092792011-02-22 02:06:14 +0000280subsequently shift the image pixels so that those that are moved out of the
281image area are cut off.</p>
cristy3ed852e2009-09-05 21:47:34 +0000282
cristy30092792011-02-22 02:06:14 +0000283<p>The transformation matrix complies with the left-handed pixel coordinate
284system: positive <em class="arg">x</em> and <em class="arg">y</em> directions
285are rightward and downward, resp.; positive rotation is clockwise.</p>
cristy3ed852e2009-09-05 21:47:34 +0000286
cristy149d58c2013-08-07 19:44:54 +0000287<p> If the translation coefficients <em class="arg">t<sub>x</sub></em> and <em class="arg">t<sub>y</sub></em> are omitted they default to 0,0. Therefore,
cristy30092792011-02-22 02:06:14 +0000288four parameters suffice for rotation and scaling without translation.</p>
cristy3ed852e2009-09-05 21:47:34 +0000289
cristy149d58c2013-08-07 19:44:54 +0000290<p>Scaling by the factors <em class="arg">s<sub>x</sub></em> and <em class="arg">s<sub>y</sub></em> in the <em>x</em> and <em>y</em> directions,
cristy30092792011-02-22 02:06:14 +0000291respectively, is accomplished with the following.</p>
292
cristy149d58c2013-08-07 19:44:54 +0000293<p>See <a href="command-line-options.html#transform">-transform</a>, and the <a href="command-line-options.html#distort">-distort</a> method '<code>Affineprojection</code> for more
cristy30092792011-02-22 02:06:14 +0000294information </p>
295
cristy3ed852e2009-09-05 21:47:34 +0000296
cristy149d58c2013-08-07 19:44:54 +0000297<p class="crtsnip"> -affine <em class="arg">s<sub>x</sub></em>,0,0,<em class="arg">s<sub>y</sub></em> </p>
cristy3ed852e2009-09-05 21:47:34 +0000298
cristy149d58c2013-08-07 19:44:54 +0000299<p>Translation by a displacement (<em class="arg">t<sub>x</sub></em>, <em class="arg">t<sub>y</sub></em>) is accomplished like so:</p>
cristy3ed852e2009-09-05 21:47:34 +0000300
301<p class="crtsnip">
302 -affine 1,0,0,1,<em class="arg">t<sub>x</sub></em>,<em class="arg">t<sub>y</sub></em>
303</p>
304
cristy751980d2012-06-03 23:18:35 +0000305<p>Rotate clockwise about the origin (the upper left-hand corner) by an angle
306<em>a</em> by letting <em>c</em> = cos(<em>a</em>), <em>s</em>
307= sin(<em>a</em>), and using the following.</p>
cristy3ed852e2009-09-05 21:47:34 +0000308
309<p class="crtsnip">
310 -affine <em>c</em>,<em>s</em>,-<em>s</em>,<em>c</em>
311</p>
312
cristy149d58c2013-08-07 19:44:54 +0000313<p>The cumulative effect of a sequence of <a href="command-line-options.html#affine">-affine</a>
314transformations can be accomplished by instead by a single <a href="command-line-options.html#affine">-affine</a> operation using the matrix equal to the product of the matrices
cristy751980d2012-06-03 23:18:35 +0000315of the individual transformations.</p>
cristy3ed852e2009-09-05 21:47:34 +0000316
cristy751980d2012-06-03 23:18:35 +0000317<p>An attempt is made to detect near-singular transformation matrices. If the
318matrix determinant has a sufficiently small absolute value it is rejected.</p>
cristy3ed852e2009-09-05 21:47:34 +0000319
320<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000321 <h4><a id="alpha"></a>-alpha <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000322</div>
323
cristy149d58c2013-08-07 19:44:54 +0000324<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>
cristy3ed852e2009-09-05 21:47:34 +0000325
326<p>Used to set a flag on an image indicating whether or not to use existing alpha
327channel data, to create an alpha channel, or to perform other operations on the alpha channel. Choose the argument <em class="arg">type</em> from the list below.</p>
328
329
330<table class="doc">
331 <tbody>
332 <tr valign="top">
333 <th align="left" style="width: 8%">type</th>
334 <th align="left">Description</th>
335 </tr>
336
337 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +0000338 <td valign="top"><code>Activate</code> or <code>On</code></td>
cristy83a272e2010-05-07 20:40:35 +0000339 <td valign="top">
cristy8ee7f242013-06-20 16:08:44 +0000340 Enable the image's transparency channel. Note normally <code>Set</code>
cristybac7a162010-06-15 19:57:29 +0000341 should be used instead of this, unless you specifically need to
cristy8ee7f242013-06-20 16:08:44 +0000342 preserve existing (but specifically turned <code>Off</code>) transparency
cristybac7a162010-06-15 19:57:29 +0000343 channel. </td></tr>
cristy83a272e2010-05-07 20:40:35 +0000344
345 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +0000346 <td valign="top"><code>Deactivate</code> or <code>Off</code></td>
cristy3ed852e2009-09-05 21:47:34 +0000347 <td valign="top">
348 Disables the image's transparency channel. Does not delete or change the
cristy83a272e2010-05-07 20:40:35 +0000349 existing data, just turns off the use of that data.</td></tr>
cristy3ed852e2009-09-05 21:47:34 +0000350
351 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +0000352 <td valign="top"><code>Set</code></td>
cristy3ed852e2009-09-05 21:47:34 +0000353 <td valign="top">
cristybac7a162010-06-15 19:57:29 +0000354 Activates the alpha/matte channel. If it was previously turned off
355 then it also resets the channel to opaque. If the image already had
356 the alpha channel turned on, it will have no effect.</td></tr>
cristy3ed852e2009-09-05 21:47:34 +0000357
358 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +0000359 <td valign="top"><code>Opaque</code></td>
cristy3ed852e2009-09-05 21:47:34 +0000360 <td valign="top">
cristybac7a162010-06-15 19:57:29 +0000361 Enables the alpha/matte channel and forces it to be fully opaque.
362 </td></tr>
cristy3ed852e2009-09-05 21:47:34 +0000363
364 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +0000365 <td valign="top"><code>Transparent</code></td>
cristy3ed852e2009-09-05 21:47:34 +0000366 <td valign="top">
cristy83a272e2010-05-07 20:40:35 +0000367 Activates the alpha/matte channel and forces it to be fully
cristybac7a162010-06-15 19:57:29 +0000368 transparent. This effectively creates a fully transparent image the
369 same size as the original and with all its original RGB data still
370 intact, but fully transparent. </td></tr>
cristy3ed852e2009-09-05 21:47:34 +0000371
372 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +0000373 <td valign="top"><code>Extract</code></td>
cristy3ed852e2009-09-05 21:47:34 +0000374 <td valign="top">
375 Copies the alpha channel values into all the color channels and turns
cristy8ee7f242013-06-20 16:08:44 +0000376 '<code>Off</code>' the the image's transparency, so as to generate
cristybac7a162010-06-15 19:57:29 +0000377 a gray-scale mask of the image's shape. The alpha channel data is left
cristy8ee7f242013-06-20 16:08:44 +0000378 intact just deactivated. This is the inverse of '<code>Copy</code>'.
cristybac7a162010-06-15 19:57:29 +0000379 </td></tr>
cristy3ed852e2009-09-05 21:47:34 +0000380
381 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +0000382 <td valign="top"><code>Copy</code></td>
cristy3ed852e2009-09-05 21:47:34 +0000383 <td valign="top">
cristy8ee7f242013-06-20 16:08:44 +0000384 Turns '<code>On</code>' the alpha/matte channel, then copies the
cristybac7a162010-06-15 19:57:29 +0000385 gray-scale intensity of the image, into the alpha channel, converting
386 a gray-scale mask into a transparent shaped mask ready to be colored
387 appropriately. The color channels are not modified. </td></tr>
cristy3ed852e2009-09-05 21:47:34 +0000388
389 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +0000390 <td valign="top"><code>Shape</code></td>
cristy3ed852e2009-09-05 21:47:34 +0000391 <td valign="top">
cristy8ee7f242013-06-20 16:08:44 +0000392 As per '<code>Copy</code>' but also colors the resulting shape mask with
cristyb36feb22010-03-26 16:54:37 +0000393 the current background color. That is the RGB color channels is
394 replaced, with appropriate alpha shape.
cristy3ed852e2009-09-05 21:47:34 +0000395 </td></tr>
396
397 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +0000398 <td valign="top"><code>Remove</code></td>
cristy751980d2012-06-03 23:18:35 +0000399 <td valign="top">
400 Composite the image over the background color.
401 </td></tr>
402
403 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +0000404 <td valign="top"><code>Background</code></td>
cristy3ed852e2009-09-05 21:47:34 +0000405 <td valign="top">
cristyb36feb22010-03-26 16:54:37 +0000406 Set any fully-transparent pixel to the background color, while leaving
407 it fully-transparent. This can make some image file formats, such as
408 PNG, smaller as the RGB values of transparent pixels are more uniform,
409 and thus can compress better.
cristy3ed852e2009-09-05 21:47:34 +0000410 </td></tr>
411 </tbody>
412</table>
413
cristy8ee7f242013-06-20 16:08:44 +0000414<p>Note that while the obsolete <code>+matte</code> operation was the
cristy149d58c2013-08-07 19:44:54 +0000415same as "<code><a href="command-line-options.html#alpha">-alpha</a> Off</code>", the <code>
416&gt;-matte</code> operation was the same as "<code><a href="command-line-options.html#alpha">-alpha</a>
417Set</code>" and not "<code><a href="command-line-options.html#alpha">-alpha</a> On</code>". </p>
cristy3ed852e2009-09-05 21:47:34 +0000418
419
420<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000421 <h4><a id="annotate"></a>
cristy149d58c2013-08-07 19:44:54 +0000422 -annotate <em class="arg">degrees</em> <em class="arg">text</em><br></br>
423 -annotate <em class="arg">Xdegrees</em>x<em class="arg">Ydegrees</em> <em class="arg">text</em><br></br> -annotate <em class="arg">Xdegrees</em>x<em class="arg">Ydegrees</em> {+-}<em class="arg">t<sub>x</sub></em>{+-}<em class="arg">t<sub>y</sub></em> <em class="arg">text</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000424</div>
425
cristy149d58c2013-08-07 19:44:54 +0000426<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>
cristy3ed852e2009-09-05 21:47:34 +0000427
cristy751980d2012-06-03 23:18:35 +0000428<p>This is a convenience for annotating an image with text. For more precise
429control over text annotations, use <a href="command-line-options.html#draw">-draw</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +0000430
431
cristy751980d2012-06-03 23:18:35 +0000432<p>The values <em class="arg">Xdegrees</em> and <em class="arg">Ydegrees</em>
433control the shears with respect to the , respectively, applied to the text,
cristy149d58c2013-08-07 19:44:54 +0000434while <em class="arg">t<sub>x</sub></em> and <em class="arg">t<sub>y</sub></em> are offsets that give the location of the text
cristy751980d2012-06-03 23:18:35 +0000435relative to the upper left corner of the image.</p>
cristy3ed852e2009-09-05 21:47:34 +0000436
cristyac1b4322013-07-28 13:58:06 +0000437<p>Using <a href="command-line-options.html#annotate">-annotate</a> <em class="arg">degrees</em>
cristy149d58c2013-08-07 19:44:54 +0000438or <a href="command-line-options.html#annotate">-annotate</a> <em class="arg">degrees</em>x<em class="arg">degrees</em> produces an unsheared rotation of the text. The
439direction of the rotation is positive, which means a clockwise rotation if <em class="arg">degrees</em> is positive. (This conforms to the usual mathematical
440convention once it is realized that the positive <em>y</em>–direction is
cristy751980d2012-06-03 23:18:35 +0000441conventionally considered to be <em>downward</em> for images.)</p>
cristy3ed852e2009-09-05 21:47:34 +0000442
cristy149d58c2013-08-07 19:44:54 +0000443<p>The new (transformed) coordinates (<em class="arg">x'</em>, <em class="arg">y'</em>) of a pixel at position (<em class="arg">x</em>, <em class="arg">y</em>) in the image are calculated using the following matrix
444equation.</p> <div class="eqn"><img alt="annotate transformation" src="../images/annotate.png"></img></div>
cristy3ed852e2009-09-05 21:47:34 +0000445
cristy149d58c2013-08-07 19:44:54 +0000446<p>If <em class="arg">t<sub>x</sub></em> and <em class="arg">t<sub>y</sub></em> are omitted, they default to 0. This makes the
cristy751980d2012-06-03 23:18:35 +0000447bottom-left of the text becomes the upper-left corner of the image, which is
cristy149d58c2013-08-07 19:44:54 +0000448probably undesirable. Adding a <a href="command-line-options.html#gravity">-gravity</a> option in this
cristy751980d2012-06-03 23:18:35 +0000449case leads to nice results.</p>
cristy3ed852e2009-09-05 21:47:34 +0000450
cristy751980d2012-06-03 23:18:35 +0000451<p>Text is any UTF-8 encoded character sequence. If <em class="arg">text</em>
452is of the form '@mytext.txt', the text is read from the file
cristy8ee7f242013-06-20 16:08:44 +0000453<code>mytext.txt</code>. Text in a file is taken literally; no embedded
cristy751980d2012-06-03 23:18:35 +0000454formatting characters are recognized.</p>
cristy3ed852e2009-09-05 21:47:34 +0000455
456<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000457 <h4><a id="antialias"></a>-antialias</h4>
cristy3ed852e2009-09-05 21:47:34 +0000458</div>
459
cristy149d58c2013-08-07 19:44:54 +0000460<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
461drawing fonts and lines.</td><td style="text-align:right;"></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +0000462
463<p>By default, objects (e.g. text, lines, polygons, etc.) are antialiased when
cristy751980d2012-06-03 23:18:35 +0000464drawn. Use <a href="command-line-options.html#antialias">+antialias</a> to disable the addition of
cristy3ed852e2009-09-05 21:47:34 +0000465antialiasing edge pixels. This will then reduce the number of colors added to
466an image to just the colors being directly drawn. That is, no mixed colors
cristyd0bd44a2010-09-24 12:38:11 +0000467are added when drawing such objects. </p>
cristy3ed852e2009-09-05 21:47:34 +0000468
469<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000470 <h4><a id="append"></a>-append</h4>
cristy3ed852e2009-09-05 21:47:34 +0000471</div>
472
cristy149d58c2013-08-07 19:44:54 +0000473<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>
cristy3ed852e2009-09-05 21:47:34 +0000474
475<p>This option creates a single longer image image, by joining all the current
cristy751980d2012-06-03 23:18:35 +0000476images in sequence top-to-bottom. Use <a href="command-line-options.html#append">+append</a> to
cristy3ed852e2009-09-05 21:47:34 +0000477stack images left-to-right. </p>
478
479<p>If they are not of the same width, narrower images are padded with the
cristy751980d2012-06-03 23:18:35 +0000480current <a href="command-line-options.html#background">-background</a> color setting, and their
cristy149d58c2013-08-07 19:44:54 +0000481position relative to each other can be controlled by the current <a href="command-line-options.html#gravity">-gravity</a> setting. </p>
cristy3ed852e2009-09-05 21:47:34 +0000482
483
484<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000485 <h4><a id="attenuate"></a>-attenuate <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000486</div>
487
cristy149d58c2013-08-07 19:44:54 +0000488<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>
cristy3ed852e2009-09-05 21:47:34 +0000489
cristy751980d2012-06-03 23:18:35 +0000490<p>If unset the value is equivelent to 1.0, or a maximum noise addition</p>
cristy3ed852e2009-09-05 21:47:34 +0000491
492<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000493 <h4><a id="authenticate"></a>-authenticate <em class="arg">password</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000494</div>
495
cristy149d58c2013-08-07 19:44:54 +0000496<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>
cristy3ed852e2009-09-05 21:47:34 +0000497
cristy751980d2012-06-03 23:18:35 +0000498<p>Use this option to supply a <em class="arg">password</em> for decrypting
499a PDF that has been encrypted using Microsoft Crypto API (MSC API). The
500encrypting using the MSC API is not supported.</p>
cristy3ed852e2009-09-05 21:47:34 +0000501
cristy751980d2012-06-03 23:18:35 +0000502<p>For a different encryption method, see <a href="command-line-options.html#encipher">-encipher</a>
503and <a href="command-line-options.html#decipher">-decipher</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +0000504
cristyd934d102009-10-10 12:55:13 +0000505
506
cristy3ed852e2009-09-05 21:47:34 +0000507<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000508 <h4><a id="auto-gamma"></a>-auto-gamma</h4>
cristy3ed852e2009-09-05 21:47:34 +0000509</div>
510
cristy149d58c2013-08-07 19:44:54 +0000511<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>
cristy3ed852e2009-09-05 21:47:34 +0000512
cristy149d58c2013-08-07 19:44:54 +0000513<p>This calculates the mean values of an image, then applies a calculated <a href="command-line-options.html#gamma">-gamma</a> adjustment so that is the mean color exists in the
cristyd934d102009-10-10 12:55:13 +0000514image it will get a have a value of 50%. </p>
515
cristyd0bd44a2010-09-24 12:38:11 +0000516<p>This means that any solid 'gray' image becomes 50% gray. </p>
cristyd934d102009-10-10 12:55:13 +0000517
518<p>This works well for real-life images with little or no extreme dark and
519light areas, but tend to fail for images with large amounts of bright sky or
cristyd0bda5e2010-09-21 16:22:45 +0000520dark shadows. It also does not work well for diagrams or cartoon like images.
cristyd934d102009-10-10 12:55:13 +0000521</p>
522
cristy149d58c2013-08-07 19:44:54 +0000523<p>It uses the <a href="command-line-options.html#channel">-channel</a> setting, (including the
cristy2dcd6822011-06-13 16:21:20 +0000524'<em>sync</em>' flag for channel synchronization), to determine which color
cristy149d58c2013-08-07 19:44:54 +0000525values is used and modified. As the default <a href="command-line-options.html#channel">-channel</a> setting is '<em>RGB,sync</em>', channels are modified
cristyd934d102009-10-10 12:55:13 +0000526together by the same gamma value, preserving colors. </p>
527
528
529
cristy3ed852e2009-09-05 21:47:34 +0000530<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000531 <h4><a id="auto-level"></a>-auto-level</h4>
cristy3ed852e2009-09-05 21:47:34 +0000532</div>
533
cristy149d58c2013-08-07 19:44:54 +0000534<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>
cristy3ed852e2009-09-05 21:47:34 +0000535
cristyd934d102009-10-10 12:55:13 +0000536<p>This is a 'perfect' image normalization operator. It finds the exact
cristy149d58c2013-08-07 19:44:54 +0000537minimum and maximum color values in the image and then applies a <a href="command-line-options.html#level">-level</a> operator to stretch the values to the full range of
cristyd934d102009-10-10 12:55:13 +0000538values. </p>
539
cristy83543962009-10-16 19:04:28 +0000540<p>The operator is not typically used for real-life images, image scans, or
cristyd934d102009-10-10 12:55:13 +0000541JPEG format images, as a single 'out-rider' pixel can set a bad min/max values
cristy149d58c2013-08-07 19:44:54 +0000542for the <a href="command-line-options.html#level">-level</a> operation. On the other hand it is the
cristyd934d102009-10-10 12:55:13 +0000543right operator to use for color stretching gradient images being used to
544generate Color lookup tables, distortion maps, or other 'mathematically'
545defined images. </p>
546
cristy149d58c2013-08-07 19:44:54 +0000547<p>The operator is very similar to the <a href="command-line-options.html#normalize">-normalize</a>, <a href="command-line-options.html#contrast-stretch">-contrast-stretch</a>, and <a href="command-line-options.html#linear-stretch">-linear-stretch</a> operators, but without 'histogram binning' or 'clipping'
548problems that these operators may have. That is <a href="command-line-options.html#auto-level">-auto-level</a> is the perfect or ideal version these operators. </p>
cristyd934d102009-10-10 12:55:13 +0000549
cristy149d58c2013-08-07 19:44:54 +0000550<p>It uses the <a href="command-line-options.html#channel">-channel</a> setting, (including the
cristy2dcd6822011-06-13 16:21:20 +0000551special '<em>sync</em>' flag for channel synchronization), to determine
cristy149d58c2013-08-07 19:44:54 +0000552which color values are used and modified. As the default <a href="command-line-options.html#channel">+channel</a> setting is '<em>RGB,sync</em>', the
cristydcca3fa2010-12-29 21:50:07 +0000553'<em>sync</em>' ensures that the color channels will are modified
cristy83543962009-10-16 19:04:28 +0000554together by the same gamma value, preserving colors, and ignoring
555transparency. </p>
cristyd934d102009-10-10 12:55:13 +0000556
557
cristy3ed852e2009-09-05 21:47:34 +0000558<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000559 <h4><a id="auto-orient"></a>-auto-orient</h4>
cristy3ed852e2009-09-05 21:47:34 +0000560</div>
561
cristy149d58c2013-08-07 19:44:54 +0000562<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">adjusts an image so that its orientation is suitable for viewing (i.e. top-left orientation).</td><td style="text-align:right;"></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +0000563
cristy83543962009-10-16 19:04:28 +0000564<p>This operator reads and resets the EXIF image profile setting 'Orientation'
565and then performs the appropriate 90 degree rotation on the image to orient
566the image, for correct viewing. </p>
567
568<p>This EXIF profile setting is usually set using a gravity sensor in digital
cristyeed6cb62012-01-28 19:38:34 +0000569camera, however photos taken directly downward or upward may not have an
cristy83543962009-10-16 19:04:28 +0000570appropriate value. Also images that have been orientation 'corrected' without
571reseting this setting, may be 'corrected' again resulting in a incorrect
cristy149d58c2013-08-07 19:44:54 +0000572result. If the EXIF profile was previously stripped, the <a href="command-line-options.html#auto-orient">-auto-orient</a> operator will do nothing. </p>
cristy83543962009-10-16 19:04:28 +0000573
574
cristy3ed852e2009-09-05 21:47:34 +0000575<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000576 <h4><a id="average"></a>-average</h4>
cristy3ed852e2009-09-05 21:47:34 +0000577</div>
578
cristy149d58c2013-08-07 19:44:54 +0000579<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>
cristy3ed852e2009-09-05 21:47:34 +0000580
581<p>An error results if the images are not identically sized.</p>
582
cristy3ed852e2009-09-05 21:47:34 +0000583
584<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000585 <h4><a id="backdrop"></a>-backdrop</h4>
cristy3ed852e2009-09-05 21:47:34 +0000586</div>
587
cristy149d58c2013-08-07 19:44:54 +0000588<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 +0000589
cristy751980d2012-06-03 23:18:35 +0000590<p>This backdrop covers the entire workstation screen and is useful for hiding
591other X window activity while viewing the image. The color of the backdrop is
592specified as the background color. The color is specified using the format
593described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +0000594
595<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000596 <h4><a id="background"></a>-background <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000597</div>
598
cristy149d58c2013-08-07 19:44:54 +0000599<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>
cristy3ed852e2009-09-05 21:47:34 +0000600
cristy149d58c2013-08-07 19:44:54 +0000601<p>The color is specified using the format described under the <a href="command-line-options.html#fill">-fill</a> option. The default background color (if none is
cristy751980d2012-06-03 23:18:35 +0000602specified or found in the image) is white.</p>
cristy3ed852e2009-09-05 21:47:34 +0000603
604<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000605 <h4><a id="bench"></a>-bench <em class="arg">iterations</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000606</div>
607
cristy149d58c2013-08-07 19:44:54 +0000608<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>
cristy3ed852e2009-09-05 21:47:34 +0000609
cristy149d58c2013-08-07 19:44:54 +0000610<p>Repeat the entire command for the given number of <em class="arg">iterations</em> and report the user-time and elapsed time. For instance,
cristy751980d2012-06-03 23:18:35 +0000611consider the following command and its output. Modify the benchmark with the
612-duration to run the benchmark for a fixed number of seconds and -concurrent
613to run the benchmark in parallel (requires the OpenMP feature).</p>
cristy3ed852e2009-09-05 21:47:34 +0000614
cristy149d58c2013-08-07 19:44:54 +0000615<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 +0000616<p>In this example, 5 iterations were completed at 0.875657 iterations per
617second, using 4 threads and 6.88 seconds of the user's allotted time, for
618a total elapsed time of 5.71 seconds.</p>
cristy3ed852e2009-09-05 21:47:34 +0000619
620<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000621 <h4><a id="bias"></a>-bias <em class="arg">value</em>{<em class="arg">%</em>}</h4>
cristy3ed852e2009-09-05 21:47:34 +0000622</div>
623
cristy149d58c2013-08-07 19:44:54 +0000624<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>
cristy3ed852e2009-09-05 21:47:34 +0000625
cristy149d58c2013-08-07 19:44:54 +0000626<p>This option shifts the output of <a href="command-line-options.html#convolve">‑convolve</a> so that
cristy751980d2012-06-03 23:18:35 +0000627positive and negative results are relative to the specified bias value. </p>
cristy3ed852e2009-09-05 21:47:34 +0000628
cristy751980d2012-06-03 23:18:35 +0000629<p>This is important for non-HDRI compilations of ImageMagick when dealing
630with convolutions that contain negative as well as positive values. This is
631especially the case with convolutions involving high pass filters or edge
632detection. Without an output bias, the negative values are clipped at
633zero.</p>
cristy3ed852e2009-09-05 21:47:34 +0000634
cristy149d58c2013-08-07 19:44:54 +0000635<p>When using an ImageMagick with the HDRI compile-time setting, <a href="command-line-options.html#bias">‑bias</a> is not needed, as ImageMagick is able to store/handle any
cristy3ed852e2009-09-05 21:47:34 +0000636negative results without clipping to the color value range
637(0..QuantumRange).</p>
638
cristy149d58c2013-08-07 19:44:54 +0000639<p>See the discussion on HDRI implementations of ImageMagick on the page <a href="high-dynamic-range.html">High Dynamic-Range Images</a>. For more
640about HDRI go the ImageMagick <a href="http://www.imagemagick.org/Usage/basics/#hdri">Usage</a> pages or this
641<a href="http://en.wikipedia.org/wiki/High_dynamic_range_imaging">Wikipedia</a>
cristy751980d2012-06-03 23:18:35 +0000642entry. </p>
cristy3ed852e2009-09-05 21:47:34 +0000643
644<div style="margin: auto;">
cristy37e0dfd2011-03-06 16:35:34 +0000645 <h4><a id="black-point-compensation"></a>-black-point-compensation</h4>
cristy3ed852e2009-09-05 21:47:34 +0000646</div>
647
cristy149d58c2013-08-07 19:44:54 +0000648<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>
cristy3ed852e2009-09-05 21:47:34 +0000649
650<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000651 <h4><a id="black-threshold"></a>-black-threshold <em class="arg">value</em>{<em class="arg">%</em>}</h4>
cristy3ed852e2009-09-05 21:47:34 +0000652</div>
653
cristy149d58c2013-08-07 19:44:54 +0000654<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>
cristy5cadd612009-09-21 19:33:41 +0000655
cristy751980d2012-06-03 23:18:35 +0000656<p> The threshold value can be given as a percentage or as an absolute integer
cristyac1b4322013-07-28 13:58:06 +0000657value within [0, <em class="QR">QuantumRange</em>] corresponding to the
cristy149d58c2013-08-07 19:44:54 +0000658desired <a href="command-line-options.html#channel">‑channel</a> value. See <a href="command-line-options.html#threshold">‑threshold</a>for more details on thresholds and resulting values. </p>
cristy3ed852e2009-09-05 21:47:34 +0000659
660
661<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000662 <h4><a id="blend"></a>-blend <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000663</div>
664
cristy149d58c2013-08-07 19:44:54 +0000665<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 +0000666
667<p>Blend will average the images together ('plus') according to the
668percentages given and each pixels transparency. If only a single percentage
669value is given it sets the weight of the composite or 'source' image, while
670the background image is weighted by the exact opposite amount. That is a
cristy8ee7f242013-06-20 16:08:44 +0000671<code>-blend 30%</code> merges 30% of the 'source' image with 70% of the
672'destination' image. Thus it is equivalent to <code>-blend 30x70%</code>.</p>
cristy3ed852e2009-09-05 21:47:34 +0000673
674
675<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000676 <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 +0000677</div>
678
cristy149d58c2013-08-07 19:44:54 +0000679<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>
cristy3ed852e2009-09-05 21:47:34 +0000680
681<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000682 <h4><a id="blue-shift"></a>-blue-shift <em class="arg">factor</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000683</div>
684
cristy149d58c2013-08-07 19:44:54 +0000685<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>
cristy3ed852e2009-09-05 21:47:34 +0000686
687<div style="margin: auto;">
688
689<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +0000690 <h4><a id="blur"></a>-blur <em class="arg">radius</em><br></br>-blur <em class="arg">radius</em>x<em class="arg">sigma</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000691</div>
692
cristy149d58c2013-08-07 19:44:54 +0000693<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>
cristy3ed852e2009-09-05 21:47:34 +0000694
cristyb15553d2010-07-03 22:53:14 +0000695<p>Convolve the image with a Gaussian or normal distribution using the given
cristy149d58c2013-08-07 19:44:54 +0000696<em class="arg">Sigma</em> value. The formula is:</p>
cristy3ed852e2009-09-05 21:47:34 +0000697
cristy149d58c2013-08-07 19:44:54 +0000698<div class="eqn"><img alt="gaussian distribution" width="243px" height="42px" src="../images/gaussian-blur.png"></img>
cristy3ed852e2009-09-05 21:47:34 +0000699</div>
700
cristy149d58c2013-08-07 19:44:54 +0000701<p>The <em class="arg">Sigma</em> value is the important argument, and
cristyefb2bdb2010-11-20 19:35:22 +0000702determines the actual amount of blurring that will take place. </p>
cristy3ed852e2009-09-05 21:47:34 +0000703
cristy149d58c2013-08-07 19:44:54 +0000704<p>The <em class="arg">Radius</em> is only used to determine the size of the
cristyefb2bdb2010-11-20 19:35:22 +0000705array which will hold the calculated Gaussian distribution. It should be an
cristyd0bda5e2010-09-21 16:22:45 +0000706integer. If not given, or set to zero, IM will calculate the largest possible
cristyb15553d2010-07-03 22:53:14 +0000707radius that will provide meaningful results for the Gaussian distribution.
708</p>
709
cristy149d58c2013-08-07 19:44:54 +0000710<p>The larger the <em class="arg">Radius</em> the slower the
711operation is. However too small a <em class="arg">Radius</em>, and sever
712aliasing effects may result. As a guideline, <em class="arg">Radius</em>
713should be at least twice the <em class="arg">Sigma</em> value, though three
cristyeed6cb62012-01-28 19:38:34 +0000714times will produce a more accurate result. </p>
cristyb15553d2010-07-03 22:53:14 +0000715
cristy751980d2012-06-03 23:18:35 +0000716<p>This option differs from <a href="command-line-options.html#gaussian-blur">-gaussian-blur</a> simply
cristyb15553d2010-07-03 22:53:14 +0000717by taking advantage of the separability properties of the distribution. Here
718we apply a single-dimensional Gaussian matrix in the horizontal direction,
719then repeat the process in the vertical direction.</p>
cristy3ed852e2009-09-05 21:47:34 +0000720
cristy751980d2012-06-03 23:18:35 +0000721<p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
cristy3ed852e2009-09-05 21:47:34 +0000722pixels which are outside the image proper are blurred into the final result.
723</p>
724
725
726<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000727 <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 +0000728</div>
729
cristy149d58c2013-08-07 19:44:54 +0000730<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 +0000731
732<p>Each pixel in the overlaid region is replaced with an Elliptical Weighted
733Average (EWA) of the source image, scaled according to the grayscale
734mapping. </p>
735
cristy149d58c2013-08-07 19:44:54 +0000736<p>The ellipse is weighted with sigma set to the given <em class="arg">Width</em> and <em class="arg">Height</em>. The <em class="arg">Height</em>
737defaults to the <em class="arg">Width</em> for a normal circular Gaussian
738weighting. The <em class="arg">Angle</em> will rotate the ellipse from
cristy3ed852e2009-09-05 21:47:34 +0000739horizontal clock-wise. </p>
740
cristy751980d2012-06-03 23:18:35 +0000741<p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
cristy3ed852e2009-09-05 21:47:34 +0000742pixels which are outside the image proper are blurred into the final result.
743</p>
744
745
746<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000747 <h4><a id="border"></a>-border <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000748</div>
749
cristy149d58c2013-08-07 19:44:54 +0000750<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>
cristy3ed852e2009-09-05 21:47:34 +0000751
cristybc9539a2010-08-16 18:06:20 +0000752<p>Set the width and height using the <em class="arg">size</em> portion of the
cristy751980d2012-06-03 23:18:35 +0000753<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 +0000754ignored. </p>
cristy3ed852e2009-09-05 21:47:34 +0000755
cristy8ee7f242013-06-20 16:08:44 +0000756<p>As of IM 6.7.8-8, the <em class="arg">geometry</em> arguments behave as follows:</p>
757
758<table id="borderTable" class="doc">
cristy149d58c2013-08-07 19:44:54 +0000759 <col width="20%"></col> <col width="80%"></col>
cristy8ee7f242013-06-20 16:08:44 +0000760 <thead>
761 <tr valign="top">
762 <th style="text-align:center"><em class="arg">size</em></th>
763 <th>General description</th>
764 </tr>
765 </thead>
766 <tbody>
767 <tr valign="top">
768 <td><em class="arg">value</em></td>
769 <td>value is added to both left/right and top/bottom</td>
770 </tr>
771 <tr valign="top">
772 <td><em class="arg">value-x</em>x</td>
773 <td>value-x is added only to left/right and top/bottom are unchanged</td>
774 </tr>
775 <tr valign="top">
776 <td>x<em class="arg">value-y</em></td>
777 <td>value-y is added only to top/bottom and left/right are unchanged</td>
778 </tr>
779 <tr valign="top">
780 <td><em class="arg">value-x</em>x<em class="arg">value-y</em></td>
781 <td>value-x is added to left/right and value-y added to top/bottom</td>
782 </tr>
783 <tr valign="top">
784 <td><em class="arg">value-x</em>x<code>0</code></td>
785 <td>value-x is added only to left/right and top/bottom are unchanged</td>
786 </tr>
787 <tr valign="top">
788 <td><code>0</code>x<em class="arg">value-y</em></td>
789 <td>value-y is added only to top/bottom and left/right are unchanged</td>
790 </tr>
791 <tr valign="top">
cristyac1b4322013-07-28 13:58:06 +0000792 <td> </td>
793 <td> </td>
cristy8ee7f242013-06-20 16:08:44 +0000794 </tr>
795 <tr valign="top">
796 <td><em class="arg">value</em>%</td>
797 <td>value % of width is added to left/right and value % of height is added to top/bottom</td>
798 </tr>
799 <tr valign="top">
800 <td><em class="arg">value-x</em>x%</td>
801 <td>value-x % of width is added to left/right and to top/bottom</td>
802 </tr>
803 <tr valign="top">
804 <td>x<em class="arg">value-y</em>%</td>
805 <td>value-y % of height is added to top/bottom and to left/right</td>
806 </tr>
807 <tr valign="top">
808 <td><em class="arg">value-x</em>%x<em class="arg">value-y</em>%</td>
809 <td>value-x % of width is added to left/right and value-y % of height is added to top/bottom</td>
810 </tr>
811 <tr valign="top">
812 <td><em class="arg">value-x</em>%x<code>0</code>%</td>
813 <td>value-x % of width is added to left/right and top/bottom are unchanged</td>
814 </tr>
815 <tr valign="top">
cristy149d58c2013-08-07 19:44:54 +0000816 <td><code>0</code>%x<em class="arg">value-y</em>%</td>
cristy8ee7f242013-06-20 16:08:44 +0000817 <td>value-y % of height is added to top/bottom and left/right are unchanged</td>
818 </tr>
819 </tbody>
820 </table>
821
822
cristy149d58c2013-08-07 19:44:54 +0000823<p>Set the border color by preceding with the <a href="command-line-options.html#bordercolor">-bordercolor</a> setting.</p>
cristy3ed852e2009-09-05 21:47:34 +0000824
cristy149d58c2013-08-07 19:44:54 +0000825<p>The <a href="command-line-options.html#border">-border</a> operation is affected by the current <a href="command-line-options.html#compose">-compose</a> setting and assumes that this is using the default
cristy8ee7f242013-06-20 16:08:44 +0000826'<code>Over</code>' composition method. It generates an image of the appropriate
cristy751980d2012-06-03 23:18:35 +0000827size colors by the current <a href="command-line-options.html#bordercolor">-bordercolor</a> before
cristybc9539a2010-08-16 18:06:20 +0000828overlaying the original image in the center of this net image. This means that
cristy8ee7f242013-06-20 16:08:44 +0000829with the default compose method of '<code>Over</code>' any transparent parts may
cristy751980d2012-06-03 23:18:35 +0000830be replaced by the current <a href="command-line-options.html#bordercolor">-bordercolor</a> setting.</p>
831<p>See also the <a href="command-line-options.html#frame">-frame</a> option, which has more
cristybc9539a2010-08-16 18:06:20 +0000832functionality.</p>
cristy3ed852e2009-09-05 21:47:34 +0000833
834<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000835 <h4><a id="bordercolor"></a>-bordercolor <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000836</div>
837
cristy149d58c2013-08-07 19:44:54 +0000838<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>
cristy3ed852e2009-09-05 21:47:34 +0000839
cristy751980d2012-06-03 23:18:35 +0000840<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 +0000841
cristy8ee7f242013-06-20 16:08:44 +0000842<p>The default border color is <code>#DFDFDF</code>, <span style="background-color: #dfdfdf;">this shade of gray</span>.</p>
cristy3ed852e2009-09-05 21:47:34 +0000843
844<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000845 <h4><a id="borderwidth"></a>-borderwidth <em class="arg">geometry</em> </h4>
cristy3ed852e2009-09-05 21:47:34 +0000846</div>
847
cristy149d58c2013-08-07 19:44:54 +0000848<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 +0000849
850<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +0000851 <h4><a id="brightness-contrast"></a>-brightness-contrast <em class="arg">brightness</em><br></br>-brightness-contrast <em class="arg">brightness</em>{x<em class="arg">contrast</em>}{<em class="arg">%</em>}}</h4>
cristy16ff93c2010-01-13 23:18:07 +0000852</div>
853
cristy149d58c2013-08-07 19:44:54 +0000854<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>
cristy16ff93c2010-01-13 23:18:07 +0000855
cristyefb2bdb2010-11-20 19:35:22 +0000856<p>Brightness and Contrast values apply changes to the input image. They are
857not absolute settings. A brightness or contrast value of zero means no change.
858The range of values is -100 to +100 on each. Positive values increase the
859brightness or contrast and negative values decrease the brightness or contrast.
860To control only contrast, set the brightness=0. To control only brightness,
861set contrast=0 or just leave it off.</p>
cristy16ff93c2010-01-13 23:18:07 +0000862
cristy751980d2012-06-03 23:18:35 +0000863<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 +0000864apply the brightness and/or contrast change. The default is to apply the same
865transformation to all channels.</p>
cristy16ff93c2010-01-13 23:18:07 +0000866
cristyefb2bdb2010-11-20 19:35:22 +0000867<p>Brightness and Contrast arguments are converted to offset and slope of a
868linear transform and applied
cristy751980d2012-06-03 23:18:35 +0000869using <a href="command-line-options.html#fill">-function polynomial "slope,offset"</a>.</p>
cristy16ff93c2010-01-13 23:18:07 +0000870
cristyefb2bdb2010-11-20 19:35:22 +0000871<p>The slope varies from 0 at contrast=-100 to almost vertical at
872contrast=+100. For brightness=0 and contrast=-100, the result are totally
873midgray. For brightness=0 and contrast=+100, the result will approach but
874not quite reach a threshold at midgray; that is the linear transformation
875is a very steep vertical line at mid gray.</p>
cristy16ff93c2010-01-13 23:18:07 +0000876
cristyefb2bdb2010-11-20 19:35:22 +0000877<p>Negative slopes, i.e. negating the image, are not possible with this
878function. All achievable slopes are zero or positive.</p>
cristy16ff93c2010-01-13 23:18:07 +0000879
cristyefb2bdb2010-11-20 19:35:22 +0000880<p>The offset varies from -0.5 at brightness=-100 to 0 at brightness=0 to +0.5
881at brightness=+100. Thus, when contrast=0 and brightness=100, the result is
882totally white. Similarly, when contrast=0 and brightness=-100, the result is
883totally black.</p>
cristy16ff93c2010-01-13 23:18:07 +0000884
cristyefb2bdb2010-11-20 19:35:22 +0000885<p>As the range of values for the arguments are -100 to +100, adding the '%'
886symbol is no different than leaving it off.</p>
cristy16ff93c2010-01-13 23:18:07 +0000887
888<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000889 <h4><a id="cache"></a>-cache <em class="arg">threshold</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000890</div>
891
cristy149d58c2013-08-07 19:44:54 +0000892<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 +0000893
894<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000895 <h4><a id="caption"></a>-caption <em class="arg">string</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000896</div>
897
cristy149d58c2013-08-07 19:44:54 +0000898<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>
cristy3ed852e2009-09-05 21:47:34 +0000899
cristy71a3f602010-09-15 12:38:16 +0000900<p>This option sets the caption meta-data of an image read in after this
901option has been given. To modify a caption of images already in memory use
cristy8ee7f242013-06-20 16:08:44 +0000902"<code><a href="command-line-options.html#set">-set</a> caption</code>". </p>
cristy71a3f602010-09-15 12:38:16 +0000903
cristy149d58c2013-08-07 19:44:54 +0000904<p>The caption can contain special format characters listed in the <a href="escape.html">Format and
cristyd0bd44a2010-09-24 12:38:11 +0000905Print Image Properties</a>. These attributes are expanded when the caption
cristy71a3f602010-09-15 12:38:16 +0000906is finally assigned to the individual images. </p>
907
cristy149d58c2013-08-07 19:44:54 +0000908<p>If the first character of <em class="arg">string</em> is <em class="arg">@</em>, the image caption is read from a file titled by the
cristy71a3f602010-09-15 12:38:16 +0000909remaining characters in the string. Comments read in from a file are literal;
910no embedded formatting characters are recognized.</p>
911
cristyeed6cb62012-01-28 19:38:34 +0000912<p>Caption meta-data is not visible on the image itself. To do that use the
cristy751980d2012-06-03 23:18:35 +0000913<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 +0000914instead.</p>
915
916<p>For example,</p>
917
918<p class="crtsnip">
919 -caption "%m:%f %wx%h" bird.miff
920</p>
921
cristy8ee7f242013-06-20 16:08:44 +0000922<p>produces an image caption of <code>MIFF:bird.miff 512x480</code> (assuming
923that the image <code>bird.miff</code> has a width of 512 and a height of
cristy71a3f602010-09-15 12:38:16 +0000924480.</p>
925
926
cristy3ed852e2009-09-05 21:47:34 +0000927<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000928 <h4><a id="cdl"></a>-cdl <em class="arg">filename</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000929</div>
930
cristy149d58c2013-08-07 19:44:54 +0000931<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>
cristy3ed852e2009-09-05 21:47:34 +0000932
933<p>Here is an example color correction collection:</p>
934
935<pre class="text">
cristybac7a162010-06-15 19:57:29 +0000936&lt;?xml version="1.0" encoding="UTF-8"?&gt;
937&lt;ColorCorrectionCollection xmlns="urn:ASC:CDL:v1.2"&gt;
938 &lt;ColorCorrection id="cc06668"&gt;
939 &lt;SOPNode&gt;
940 &lt;Slope&gt; 0.9 1.2 0.5 &lt;/Slope&gt;
941 &lt;Offset&gt; 0.4 -0.5 0.6 &lt;/Offset&gt;
942 &lt;Power&gt; 1.0 0.8 1.5 &lt;/Power&gt;
943 &lt;/SOPNode&gt;
944 &lt;SATNode&gt;
945 &lt;Saturation&gt; 0.85 &lt;/Saturation&gt;
946 &lt;/SATNode&gt;
947 &lt;/ColorCorrection&gt;
948&lt;/ColorCorrectionCollection&gt;
cristy3ed852e2009-09-05 21:47:34 +0000949</pre>
950
951<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +0000952 <h4><a id="channel"></a>-channel <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +0000953</div>
954
cristy149d58c2013-08-07 19:44:54 +0000955<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>
cristy3ed852e2009-09-05 21:47:34 +0000956
cristy8ee7f242013-06-20 16:08:44 +0000957<p>Choose from: <code>Red</code>, <code>Green</code>, <code>Blue</code>,
958<code>Alpha</code>, <code>Cyan</code>, <code>Magenta</code>, <code>Yellow</code>,
959<code>Black</code>, <code>Opacity</code>, <code>Index</code>, <code>RGB</code>,
960<code>RGBA</code>, <code>CMYK</code>, or <code>CMYKA</code>.</p>
cristy3ed852e2009-09-05 21:47:34 +0000961
cristy83a272e2010-05-07 20:40:35 +0000962<p>The channels above can also be specified as a comma-separated list or can be
cristy8ee7f242013-06-20 16:08:44 +0000963abbreviated as a concatenation of the letters '<code>R</code>', '<code>G</code>',
964'<code>B</code>', '<code>A</code>', '<code>O</code>', '<code>C</code>',
965'<code>M</code>', '<code>Y</code>', '<code>K</code>'.
cristy3ed852e2009-09-05 21:47:34 +0000966
cristy8ee7f242013-06-20 16:08:44 +0000967For example, to only select the <code>Red</code> and <code>Blue</code> channels
cristy83a272e2010-05-07 20:40:35 +0000968you can either use </p>
cristy3ed852e2009-09-05 21:47:34 +0000969<p class="crtsnip">
cristy83a272e2010-05-07 20:40:35 +0000970 -channel Red,Blue
971</p>
972<p>or you can use the short hand form</p>
973<p class="crtsnip">
974 -channel RB
cristy3ed852e2009-09-05 21:47:34 +0000975</p>
976
cristy2dcd6822011-06-13 16:21:20 +0000977<p>All the channels that are present in an image can be specified using the
cristy8ee7f242013-06-20 16:08:44 +0000978special channel type <code>All</code>. Not all operators are 'channel capable',
cristybac7a162010-06-15 19:57:29 +0000979but generally any operators that are generally 'grey-scale' image operators,
980will understand this setting. See individual operator documentation. </p>
981
cristy149d58c2013-08-07 19:44:54 +0000982<br></br>
cristy83a272e2010-05-07 20:40:35 +0000983
cristy2dcd6822011-06-13 16:21:20 +0000984<p>On top of the normal channel selection an extra flag can be specified,
cristy8ee7f242013-06-20 16:08:44 +0000985'<code>Sync</code>'. This is turned on by default and if set means that
cristybac7a162010-06-15 19:57:29 +0000986operators that understand this flag should perform: cross-channel
cristy2dcd6822011-06-13 16:21:20 +0000987synchronization of the channels. If not specified, then most grey-scale
cristybac7a162010-06-15 19:57:29 +0000988operators will apply their image processing operations to each individual
cristy751980d2012-06-03 23:18:35 +0000989channel (as specified by the rest of the <a href="command-line-options.html#channel">-channel</a>
cristyd0bda5e2010-09-21 16:22:45 +0000990setting) completely independently from each other. </p>
cristy83a272e2010-05-07 20:40:35 +0000991
cristy751980d2012-06-03 23:18:35 +0000992<p>For example for operators such as <a href="command-line-options.html#auto-level">-auto-level</a> and
993<a href="command-line-options.html#auto-gamma">-auto-gamma</a> the color channels are modified
cristy83a272e2010-05-07 20:40:35 +0000994together in exactly the same way so that colors will remain in-sync. Without
cristyd0bd44a2010-09-24 12:38:11 +0000995it being set, then each channel is modified separately and
cristyd0bda5e2010-09-21 16:22:45 +0000996independently, which may produce color distortion. </p>
cristy83a272e2010-05-07 20:40:35 +0000997
cristy8ee7f242013-06-20 16:08:44 +0000998<p>The <a href="command-line-options.html#morphology">-morphology</a> '<code>Convolve</code>' method
cristy751980d2012-06-03 23:18:35 +0000999and the <a href="command-line-options.html#compose">-compose</a> mathematical methods, also understands
cristy8ee7f242013-06-20 16:08:44 +00001000the '<code>Sync</code>' flag to modify the behaviour of pixel colors according
cristybac7a162010-06-15 19:57:29 +00001001to the alpha channel (if present). That is to say it will modify the image
1002processing with the understanding that fully-transparent colors should not
1003contribute to the final result. </p>
1004
cristy2dcd6822011-06-13 16:21:20 +00001005<p>Basically, by default, operators work with color channels in synchronous, and
cristy751980d2012-06-03 23:18:35 +00001006treats transparency as special, unless the <a href="command-line-options.html#channel">-channel</a>
cristy8ee7f242013-06-20 16:08:44 +00001007setting is modified so as to remove the effect of the '<code>Sync</code>' flag.
cristybac7a162010-06-15 19:57:29 +00001008How each operator does this depends on that operators current implementation.
1009Not all operators understands this flag at this time, but that is changing.
1010</p>
cristy83a272e2010-05-07 20:40:35 +00001011
cristy751980d2012-06-03 23:18:35 +00001012<p>To print a complete list of channel types, use <a href="command-line-options.html#list">-list
cristy83a272e2010-05-07 20:40:35 +00001013channel</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00001014
cristy149d58c2013-08-07 19:44:54 +00001015<br></br>
cristyd934d102009-10-10 12:55:13 +00001016
cristy751980d2012-06-03 23:18:35 +00001017<p>By default, ImageMagick sets <a href="command-line-options.html#channel">-channel</a> to the value
cristy8ee7f242013-06-20 16:08:44 +00001018'<code>RGBK,sync</code>', which specifies that operators act on all color
cristybac7a162010-06-15 19:57:29 +00001019channels except the transparency channel, and that all the color channels are
cristyeed6cb62012-01-28 19:38:34 +00001020to be modified in exactly the same way, with an understanding of transparency
cristy149d58c2013-08-07 19:44:54 +00001021(depending on the operation being applied). The 'plus' form <a href="command-line-options.html#channel">+channel</a> will reset the value back to this default. </p>
cristyd934d102009-10-10 12:55:13 +00001022
cristy149d58c2013-08-07 19:44:54 +00001023<p>Options that are affected by the <a href="command-line-options.html#channel">-channel</a> setting
cristyd934d102009-10-10 12:55:13 +00001024include the following.
1025
cristy751980d2012-06-03 23:18:35 +00001026<a href="command-line-options.html#auto-gamma">-auto-gamma</a>,
1027<a href="command-line-options.html#auto-level">-auto-level</a>,
1028<a href="command-line-options.html#black-threshold">-black-threshold</a>,
1029<a href="command-line-options.html#blur">-blur</a>,
1030<a href="command-line-options.html#clamp">-clamp</a>,
1031<a href="command-line-options.html#clut">-clut</a>,
1032<a href="command-line-options.html#combine">-combine</a>,
1033<a href="command-line-options.html#composite">-composite</a> (Mathematical compose methods only),
1034<a href="command-line-options.html#convolve">-convolve</a>,
1035<a href="command-line-options.html#contrast-stretch">-contrast-stretch</a>,
1036<a href="command-line-options.html#evaluate">-evaluate</a>,
1037<a href="command-line-options.html#function">-function</a>,
1038<a href="command-line-options.html#fx">-fx</a>,
1039<a href="command-line-options.html#gaussian-blur">-gaussian-blur</a>,
1040<a href="command-line-options.html#hald-clut">-hald-clut</a>,
1041<a href="command-line-options.html#motion-blur">-motion-blur</a>,
1042<a href="command-line-options.html#morphology">-morphology</a>,
1043<a href="command-line-options.html#negate">-negate</a>,
1044<a href="command-line-options.html#normalize">-normalize</a>,
1045<a href="command-line-options.html#ordered-dither">-ordered-dither</a>,
1046<a href="command-line-options.html#radial-blur">-radial-blur</a>,
1047<a href="command-line-options.html#random-threshold">-random-threshold</a>,
1048<a href="command-line-options.html#separate">-separate</a>,
1049<a href="command-line-options.html#threshold">-threshold</a>, and
1050<a href="command-line-options.html#white-threshold">-white-threshold</a>.
cristy3ed852e2009-09-05 21:47:34 +00001051</p>
1052
cristy149d58c2013-08-07 19:44:54 +00001053<p>Warning, some operators behave differently when the <a href="command-line-options.html#channel">+channel</a> default setting is in effect, verses ANY user defined <a href="command-line-options.html#channel">-channel</a> setting (including the equivalent of the
cristy83a272e2010-05-07 20:40:35 +00001054default). These operators have yet to be made to understand the newer 'Sync'
1055flag. </p>
1056
cristy751980d2012-06-03 23:18:35 +00001057<p>For example <a href="command-line-options.html#threshold">-threshold</a> will by default gray-scale
cristy149d58c2013-08-07 19:44:54 +00001058the image before thresholding, if no <a href="command-line-options.html#channel">-channel</a> setting
cristybac7a162010-06-15 19:57:29 +00001059has been defined. This is not 'Sync flag controlled, yet. </p>
cristyd934d102009-10-10 12:55:13 +00001060
cristy149d58c2013-08-07 19:44:54 +00001061<p>Also some operators such as <a href="command-line-options.html#blur">-blur</a>, <a href="command-line-options.html#gaussian-blur">-gaussian-blur</a>, will modify their handling of the
1062color channels if the '<code>alpha</code>' channel is also enabled by <a href="command-line-options.html#channel">-channel</a>. Generally this done to ensure that
cristyd934d102009-10-10 12:55:13 +00001063fully-transparent colors are treated as being fully-transparent, and thus any
1064underlying 'hidden' color has no effect on the final results. Typically
cristy751980d2012-06-03 23:18:35 +00001065resulting in 'halo' effects. The newer <a href="command-line-options.html#morphology">-morphology</a>
cristyd0bda5e2010-09-21 16:22:45 +00001066convolution equivalents however does have a understanding of the 'Sync' flag
cristybac7a162010-06-15 19:57:29 +00001067and will thus handle transparency correctly by default. </p>
cristyd934d102009-10-10 12:55:13 +00001068
cristybac7a162010-06-15 19:57:29 +00001069<p>As a alpha channel is optional within images, some operators will read the
cristyd934d102009-10-10 12:55:13 +00001070color channels of an image as a greyscale alpha mask, when the image has no
cristy149d58c2013-08-07 19:44:54 +00001071alpha channel present, and the <a href="command-line-options.html#channel">-channel</a> setting tells
1072the operator to apply the operation using alpha channels. The <a href="command-line-options.html#clut">-clut</a> operator is a good example of this. </p>
cristy751980d2012-06-03 23:18:35 +00001073
cristyd934d102009-10-10 12:55:13 +00001074
cristy3ed852e2009-09-05 21:47:34 +00001075
1076<div style="margin: auto;">
cristy751980d2012-06-03 23:18:35 +00001077 <h4><a id="charcoal"></a>-charcoal <em class="arg">factor</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001078</div>
1079
cristy149d58c2013-08-07 19:44:54 +00001080<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>
cristy3ed852e2009-09-05 21:47:34 +00001081
1082<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001083 <h4><a id="chop"></a>-chop <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001084</div>
1085
cristy149d58c2013-08-07 19:44:54 +00001086<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>
cristy3ed852e2009-09-05 21:47:34 +00001087
cristy751980d2012-06-03 23:18:35 +00001088<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 +00001089and <em class="arg">height</em> given in the of the <em class="arg">size</em>
1090portion of the <em class="arg">geometry</em> argument give the number of
1091columns and rows to remove. The <em class="arg">offset</em> portion of
1092the <em class="arg">geometry</em> argument is influenced by
cristy751980d2012-06-03 23:18:35 +00001093a <a href="command-line-options.html#gravity">-gravity</a> setting, if present.</p>
cristy3ed852e2009-09-05 21:47:34 +00001094
cristy751980d2012-06-03 23:18:35 +00001095<p>The <a href="command-line-options.html#chop">-chop</a> option removes entire rows and columns,
cristyefb2bdb2010-11-20 19:35:22 +00001096and moves the remaining corner blocks leftward and upward to close the gaps.</p>
cristy3ed852e2009-09-05 21:47:34 +00001097
cristyacc04882011-05-04 23:03:43 +00001098<p>While it can remove internal rows and columns of pixels, it is more
cristy751980d2012-06-03 23:18:35 +00001099typically used with as <a href="command-line-options.html#gravity">-gravity</a> setting and zero
cristy149d58c2013-08-07 19:44:54 +00001100offsets so as to remove a single edge from an image. Compare this to <a href="command-line-options.html#shave">-shave</a> which removes equal numbers of pixels from oppisite
cristyacc04882011-05-04 23:03:43 +00001101sides of the image. </p>
cristydcca3fa2010-12-29 21:50:07 +00001102
cristy149d58c2013-08-07 19:44:54 +00001103<p>Using <a href="command-line-options.html#chop">-chop</a> effectively undoes the results of a <a href="command-line-options.html#splice">-splice</a> that was given the same <em class="arg">geometry</em> and <a href="command-line-options.html#gravity">-gravity</a> settings. </p>
cristy751980d2012-06-03 23:18:35 +00001104
1105<div style="margin: auto;">
1106 <h4><a id="clamp"></a>-clamp</h4>
1107</div>
1108
cristy149d58c2013-08-07 19:44:54 +00001109<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">set each pixel whose value is below zero to zero and any the pixel whose value is above the quantum range to the quantum range (e.g. 65535) otherwise the pixel value remains unchanged.</td><td style="text-align:right;"></td></tr></table>
cristydcca3fa2010-12-29 21:50:07 +00001110
cristy3ed852e2009-09-05 21:47:34 +00001111<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001112 <h4><a id="clip"></a>-clip</h4>
cristy3ed852e2009-09-05 21:47:34 +00001113</div>
1114
cristy149d58c2013-08-07 19:44:54 +00001115<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>
cristy3ed852e2009-09-05 21:47:34 +00001116
1117<p>If a clipping path is present, it is applied to subsequent operations.</p>
1118
1119<p>For example, in the command</p>
1120
cristy149d58c2013-08-07 19:44:54 +00001121<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert cockatoo.tif -clip -negate negated.tif</span></p>
cristy3ed852e2009-09-05 21:47:34 +00001122<p>only the pixels within the clipping path are negated.</p>
1123
cristy8ee7f242013-06-20 16:08:44 +00001124<p>The <a href="command-line-options.html#clip">-clip</a> feature requires SVG support. If the SVG
1125delegate library is not present, the option is ignored.</p>
1126
1127<p>Use <a href="command-line-options.html#clip">+clip</a> to disable clipping for subsequent operations.</p>
cristy3ed852e2009-09-05 21:47:34 +00001128
1129<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001130 <h4><a id="clip-mask"></a>-clip-mask</h4>
cristy3ed852e2009-09-05 21:47:34 +00001131</div>
1132
cristy149d58c2013-08-07 19:44:54 +00001133<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>
cristy3ed852e2009-09-05 21:47:34 +00001134
cristy8ee7f242013-06-20 16:08:44 +00001135<p>Use the alpha channel of the current image as a mask. Any areas that is
1136white is not modified by any of the 'image processing operators' that follow,
1137until the mask is removed. Pixels in the black areas of the clip mask are
1138modified per the requirements of the operator. </p>
cristy30092792011-02-22 02:06:14 +00001139
1140<p>In some ways this is similar to (though not the same) as defining
cristy149d58c2013-08-07 19:44:54 +00001141a rectangular <a href="command-line-options.html#region">-region</a>, or using the negative of the
1142mask (third) image in a three image <a href="command-line-options.html#composite">-composite</a>,
cristy30092792011-02-22 02:06:14 +00001143operation. </p>
1144
cristy8ee7f242013-06-20 16:08:44 +00001145<p>Use <a href="command-line-options.html#clip-mask">+clip-mask</a> to disable clipping for subsequent operations.</p>
cristy30092792011-02-22 02:06:14 +00001146
cristy3ed852e2009-09-05 21:47:34 +00001147<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001148 <h4><a id="clip-path"></a>-clip-path <em class="arg">id</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001149</div>
1150
cristy149d58c2013-08-07 19:44:54 +00001151<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 +00001152
cristy8ee7f242013-06-20 16:08:44 +00001153<p>This is identical to <a href="command-line-options.html#clip">-clip</a> except choose a specific clip path in the event the image has more than one path available. </p>
cristy30092792011-02-22 02:06:14 +00001154
cristy8ee7f242013-06-20 16:08:44 +00001155<p>Use <a href="command-line-options.html#clip-path">+clip-path</a> to disable clipping for subsequent operations.</p>
cristy30092792011-02-22 02:06:14 +00001156
cristy3ed852e2009-09-05 21:47:34 +00001157<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001158 <h4><a id="clone"></a>-clone <em class="arg">index(s)</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001159</div>
1160
cristy149d58c2013-08-07 19:44:54 +00001161<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 +00001162
cristydcca3fa2010-12-29 21:50:07 +00001163<p>Inside parenthesis (where the operator is normally used) it will make a
1164clone of the images from the last 'pushed' image sequence, and adds them to
1165the end of the current image sequence. Outside parenthesis
1166(not recommended) it clones the images from the current image sequence. </p>
1167
cristy3ed852e2009-09-05 21:47:34 +00001168<p>Specify the image by its index in the sequence. The first image is index
cristyefb2bdb2010-11-20 19:35:22 +000011690. Negative indexes are relative to the end of the sequence; for
cristy149d58c2013-08-07 19:44:54 +00001170example, <code>−1</code>
cristy3ed852e2009-09-05 21:47:34 +00001171represents the last image of the sequence. Specify a range of images with a
cristy149d58c2013-08-07 19:44:54 +00001172dash (e.g. <code>0−4</code>). Separate multiple indexes with commas but no
1173spaces (e.g. <code>0,2,5</code>). A value of '<code>0−−1</code> will
cristy8b9dd952011-03-21 22:56:18 +00001174effectively clone all the images. </p>
cristydcca3fa2010-12-29 21:50:07 +00001175
cristy751980d2012-06-03 23:18:35 +00001176<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 +00001177in the image sequence, and is thus equivalent to using a argument of
cristy149d58c2013-08-07 19:44:54 +00001178'<code>−1</code>'. </p>
cristy3ed852e2009-09-05 21:47:34 +00001179
1180<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001181 <h4><a id="clut"></a>-clut</h4>
cristy3ed852e2009-09-05 21:47:34 +00001182</div>
1183
cristy149d58c2013-08-07 19:44:54 +00001184<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
cristy3ed852e2009-09-05 21:47:34 +00001185corresponding channel in the second image as a <b>c</b>olor
cristy149d58c2013-08-07 19:44:54 +00001186<b>l</b>ook<b>u</b>p <b>t</b>able.</td><td style="text-align:right;"></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00001187
1188<p>The second (LUT) image is ordinarily a gradient image containing the
1189histogram mapping of how each channel should be modified. Typically it is a
1190either a single row or column image of replacement color values. If larger
1191than a single row or column, values are taken from a diagonal line from
1192top-left to bottom-right corners.</p>
1193
cristy149d58c2013-08-07 19:44:54 +00001194<p>The lookup is further controlled by the <a href="command-line-options.html#interpolate">-interpolate</a> setting, which is especially handy for an
cristy3ed852e2009-09-05 21:47:34 +00001195LUT which is not the full length needed by the ImageMagick installed Quality
cristy8ee7f242013-06-20 16:08:44 +00001196(Q) level. Good settings for this are the '<code>bilinear</code>' and
1197'<code>bicubic</code>' interpolation settings, which give smooth color
1198gradients, and the '<code>integer</code>' setting for a direct, unsmoothed
cristy3ed852e2009-09-05 21:47:34 +00001199lookup of color values. </p>
1200
1201<p>This operator is especially suited to replacing a grayscale image with a
1202specific color gradient from the CLUT image. </p>
1203
cristy751980d2012-06-03 23:18:35 +00001204<p>Only the channel values defined by the <a href="command-line-options.html#channel">-channel</a>
cristy149d58c2013-08-07 19:44:54 +00001205setting will have their values replaced. In particular, since the default <a href="command-line-options.html#channel">-channel</a> setting is <code>RGB</code>, this means that
1206transparency (alpha/matte channel) is not affected, unless the <a href="command-line-options.html#channel">-channel</a> setting is modified. When the alpha channel is
1207set, 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 +00001208as the other channels, implying that alpha/matte values are replaced using the
1209alpha/matte values of the original image. </p>
1210
cristyd0bda5e2010-09-21 16:22:45 +00001211<p>If either the image being modified, or the lookup image, contains no
cristy149d58c2013-08-07 19:44:54 +00001212transparency (i.e. <a href="command-line-options.html#alpha">-alpha</a> is turned 'off') but the <a href="command-line-options.html#channel">-channel</a> setting includes alpha replacement, then it is
cristyd0bd44a2010-09-24 12:38:11 +00001213assumed that image represents a gray-scale gradient which is used for the
cristy3ed852e2009-09-05 21:47:34 +00001214replacement alpha values. That is you can use a gray-scale CLUT image to
1215adjust a existing images alpha channel, or you can color a gray-scale image
1216using colors form CLUT containing the desired colors, including transparency.
1217</p>
1218
cristy149d58c2013-08-07 19:44:54 +00001219<p>See also <a href="command-line-options.html#hald-clut">-hald-clut</a> which replaces colors
cristyefb2bdb2010-11-20 19:35:22 +00001220according to the lookup of the full color RGB value from a 2D representation
1221of a 3D color cube. </p>
cristy3ed852e2009-09-05 21:47:34 +00001222
1223
1224<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001225 <h4><a id="coalesce"></a>-coalesce</h4>
cristy3ed852e2009-09-05 21:47:34 +00001226</div>
1227
cristy149d58c2013-08-07 19:44:54 +00001228<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>
cristy3ed852e2009-09-05 21:47:34 +00001229
cristyefb2bdb2010-11-20 19:35:22 +00001230<p>Overlay each image in an image sequence according to
cristy751980d2012-06-03 23:18:35 +00001231its <a href="command-line-options.html#dispose">-dispose</a> meta-data, to reproduce the look of
cristyefb2bdb2010-11-20 19:35:22 +00001232an animation at each point in the animation sequence. All images should be
1233the same size, and are assigned appropriate GIF disposal settings for the
1234animation to continue working as expected as a GIF animation. Such frames
1235are more easily viewed and processed than the highly optimized GIF overlay
1236images. </p>
cristy3ed852e2009-09-05 21:47:34 +00001237
cristyefb2bdb2010-11-20 19:35:22 +00001238<p>The animation can be re-optimized after processing using
cristy8ee7f242013-06-20 16:08:44 +00001239the <a href="command-line-options.html#layers">-layers</a> method '<code>optimize</code>', although
cristyefb2bdb2010-11-20 19:35:22 +00001240there is no guarantee that the restored GIF animation optimization is
1241better than the original. </p>
cristy3ed852e2009-09-05 21:47:34 +00001242
1243
1244<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001245 <h4><a id="colorize"></a>-colorize <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001246</div>
1247
cristy149d58c2013-08-07 19:44:54 +00001248<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 +00001249
cristyefb2bdb2010-11-20 19:35:22 +00001250<p>Specify the amount of colorization as a percentage. Separate colorization
1251values can be applied to the red, green, and blue channels of the image with
1252a comma-delimited list of colorization
cristy8ee7f242013-06-20 16:08:44 +00001253values (e.g., <code>-colorize 0,0,50</code>).</p>
cristy3ed852e2009-09-05 21:47:34 +00001254
1255<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001256 <h4><a id="colormap"></a>-colormap <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001257</div>
1258
cristy149d58c2013-08-07 19:44:54 +00001259<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 +00001260
cristy8ee7f242013-06-20 16:08:44 +00001261<p>The <em class="arg">type</em> can be <code>shared</code> or <code>private</code>.</p>
cristy3ed852e2009-09-05 21:47:34 +00001262
cristyefb2bdb2010-11-20 19:35:22 +00001263<p>This option only applies when the default X server visual
cristy8ee7f242013-06-20 16:08:44 +00001264is <code>PseudoColor</code> or <code>GrayScale</code>. Refer
cristy751980d2012-06-03 23:18:35 +00001265to <a href="command-line-options.html#visual">-visual</a> for more details. By default,
cristyefb2bdb2010-11-20 19:35:22 +00001266a shared colormap is allocated. The image shares colors with
1267other X clients. Some image colors could be approximated,
1268therefore your image may look very different than intended.
cristy8ee7f242013-06-20 16:08:44 +00001269If <code>private</code> is chosen, the image colors appear exactly
cristyefb2bdb2010-11-20 19:35:22 +00001270as they are defined. However, other clients may go <em>technicolor</em>
1271when the image colormap is installed.</p>
cristy3ed852e2009-09-05 21:47:34 +00001272
1273<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001274 <h4><a id="colors"></a>-colors <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001275</div>
1276
cristy149d58c2013-08-07 19:44:54 +00001277<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>
cristy3ed852e2009-09-05 21:47:34 +00001278
cristyefb2bdb2010-11-20 19:35:22 +00001279<p>The actual number of colors in the image may be less than your request,
1280but never more. Note that this a color reduction option. Images with fewer
1281unique colors than specified by <em class="arg">value</em> will have any
1282duplicate or unused colors removed. The ordering of an existing color
1283palette may be altered. When converting an image from color to grayscale,
1284it is more efficient to convert the image to the gray colorspace before
1285reducing the number of colors. Refer to
cristy751980d2012-06-03 23:18:35 +00001286the <a href="quantize.html">
cristyefb2bdb2010-11-20 19:35:22 +00001287color reduction algorithm</a> for more details.</p>
cristy3ed852e2009-09-05 21:47:34 +00001288
1289<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001290 <h4><a id="color-matrix"></a>-color-matrix <em class="arg">matrix</em></h4>
cristy2c839602010-04-03 02:32:08 +00001291</div>
1292
cristy149d58c2013-08-07 19:44:54 +00001293<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>
cristy2c839602010-04-03 02:32:08 +00001294
cristyefb2bdb2010-11-20 19:35:22 +00001295<p>This option permits saturation changes, hue rotation, luminance to alpha,
1296and various other effects. Although variable-sized transformation matrices
1297can be used, typically one uses a 5x5 matrix for an RGBA image and a 6x6
1298for CMYKA (or RGBA with offsets). The matrix is similar to those used by
1299Adobe Flash except offsets are in column 6 rather than 5 (in support of
1300CMYKA images) and offsets are normalized (divide Flash offset by 255).</p>
cristy2c839602010-04-03 02:32:08 +00001301
1302<p>As an example, to add contrast to an image with offsets, try this command:</p>
1303
1304<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00001305 convert kittens.jpg -color-matrix \
1306 " 1.5 0.0 0.0 0.0, 0.0, -0.157 \
1307 0.0 1.5 0.0 0.0, 0.0, -0.157 \
1308 0.0 0.0 1.5 0.0, 0.0, -0.157 \
1309 0.0 0.0 0.0 1.0, 0.0, 0.0 \
1310 0.0 0.0 0.0 0.0, 1.0, 0.0 \
1311 0.0 0.0 0.0 0.0, 0.0, 1.0" kittens.png
cristy2c839602010-04-03 02:32:08 +00001312</pre>
1313<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001314 <h4><a id="colorspace"></a>-colorspace <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001315</div>
1316
cristy149d58c2013-08-07 19:44:54 +00001317<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>
cristy3ed852e2009-09-05 21:47:34 +00001318
1319<p>Choices are:</p>
1320
1321<pre class="text">
cristy8ee7f242013-06-20 16:08:44 +00001322 CMY CMYK Gray HCL
1323 HCLp HSB HSI HSL
1324 HSV HWB Lab LCHab
1325 LCHuv LMS Log Luv
1326 OHTA Rec601YCbCr Rec709YCbCr RGB
1327 scRGB sRGB Transparent XYZ
1328 YCbCr YCC YDbDr YIQ
cristye9a32c32011-04-07 01:11:05 +00001329 YPbPr YUV
cristy3ed852e2009-09-05 21:47:34 +00001330</pre>
1331
cristy8ee7f242013-06-20 16:08:44 +00001332<p>To print a complete list of colorspaces, use <a href="command-line-options.html#list">-list colorspace</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00001333
cristy8ee7f242013-06-20 16:08:44 +00001334<p>For a more accurate color conversion to or from the linear RGB, CMYK, or grayscale colorspaces, use the <a href="command-line-options.html#profile">-profile</a> option. Note, ImageMagick assumes the sRGB colorspace if the image format does not indicate otherwise. For colorspace conversion, the gamma function is first removed to produce linear RGB.</p>
cristy3ed852e2009-09-05 21:47:34 +00001335
1336<table class="doc">
cristy8ee7f242013-06-20 16:08:44 +00001337 <caption>Conversion of RGB to Other Color Spaces</caption>
cristy3ed852e2009-09-05 21:47:34 +00001338 <tr><th align="left" valign="middle">CMY</th></tr>
cristy149d58c2013-08-07 19:44:54 +00001339 <tr><td align="left" valign="middle">C=<em class="QR">QuantumRange</em>−R</td></tr>
1340 <tr><td align="left" valign="middle">M=<em class="QR">QuantumRange</em>−G</td></tr>
1341 <tr><td align="left" valign="middle">Y=<em class="QR">QuantumRange</em>−B</td></tr>
1342 <tr><th align="left" valign="middle">CMYK — starts with CMY from above</th></tr>
cristy3ed852e2009-09-05 21:47:34 +00001343 <tr><td align="left" valign="middle">K=min(C,Y,M)</td></tr>
cristy149d58c2013-08-07 19:44:54 +00001344 <tr><td align="left" valign="middle">C=<em class="QR">QuantumRange</em>*(C−K)/(<em class="QR">QuantumRange</em>−K)</td></tr>
1345 <tr><td align="left" valign="middle">M=<em class="QR">QuantumRange</em>*(M−K)/(<em class="QR">QuantumRange</em>−K)</td></tr>
1346 <tr><td align="left" valign="middle">Y=<em class="QR">QuantumRange</em>*(Y−K)/(<em class="QR">QuantumRange</em>−K)</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00001347
1348 <tr><th align="left" valign="middle">Gray</th></tr>
cristy8ee7f242013-06-20 16:08:44 +00001349 <tr><td align="left" valign="middle">Gray = 0.298839*R+0.586811*G+0.114350*B</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00001350
cristy149d58c2013-08-07 19:44:54 +00001351 <tr><th align="left" valign="middle">HSB — Hue, Saturation, Brightness; like a cone peak downward</th></tr>
cristy3ed852e2009-09-05 21:47:34 +00001352 <tr><td align="left" valign="middle">H=angle around perimeter (0 to 360 deg); H=0 is red; increasing angles toward green</td></tr>
1353 <tr><td align="left" valign="middle">S=distance from axis outward</td></tr>
1354 <tr><td align="left" valign="middle">B=distance along axis from bottom upward; B=max(R,G,B); <em>intensity-like</em></td></tr>
1355
cristy149d58c2013-08-07 19:44:54 +00001356 <tr><th align="left" valign="middle">HSL — Hue, Saturation, Lightness; like a double cone end-to-end with peaks at very top and bottom</th></tr>
cristy3ed852e2009-09-05 21:47:34 +00001357 <tr><td align="left" valign="middle">H=angle around perimeter (0 to 360 deg); H=0 is red; increasing angles toward green</td></tr>
1358 <tr><td align="left" valign="middle">S=distance from axis outward</td></tr>
1359 <tr><td align="left" valign="middle">L=distance along axis from bottom upward; L=0.5*max(R,G,B) + 0.5*min(R,G,B); <em>intensity-like</em></td></tr>
1360
cristy149d58c2013-08-07 19:44:54 +00001361 <tr><th align="left" valign="middle">HWB — Hue, Whiteness, Blackness</th></tr>
cristy3ed852e2009-09-05 21:47:34 +00001362 <tr><td align="left" valign="middle">Hue (complicated equation)</td></tr>
1363 <tr><td align="left" valign="middle">Whiteness (complicated equation)</td></tr>
1364 <tr><td align="left" valign="middle">Blackness (complicated equation)</td></tr>
1365
1366 <tr><th align="left" valign="middle">LAB</th></tr>
1367 <tr><td align="left" valign="middle">L (complicated equation relating X,Y,Z)</td></tr>
1368 <tr><td align="left" valign="middle">A (complicated equation relating X,Y,Z)</td></tr>
1369 <tr><td align="left" valign="middle">B (complicated equation relating X,Y,Z)</td></tr>
1370
1371 <tr><th align="left" valign="middle">LOG</th></tr>
1372 <tr><td align="left" valign="middle">I1 (complicated equation involving logarithm of R)</td></tr>
1373 <tr><td align="left" valign="middle">I2 (complicated equation involving logarithm of G)</td></tr>
1374 <tr><td align="left" valign="middle">I3 (complicated equation involving logarithm of B)</td></tr>
1375
cristy149d58c2013-08-07 19:44:54 +00001376 <tr><th align="left" valign="middle">OHTA — approximates principal components transformation</th></tr>
cristy3ed852e2009-09-05 21:47:34 +00001377 <tr><td align="left" valign="middle">I1=0.33333*R+0.33334*G+0.33333*B; <em>intensity-like</em></td></tr>
cristy149d58c2013-08-07 19:44:54 +00001378 <tr><td align="left" valign="middle">I2=(0.50000*R+0.00000*G−0.50000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1379 <tr><td align="left" valign="middle">I3=(−0.25000*R+0.50000*G−0.25000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00001380
1381 <tr><th align="left" valign="middle">Rec601Luma</th></tr>
cristy8ee7f242013-06-20 16:08:44 +00001382 <tr><td align="left" valign="middle">Gray = 0.298839*R+0.586811*G+0.114350*B</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00001383
1384 <tr><th align="left" valign="middle">Rec601YCbCr</th></tr>
cristy8ee7f242013-06-20 16:08:44 +00001385 <tr><td align="left" valign="middle">Y=0.2988390*R+0.5868110*G+0.1143500*B; <em>intensity-like</em></td></tr>
cristy149d58c2013-08-07 19:44:54 +00001386 <tr><td align="left" valign="middle">Cb=(−0.168736*R-0.331264*G+0.500000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1387 <tr><td align="left" valign="middle">Cr=(0.500000*R−0.418688*G−0.081312*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00001388
1389 <tr><th align="left" valign="middle">Rec709Luma</th></tr>
cristy8ee7f242013-06-20 16:08:44 +00001390 <tr><td align="left" valign="middle">Gray=0.212656*R+0.715158*G+0.072186*B</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00001391
1392 <tr><th align="left" valign="middle">Rec709YCbCr</th></tr>
cristy8ee7f242013-06-20 16:08:44 +00001393 <tr><td align="left" valign="middle">Y=0.212656*R+0.715158*G+0.072186*B; <em>intensity-like</em></td></tr>
cristy149d58c2013-08-07 19:44:54 +00001394 <tr><td align="left" valign="middle">Cb=(−0.114572*R−0.385428*G+0.500000*B)+(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1395 <tr><td align="left" valign="middle">Cr=(0.500000*R−0.454153*G−0.045847*B)+(<em class="QR">QuantumRange</em>+1)/2</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00001396
1397 <tr><th align="left" valign="middle">sRGB</th></tr>
cristy149d58c2013-08-07 19:44:54 +00001398 <tr><td align="left" valign="middle">if R ≤ .0.0031308 then Rs=R/12.92 else Rs=1.055 R ^ (1.0 / 2.4) ? 0.055</td></tr>
1399 <tr><td align="left" valign="middle">if G ≤ .0.0031308 then Gs=B/12.92 else Gs=1.055 R ^ (1.0 / 2.4) ? 0.055</td></tr>
1400 <tr><td align="left" valign="middle">if B ≤ .0.0031308 then Bs=B/12.92 else Bs=1.055 R ^ (1.0 / 2.4) ? 0.055</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00001401
1402 <tr><th align="left" valign="middle">XYZ</th></tr>
1403 <tr><td align="left" valign="middle">X=0.4124240*R+0.3575790*G+0.1804640*B</td></tr>
cristybf2eb892013-06-07 00:33:05 +00001404 <tr><td align="left" valign="middle">Y=0.212656*R+0.715158*G+0.0721856*B</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00001405 <tr><td align="left" valign="middle">Z=0.0193324*R+0.1191930*G+0.9504440*B</td></tr>
1406
1407 <tr><th align="left" valign="middle">YCC</th></tr>
cristy8ee7f242013-06-20 16:08:44 +00001408 <tr><td align="left" valign="middle">Y=(0.298839*R+0.586811*G+0.114350*B) (with complicated scaling); <em>intensity-like</em></td></tr>
cristy149d58c2013-08-07 19:44:54 +00001409 <tr><td align="left" valign="middle">C1=(−0.298839*R−0.586811*G+0.88600*B) (with complicated scaling)</td></tr>
1410 <tr><td align="left" valign="middle">C2=(0.70100*R−0.586811*G−0.114350*B) (with complicated scaling)</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00001411
1412 <tr><th align="left" valign="middle">YCbCr</th></tr>
cristy8ee7f242013-06-20 16:08:44 +00001413 <tr><td align="left" valign="middle">Y=0.2988390*R+0.5868110*G+0.1143500*B; <em>intensity-like</em></td></tr>
cristy149d58c2013-08-07 19:44:54 +00001414 <tr><td align="left" valign="middle">Cb=(−0.168736*R−0.331264*G+0.500000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1415 <tr><td align="left" valign="middle">Cr=(0.500000*R−0.418688*G−0.081312*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00001416
1417 <tr><th align="left" valign="middle">YIQ</th></tr>
cristy8ee7f242013-06-20 16:08:44 +00001418 <tr><td align="left" valign="middle">Y=0.298839*R+0.586811*G+0.114350*B; <em>intensity-like</em></td></tr>
cristy149d58c2013-08-07 19:44:54 +00001419 <tr><td align="left" valign="middle">I=(0.59600*R−0.27400*G−0.32200*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1420 <tr><td align="left" valign="middle">Q=(0.21100*R−0.52300*G+0.31200*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00001421
1422 <tr><th align="left" valign="middle">YPbPr</th></tr>
cristy8ee7f242013-06-20 16:08:44 +00001423 <tr><td align="left" valign="middle">Y=0.2988390*R+0.5868110*G+0.1143500*B; <em>intensity-like</em></td></tr>
cristy149d58c2013-08-07 19:44:54 +00001424 <tr><td align="left" valign="middle">Pb=(−0.168736*R−0.331264*G+0.500000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1425 <tr><td align="left" valign="middle">Pr=(0.500000*R−0.418688*G−0.081312*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00001426
1427 <tr><th align="left" valign="middle">YUV</th></tr>
cristy8ee7f242013-06-20 16:08:44 +00001428 <tr><td align="left" valign="middle">Y=0.298839*R+0.586811*G+0.114350*B; <em>intensity-like</em></td></tr>
cristy149d58c2013-08-07 19:44:54 +00001429 <tr><td align="left" valign="middle">U=(−0.14740*R−0.28950*G+0.43690*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
1430 <tr><td align="left" valign="middle">V=(0.61500*R−0.51500*G−0.10000*B)*(<em class="QR">QuantumRange</em>+1)/2</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00001431</table>
1432
cristy8ee7f242013-06-20 16:08:44 +00001433<p>Note the scRGB colorspace requires HDRI support otherwise it behaves just like linear RGB.</p>
1434
cristy3ed852e2009-09-05 21:47:34 +00001435<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001436 <h4><a id="combine"></a>-combine</h4>
cristy3ed852e2009-09-05 21:47:34 +00001437</div>
1438
cristy149d58c2013-08-07 19:44:54 +00001439<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>
cristy3ed852e2009-09-05 21:47:34 +00001440
cristy751980d2012-06-03 23:18:35 +00001441<p>The channels (previously set by <a href="command-line-options.html#channel">-channel</a>) of the
1442combined image are taken from the grayscale values of each image in the
cristy8ee7f242013-06-20 16:08:44 +00001443sequence, in order. For the default -channel setting of <code>RGB</code>, this
1444means the first image is assigned to the <code>Red</code> channel, the second
1445to the <code>Green</code> channel, the third to the <code>Blue</code>.</p>
cristy3ed852e2009-09-05 21:47:34 +00001446
cristy149d58c2013-08-07 19:44:54 +00001447<p>This option can be thought of as the inverse to <a href="command-line-options.html#separate">-separate</a>, so long as the channel settings are the same.
cristy751980d2012-06-03 23:18:35 +00001448Thus, in the following example, the final image should be a copy of the
1449original. </p>
cristy3ed852e2009-09-05 21:47:34 +00001450
cristy149d58c2013-08-07 19:44:54 +00001451<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert original.png -channel RGB -separate sepimage.png</span><span class="crtout"></span><span class="crtprompt"> $ </span><span class="crtin">convert sepimage-0.png sepimage-1.png sepimage-2.png -channel RGB \ <br></br> -combine imagecopy.png</span></p>
cristy3ed852e2009-09-05 21:47:34 +00001452<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001453 <h4><a id="comment"></a>-comment <em class="arg">string</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001454</div>
1455
cristy149d58c2013-08-07 19:44:54 +00001456<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>
cristy3ed852e2009-09-05 21:47:34 +00001457
cristyd0bda5e2010-09-21 16:22:45 +00001458<p>This option sets the comment meta-data of an image read in after this
cristy71a3f602010-09-15 12:38:16 +00001459option has been given. To modify a comment of images already in memory use
cristy8ee7f242013-06-20 16:08:44 +00001460"<code><a href="command-line-options.html#set">-set</a> comment</code>". </p>
cristy3ed852e2009-09-05 21:47:34 +00001461
cristy149d58c2013-08-07 19:44:54 +00001462<p>The comment can contain special format characters listed in the <a href="escape.html">Format and
cristyd0bd44a2010-09-24 12:38:11 +00001463Print Image Properties</a>. These attributes are expanded when the comment
cristy71a3f602010-09-15 12:38:16 +00001464is finally assigned to the individual images. </p>
1465
cristy149d58c2013-08-07 19:44:54 +00001466<p>If the first character of <em class="arg">string</em> is <em class="arg">@</em>, the image comment is read from a file titled by the
cristy71a3f602010-09-15 12:38:16 +00001467remaining characters in the string. Comments read in from a file are literal;
1468no embedded formatting characters are recognized.</p>
1469
1470<p>Comment meta-data are not visible on the image itself. To do that use the
cristy751980d2012-06-03 23:18:35 +00001471<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 +00001472instead.</p>
cristy3ed852e2009-09-05 21:47:34 +00001473
1474<p>For example,</p>
1475
1476<p class="crtsnip">
cristy71a3f602010-09-15 12:38:16 +00001477 -comment "%m:%f %wx%h" bird.miff
cristy3ed852e2009-09-05 21:47:34 +00001478</p>
1479
cristy8ee7f242013-06-20 16:08:44 +00001480<p>produces an image comment of <code>MIFF:bird.miff 512x480</code> (assuming
1481that the image <code>bird.miff</code> has a width of 512 and a height of
cristy71a3f602010-09-15 12:38:16 +00001482480.</p>
cristy3ed852e2009-09-05 21:47:34 +00001483
1484<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001485 <h4><a id="compose"></a>-compose <em class="arg">operator</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001486</div>
1487
cristy149d58c2013-08-07 19:44:54 +00001488<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>
cristy3ed852e2009-09-05 21:47:34 +00001489
cristy751980d2012-06-03 23:18:35 +00001490<p>See <a href="compose.html">Alpha Compositing</a> for
cristybc9539a2010-08-16 18:06:20 +00001491a detailed discussion of alpha compositing.</p>
cristy3ed852e2009-09-05 21:47:34 +00001492
cristybc9539a2010-08-16 18:06:20 +00001493<p>This setting effects image processing operators that merge two (or more)
1494images together in some way. This includes the operators,
cristy751980d2012-06-03 23:18:35 +00001495<a href="command-line-options.html#composite">-composite</a>,
1496<a href="command-line-options.html#layers">-layers</a> composite,
1497<a href="command-line-options.html#flatten">-flatten</a>,
1498<a href="command-line-options.html#mosaic">-mosaic</a>,
1499<a href="command-line-options.html#layers">-layers</a> merge,
1500<a href="command-line-options.html#border">-border</a>,
1501<a href="command-line-options.html#frame">-frame</a>,
1502and <a href="command-line-options.html#extent">-extent</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00001503
cristy8ee7f242013-06-20 16:08:44 +00001504<p>It is also one of the primary options for the "<code>composite</code>"
cristybc9539a2010-08-16 18:06:20 +00001505command. </p>
cristy3ed852e2009-09-05 21:47:34 +00001506
1507
1508<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001509 <h4><a id="composite"></a>-composite</h4>
cristy3ed852e2009-09-05 21:47:34 +00001510</div>
1511
cristy149d58c2013-08-07 19:44:54 +00001512<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 +00001513
1514<p>Take the first image 'destination' and overlay the second 'source' image
cristy751980d2012-06-03 23:18:35 +00001515according to the current <a href="command-line-options.html#compose">-compose</a> setting. The location
cristy149d58c2013-08-07 19:44:54 +00001516of the 'source' or 'overlay' image is controlled according to <a href="command-line-options.html#geometry">-geometry</a>, and <a href="command-line-options.html#geometry">-geometry</a>
cristy3ed852e2009-09-05 21:47:34 +00001517settings. </p>
1518
1519<p>If a third image is given this is treated as a gray-scale 'mask' image
1520relative to the first 'destination' image. This mask will limit what parts of
1521the destination can be modified by the image composition. However for the
cristy8ee7f242013-06-20 16:08:44 +00001522'<code>displace</code>' compose method, the mask is used to provide a separate
cristy3ed852e2009-09-05 21:47:34 +00001523Y-displacement image instead. </p>
1524
cristy751980d2012-06-03 23:18:35 +00001525<p>If a <a href="command-line-options.html#compose">-compose</a> method requires extra numerical
cristy149d58c2013-08-07 19:44:54 +00001526arguments or flags these can be provided by setting the <a href="command-line-options.html#set">-set</a> '<code class="arg">option:compose:args</code>'
cristyd0bda5e2010-09-21 16:22:45 +00001527appropriately for the compose method. </p>
cristy3ed852e2009-09-05 21:47:34 +00001528
cristy751980d2012-06-03 23:18:35 +00001529<p>Some <a href="command-line-options.html#compose">-compose</a> methods can modify the 'destination'
cristy149d58c2013-08-07 19:44:54 +00001530image outside the overlay area. You can disable this by setting the special <a href="command-line-options.html#set">-set</a> '<code class="arg">option:compose:outside-overlay</code>'
cristy8ee7f242013-06-20 16:08:44 +00001531to '<code>false</code>'. </p>
cristy3ed852e2009-09-05 21:47:34 +00001532
1533
1534<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001535 <h4><a id="compress"></a>-compress <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001536</div>
1537
cristy149d58c2013-08-07 19:44:54 +00001538<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>
cristy3ed852e2009-09-05 21:47:34 +00001539
cristy149d58c2013-08-07 19:44:54 +00001540<p>Choices are: <code class="arg">None</code>, <code class="arg">BZip</code>, <code class="arg">Fax</code>, <code class="arg">Group4</code>, <code class="arg">JPEG</code>, <code class="arg">JPEG2000</code>, <code class="arg">Lossless</code>, <code class="arg">LZW</code>, <code class="arg">RLE</code> or <code class="arg">Zip</code>.</p>
cristy3ed852e2009-09-05 21:47:34 +00001541
cristy751980d2012-06-03 23:18:35 +00001542<p>To print a complete list of compression types, use <a href="command-line-options.html#list">-list
1543compress</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00001544
cristy751980d2012-06-03 23:18:35 +00001545<p>Specify <a href="command-line-options.html#compress">+compress</a> to store the binary image in an
1546uncompressed format. The default is the compression type of the specified
1547image file.</p>
cristy3ed852e2009-09-05 21:47:34 +00001548
cristy8ee7f242013-06-20 16:08:44 +00001549<p>If <code>LZW</code> compression is specified but LZW compression has not been
cristy751980d2012-06-03 23:18:35 +00001550enabled, the image data is written in an uncompressed LZW format that can be
1551read by LZW decoders. This may result in larger-than-expected GIF files.</p>
cristy3ed852e2009-09-05 21:47:34 +00001552
cristy8ee7f242013-06-20 16:08:44 +00001553<p><code>Lossless</code> refers to lossless JPEG, which is only available if the
cristyeed6cb62012-01-28 19:38:34 +00001554JPEG library has been patched to support it. Use of lossless JPEG is generally
1555not recommended.</p>
cristy3ed852e2009-09-05 21:47:34 +00001556
cristyeed6cb62012-01-28 19:38:34 +00001557<p>
1558When writing an ICO file, you may request that the images be encoded in
cristy8ee7f242013-06-20 16:08:44 +00001559PNG format, by specifying <code>Zip</code> compression.</p>
cristyeed6cb62012-01-28 19:38:34 +00001560
1561<p>
cristy8ee7f242013-06-20 16:08:44 +00001562When writing a JNG file, specify <code>Zip</code> compression to request that
1563the alpha channel be encoded in PNG "IDAT" format, or <code>JPEG</code>
cristyeed6cb62012-01-28 19:38:34 +00001564to request that it be encoded in JPG "JDAA" format.</p>
1565
cristy751980d2012-06-03 23:18:35 +00001566<p>Use the <a href="command-line-options.html#quality">-quality</a> option to set the compression level
cristyeed6cb62012-01-28 19:38:34 +00001567to be used by JPEG, PNG, MIFF, and MPEG encoders.
cristy751980d2012-06-03 23:18:35 +00001568Use the <a href="command-line-options.html#sampling-factor">-sampling-factor</a> option to set the
cristyeed6cb62012-01-28 19:38:34 +00001569sampling factor to be used by JPEG, MPEG, and YUV encoders for down-sampling
1570the chroma channels.</p>
cristy3ed852e2009-09-05 21:47:34 +00001571
1572<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001573 <h4><a id="contrast"></a>-contrast</h4>
cristy3ed852e2009-09-05 21:47:34 +00001574</div>
1575
cristy149d58c2013-08-07 19:44:54 +00001576<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>
cristy3ed852e2009-09-05 21:47:34 +00001577
cristy751980d2012-06-03 23:18:35 +00001578<p>This option enhances the intensity differences between the lighter and
1579darker elements of the image. Use <a href="command-line-options.html#contrast">-contrast</a> to enhance
1580the image or <a href="command-line-options.html#contrast">+contrast</a> to reduce the image
1581contrast.</p>
cristy3ed852e2009-09-05 21:47:34 +00001582
1583<p>For a more pronounced effect you can repeat the option:</p>
1584
cristy149d58c2013-08-07 19:44:54 +00001585<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 +00001586<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00001587 <h4><a id="contrast-stretch"></a>-contrast-stretch <em class="arg">black-point</em><br></br>-contrast-stretch <em class="arg">black-point</em>{x<em class="arg">white-point</em>}{<em class="arg">%</em>}}</h4>
cristy3ed852e2009-09-05 21:47:34 +00001588</div>
1589
cristy149d58c2013-08-07 19:44:54 +00001590<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>
cristy3ed852e2009-09-05 21:47:34 +00001591
cristy149d58c2013-08-07 19:44:54 +00001592<p>While performing the stretch, black-out at most <em class="arg">black-point</em> pixels and white-out at most <em class="arg">white-point</em> pixels. Or, if percent is used, black-out at most
1593<em class="arg">black-point %</em> pixels and white-out at most <em class="arg">white-point %</em> pixels.</p>
cristy3ed852e2009-09-05 21:47:34 +00001594
cristy149d58c2013-08-07 19:44:54 +00001595<p>Prior to ImageMagick 6.4.7-0, <a href="command-line-options.html#contrast-stretch">-contrast-stretch</a> will black-out at most <em class="arg">black-point</em> pixels and white-out at most <em class="arg">total pixels
1596minus white-point</em> pixels. Or, if percent is used, black-out at most <em class="arg">black-point %</em> pixels and white-out at most <em class="arg">100% minus white-point %</em> pixels.</p>
cristy3ed852e2009-09-05 21:47:34 +00001597
cristy8ee7f242013-06-20 16:08:44 +00001598<p>Note that <code>-contrast-stretch 0</code> will modify the image such that
cristy149d58c2013-08-07 19:44:54 +00001599the image's min and max values are stretched to 0 and <em class="QR">QuantumRange</em>, respectively, without any loss of data due to burn-out or
1600clipping at either end. This is not the same as <a href="command-line-options.html#normalize">-normalize</a>, which is equivalent to <code>-contrast-stretch 0.15x0.05%</code> (or
cristy8ee7f242013-06-20 16:08:44 +00001601prior to ImageMagick 6.4.7-0, <code>-contrast-stretch 2%x99%</code>).</p>
cristy3ed852e2009-09-05 21:47:34 +00001602
cristyd934d102009-10-10 12:55:13 +00001603<p>Internally operator works by creating a histogram bin, and then uses that
1604bin to modify the image. As such some colors may be merged together when they
1605originally fell into the same 'bin'. </p>
1606
1607<p>All the channels are normalized in concert by the came amount so as to
cristy149d58c2013-08-07 19:44:54 +00001608preserve color integrity, when the default <a href="command-line-options.html#channel">+channel</a>
1609setting is in use. Specifying any other <a href="command-line-options.html#channel">-channel</a>
cristyd934d102009-10-10 12:55:13 +00001610setting will normalize the RGB channels independently.</p>
1611
cristy149d58c2013-08-07 19:44:54 +00001612<p>See also <a href="command-line-options.html#auto-level">-auto-level</a> for a 'perfect'
cristyd934d102009-10-10 12:55:13 +00001613normalization of mathematical images. </p>
1614
1615<p>This operator is under review for re-development. </p>
cristy3ed852e2009-09-05 21:47:34 +00001616
1617
1618<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001619 <h4><a id="convolve"></a>-convolve <em class="arg">kernel</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001620</div>
1621
cristy149d58c2013-08-07 19:44:54 +00001622<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>
cristy3ed852e2009-09-05 21:47:34 +00001623
cristy16ff93c2010-01-13 23:18:07 +00001624<p>The <em class="arg">kernel</em> is a matrix specified as
cristyd934d102009-10-10 12:55:13 +00001625a comma-separated list of integers (with no spaces), ordered left-to right,
1626starting with the top row. Presently, only odd-dimensioned kernels are
cristy149d58c2013-08-07 19:44:54 +00001627supported, and therefore the number of entries in the specified <em class="arg">kernel</em> must be 3<sup>2</sup>=9, 5<sup>2</sup>=25,
cristyd934d102009-10-10 12:55:13 +000016287<sup>2</sup>=49, etc. </p>
cristy3ed852e2009-09-05 21:47:34 +00001629
cristy149d58c2013-08-07 19:44:54 +00001630<p>Note that the <a href="command-line-options.html#convolve">‑convolve</a> operator supports the <a href="command-line-options.html#bias">‑bias</a> setting. This option shifts the convolution so that
cristyd934d102009-10-10 12:55:13 +00001631positive and negative results are relative to a user-specified bias value.
1632This is important for non-HDRI compilations of ImageMagick when dealing with
1633convolutions that contain negative as well as positive values. This is
1634especially the case with convolutions involving high pass filters or edge
1635detection. Without an output bias, the negative values is clipped at zero.
cristy3ed852e2009-09-05 21:47:34 +00001636</p>
1637
cristy149d58c2013-08-07 19:44:54 +00001638<p>When using an ImageMagick with the HDRI compile-time setting, <a href="command-line-options.html#bias">‑bias</a> is not needed, as ImageMagick is able to store/handle any
cristyd934d102009-10-10 12:55:13 +00001639negative results without clipping to the color value range (0..QuantumRange).
cristy149d58c2013-08-07 19:44:54 +00001640See the discussion on HDRI implementations of ImageMagick on the page <a href="high-dynamic-range.html">High
1641Dynamic-Range Images</a>. For more about HDRI go the ImageMagick <a href="http://www.imagemagick.org/Usage/basics/#hdri">Usage</a> pages or this
cristyd934d102009-10-10 12:55:13 +00001642<a href="http://en.wikipedia.org/wiki/High_dynamic_range_imaging">Wikipedia</a>
1643entry. </p>
cristy3ed852e2009-09-05 21:47:34 +00001644
cristy3ed852e2009-09-05 21:47:34 +00001645
1646<div style="margin: auto;">
cristy8ee7f242013-06-20 16:08:44 +00001647 <h4><a id="crop"></a>-crop <em class="arg">geometry</em>{<em class="arg">@</em>}{<em class="arg">!</em>}</h4>
cristy3ed852e2009-09-05 21:47:34 +00001648</div>
1649
cristy149d58c2013-08-07 19:44:54 +00001650<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>
cristy3ed852e2009-09-05 21:47:34 +00001651
cristy751980d2012-06-03 23:18:35 +00001652<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 +00001653
cristy149d58c2013-08-07 19:44:54 +00001654<p>The <em class="arg">width</em> and <em class="arg">height</em> of the <em class="arg">geometry</em> argument give the size of the image that remains
cristy751980d2012-06-03 23:18:35 +00001655after cropping, and <em class="arg">x</em> and <em class="arg">y</em> in the
1656<em class="arg">offset</em> (if present) gives the location of the top left
1657corner of the cropped image with respect to the original image. To specify the
1658amount to be removed, use <a href="command-line-options.html#shave">-shave</a> instead.</p>
cristy3ed852e2009-09-05 21:47:34 +00001659
cristy751980d2012-06-03 23:18:35 +00001660<p>If the <em class="arg">x</em> and <em class="arg">y</em> offsets are
1661present, a single image is generated, consisting of the pixels from the
1662cropping region. The offsets specify the location of the upper left corner of
1663the cropping region measured downward and rightward with respect to the upper
1664left corner of the image. If the <a href="command-line-options.html#gravity">-gravity</a> option is
cristy8ee7f242013-06-20 16:08:44 +00001665present with <code>NorthEast</code>, <code>East</code>, or <code>SouthEast</code>
cristy751980d2012-06-03 23:18:35 +00001666gravity, it gives the distance leftward from the right edge of the image to
cristy149d58c2013-08-07 19:44:54 +00001667the right edge of the cropping region. Similarly, if the <a href="command-line-options.html#gravity">-gravity</a> option is present with <code>SouthWest</code>,
cristy8ee7f242013-06-20 16:08:44 +00001668<code>South</code>, or <code>SouthEast</code> gravity, the distance is measured
cristy751980d2012-06-03 23:18:35 +00001669upward between the bottom edges.</p>
cristy3ed852e2009-09-05 21:47:34 +00001670
cristy751980d2012-06-03 23:18:35 +00001671<p>If the <em class="arg">x</em> and <em class="arg">y</em> offsets are
1672omitted, a set of tiles of the specified geometry, covering the entire input
1673image, is generated. The rightmost tiles and the bottom tiles are smaller if
1674the specified geometry extends beyond the dimensions of the input image.</p>
cristy3ed852e2009-09-05 21:47:34 +00001675
cristy8ee7f242013-06-20 16:08:44 +00001676<p>You can add the <em class="arg">@</em> to the geometry argument to equally divide the image into the number of tiles generated.</p>
1677
cristy3ed852e2009-09-05 21:47:34 +00001678<p>By adding a exclamation character flag to the geometry argument, the
1679cropped images virtual canvas page size and offset is set as if the
1680geometry argument was a viewport or window. This means the canvas page size
1681is set to exactly the same size you specified, the image offset set
1682relative top left corner of the region cropped. </p>
1683
1684<p>If the cropped image 'missed' the actual image on its virtual canvas, a
1685special single pixel transparent 'missed' image is returned, and a 'crop
1686missed' warning given. </p>
1687
cristy149d58c2013-08-07 19:44:54 +00001688<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 +00001689cropping the image to ensure the crop coordinate frame is relocated to the
cristy751980d2012-06-03 23:18:35 +00001690upper-left corner of the visible image.
1691
cristy149d58c2013-08-07 19:44:54 +00001692Similarly you may want to use <a href="command-line-options.html#repage">+repage</a> after cropping to
cristy751980d2012-06-03 23:18:35 +00001693remove the page offset that will be left behind. This is especially true when
1694you are going to write to an image format such as PNG that supports an image
cristyeed6cb62012-01-28 19:38:34 +00001695offset.</p>
cristy3ed852e2009-09-05 21:47:34 +00001696
1697<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001698 <h4><a id="cycle"></a>-cycle <em class="arg">amount</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001699</div>
1700
cristy149d58c2013-08-07 19:44:54 +00001701<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>
cristy3ed852e2009-09-05 21:47:34 +00001702
1703<p><em class="arg">Amount</em> defines the number of positions each
1704colormap entry is shifted.</p>
1705
1706
1707<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001708 <h4><a id="debug"></a>-debug <em class="arg">events</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001709</div>
1710
cristy149d58c2013-08-07 19:44:54 +00001711<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>
cristy3ed852e2009-09-05 21:47:34 +00001712
cristy8ee7f242013-06-20 16:08:44 +00001713<p>The <code>events</code> parameter specifies which events are to be logged. It
1714can be either <code>None</code>, <code>All</code>, <code>Trace</code>, or
cristy751980d2012-06-03 23:18:35 +00001715a comma-separated list consisting of one or more of the following domains:
cristy8ee7f242013-06-20 16:08:44 +00001716<code>Accelerate</code>, <code>Annotate</code>, <code>Blob</code>, <code>Cache</code>,
1717<code>Coder</code>, <code>Configure</code>, <code>Deprecate</code>,
1718<code>Exception</code>, <code>Locale</code>, <code>Render</code>,
1719<code>Resource</code>, <code>Security</code>, <code>TemporaryFile</code>,
1720<code>Transform</code>, <code>X11</code>, or <code>User</code>. </p>
cristy3ed852e2009-09-05 21:47:34 +00001721
1722
1723<p>For example, to log cache and blob events, use.</p>
1724
cristy149d58c2013-08-07 19:44:54 +00001725<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert -debug "Cache,Blob" rose: rose.png</span></p>
cristy8ee7f242013-06-20 16:08:44 +00001726<p>The <code>User</code> domain is normally empty, but developers can log user
cristy751980d2012-06-03 23:18:35 +00001727events in their private copy of ImageMagick.</p>
cristy3ed852e2009-09-05 21:47:34 +00001728
cristy751980d2012-06-03 23:18:35 +00001729<p>To print the complete list of debug methods, use <a href="command-line-options.html#list">-list
1730debug</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00001731
cristy751980d2012-06-03 23:18:35 +00001732<p>Use the <a href="command-line-options.html#log">-log</a> option to specify the format for debugging
1733output.</p>
cristy3ed852e2009-09-05 21:47:34 +00001734
cristy751980d2012-06-03 23:18:35 +00001735<p>Use <a href="command-line-options.html#debug">+debug</a> to turn off all logging.</p>
cristy3ed852e2009-09-05 21:47:34 +00001736
cristy149d58c2013-08-07 19:44:54 +00001737<p>Debugging may also be set using the <code>MAGICK_DEBUG</code> <a href="resources.html#environment">environment variable</a>. The allowed values for the <code>MAGICK_DEBUG</code>
cristy751980d2012-06-03 23:18:35 +00001738environment variable are the same as for the <a href="command-line-options.html#debug">-debug</a>
1739option.</p>
cristy3ed852e2009-09-05 21:47:34 +00001740
1741
1742<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001743 <h4><a id="decipher"></a>-decipher <em class="arg">filename</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00001744</div>
1745
cristy149d58c2013-08-07 19:44:54 +00001746<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Decipher and restore pixels that were previously transformed by
1747<a href="command-line-options.html#encipher">-encipher</a>.</td><td style="text-align:right;"></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00001748
cristy149d58c2013-08-07 19:44:54 +00001749<p>Get the passphrase from the file specified by <em class="arg">filename</em>.</p>
cristy3ed852e2009-09-05 21:47:34 +00001750
cristy149d58c2013-08-07 19:44:54 +00001751<p>For more information, see the webpage, <a href="../www/cipher.html">ImageMagick: Encipher or
cristy751980d2012-06-03 23:18:35 +00001752Decipher an Image</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00001753
1754
1755<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001756 <h4><a id="deconstruct"></a>-deconstruct</h4>
cristy3ed852e2009-09-05 21:47:34 +00001757</div>
1758
cristy149d58c2013-08-07 19:44:54 +00001759<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>
cristy3ed852e2009-09-05 21:47:34 +00001760
cristy149d58c2013-08-07 19:44:54 +00001761<p>Given a sequence of images all the same size, such as produced by <a href="command-line-options.html#coalesce">-coalesce</a>, replace the second and later images, with
cristy751980d2012-06-03 23:18:35 +00001762a smaller image of just the area that changed relative to the previous image.
1763</p>
cristy3ed852e2009-09-05 21:47:34 +00001764
cristy751980d2012-06-03 23:18:35 +00001765<p>The resulting sequence of images can be used to optimize an animation
1766sequence, though will not work correctly for GIF animations when parts of the
1767animation can go from opaque to transparent. </p>
cristy3ed852e2009-09-05 21:47:34 +00001768
cristy751980d2012-06-03 23:18:35 +00001769<p>This option is actually equivalent to the <a href="command-line-options.html#layers">-layers</a>
cristy8ee7f242013-06-20 16:08:44 +00001770method '<code>compare-any</code>'. </p>
cristy3ed852e2009-09-05 21:47:34 +00001771
1772
1773<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00001774 <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 +00001775</div>
1776
cristy149d58c2013-08-07 19:44:54 +00001777<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
1778coders and image processing operations.</td><td style="text-align:right;"></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00001779
cristyd0bda5e2010-09-21 16:22:45 +00001780<p>This option creates one or more definitions for coders and decoders to use
1781while reading and writing image data. Definitions are generally used to
1782control image file format coder modules, and image processing operations,
cristy149d58c2013-08-07 19:44:54 +00001783beyond what is provided by normal means. Defined settings are listed in <a href="command-line-options.html#verbose">-verbose</a> information ("<code>info:</code>" output format)
cristyd0bda5e2010-09-21 16:22:45 +00001784as "Artifacts". </p>
cristy3ed852e2009-09-05 21:47:34 +00001785
cristyd0bda5e2010-09-21 16:22:45 +00001786<p>If <em class="arg">value</em> is missing for a definition, an empty-valued
1787definition of a flag is created with that name. This used to control on/off
cristy751980d2012-06-03 23:18:35 +00001788options. Use <a href="command-line-options.html#define">+define key</a> to remove definitions
1789previously created. Use <a href="command-line-options.html#define">+define "*"</a> to remove all
cristyd0bda5e2010-09-21 16:22:45 +00001790existing definitions.</p>
1791
cristy149d58c2013-08-07 19:44:54 +00001792<p>The same 'artifact' settings can also be defined using the <a href="command-line-options.html#set">-set "option:<em class="arg">key</em>" "<em class="arg">value</em>"</a> option, which also allows the use of <a href="escape.html">Format and Print Image
cristyd0bda5e2010-09-21 16:22:45 +00001793Properties</a> in the defined value. </p>
1794
cristyefb2bdb2010-11-20 19:35:22 +00001795<p>The <em>option</em> and <em>key</em> are case-independent (they are
1796converted to lowercase for use within the decoders) while the <em>value</em>
1797is case-dependent.</p>
1798
cristy8ee7f242013-06-20 16:08:44 +00001799<p>Such settings are global in scope, and affect all images and operations. </p>
cristyd0bda5e2010-09-21 16:22:45 +00001800
1801<p>The following definitions are just some of the artifacts that are
1802available:</p>
cristy3ed852e2009-09-05 21:47:34 +00001803
cristydcca3fa2010-12-29 21:50:07 +00001804<dl>
cristyeed6cb62012-01-28 19:38:34 +00001805
1806<dt>compose:args=<em class="arg">arguments</em></dt>
cristy751980d2012-06-03 23:18:35 +00001807<dd>Sets certain compose argument values when using convert ... -compose ...
cristy149d58c2013-08-07 19:44:54 +00001808 -composite. See <a href="compose.html">Image Composition</a></dd>
cristyeed6cb62012-01-28 19:38:34 +00001809
1810<dt>distort:scale=<em class="arg">value</em></dt>
cristy149d58c2013-08-07 19:44:54 +00001811 <dd>Sets the output scaling factor for use with <a href="command-line-options.html#distort">-distort</a></dd>
cristyeed6cb62012-01-28 19:38:34 +00001812
1813<dt>distort:viewport=WxH+X+Y</dt>
cristy751980d2012-06-03 23:18:35 +00001814 <dd>Sets the viewport for use with <a href="command-line-options.html#distort">-distort</a></dd>
cristyeed6cb62012-01-28 19:38:34 +00001815
cristy045bd902010-01-30 18:56:24 +00001816<dt>dcm:display-range=reset</dt>
cristyd0bda5e2010-09-21 16:22:45 +00001817<dd>Set the display range to the minimum and maximum pixel values for the
cristydcca3fa2010-12-29 21:50:07 +00001818 DCM image format.</dd>
cristyd0bda5e2010-09-21 16:22:45 +00001819
cristy045bd902010-01-30 18:56:24 +00001820<dt>dot:layout-engine=<em class="arg">value</em></dt>
cristyd0bda5e2010-09-21 16:22:45 +00001821<dd>Set the specify the layout engine for the DOT image format (e.g.
cristy8ee7f242013-06-20 16:08:44 +00001822 <code>neato</code>).</dd>
1823
1824<dt>jpeg:colors=<em class="arg">value</em></dt>
1825<dd>Set the desired number of colors and let the JPEG encoder do the
1826 quantizing.</dd>
1827
1828<dt>jpeg:block-smoothing=<em class="arg">on|off</em></dt>
1829
1830<dt>jpeg:dct-method=<em class="arg">value</em></dt>
1831<dd>Choose from <code>default</code>, <code>fastest</code>, <code>float</code>,
1832 <code>ifast</code>, and <code>islow</code>.</dd>
cristyd0bda5e2010-09-21 16:22:45 +00001833
cristy045bd902010-01-30 18:56:24 +00001834<dt>jpeg:extent=<em class="arg">value</em></dt>
cristy8ee7f242013-06-20 16:08:44 +00001835<dd>Restrict the maximum JPEG file size, for example <code>-define
1836 jpeg:extent=400kb</code>. The JPEG encoder will search for the highest
1837 compression quality level that results in an output file that does not
1838 exceed the value. The <code>-quality</code> option is ignored if it
1839 is also present.</dd>
1840
1841<dt>jpeg:fancy-upsampling=<em class="arg">on|off</em></dt>
1842
1843<dt>jpeg:optimize-coding=<em class="arg">on|off</em></dt>
1844
1845<dt>jpeg:q-table=<em class="arg">table</em></dt>
1846
1847<dt>jpeg:sampling-factor=<em class="arg">sampling-factor-string</em></dt>
cristyd0bda5e2010-09-21 16:22:45 +00001848
cristy045bd902010-01-30 18:56:24 +00001849<dt>jpeg:size=<em class="arg">geometry</em></dt>
cristy8ee7f242013-06-20 16:08:44 +00001850<dd>Set the size hint of a JPEG image, for
1851 example, <code>-define jpeg:size=128x128</code>.
cristyd0bda5e2010-09-21 16:22:45 +00001852 It is most useful for increasing performance and reducing the memory
cristydcca3fa2010-12-29 21:50:07 +00001853 requirements when reducing the size of a large JPEG image.</dd>
cristyd0bda5e2010-09-21 16:22:45 +00001854
cristy045bd902010-01-30 18:56:24 +00001855<dt>jp2:rate=<em class="arg">value</em></dt>
cristyd0bda5e2010-09-21 16:22:45 +00001856<dd>Specify the compression factor to use while writing JPEG-2000 files. The
1857 compression factor is the reciprocal of the compression ratio. The valid
1858 range is 0.0 to 1.0, with 1.0 indicating lossless compression. If defined,
1859 this value overrides the -quality setting. A quality setting of 75
cristydcca3fa2010-12-29 21:50:07 +00001860 results in a rate value of 0.06641.</dd>
cristyd0bda5e2010-09-21 16:22:45 +00001861
cristy3ed852e2009-09-05 21:47:34 +00001862<dt>mng:need-cacheoff</dt>
cristydcca3fa2010-12-29 21:50:07 +00001863 <dd>turn playback caching off for streaming MNG.</dd>
cristyd0bda5e2010-09-21 16:22:45 +00001864
cristy045bd902010-01-30 18:56:24 +00001865<dt>png:bit-depth=<em class="arg">value</em></dt>
1866<dt>png:color-type=<em class="arg">value</em></dt>
cristyd0bda5e2010-09-21 16:22:45 +00001867<dd>desired bit-depth and color-type for PNG output. You can force the PNG
1868 encoder to use a different bit-depth and color-type than it would have
1869 normally selected, but only if this does not cause any loss of image
1870 quality. Any attempt to reduce image quality is treated as an error and no
1871 PNG file is written. E.g., if you have a 1-bit black-and-white image, you
1872 can use these "defines" to cause it to be written as an 8-bit grayscale,
1873 indexed, or even a 64-bit RGBA. But if you have a 16-million color image,
1874 you cannot force it to be written as a grayscale or indexed PNG. If you
cristy751980d2012-06-03 23:18:35 +00001875 wish to do this, you must use the appropriate <a href="command-line-options.html#depth">-depth</a>,
1876 <a href="command-line-options.html#colors">-colors</a>, or <a href="command-line-options.html#type">-type</a> directives to
cristyd0bda5e2010-09-21 16:22:45 +00001877 reduce the image quality prior to using the PNG encoder. Note that in
1878 indexed PNG files, "bit-depth" refers to the number of bits per index,
cristyefb2bdb2010-11-20 19:35:22 +00001879 which can be 1, 2, 4, or 8. In such files, the color samples always have
cristydcca3fa2010-12-29 21:50:07 +00001880 8-bit depth.</dd>
1881
cristya4dfb122011-07-07 19:01:57 +00001882<dt>png:compression-filter=<em class="arg">value</em></dt>
1883 <dd> valid values are 0 through 7. 0-4 are the corresponding PNG filters,
1884 5 means adaptive filtering except for images with a colormap, 6 means
cristy751980d2012-06-03 23:18:35 +00001885 adaptive filtering for all images, 7 means MNG "loco" compression.</dd>
cristya4dfb122011-07-07 19:01:57 +00001886
cristy87a7f072011-07-01 00:08:52 +00001887<dt>png:compression-level=<em class="arg">value</em></dt>
1888 <dd> valid values are 0 through 9, with 0 providing the least but fastest
1889 compression and 9 usually providing the best and always the slowest.</dd>
1890
1891<dt>png:compression-strategy=<em class="arg">value</em></dt>
1892 <dd> valid values are 0 through 4, meaning default, filtered, huffman_only,
cristya4dfb122011-07-07 19:01:57 +00001893 rle, and fixed ZLIB compression strategy. If you are using an old zlib
1894 that does not support Z_RLE (before 1.2.0) or Z_FIXED (before 1.2.2.2),
1895 values 3 and 4, respectively, will use the zlib default strategy
1896 instead.</dd>
cristy87a7f072011-07-01 00:08:52 +00001897
cristyeed6cb62012-01-28 19:38:34 +00001898<dt>png:format=<em class="arg">value</em></dt>
1899 <dd> valid values are <em class="arg">png8</em>, <em class="arg">png24</em>,
cristy8ee7f242013-06-20 16:08:44 +00001900 <em class="arg">png32</em>, <em class="arg">png48</em>,
1901 <em class="arg">png64</em>, and <em class="arg">png00</em>.
1902 This property can be useful for specifying
cristyeed6cb62012-01-28 19:38:34 +00001903 the specific PNG format to be used, when the usual method of prepending the
1904 format name to the output filename is inconvenient, such as when writing
cristy8ee7f242013-06-20 16:08:44 +00001905 a PNG-encoded ICO file.
1906 Value = <em class="arg">png8</em> reduces the number of colors to 256,
1907 only one of which may be fully transparent, if necessary. The other
1908 values do not force any reduction of quality; it is an error to request
1909 a format that cannot represent the image data without loss (except that
1910 it is allowed to reduce the bit-depth from 16 to 8 for all formats).
1911 Value = <em class="arg">png24</em> and <em class="arg">png48</em>
1912 allow transparency, only if a single color is fully transparent and that
1913 color does not also appear in an opaque pixel; such transparency is
1914 written in a PNG <code>tRNS</code> chunk.
1915 Value = <em class="arg">png00</em> causes the image to inherit its
1916 color-type and bit-depth from the input image, if the input was also
1917 a PNG.</dd>
cristyeed6cb62012-01-28 19:38:34 +00001918
cristydcca3fa2010-12-29 21:50:07 +00001919<dt>png:exclude-chunk=<em class="arg">value</em></dt>
1920<dt>png:include-chunk=<em class="arg">value</em></dt>
1921<dd>ancillary chunks to be excluded from or included in PNG output.
1922
cristy8ee7f242013-06-20 16:08:44 +00001923 <p>The <em class="arg">value</em> can be the name of a PNG chunk-type such
cristydcca3fa2010-12-29 21:50:07 +00001924 as <em class="arg">bKGD</em>, a comma-separated list of chunk-types,
1925 or the word <em class="arg">all</em> or
1926 the word <em class="arg">none</em>. There must be no spaces in the
1927 list. Although PNG chunk-names are case-dependent, you can use
1928 all lowercase names if you prefer.</p>
1929
cristyd241f442011-03-29 13:50:49 +00001930 <p>The "include-chunk" and "exclude-chunk" lists only affect the behavior
1931 of the PNG encoder and have no effect on the PNG decoder.</p>
1932
cristy8ee7f242013-06-20 16:08:44 +00001933 <p>As a special case, if the <code>sRGB</code> chunk is excluded and
1934 the <code>gAMA</code> chunk is included, the <code>gAMA</code> chunk will
cristydcca3fa2010-12-29 21:50:07 +00001935 only be written if gamma is not 1/2.2, since most decoders assume
1936 sRGB and gamma=1/2.2 when no colorspace information is included in
1937 the PNG file. Because the list is processed from left to right, you
1938 can achieve this with a single define:</p>
1939
1940<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00001941 -define png:include-chunk=none,gAMA
cristydcca3fa2010-12-29 21:50:07 +00001942</pre>
1943
cristy8ee7f242013-06-20 16:08:44 +00001944 <p>As a special case, if the <code>sRGB</code> chunk is not excluded and
cristyeed6cb62012-01-28 19:38:34 +00001945 the PNG encoder recognizes that the image contains the sRGB ICC profile,
cristy8ee7f242013-06-20 16:08:44 +00001946 the PNG encoder will write the <code>sRGB</code> chunk instead of the entire
cristyeed6cb62012-01-28 19:38:34 +00001947 3144-byte ICC profile. To force the PNG encoder to write the sRGB
cristy8ee7f242013-06-20 16:08:44 +00001948 profile as an <code>iCCP</code> chunk in the output PNG instead of the
1949 <code>sRGB</code> chunk, exclude the <code>sRGB</code> chunk.</p>
cristyeed6cb62012-01-28 19:38:34 +00001950
cristy8ee7f242013-06-20 16:08:44 +00001951 <p>The critical PNG chunks <code>IHDR</code>, <code>PLTE</code>,
1952 <code>IDAT</code>, and <code>IEND</code> cannot be excluded. Any such
cristya4dfb122011-07-07 19:01:57 +00001953 entries appearing in the list will be ignored.</p>
cristydcca3fa2010-12-29 21:50:07 +00001954
cristy8ee7f242013-06-20 16:08:44 +00001955 <p>If the ancillary PNG <code>tRNS</code> chunk is excluded and the
cristydcca3fa2010-12-29 21:50:07 +00001956 image has transparency, the PNG colortype is forced to be 4 or 6
1957 (GRAY_ALPHA or RGBA). If the image is not transparent, then the
cristy8ee7f242013-06-20 16:08:44 +00001958 <code>tRNS</code> chunk isn't written anyhow, and there is no effect
cristydcca3fa2010-12-29 21:50:07 +00001959 on the PNG colortype of the output image.</p>
1960
cristy751980d2012-06-03 23:18:35 +00001961 <p>The <a href="command-line-options.html#strip">-strip</a> option does the equivalent of the
cristydcca3fa2010-12-29 21:50:07 +00001962 following for PNG output:</p>
1963
1964<pre class="text">
cristyeed6cb62012-01-28 19:38:34 +00001965 -define png:include-chunk=none,trns,gama
cristydcca3fa2010-12-29 21:50:07 +00001966</pre>
1967
1968 <p>The default behavior is to include all known PNG ancillary chunks
cristy8ee7f242013-06-20 16:08:44 +00001969 plus ImageMagick's private <code>vpAg</code> ("virtual page") chunk,
cristyf7964272011-01-30 03:49:12 +00001970 and to exclude all PNG chunks that are unknown to ImageMagick,
1971 regardless of their PNG "copy-safe" status as described in the
1972 PNG specification.</p>
cristyd241f442011-03-29 13:50:49 +00001973
1974 <p>Any chunk names that are not known to ImageMagick are ignored
1975 if they appear in either the "include-chunk" or "exclude-chunk" list.
1976 The ancillary chunks currently known to ImageMagick are
cristy8ee7f242013-06-20 16:08:44 +00001977 <code>bKGD</code>, <code>cHRM</code>, <code>gAMA</code>, <code>iCCP</code>,
1978 <code>oFFs</code>, <code>pHYs</code>, <code>sRGB</code>, <code>tEXt</code>,
1979 <code>tRNS</code>, <code>vpAg</code>, and <code>zTXt</code>.</p>
cristyd241f442011-03-29 13:50:49 +00001980
cristy8ee7f242013-06-20 16:08:44 +00001981 <p>You can also put <code>date</code> in the list to include or exclude
cristyf9a6c462011-04-24 14:01:11 +00001982 the "Date:create" and "Date:modify" text chunks that ImageMagick normally
1983 inserts in the output PNG.</p>
1984
1985</dd>
1986
1987<dt>png:preserve-colormap</dt>
cristy149d58c2013-08-07 19:44:54 +00001988 <dd>Use the existing image-&gt;colormap. Normally the PNG encoder will
cristyf9a6c462011-04-24 14:01:11 +00001989 try to optimize the palette, eliminating unused entries and putting
1990 the transparent colors first. If this flag is set, that behavior
1991 is suppressed.</dd>
cristyd0bda5e2010-09-21 16:22:45 +00001992
cristy8ee7f242013-06-20 16:08:44 +00001993<dt>png:preserve-iCCP</dt>
1994 <dd>By default, the PNG decoder and encoder examine any ICC profile
1995 that is present, either from an <code>iCCP</code> chunk in the PNG
1996 input or supplied via an option, and if the profile is recognized
1997 to be the sRGB profile, converts it to the <code>sRGB</code> chunk.
1998 You can use <code>-define png:preserve-iCCP</code> to prevent
1999 this from happening; in such cases the <code>iCCP</code> chunk
2000 will be read or written and no <code>sRGB</code> chunk will be
2001 written. There are some ICC profiles that claim to be sRGB but
2002 have various errors that cause them to be rejected by libpng16; such
2003 profiles are recognized anyhow and converted to the <code>sRGB</code>
2004 chunk, but are rejected if the <code>-define png:preserve-iCCP</code>
2005 is present. Note that not all "sRGB" ICC profiles are recognized
2006 yet; we will add them to the list as we encounter them.</dd>
2007
cristy3ed852e2009-09-05 21:47:34 +00002008<dt>ps:imagemask</dt>
cristyd0bda5e2010-09-21 16:22:45 +00002009<dd>If the ps:imagemask flag is defined, the PS3 and EPS3 coders will create
2010 Postscript files that render bilevel images with the Postscript imagemask
cristydcca3fa2010-12-29 21:50:07 +00002011 operator instead of the image operator.</dd>
cristyd0bda5e2010-09-21 16:22:45 +00002012
cristy045bd902010-01-30 18:56:24 +00002013<dt>quantum:format=<em class="arg">type</em></dt>
cristy8ee7f242013-06-20 16:08:44 +00002014<dd>Set the type to <code>floating-point</code> to specify a floating-point
cristyd0bda5e2010-09-21 16:22:45 +00002015 format for raw files (e.g. GRAY:) or for MIFF and TIFF images in HDRI mode
cristy751980d2012-06-03 23:18:35 +00002016 to preserve negative values. If <a href="command-line-options.html#depth">-depth</a> 16 is
cristyd0bd44a2010-09-24 12:38:11 +00002017 included, the result is a single precision floating point format.
cristy751980d2012-06-03 23:18:35 +00002018 If <a href="command-line-options.html#depth">-depth</a> 32 is included, the result is
cristyd0bda5e2010-09-21 16:22:45 +00002019 double precision floating point format.</dd>
2020
cristy8ee7f242013-06-20 16:08:44 +00002021<dt>quantum:polarity=<em class="arg">photometric-interpretation</em></dt>
2022<dd>Set the photometric-interpretation of an image (typically for TIFF image
2023 file format) to either <code>min-is-black</code> (default) or
2024 <code>min-is-white</code>.</dd>
2025
2026<dt>sample:offset=<em class="arg">geometry</em></dt>
2027<dd>Location of the sampling point within the sub-region being sampled,
cristy149d58c2013-08-07 19:44:54 +00002028expressed as percentages (see <a href="command-line-options.html#sample">-sample</a>).</dd>
cristy8ee7f242013-06-20 16:08:44 +00002029
cristy149d58c2013-08-07 19:44:54 +00002030<dt>showkernel=<em class="arg">1</em></dt>
2031<dd>Outputs (to 'standard error') all the information about a generated <a href="command-line-options.html#morphology">-morphology</a> kernel.</dd>
cristyeed6cb62012-01-28 19:38:34 +00002032
cristyeed6cb62012-01-28 19:38:34 +00002033<dt>tiff:rows-per-strip=<em class="arg">value</em></dt>
2034 <dd>Sets the number of rows per strip</dd>
2035
2036<dt>tiff:tile-geometry=<em class="arg">WxH</em></dt>
cristy751980d2012-06-03 23:18:35 +00002037<dd>Sets the tile size for pyramid tiffs. Requires the suffix PTIF: before the
2038 outputname</dd>
cristydcca3fa2010-12-29 21:50:07 +00002039</dl>
cristy3ed852e2009-09-05 21:47:34 +00002040
cristyd0bda5e2010-09-21 16:22:45 +00002041<p>For example, to create a postscript file that will render only the black
2042pixels of a bilevel image, use:</p>
cristy3ed852e2009-09-05 21:47:34 +00002043
cristy149d58c2013-08-07 19:44:54 +00002044<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 +00002045<p>Set attributes of the image registry by prefixing the value with
cristy8ee7f242013-06-20 16:08:44 +00002046<code>registry:</code>. For example, to set a temporary path to put work files,
cristyd0bda5e2010-09-21 16:22:45 +00002047use:</p>
cristy3ed852e2009-09-05 21:47:34 +00002048
2049<p class="crtsnip">
2050-define registry:temporary-path=/data/tmp
2051</p>
2052
cristy8ee7f242013-06-20 16:08:44 +00002053<p>If you want to keep the temporary files ImageMagick creates private, overwrite them with zeros or random data before they are removed. On the first pass, the file is zeroed. For subsequent passes, random data is written. For example, to specify two passes:</p>
cristyd0bda5e2010-09-21 16:22:45 +00002054
cristy8ee7f242013-06-20 16:08:44 +00002055<p class="crtsnip">
2056-define registry:shred-passes=2
2057</p>
cristyd0bda5e2010-09-21 16:22:45 +00002058
cristy3ed852e2009-09-05 21:47:34 +00002059<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00002060 <h4><a id="delay"></a>-delay <em class="arg">ticks</em> <br></br>-delay <em class="arg">ticks</em>x<em class="arg">ticks-per-second</em> {<em class="arg">&lt;</em>} {<em class="arg">&gt;</em>}</h4>
cristy3ed852e2009-09-05 21:47:34 +00002061</div>
2062
cristy149d58c2013-08-07 19:44:54 +00002063<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>
cristy3ed852e2009-09-05 21:47:34 +00002064
cristy751980d2012-06-03 23:18:35 +00002065<p>This option is useful for regulating the animation of image sequences
2066<em>ticks/ticks-per-second</em> seconds must expire before the display of the
2067next image. The default is no delay between each showing of the image
2068sequence. The default ticks-per-second is 100.</p>
cristy3ed852e2009-09-05 21:47:34 +00002069
cristy8ee7f242013-06-20 16:08:44 +00002070<p>Use <code>&gt;</code> to change the image delay <em>only</em> if its current
2071value exceeds the given delay. <code>&lt;</code> changes the image delay
cristy751980d2012-06-03 23:18:35 +00002072<em>only</em> if current value is less than the given delay. For example, if
cristy8ee7f242013-06-20 16:08:44 +00002073you specify <code>30&gt;</code> and the image delay is 20, the image delay does
cristy751980d2012-06-03 23:18:35 +00002074not change. However, if the image delay is 40 or 50, the delay it is changed
2075to 30. Enclose the given delay in quotation marks to prevent the
cristy8ee7f242013-06-20 16:08:44 +00002076<code>&lt;</code> or <code>&gt;</code> from being interpreted by your shell as
cristy751980d2012-06-03 23:18:35 +00002077a file redirection.</p>
cristy3ed852e2009-09-05 21:47:34 +00002078
2079
2080<div style="margin: auto;">
cristy323f35b2011-03-24 23:05:13 +00002081 <h4><a id="delete"></a>-delete <em class="arg">indexes</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002082</div>
2083
cristy149d58c2013-08-07 19:44:54 +00002084<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 +00002085
cristy751980d2012-06-03 23:18:35 +00002086<p>Specify the image by its index in the sequence. The first image is index
20870. Negative indexes are relative to the end of the sequence, for example, -1
2088represents the last image of the sequence. Specify a range of images with
2089a dash (e.g. 0-4). Separate indexes with a comma (e.g. 0,2). Use
cristy8ee7f242013-06-20 16:08:44 +00002090<code>+delete</code> to delete the last image in the current image sequence.</p>
cristy3ed852e2009-09-05 21:47:34 +00002091
2092
2093<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00002094 <h4><a id="density"></a>-density <em class="arg">width</em><br></br>-density <em class="arg">width</em>x<em class="arg">height</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002095</div>
2096
cristy149d58c2013-08-07 19:44:54 +00002097<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
2098rendering to devices.</td><td style="text-align:right;"></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00002099
cristy751980d2012-06-03 23:18:35 +00002100<p>This option specifies the image resolution to store while encoding a raster
2101image or the canvas resolution while rendering (reading) vector formats such
2102as Postscript, PDF, WMF, and SVG into a raster image. Image resolution
2103provides the unit of measure to apply when rendering to an output device or
cristy149d58c2013-08-07 19:44:54 +00002104raster image. The default unit of measure is in dots per inch (DPI). The <a href="command-line-options.html#units">-units</a> option may be used to select dots per centimeter
cristy751980d2012-06-03 23:18:35 +00002105instead.</p>
cristy3ed852e2009-09-05 21:47:34 +00002106
cristy751980d2012-06-03 23:18:35 +00002107<p>The default resolution is 72 dots per inch, which is equivalent to one
2108point per pixel (Macintosh and Postscript standard). Computer screens are
2109normally 72 or 96 dots per inch, while printers typically support 150, 300,
2110600, or 1200 dots per inch. To determine the resolution of your display, use
2111a ruler to measure the width of your screen in inches, and divide by the
2112number of horizontal pixels (1024 on a 1024x768 display).</p>
cristy3ed852e2009-09-05 21:47:34 +00002113
cristy751980d2012-06-03 23:18:35 +00002114<p>If the file format supports it, this option may be used to update the
2115stored image resolution. Note that Photoshop stores and obtains image
2116resolution from a proprietary embedded profile. If this profile is not
2117stripped from the image, then Photoshop will continue to treat the image using
2118its former resolution, ignoring the image resolution specified in the standard
2119file header.</p>
cristy3ed852e2009-09-05 21:47:34 +00002120
cristy751980d2012-06-03 23:18:35 +00002121<p>The <a href="command-line-options.html#density">-density</a> option sets an <em>attribute</em> and
2122does not alter the underlying raster image. It may be used to adjust the
2123rendered size for desktop publishing purposes by adjusting the scale applied
2124to the pixels. To resize the image so that it is the same size at a different
2125resolution, use the <a href="command-line-options.html#resample">-resample</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00002126
2127<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002128 <h4><a id="depth"></a>-depth <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002129</div>
2130
cristy149d58c2013-08-07 19:44:54 +00002131<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>
cristy3ed852e2009-09-05 21:47:34 +00002132
cristy751980d2012-06-03 23:18:35 +00002133<p>This the number of bits in a color sample within a pixel. Use this option
2134to specify the depth of raw images whose depth is unknown such as GRAY, RGB,
2135or CMYK, or to change the depth of any image after it has been read.</p>
cristy3ed852e2009-09-05 21:47:34 +00002136
2137<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002138 <h4><a id="descend"></a>-descend</h4>
cristy3ed852e2009-09-05 21:47:34 +00002139</div>
2140
cristy149d58c2013-08-07 19:44:54 +00002141<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>
cristy3ed852e2009-09-05 21:47:34 +00002142
2143<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002144 <h4><a id="deskew"></a>-deskew <em class="arg">threshold</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002145</div>
2146
cristy149d58c2013-08-07 19:44:54 +00002147<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>
cristy3ed852e2009-09-05 21:47:34 +00002148
cristy8ee7f242013-06-20 16:08:44 +00002149<p>Use <a href="command-line-options.html#set">-set</a> <code>option:deskew:auto-crop
2150<em>width</em></code> to auto crop the image. The set argument is the pixel
cristy751980d2012-06-03 23:18:35 +00002151width of the image background (e.g 40).</p>
cristy3ed852e2009-09-05 21:47:34 +00002152
2153<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002154 <h4><a id="despeckle"></a>-despeckle</h4>
cristy3ed852e2009-09-05 21:47:34 +00002155</div>
2156
cristy149d58c2013-08-07 19:44:54 +00002157<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>
cristy3ed852e2009-09-05 21:47:34 +00002158
2159<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002160 <h4><a id="direction"></a>-direction <em class="arg">type</em></h4>
cristy2c839602010-04-03 02:32:08 +00002161</div>
2162
cristy149d58c2013-08-07 19:44:54 +00002163<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>
cristy2c839602010-04-03 02:32:08 +00002164
2165<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00002166 <h4><a id="displace"></a>-displace <em class="arg">horizontal-scale</em><br></br>-displace <em class="arg">horizontal-scale</em>x<em class="arg">vertical-scale</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002167</div>
2168
cristy149d58c2013-08-07 19:44:54 +00002169<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 +00002170
2171<p>With this option, the 'overlay' image, and optionally the 'mask' image,
cristyd0bd44a2010-09-24 12:38:11 +00002172is used as a displacement map, which is used to displace the lookup of
cristy3ed852e2009-09-05 21:47:34 +00002173what part of the 'background' image is seen at each point of the overlaid
2174area. Much like the displacement map is a 'lens' that redirects light shining
2175through it so as to present a distorted view the original 'background' image
2176behind it. </p>
2177
2178<p>Any perfect grey areas of the displacement map produce a zero
2179displacement of the image. Black areas produce the given maximum negative
2180displacement of the lookup point, while white produce a maximum positive
2181displacement of the lookup. </p>
2182
2183<p>Note that it is the lookup of the 'background' that is displaced, not a
2184displacement of the image itself. As such an area of the displacement map
2185containing 'white' will have the lookup point 'shifted' by a positive amount,
2186and thus generating a copy of the destination image to the right/downward from
2187the correct position. That is the image will look like it may have been
2188'shifted' in a negative left/upward direction. Understanding this is a very
2189important in understanding how displacement maps work. </p>
2190
2191<p>The given arguments define the maximum amount of displacement in pixels
2192that a particular map can produce. If the displacement scale is large enough
cristyd0bda5e2010-09-21 16:22:45 +00002193it is also possible to lookup parts of the 'background' image that lie well
cristy3ed852e2009-09-05 21:47:34 +00002194outside the bounds of the displacement map itself. That is you could very
cristyd0bda5e2010-09-21 16:22:45 +00002195easily copy a section of the original image from outside the overlay area
cristy3ed852e2009-09-05 21:47:34 +00002196into the overlay area. </p>
2197
2198<p>The '%' flag makes the displacement scale relative to the size of the
2199overlay image (100% = half width/height of image). Using '!' switches
2200percentage arguments to refer to the destination image size instead.
2201these flags were added as of IM v6.5.3-5.</p>
2202
2203<p>Normally a single grayscale displacement map is provided, which with the
2204given scaling values will determine a single direction (vector) in which
cristyd0bda5e2010-09-21 16:22:45 +00002205displacements can occur (positively or negatively). However, if you also
cristy3ed852e2009-09-05 21:47:34 +00002206specify a third image which is normally used as a <em class="arg">mask</em>,
cristyd0bd44a2010-09-24 12:38:11 +00002207the <em class="arg">composite image</em> is used for horizontal X
cristy3ed852e2009-09-05 21:47:34 +00002208displacement, while the <em class="arg">mask image</em> is used for vertical Y
2209displacement. This allows you to define completely different displacement
2210values for the X and Y directions, and allowing you to lookup any point within
2211the <em class="arg">scale</em> bounds. In other words each pixel can lookup
cristyd0bda5e2010-09-21 16:22:45 +00002212any other nearby pixel, producing complex 2 dimensional displacements, rather
2213than a simple 1 dimensional vector displacements. </p>
cristy3ed852e2009-09-05 21:47:34 +00002214
cristyeed6cb62012-01-28 19:38:34 +00002215<p>Alternatively rather than supplying two separate images, as of IM v6.4.4-0,
cristy3ed852e2009-09-05 21:47:34 +00002216you can use the 'red' channel of the overlay image to specify the horizontal
2217or X displacement, and the 'green' channel for the vertical or Y displacement.
2218</p>
2219
cristyd0bd44a2010-09-24 12:38:11 +00002220<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 +00002221mask the transparency of the destination image. However areas outside the
2222overlaid areas will not be effected. </p>
2223
2224
2225<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002226 <h4><a id="display"></a>-display <em class="arg">host:display[.screen]</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002227</div>
2228
cristy149d58c2013-08-07 19:44:54 +00002229<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 +00002230
cristy751980d2012-06-03 23:18:35 +00002231<p>This option is used with convert for obtaining image or font from this
2232X server. See <em class="arg">X(1)</em>.</p>
cristy3ed852e2009-09-05 21:47:34 +00002233
2234<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002235 <h4><a id="dispose"></a>-dispose <em class="arg">method</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002236</div>
2237
cristy149d58c2013-08-07 19:44:54 +00002238<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>
cristy3ed852e2009-09-05 21:47:34 +00002239
2240<p>The layer disposal method defines the way each the displayed image is to be
2241modified after the current 'frame' of an animation has finished being
2242displayed (after its 'delay' period), but before the next frame on an
2243animation is to be overlaid onto the display. </p>
2244
2245<p>Here are the valid methods:</p>
2246
2247<pre class="text">
cristy8ee7f242013-06-20 16:08:44 +00002248 Undefined 0 No disposal specified (equivalent to '<code>none</code>').
cristye9a32c32011-04-07 01:11:05 +00002249 None 1 Do not dispose, just overlay next frame image.
2250 Background 2 Clear the frame area with the background color.
2251 Previous 3 Clear to the image prior to this frames overlay.
cristy3ed852e2009-09-05 21:47:34 +00002252</pre>
2253
2254<p>You can also use the numbers given above, which is what the GIF format
2255uses internally to represent the above settings. </p>
2256
cristy751980d2012-06-03 23:18:35 +00002257<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 +00002258
cristy149d58c2013-08-07 19:44:54 +00002259<p>Use <a href="command-line-options.html#dispose">+dispose</a>, turn off the setting and prevent
cristy3ed852e2009-09-05 21:47:34 +00002260resetting the layer disposal methods of images being read in. </p>
2261
cristy8ee7f242013-06-20 16:08:44 +00002262<p>Use <a href="command-line-options.html#set">-set</a> '<code>dispose</code>' method to set the image
cristy3ed852e2009-09-05 21:47:34 +00002263disposal method for images already in memory.</p>
2264
2265<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002266 <h4><a id="dissimilarity-threshold"></a>-dissimilarity-threshold <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002267</div>
2268
cristy149d58c2013-08-07 19:44:54 +00002269<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 +00002270
2271
2272<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002273 <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 +00002274</div>
2275
cristy149d58c2013-08-07 19:44:54 +00002276<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 +00002277
2278<p>The opacity of the composite image is multiplied by the given percent, then
2279it is composited 'over' the main image. If <em class="arg">src_percent</em>
cristyd0bd44a2010-09-24 12:38:11 +00002280is greater than 100, start dissolving the main image so it becomes
cristy8ee7f242013-06-20 16:08:44 +00002281transparent at a value of '<code class="arg">200</code>'. If both percentages
cristy3ed852e2009-09-05 21:47:34 +00002282are given, each image are dissolved to the percentages given. </p>
2283
2284<p>Note that dissolve percentages do not add, two opaque images dissolved
2285'50,50', produce a 75% transparency. For a 50% + 50% blending of the two
2286images, you would need to use dissolve values of '50,100'. </p>
2287
2288<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002289 <h4><a id="distort"></a>-distort <em class="arg">method arguments</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002290</div>
2291
cristy149d58c2013-08-07 19:44:54 +00002292<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>
cristy3ed852e2009-09-05 21:47:34 +00002293
2294<p>The <em class="arg">arguments</em> is a single string containing a list
2295of floating point numbers separated by commas or spaces. The number of
cristy149d58c2013-08-07 19:44:54 +00002296and meaning of the floating point values depends on the distortion <em class="arg">method</em> being used. </p>
cristy3ed852e2009-09-05 21:47:34 +00002297
2298<p>Choose from these distortion types:</p>
2299
2300<table class="doc">
2301 <tr valign="top">
2302 <th align="left" style="width: 8%">Method</th>
2303 <th align="left">Description</th>
2304 </tr>
2305
2306 <tr valign="top">
cristyac1b4322013-07-28 13:58:06 +00002307 <td valign="top"><code>ScaleRotateTranslate</code>
cristy149d58c2013-08-07 19:44:54 +00002308 <br></br>or <code>SRT</code></td>
cristy3ed852e2009-09-05 21:47:34 +00002309 <td valign="top">
2310 Distort image by first scaling and rotating about a given 'center',
2311 before translating that 'center' to the new location, in that order. It
cristy8ee7f242013-06-20 16:08:44 +00002312 is an alternative method of specifying a '<code>Affine</code>' type of
cristy3ed852e2009-09-05 21:47:34 +00002313 distortion, but without shearing effects. It also provides a good way
2314 of rotating and displacing a smaller image for tiling onto a larger
cristy149d58c2013-08-07 19:44:54 +00002315 background (IE 2-dimensional animations). <br></br>
cristy3ed852e2009-09-05 21:47:34 +00002316
2317 The number of arguments determine the specific meaning of each
cristy149d58c2013-08-07 19:44:54 +00002318 argument for the scales, rotation, and translation operations. <br></br>
cristy3ed852e2009-09-05 21:47:34 +00002319
2320 <table style="margin-left:auto; margin-right:auto;">
cristyac1b4322013-07-28 13:58:06 +00002321 <tr><td># </td><td>arguments meaning</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00002322 <tr><td>1:</td><td><em>Angle_of_Rotation</em></td></tr>
cristyac1b4322013-07-28 13:58:06 +00002323 <tr><td>2:</td><td><em>Scale Angle</em></td></tr>
2324 <tr><td>3:</td><td><em>X,Y Angle</em></td></tr>
2325 <tr><td>4:</td><td><em>X,Y Scale Angle</em></td></tr>
cristy3ed852e2009-09-05 21:47:34 +00002326 <tr><td>5:</td>
cristyac1b4322013-07-28 13:58:06 +00002327 <td><em>X,Y ScaleX,ScaleY Angle</em></td></tr>
cristy3ed852e2009-09-05 21:47:34 +00002328 <tr><td>6:</td>
cristyac1b4322013-07-28 13:58:06 +00002329 <td><em>X,Y Scale Angle NewX,NewY</em></td></tr>
cristy3ed852e2009-09-05 21:47:34 +00002330 <tr><td>7:</td>
cristyac1b4322013-07-28 13:58:06 +00002331 <td><em>X,Y ScaleX,ScaleY Angle
2332 NewX,NewY</em></td></tr>
cristy3ed852e2009-09-05 21:47:34 +00002333 </table>
2334
cristyd0bda5e2010-09-21 16:22:45 +00002335 This is actually an alternative way of specifying a 2 dimensional linear
cristy8ee7f242013-06-20 16:08:44 +00002336 '<code>Affine</code>' or '<code>AffineProjection</code>' distortion. </td> </tr>
cristy3ed852e2009-09-05 21:47:34 +00002337
2338 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +00002339 <td valign="top"><code>Affine</code></td>
cristy3ed852e2009-09-05 21:47:34 +00002340 <td valign="top">
2341 Distort the image linearly by moving a list of at least 3 or more sets
cristyd0bda5e2010-09-21 16:22:45 +00002342 of control points (as defined below). Ideally 3 sets or 12 floating
cristy3ed852e2009-09-05 21:47:34 +00002343 point values are given allowing the image to be linearly scaled,
2344 rotated, sheared, and translated, according to those three points. See
cristy8ee7f242013-06-20 16:08:44 +00002345 also the related '<code>AffineProjection</code>' and '<code>SRT</code>'
cristy149d58c2013-08-07 19:44:54 +00002346 distortions. <br></br>
cristy3ed852e2009-09-05 21:47:34 +00002347
2348 More than 3 sets given control point pairs (12 numbers) is least
cristyeed6cb62012-01-28 19:38:34 +00002349 squares fitted to best match a linear affine distortion. If only 2
cristy3ed852e2009-09-05 21:47:34 +00002350 control point pairs (8 numbers) are given a two point image translation
cristyd0bda5e2010-09-21 16:22:45 +00002351 rotation and scaling is performed, without any possible shearing,
cristy3ed852e2009-09-05 21:47:34 +00002352 flipping or changes in aspect ratio to the resulting image. If only one
2353 control point pair is provides the image is only translated, (which may
cristy149d58c2013-08-07 19:44:54 +00002354 be a floating point non-integer translation). <br></br>
cristy3ed852e2009-09-05 21:47:34 +00002355
2356 This distortion does not include any form of perspective distortion.
2357 </td>
2358
2359 </tr>
2360
2361 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +00002362 <td valign="top"><code>AffineProjection</code></td>
cristy3ed852e2009-09-05 21:47:34 +00002363 <td valign="top">
2364 Linearly distort an image using the given Affine Matrix of 6
2365 pre-calculated coefficients forming a set of Affine Equations to map
2366 the source image to the destination image.
2367
2368 <div style="text-align: center"><em>
2369 s<sub>x</sub>, r<sub>x</sub>,
2370 r<sub>y</sub>, s<sub>y</sub>,
2371 t<sub>x</sub>, t<sub>y</sub>
2372 </em></div>
2373
cristy149d58c2013-08-07 19:44:54 +00002374 See <a href="command-line-options.html#affine">-affine</a> setting for more detail, and
2375 meanings of these coefficients. <br></br>
cristy3ed852e2009-09-05 21:47:34 +00002376
cristy8ee7f242013-06-20 16:08:44 +00002377 The distortions '<code>Affine</code>' and '<code>SRT</code>' provide
cristyd0bd44a2010-09-24 12:38:11 +00002378 alternative methods of defining this distortion, with ImageMagick doing
2379 the calculations needed to generate the required coefficients. You can
cristy149d58c2013-08-07 19:44:54 +00002380 see the internally generated coefficients, by using a <a href="command-line-options.html#verbose">-verbose</a> setting with those other variants. </td>
cristy3ed852e2009-09-05 21:47:34 +00002381
2382 </tr>
2383
cristy3ed852e2009-09-05 21:47:34 +00002384 <tr valign="top">
cristy149d58c2013-08-07 19:44:54 +00002385 <td valign="top"><code>BilinearForward</code><br></br>
cristy8ee7f242013-06-20 16:08:44 +00002386 <code>BilinearReverse</code></td>
cristy3ed852e2009-09-05 21:47:34 +00002387 <td valign="top">
cristyd0bd44a2010-09-24 12:38:11 +00002388 Bilinear Distortion, given a minimum of 4 sets of coordinate pairs, or
2389 16 values (see below). Not that lines may not appear straight after
2390 distortion, though the distance between coordinates will remain
cristy149d58c2013-08-07 19:44:54 +00002391 consistent. <br></br>
cristyd0bd44a2010-09-24 12:38:11 +00002392
cristy8ee7f242013-06-20 16:08:44 +00002393 The '<code>BilinearForward</code>' is used to map rectangles to any
2394 quadrilateral, while the '<code>BilinearReverse</code>' form maps any
cristyeed6cb62012-01-28 19:38:34 +00002395 quadrilateral to a rectangle, while preserving the straight line edges
cristy149d58c2013-08-07 19:44:54 +00002396 in each case. <br></br>
cristyd0bd44a2010-09-24 12:38:11 +00002397
cristy8ee7f242013-06-20 16:08:44 +00002398 Note that '<code>BilinearForward</code>' can generate invalid pixels
cristy149d58c2013-08-07 19:44:54 +00002399 which will be colored using the <a href="command-line-options.html#mattecolor">-mattecolor</a>
cristyeed6cb62012-01-28 19:38:34 +00002400 color setting. Also if the quadrilateral becomes 'flipped' the image
cristy149d58c2013-08-07 19:44:54 +00002401 may disappear. <br></br>
cristyd0bd44a2010-09-24 12:38:11 +00002402
2403 There are future plans to produce a true Bilinear distortion that will
2404 attempt to map any quadrilateral to any other quadrilateral, while
2405 preserving edges (and edge distance ratios).
2406
2407 </td>
cristy3ed852e2009-09-05 21:47:34 +00002408 </tr>
cristy3ed852e2009-09-05 21:47:34 +00002409
2410 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +00002411 <td valign="top"><code>Perspective</code></td>
cristy3ed852e2009-09-05 21:47:34 +00002412 <td valign="top">
2413 Perspective distort the images, using a list of 4 or more sets of
2414 control points (as defined below). More that 4 sets (16 numbers) of
2415 control points provide least squares fitting for more accurate
cristyeed6cb62012-01-28 19:38:34 +00002416 distortions (for the purposes of image registration and panorama
cristy8ee7f242013-06-20 16:08:44 +00002417 effects). Less than 4 sets will fall back to a '<code>Affine</code>'
cristy149d58c2013-08-07 19:44:54 +00002418 linear distortion. <br></br>
cristy3ed852e2009-09-05 21:47:34 +00002419
2420 Perspective Distorted images ensures that straight lines remain
2421 straight, but the scale of the distorted image will vary. The horizon
2422 is anti-aliased, and the 'sky' color may be set using the
cristy149d58c2013-08-07 19:44:54 +00002423 <a href="command-line-options.html#mattecolor">-mattecolor</a> setting. </td>
cristy3ed852e2009-09-05 21:47:34 +00002424 </tr>
2425
2426 <tr valign="top">
cristyac1b4322013-07-28 13:58:06 +00002427 <td valign="top"><code>PerspectiveProjection</code> </td>
cristy3ed852e2009-09-05 21:47:34 +00002428 <td valign="top">
cristy8ee7f242013-06-20 16:08:44 +00002429 Do a '<code>Perspective</code>' distortion biased on a set of 8
cristy3ed852e2009-09-05 21:47:34 +00002430 pre-calculated coefficients. You can get these coefficients by looking
cristy149d58c2013-08-07 19:44:54 +00002431 at the <a href="command-line-options.html#verbose">-verbose</a> output of a
cristy8ee7f242013-06-20 16:08:44 +00002432 '<code>Perspective</code>' distortion, or by calculating them yourself.
cristy3ed852e2009-09-05 21:47:34 +00002433 If the last two perspective scaling coefficients are zero, the
2434 remaining 6 represents a transposed 'Affine Matrix'. </td>
2435
2436 </tr>
2437
2438 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +00002439 <td valign="top"><code>Arc</code></td>
cristy3ed852e2009-09-05 21:47:34 +00002440 <td valign="top">
2441 Arc the image (variation of polar mapping) over the angle given around
cristy149d58c2013-08-07 19:44:54 +00002442 a circle. <br></br>
2443 <table width="90%" style="margin-left: auto; margin-right: auto;">
cristy3ed852e2009-09-05 21:47:34 +00002444 <tr valign="top"><td>Argument</td>
2445 <td>Meaning</td></tr>
2446 <tr valign="top"><td><em>arc_angle</em></td>
2447 <td>The angle over which to arc the image side-to-side</td></tr>
2448 <tr valign="top"><td><em>rotate_angle</em></td>
2449 <td>Angle to rotate resulting image from vertical center</td></tr>
2450 <tr valign="top"><td><em>top_radius</em></td>
2451 <td>Set top edge of source image at this radius</td></tr>
cristyac1b4322013-07-28 13:58:06 +00002452 <tr valign="top"><td><em>bottom_radius</em> </td>
cristy3ed852e2009-09-05 21:47:34 +00002453 <td>Set bottom edge to this radius (radial scaling)</td></tr>
2454 </table>
2455
2456 The resulting image is always resized to best fit the resulting image,
cristy149d58c2013-08-07 19:44:54 +00002457 (as if using <a href="command-line-options.html#distort">+distort</a>) while attempting to
cristy3ed852e2009-09-05 21:47:34 +00002458 preserve scale and aspect ratio of the original image as much as
2459 possible with the arguments given by the user. All four arguments will
cristy149d58c2013-08-07 19:44:54 +00002460 be needed to change the overall aspect ratio of an 'Arc'ed image. <br></br>
cristy3ed852e2009-09-05 21:47:34 +00002461
2462 This a variation of a polar distortion designed to try to preserve the
2463 aspect ratio of the image rather than direct Cartesian to Polar
2464 conversion. </td>
2465 </tr>
2466
2467 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +00002468 <td valign="top"><code>Polar</code></td>
cristy3ed852e2009-09-05 21:47:34 +00002469 <td valign="top">
cristy8ee7f242013-06-20 16:08:44 +00002470 Like '<code>Arc</code>' but do a complete Cartesian to Polar mapping of
cristy3ed852e2009-09-05 21:47:34 +00002471 the image. that is the height of the input image is mapped to the
2472 radius limits, while the width is wrapped around between the
cristy149d58c2013-08-07 19:44:54 +00002473 angle limits. <br></br>
cristy3ed852e2009-09-05 21:47:34 +00002474
cristy149d58c2013-08-07 19:44:54 +00002475 Arguments: <em>Rmax,Rmin CenterX,CenterY, start,end_angle</em> <br></br>
cristy3ed852e2009-09-05 21:47:34 +00002476
2477 All arguments are optional. With <em>Rmin</em> defaulting to zero, the
2478 center to the center of the image, and the angles going from -180 (top)
2479 to +180 (top). If <em>Rmax</em> is given the special value of
2480 '<code>0</code>', the the distance from the center to the nearest edge
2481 is used for the radius of the output image, which will ensure the whole
2482 image is visible (though scaled smaller). However a special value of
2483 '<code>-1</code>' will use the distance from the center to the furthest
2484 corner, This may 'clip' the corners from the input rectangular image,
cristy8ee7f242013-06-20 16:08:44 +00002485 but will generate the exact reverse of a '<code>DePolar</code>' with
cristy149d58c2013-08-07 19:44:54 +00002486 the same arguments. <br></br>
cristy3ed852e2009-09-05 21:47:34 +00002487
cristy149d58c2013-08-07 19:44:54 +00002488 If the plus form of distort (<a href="command-line-options.html#distort">+distort</a>) is used
cristy3ed852e2009-09-05 21:47:34 +00002489 output image center will default to <code>0,0</code> of the virtual
2490 canvas, and the image size adjusted to ensure the whole input image is
2491 made visible in the output image on the virtual canvas. </td>
2492
2493 </tr>
2494
2495 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +00002496 <td valign="top"><code>DePolar</code></td>
cristy3ed852e2009-09-05 21:47:34 +00002497 <td valign="top">
cristy8ee7f242013-06-20 16:08:44 +00002498 Uses the same arguments and meanings as a '<code>Polar</code>' distortion
cristy149d58c2013-08-07 19:44:54 +00002499 but generates the reverse Polar to Cartesian distortion. <br></br>
cristy3ed852e2009-09-05 21:47:34 +00002500
2501 The special <em>Rmax</em> setting of '<code>0</code>' may however clip
2502 the corners of the input image. However using the special
2503 <em>Rmax</em> setting of '<code>-1</code>' (maximum center to corner
2504 distance) will ensure the whole distorted image is preserved in the
cristy8ee7f242013-06-20 16:08:44 +00002505 generated result, so that the same argument to '<code>Polar</code>' will
cristy3ed852e2009-09-05 21:47:34 +00002506 reverse the distortion re-producing the original.
2507
2508 Note that as this distortion requires the area resampling of a circular
2509 arc, which can not be handled by the builtin EWA resampling function.
cristyd0bda5e2010-09-21 16:22:45 +00002510 As such the normal EWA filters are turned off. It is recommended some
cristy3ed852e2009-09-05 21:47:34 +00002511 form of 'super-sampling' image processing technique be used to produce
2512 a high quality result. </td>
2513
2514 </tr>
2515
2516 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +00002517 <td valign="top"><code>Barrel</code></td>
cristy3ed852e2009-09-05 21:47:34 +00002518 <td valign="top">
cristy149d58c2013-08-07 19:44:54 +00002519 Given the four coefficients (A,B,C,D) as defined by <a href="http://wiki.panotools.org/Lens_correction_model">Helmut
cristyeed6cb62012-01-28 19:38:34 +00002520 Dersch</a>, perform a barrel or pin-cushion distortion appropriate to
cristy3ed852e2009-09-05 21:47:34 +00002521 correct radial lens distortions. That is in photographs, make straight
cristy149d58c2013-08-07 19:44:54 +00002522 lines straight again. <br></br>
cristy3ed852e2009-09-05 21:47:34 +00002523
cristyac1b4322013-07-28 13:58:06 +00002524 Arguments: <em>A B C</em> [ <em>D</em> [
cristy149d58c2013-08-07 19:44:54 +00002525 <em>X</em> , <em>Y</em> ] ] <br></br>
cristyac1b4322013-07-28 13:58:06 +00002526 or <em>A<sub>x</sub> B<sub>x</sub> C<sub>x</sub> D<sub>x</sub>
2527 A<sub>y</sub> B<sub>y</sub> C<sub>y</sub> D<sub>y</sub></em>
cristy149d58c2013-08-07 19:44:54 +00002528 [ <em>X</em> , <em>Y</em> ] <br></br>
2529 So that it forms the function <br></br>
cristy3ed852e2009-09-05 21:47:34 +00002530 Rsrc = r * ( <em>A</em>*r<sup>3</sup> + <em>B</em>*r<sup>2</sup> +
cristy149d58c2013-08-07 19:44:54 +00002531 <em>C</em>*r + <em>D</em> )<br></br>
cristy3ed852e2009-09-05 21:47:34 +00002532
2533 Where <em>X</em>,<em>Y</em> is the optional center of the distortion
cristy149d58c2013-08-07 19:44:54 +00002534 (defaulting to the center of the image). <br></br>
cristy3ed852e2009-09-05 21:47:34 +00002535 The second form is typically used to distort images, rather than
cristy149d58c2013-08-07 19:44:54 +00002536 correct lens distortions. <br></br>
cristy3ed852e2009-09-05 21:47:34 +00002537 </td>
2538
2539 </tr>
2540
2541 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +00002542 <td valign="top"><code>BarrelInverse</code></td>
cristy3ed852e2009-09-05 21:47:34 +00002543 <td valign="top">
cristy8ee7f242013-06-20 16:08:44 +00002544 This is very similar to '<code>Barrel</code>' with the same set of
cristy3ed852e2009-09-05 21:47:34 +00002545 arguments, and argument handling. However it uses the inverse
2546 of the radial polynomial,
cristy149d58c2013-08-07 19:44:54 +00002547 so that it forms the function <br></br>
cristy3ed852e2009-09-05 21:47:34 +00002548 Rsrc = r / ( <em>A</em>*r<sup>3</sup> + <em>B</em>*r<sup>2</sup> +
cristy149d58c2013-08-07 19:44:54 +00002549 <em>C</em>*r + <em>D</em> )<br></br>
cristy8ee7f242013-06-20 16:08:44 +00002550 Note that this is not the reverse of the '<code>Barrel</code>'
cristyd0bd44a2010-09-24 12:38:11 +00002551 distortion, just a different barrel-like radial distortion method.
2552
cristy3ed852e2009-09-05 21:47:34 +00002553 </td>
2554 </tr>
2555
2556 <tr valign="top">
cristy8ee7f242013-06-20 16:08:44 +00002557 <td valign="top"><code>Shepards</code></td>
cristy3ed852e2009-09-05 21:47:34 +00002558 <td valign="top">
2559 Distort the given list control points (any number) using an Inverse
cristy149d58c2013-08-07 19:44:54 +00002560 Squared Distance Interpolation Method (<a href="http://en.wikipedia.org/wiki/Shepard%27s_method">Shepards
cristyd0bd44a2010-09-24 12:38:11 +00002561 Method</a>). The control points in effect do 'localized' displacement
2562 of the image around the given control point (preserving the look and
2563 the rotation of the area near the control points. For best results
2564 extra control points should be added to 'lock' the positions of the
2565 corners, edges and other unchanging parts of the image, to prevent
cristy149d58c2013-08-07 19:44:54 +00002566 their movement. <br></br>
cristy3ed852e2009-09-05 21:47:34 +00002567
cristyd0bd44a2010-09-24 12:38:11 +00002568 The distortion has been likened to 'taffy pulling' using nails, or
2569 pins' stuck in a block of 'jelly' which is then moved to the new
cristy149d58c2013-08-07 19:44:54 +00002570 position, distorting the surface of the jelly. <br></br>
cristy3ed852e2009-09-05 21:47:34 +00002571
cristy149d58c2013-08-07 19:44:54 +00002572 Internally it is equivalent to generating a displacement map (see <a href="command-line-options.html#displace">-displace</a>) for source image color look-up using
2573 the <a href="command-line-options.html#sparse-color">-sparse-color</a> method of the same name.
cristyd0bd44a2010-09-24 12:38:11 +00002574
2575 </td>
cristy3ed852e2009-09-05 21:47:34 +00002576 </tr>
2577
2578</table>
2579
cristy751980d2012-06-03 23:18:35 +00002580<p>To print a complete list of distortion methods, use <a href="command-line-options.html#list">-list
cristyd0bd44a2010-09-24 12:38:11 +00002581distort</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00002582
cristy8ee7f242013-06-20 16:08:44 +00002583<p>Many of the above distortion methods such as '<code>Affine</code>',
2584'<code>Perspective</code>', and '<code>Shepards</code>' use a list control points
cristy3ed852e2009-09-05 21:47:34 +00002585defining how these points in the given image should be distorted in the
2586destination image. Each set of four floating point values represent a source
2587image coordinate, followed immediately by the destination image coordinate.
2588This produces a list of values such as...</p>
2589<div style="text-align: center"><em>
cristyac1b4322013-07-28 13:58:06 +00002590 U<sub>1</sub>,V<sub>1</sub> X<sub>1</sub>,Y<sub>1</sub>
2591 U<sub>2</sub>,V<sub>2</sub> X<sub>2</sub>,Y<sub>2</sub>
2592 U<sub>3</sub>,V<sub>3</sub> X<sub>3</sub>,Y<sub>3</sub>
2593 ...
2594 U<sub>n</sub>,V<sub>n</sub> X<sub>n</sub>,Y<sub>n</sub>
cristy3ed852e2009-09-05 21:47:34 +00002595</em></div>
2596<p>where <em>U,V</em> on the source image is mapped to <em>X,Y</em> on the
2597destination image. </p>
2598
cristy8ee7f242013-06-20 16:08:44 +00002599<p>For example, to warp an image using '<code>perspective</code>' distortion,
cristy3ed852e2009-09-05 21:47:34 +00002600needs a list of at least 4 sets of coordinates, or 16 numbers. Here is the
2601perspective distortion of the built-in "rose:" image. Note how spaces were
2602used to group the 4 sets of coordinate pairs, to make it easier to read and
2603understand.</p>
2604
cristy149d58c2013-08-07 19:44:54 +00002605<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">
2606convert rose: -virtual-pixel black \<br></br>
2607 -distort Perspective '0,0,0,0 0,45,0,45 69,0,60,10 69,45,60,35' \<br></br>
cristyd0bd44a2010-09-24 12:38:11 +00002608 rose_3d_rotated.gif</span></p>
2609<p>If more that the required number of coordinate pairs are given for
2610a distortion, the distortion method is 'least squares' fitted to produce the
2611best result for all the coordinate pairs given. If less than the ideal number
2612of points are given, the distort will generally fall back to a simpler form of
cristyeed6cb62012-01-28 19:38:34 +00002613distortion that can handles the smaller number of coordinates (usually a linear
cristy8ee7f242013-06-20 16:08:44 +00002614'<code>Affine</code>' distortion). </p>
cristy3ed852e2009-09-05 21:47:34 +00002615
cristyd0bda5e2010-09-21 16:22:45 +00002616<p>By using more coordinates you can make use of image registration tool to
cristyd0bd44a2010-09-24 12:38:11 +00002617find matching coordinate pairs in overlapping images, so as to improve the
2618'fit' of the distortion. Of course a bad coordinate pair can also make the
2619'fit' worse. Caution is always advised. </p>
cristy3ed852e2009-09-05 21:47:34 +00002620
cristy8ee7f242013-06-20 16:08:44 +00002621<p>Colors are acquired from the source image according to a cylindrical
cristy149d58c2013-08-07 19:44:54 +00002622resampling <a href="command-line-options.html#filter">-filter</a>, using a special technique known as
cristy8ee7f242013-06-20 16:08:44 +00002623EWA resampling. This produces very high quality results, especially when
2624images become smaller (minified) in the output, which is very common when
2625using '<code>perspective</code>' distortion. For example here we view
2626a infinitely tiled 'plane' all the way to the horizon. </p>
cristy3ed852e2009-09-05 21:47:34 +00002627
cristy149d58c2013-08-07 19:44:54 +00002628<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">
2629convert -size 90x90 pattern:checkerboard -normalize -virtual-pixel tile \<br></br>
2630 -distort perspective '0,0,5,45 89,0,45,46 0,89,0,89 89,89,89,89' \<br></br>
cristyd0bd44a2010-09-24 12:38:11 +00002631 checks_tiled.jpg</span></p>
cristy3ed852e2009-09-05 21:47:34 +00002632<p>Note that a infinitely tiled perspective images involving the horizon can
cristy8ee7f242013-06-20 16:08:44 +00002633be very slow, because of the number of pixels that are compressed to generate
2634each individual pixel close to the 'horizon'. You can turn off EWA
cristy149d58c2013-08-07 19:44:54 +00002635resampling, by specifing the special <a href="command-line-options.html#filter">-filter</a> setting of
cristy8ee7f242013-06-20 16:08:44 +00002636'<code>point</code>' (recommended if you plan to use super-sampling instead).
2637</p>
cristy3ed852e2009-09-05 21:47:34 +00002638
2639<p>If an image generates <i>invalid pixels</i>, such as the 'sky' in the last
cristy149d58c2013-08-07 19:44:54 +00002640example, <a href="command-line-options.html#distort">-distort</a> will use the current <a href="command-line-options.html#mattecolor">-mattecolor</a> setting for these pixels. If you do not
cristy8ee7f242013-06-20 16:08:44 +00002641what these pixels to be visible, set the color to match the rest of the
2642ground. </p>
cristy3ed852e2009-09-05 21:47:34 +00002643
2644<p>The output image size will by default be the same as the input image. This
2645means that if the part of the distorted image falls outside the viewed area of
cristyd0bd44a2010-09-24 12:38:11 +00002646the 'distorted space', those parts is clipped and lost. However if you use
cristy149d58c2013-08-07 19:44:54 +00002647the plus form of the operator (<a href="command-line-options.html#distort">+distort</a>) the operator
cristyd0bd44a2010-09-24 12:38:11 +00002648will attempt (if possible) to show the whole of the distorted image, while
2649retaining a correct 'virtual canvas' offset, for image layering. This offset
cristy149d58c2013-08-07 19:44:54 +00002650may need to be removed using <a href="command-line-options.html#repage">+repage</a>, to remove if it
cristyd0bd44a2010-09-24 12:38:11 +00002651is unwanted. </p>
cristy3ed852e2009-09-05 21:47:34 +00002652
cristy149d58c2013-08-07 19:44:54 +00002653<p>Setting <a href="command-line-options.html#verbose">-verbose</a> setting, will cause <a href="command-line-options.html#distort">-distort</a> to attempt to output the internal coefficients,
2654and the <a href="command-line-options.html#fx">-fx</a> equivalent to the distortion, for expert study,
cristy3ed852e2009-09-05 21:47:34 +00002655and debugging purposes. This many not be available for all distorts. </p>
2656
cristy149d58c2013-08-07 19:44:54 +00002657<p>You can alternatively specify a special "<code><a href="command-line-options.html#define">-define</a> distort:viewport={geometry_string}</code>" setting which will
cristy8ee7f242013-06-20 16:08:44 +00002658specify the size and the offset of the generated 'viewport' image of the
2659distorted image space.</p>
cristy3ed852e2009-09-05 21:47:34 +00002660
cristy149d58c2013-08-07 19:44:54 +00002661<p>Setting a "<code><a href="command-line-options.html#define">-define</a>
cristy8ee7f242013-06-20 16:08:44 +00002662distort:scale={scale_factor}</code>" will scale the output image (viewport or
2663otherwise) by that factor without changing the viewed contents of the
2664distorted image. This can be used either for 'super-sampling' the image for
2665a higher quality result, or for panning and zooming around the image (with
2666appropriate viewport changes, or post-distort cropping and resizing). </p>
2667
cristy149d58c2013-08-07 19:44:54 +00002668<p>Setting "<code><a href="command-line-options.html#define">-define</a> resample:verbose=1</code>"
cristy8ee7f242013-06-20 16:08:44 +00002669will output the cylindrical filter lookup table created by the EWA (Elliptical
2670Weighted Average) resampling algorithm. Note this table uses a squared radius
2671lookup value. This is typically only used for debugging EWA resampling. </p>
2672
2673
2674<div style="margin: auto;">
2675 <h4><a id="distribute-cache"></a>-distribute-cache <em class="arg">port</em></h4>
2676</div>
2677
cristy149d58c2013-08-07 19:44:54 +00002678<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">launch a distributed pixel cache server. </td><td style="text-align:right;"></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00002679
2680<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002681 <h4><a id="dither"></a>-dither <em class="arg">method</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002682</div>
2683
cristy149d58c2013-08-07 19:44:54 +00002684<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
cristy751980d2012-06-03 23:18:35 +00002685images when general color reduction is applied via an option, or automagically
cristy149d58c2013-08-07 19:44:54 +00002686when saving to specific formats. This enabled by default. </td><td style="text-align:right;"></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00002687
cristy751980d2012-06-03 23:18:35 +00002688<p>Dithering places two or more colors in neighboring pixels so that to the
2689eye a closer approximation of the images original color is reproduced. This
2690reduces the number of colors needed to reproduce the image but at the cost of
2691a lower level pattern of colors. Error diffusion dithers can use any set of
2692colors (generated or user defined) to an image. </p>
cristy3ed852e2009-09-05 21:47:34 +00002693
2694<p>Dithering is turned on by default, to turn it off use the plus form of the
cristy751980d2012-06-03 23:18:35 +00002695setting, <a href="command-line-options.html#dither">+dither</a>. This will also also render PostScript
cristy3ed852e2009-09-05 21:47:34 +00002696without text or graphic aliasing. Disabling dithering often (but not always)
2697leads to faster process, a smaller number of colors, but more cartoon like
2698image coloring. Generally resulting in 'color banding' effects in areas with
2699color gradients. </p>
2700
cristy149d58c2013-08-07 19:44:54 +00002701<p>The color reduction operators <a href="command-line-options.html#colors">-colors</a>, <a href="command-line-options.html#monochrome">-monochrome</a>, <a href="command-line-options.html#remap ">-remap</a>, and <a href="command-line-options.html#posterize">-posterize</a>, apply dithering to images using the reduced
cristy751980d2012-06-03 23:18:35 +00002702color set they created. These operators are also used as part of automatic
2703color reduction when saving images to formats with limited color support, such
cristy8ee7f242013-06-20 16:08:44 +00002704as <code>GIF:</code>, <code>XBM:</code>, and others, so dithering may also be used
cristy751980d2012-06-03 23:18:35 +00002705in these cases. </p>
cristy3ed852e2009-09-05 21:47:34 +00002706
cristy751980d2012-06-03 23:18:35 +00002707<p>Alternatively you can use <a href="command-line-options.html#random-threshold">-random-threshold</a>
cristy149d58c2013-08-07 19:44:54 +00002708to generate purely random dither. Or use <a href="command-line-options.html#ordered-dither">-ordered-dither</a> to apply threshold mapped dither
cristy751980d2012-06-03 23:18:35 +00002709patterns, using uniform color maps, rather than specific color maps. </p>
cristy3ed852e2009-09-05 21:47:34 +00002710
2711
2712<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002713 <h4><a id="draw"></a>-draw <em class="arg">string</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002714</div>
2715
cristy149d58c2013-08-07 19:44:54 +00002716<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>
cristy3ed852e2009-09-05 21:47:34 +00002717
cristy751980d2012-06-03 23:18:35 +00002718<p>Use this option to annotate or decorate an image with one or more graphic
2719primitives. The primitives include shapes, text, transformations, and pixel
2720operations.</p>
cristy3ed852e2009-09-05 21:47:34 +00002721
2722<p>The shape primitives:</p>
2723
2724<pre class="text">
2725 point x,y
2726 line x0,y0 x1,y1
2727 rectangle x0,y0 x1,y1
2728 roundRectangle x0,y0 x1,y1 wc,hc
2729 arc x0,y0 x1,y1 a0,a1
2730 ellipse x0,y0 rx,ry a0,a1
2731 circle x0,y0 x1,y1
2732 polyline x0,y0 ... xn,yn
2733 polygon x0,y0 ... xn,yn
2734 bezier x0,y0 ... xn,yn
2735 path path specification
2736 image operator x0,y0 w,h filename
2737</pre>
2738
2739<p>The text primitive:</p>
2740
2741<pre class="text">
2742 text x0,y0 string
2743</pre>
2744<p>The text gravity primitive:</p>
2745
2746<pre class="text">
2747 gravity NorthWest, North, NorthEast, West, Center,
2748 East, SouthWest, South, or SouthEast
2749</pre>
2750
cristy751980d2012-06-03 23:18:35 +00002751<p>The text gravity primitive only affects the placement of text and does not
cristy149d58c2013-08-07 19:44:54 +00002752interact with the other primitives. It is equivalent to using the <a href="command-line-options.html#gravity">-gravity</a> command-line option, except that it is limited in
cristy751980d2012-06-03 23:18:35 +00002753scope to the <a href="command-line-options.html#draw">-draw</a> option in which it appears.</p>
cristy3ed852e2009-09-05 21:47:34 +00002754
2755<p>The transformation primitives:</p>
2756
2757<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00002758 rotate degrees
2759 translate dx,dy
2760 scale sx,sy
2761 skewX degrees
2762 skewY degrees
cristy3ed852e2009-09-05 21:47:34 +00002763</pre>
2764
2765<p>The pixel operation primitives:</p>
2766
2767<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00002768 color x0,y0 method
2769 matte x0,y0 method
cristy3ed852e2009-09-05 21:47:34 +00002770</pre>
2771
cristy149d58c2013-08-07 19:44:54 +00002772<p>The shape primitives are drawn in the color specified by the preceding <a href="command-line-options.html#fill">-fill</a> setting. For unfilled shapes, use <a href="command-line-options.html#fill">-fill none</a>. You can optionally control the stroke (the
2773"outline" of a shape) with the <a href="command-line-options.html#stroke">-stroke</a> and <a href="command-line-options.html#strokewidth">-strokewidth</a> settings.</p>
cristy3ed852e2009-09-05 21:47:34 +00002774
cristy8ee7f242013-06-20 16:08:44 +00002775<p>A <code>point</code> primitive is specified by a single <em>point</em> in the
cristy751980d2012-06-03 23:18:35 +00002776pixel plane, that is, by an ordered pair of integer coordinates,
cristy8ee7f242013-06-20 16:08:44 +00002777<em>x</em>,<em>y</em>. (As it involves only a single pixel, a <code>point</code>
cristy149d58c2013-08-07 19:44:54 +00002778primitive is not affected by <a href="command-line-options.html#stroke">-stroke</a> or <a href="command-line-options.html#strokewidth">-strokewidth</a>.)</p>
cristy3ed852e2009-09-05 21:47:34 +00002779
cristy8ee7f242013-06-20 16:08:44 +00002780<p>A <code>line</code> primitive requires a start point and end point.</p>
cristy3ed852e2009-09-05 21:47:34 +00002781
cristy8ee7f242013-06-20 16:08:44 +00002782<p>A <code>rectangle</code> primitive is specified by the pair of points at the
cristy751980d2012-06-03 23:18:35 +00002783upper left and lower right corners.</p>
cristy3ed852e2009-09-05 21:47:34 +00002784
cristy8ee7f242013-06-20 16:08:44 +00002785<p>A <code>roundRectangle</code> primitive takes the same corner points as
2786a <code>rectangle</code> followed by the width and height of the rounded corners
cristy751980d2012-06-03 23:18:35 +00002787to be removed.</p>
cristy3ed852e2009-09-05 21:47:34 +00002788
cristy8ee7f242013-06-20 16:08:44 +00002789<p>The <code>circle</code> primitive makes a disk (filled) or circle (unfilled).
cristy751980d2012-06-03 23:18:35 +00002790Give the center and any point on the perimeter (boundary).</p>
cristy3ed852e2009-09-05 21:47:34 +00002791
cristy8ee7f242013-06-20 16:08:44 +00002792<p>The <code>arc</code> primitive is used to inscribe an elliptical segment in
2793to a given rectangle. An <code>arc</code> requires the two corners used for
2794<code>rectangle</code> (see above) followed by the start and end angles of the
cristy751980d2012-06-03 23:18:35 +00002795arc of the segment segment (e.g. 130,30 200,100 45,90). The start and end
2796points produced are then joined with a line segment and the resulting segment
2797of an ellipse is filled.</p>
cristy3ed852e2009-09-05 21:47:34 +00002798
cristy8ee7f242013-06-20 16:08:44 +00002799<p>Use <code>ellipse</code> to draw a partial (or whole) ellipse. Give the
cristy751980d2012-06-03 23:18:35 +00002800center point, the horizontal and vertical "radii" (the <em>semi-axes</em> of
2801the ellipse) and start and end angles in degrees (e.g. 100,100 100,150
28020,360).</p>
cristy3ed852e2009-09-05 21:47:34 +00002803
cristy8ee7f242013-06-20 16:08:44 +00002804<p>The <code>polyline</code> and <code>polygon</code> primitives require three or
2805more points to define their perimeters. A <code>polyline</code> is simply
2806a <code>polygon</code> in which the final point is not stroked to the start
cristy149d58c2013-08-07 19:44:54 +00002807point. When unfilled, this is a <em>polygonal line</em>. If the <a href="command-line-options.html#stroke">-stroke</a> setting is <code>none</code> (the default), then
cristy8ee7f242013-06-20 16:08:44 +00002808a <code>polyline</code> is identical to a <code>polygon</code>. </p>
cristy3ed852e2009-09-05 21:47:34 +00002809
cristy751980d2012-06-03 23:18:35 +00002810<p>A <em>coordinate</em> is a pair of integers separated by a space or
2811optional comma. </p>
cristy3ed852e2009-09-05 21:47:34 +00002812
cristy751980d2012-06-03 23:18:35 +00002813<p>As an example, to define a circle centered at 100,100 that extends to
2814150,150 use:</p>
cristy3ed852e2009-09-05 21:47:34 +00002815
2816<p class="crtsnip">
2817 -draw 'circle 100,100 150,150'
2818</p>
2819
cristy8ee7f242013-06-20 16:08:44 +00002820<p>The <code>Bezier</code> primitive creates a spline curve and requires three
cristy751980d2012-06-03 23:18:35 +00002821or points to define its shape. The first and last points are the
2822<em>knots</em> and these points are attained by the curve, while any
2823intermediate coordinates are <em>control points</em>. If two control points
2824are specified, the line between each end knot and its sequentially respective
2825control point determines the tangent direction of the curve at that end. If
2826one control point is specified, the lines from the end knots to the one
2827control point determines the tangent directions of the curve at each end. If
2828more than two control points are specified, then the additional control points
2829act in combination to determine the intermediate shape of the curve. In order
2830to draw complex curves, it is highly recommended either to use the
cristy8ee7f242013-06-20 16:08:44 +00002831<code>path</code> primitive or to draw multiple four-point bezier segments with
cristy751980d2012-06-03 23:18:35 +00002832the start and end knots of each successive segment repeated. For example:</p>
cristy3ed852e2009-09-05 21:47:34 +00002833
2834<p class="crtsnip">
2835 -draw 'bezier 20,50 45,100 45,0 70,50'
2836</p>
2837<p class="crtsnip">
2838 -draw 'bezier 70,50 95,100 95,0 120,50'
2839</p>
2840
2841
cristy8ee7f242013-06-20 16:08:44 +00002842<p>A <code>path</code> represents an outline of an object, defined in terms of
cristy751980d2012-06-03 23:18:35 +00002843moveto (set a new current point), lineto (draw a straight line), curveto (draw
2844a Bezier curve), arc (elliptical or circular arc) and closepath (close the
2845current shape by drawing a line to the last moveto) elements. Compound paths
2846(i.e., a path with subpaths, each consisting of a single moveto followed by
2847one or more line or curve operations) are possible to allow effects such as
cristy149d58c2013-08-07 19:44:54 +00002848<em>donut holes</em> in objects. (See <a href="http://www.w3.org/TR/SVG/paths.html">Paths</a>.)</p>
cristy3ed852e2009-09-05 21:47:34 +00002849
cristy8ee7f242013-06-20 16:08:44 +00002850<p>Use <code>image</code> to composite an image with another image. Follow the
cristy751980d2012-06-03 23:18:35 +00002851image keyword with the composite operator, image location, image size, and
2852filename:</p>
cristy3ed852e2009-09-05 21:47:34 +00002853
2854<p class="crtsnip">
2855 -draw 'image SrcOver 100,100 225,225 image.jpg'
2856</p>
2857
cristybc9539a2010-08-16 18:06:20 +00002858<p>You can use 0,0 for the image size, which means to use the actual
2859dimensions found in the image header. Otherwise, it is scaled to the given
cristy751980d2012-06-03 23:18:35 +00002860dimensions. See <a href="compose.html">Alpha Compositing</a> for
2861a detailed discussion of alpha composition methods that are available. </p>
2862
cristy149d58c2013-08-07 19:44:54 +00002863<p>The "special augmented compose operators" such as "dissolve" that require
cristy8ee7f242013-06-20 16:08:44 +00002864arguments cannot be used at present with the <code>-draw image</code> option.
cristy29c5c992011-06-25 13:58:49 +00002865 </p>
cristy3ed852e2009-09-05 21:47:34 +00002866
cristy8ee7f242013-06-20 16:08:44 +00002867<p>Use <code>text</code> to annotate an image with text. Follow the text
cristy751980d2012-06-03 23:18:35 +00002868coordinates with a string. If the string has embedded spaces, enclose it in
2869single or double quotes.</p>
2870
cristy8ee7f242013-06-20 16:08:44 +00002871<p>For example, the following annotates the image with <code>Works like
2872magick!</code> for an image titled <code>bird.miff</code>. </p>
cristy3ed852e2009-09-05 21:47:34 +00002873
2874<p class="crtsnip">
cristy4bf6e232011-05-21 01:43:33 +00002875 -draw "text 100,100 'Works like magick!' "
cristy3ed852e2009-09-05 21:47:34 +00002876</p>
2877
cristy751980d2012-06-03 23:18:35 +00002878<p>See the <a href="command-line-options.html#annotate">-annotate</a> option for another convenient way
2879to annotate an image with text.</p>
cristy3ed852e2009-09-05 21:47:34 +00002880
cristy8ee7f242013-06-20 16:08:44 +00002881<p>The <code>rotate</code> primitive rotates subsequent shape primitives and
cristy149d58c2013-08-07 19:44:54 +00002882text primitives about the origin of the main image. If the <a href="command-line-options.html#region">-region</a> option precedes the <a href="command-line-options.html#draw">-draw</a>
cristy751980d2012-06-03 23:18:35 +00002883option, the origin for transformations is the upper left corner of the
2884region.</p>
cristy3ed852e2009-09-05 21:47:34 +00002885
cristy8ee7f242013-06-20 16:08:44 +00002886<p>The <code>translate</code> primitive translates subsequent shape and text
cristy751980d2012-06-03 23:18:35 +00002887primitives.</p>
cristy3ed852e2009-09-05 21:47:34 +00002888
cristy8ee7f242013-06-20 16:08:44 +00002889<p>The <code>scale</code> primitive scales them.</p>
cristy3ed852e2009-09-05 21:47:34 +00002890
cristy8ee7f242013-06-20 16:08:44 +00002891<p>The <code>skewX</code> and <code>skewY</code> primitives skew them with respect
cristy751980d2012-06-03 23:18:35 +00002892to the origin of the main image or the region.</p>
cristy3ed852e2009-09-05 21:47:34 +00002893
cristy751980d2012-06-03 23:18:35 +00002894<p>The transformations modify the current affine matrix, which is initialized
2895from the initial affine matrix defined by the <a href="command-line-options.html#affine">-affine</a>
2896option. Transformations are cumulative within the <a href="command-line-options.html#draw">-draw</a>
2897option. The initial affine matrix is not affected; that matrix is only changed
2898by the appearance of another <a href="command-line-options.html#affine">-affine</a> option. If another
2899<a href="command-line-options.html#draw">-draw</a> option appears, the current affine matrix is
2900reinitialized from the initial affine matrix.</p>
cristy3ed852e2009-09-05 21:47:34 +00002901
cristy8ee7f242013-06-20 16:08:44 +00002902<p>Use the <code>color</code> primitive to change the color of a pixel to the
cristy751980d2012-06-03 23:18:35 +00002903fill color (see <a href="command-line-options.html#fill">-fill</a>). Follow the pixel coordinate with
2904a method:</p>
cristy3ed852e2009-09-05 21:47:34 +00002905
2906<pre class="text">
2907 point
2908 replace
2909 floodfill
2910 filltoborder
2911 reset
2912</pre>
2913
cristy751980d2012-06-03 23:18:35 +00002914<p>Consider the target pixel as that specified by your coordinate. The
cristy8ee7f242013-06-20 16:08:44 +00002915<code>point</code> method recolors the target pixel. The <code>replace</code>
cristy751980d2012-06-03 23:18:35 +00002916method recolors any pixel that matches the color of the target pixel.
cristy8ee7f242013-06-20 16:08:44 +00002917<code>Floodfill</code> recolors any pixel that matches the color of the target
2918pixel and is a neighbor, whereas <code>filltoborder</code> recolors any neighbor
2919pixel that is not the border color. Finally, <code>reset</code> recolors all
cristy751980d2012-06-03 23:18:35 +00002920pixels.</p>
cristy3ed852e2009-09-05 21:47:34 +00002921
cristy8ee7f242013-06-20 16:08:44 +00002922<p>Use <code>matte</code> to the change the pixel matte value to transparent.
2923Follow the pixel coordinate with a method (see the <code>color</code> primitive
2924for a description of methods). The <code>point</code> method changes the matte
2925value of the target pixel. The <code>replace</code> method changes the matte
cristy751980d2012-06-03 23:18:35 +00002926value of any pixel that matches the color of the target pixel.
cristy8ee7f242013-06-20 16:08:44 +00002927<code>Floodfill</code> changes the matte value of any pixel that matches the
2928color of the target pixel and is a neighbor, whereas <code>filltoborder</code>
cristy149d58c2013-08-07 19:44:54 +00002929changes the matte value of any neighbor pixel that is not the border color (<a href="command-line-options.html#bordercolor">-bordercolor</a>). Finally <code>reset</code> changes the
cristy751980d2012-06-03 23:18:35 +00002930matte value of all pixels.</p>
cristy3ed852e2009-09-05 21:47:34 +00002931
cristy149d58c2013-08-07 19:44:54 +00002932<p>You can set the primitive color, font, and font bounding box color with <a href="command-line-options.html#fill">-fill</a>, <a href="command-line-options.html#font">-font</a>, and <a href="command-line-options.html#box">-box</a>
cristy751980d2012-06-03 23:18:35 +00002933respectively. Options are processed in command line order so be sure to use
2934these options <em>before</em> the <a href="command-line-options.html#draw">-draw</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00002935
cristy751980d2012-06-03 23:18:35 +00002936<p>Strings that begin with a number must be quoted (e.g. use '1.png' rather
2937than 1.png).</p>
cristy3ed852e2009-09-05 21:47:34 +00002938
cristy149d58c2013-08-07 19:44:54 +00002939<p>Drawing primitives conform to the <a href="magick-vector-graphics.html">Magick
cristy751980d2012-06-03 23:18:35 +00002940Vector Graphics</a> format.</p>
cristy3ed852e2009-09-05 21:47:34 +00002941
cristy2dcd6822011-06-13 16:21:20 +00002942
cristy8b9dd952011-03-21 22:56:18 +00002943<div style="margin: auto;">
cristy323f35b2011-03-24 23:05:13 +00002944 <h4><a id="duplicate"></a>-duplicate <em class="arg">count,indexes</em></h4>
cristy8b9dd952011-03-21 22:56:18 +00002945</div>
2946
cristy149d58c2013-08-07 19:44:54 +00002947<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 +00002948
cristy751980d2012-06-03 23:18:35 +00002949<p>Specify the count and the image to duplicate by its index in the sequence.
2950The first image is index 0. Negative indexes are relative to the end of the
2951sequence, for example, -1 represents the last image of the sequence. Specify
2952a range of images with a dash (e.g. 0-4). Separate indexes with a comma (e.g.
cristy8ee7f242013-06-20 16:08:44 +000029530,2). Use <code>+duplicate</code> to duplicate the last image in the current
cristy751980d2012-06-03 23:18:35 +00002954image sequence.</p>
cristy3ed852e2009-09-05 21:47:34 +00002955
2956<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002957 <h4><a id="edge"></a>-edge <em class="arg">radius</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002958</div>
2959
cristy149d58c2013-08-07 19:44:54 +00002960<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>
cristy3ed852e2009-09-05 21:47:34 +00002961
2962<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002963 <h4><a id="emboss"></a>-emboss <em class="arg">radius</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002964</div>
2965
cristy149d58c2013-08-07 19:44:54 +00002966<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>
cristy3ed852e2009-09-05 21:47:34 +00002967
2968<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002969 <h4><a id="encipher"></a>-encipher <em class="arg">filename</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002970</div>
2971
cristy149d58c2013-08-07 19:44:54 +00002972<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 +00002973
cristy149d58c2013-08-07 19:44:54 +00002974<p>Get the passphrase from the file specified by <em class="arg">filename</em>.</p>
cristy3ed852e2009-09-05 21:47:34 +00002975
cristy149d58c2013-08-07 19:44:54 +00002976<p>For more information, see the webpage, <a href="../www/cipher.html">ImageMagick: Encipher or
cristy751980d2012-06-03 23:18:35 +00002977Decipher an Image</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00002978
cristyd0bda5e2010-09-21 16:22:45 +00002979
2980
cristy3ed852e2009-09-05 21:47:34 +00002981<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002982 <h4><a id="encoding"></a>-encoding <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002983</div>
2984
cristy149d58c2013-08-07 19:44:54 +00002985<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>
cristy3ed852e2009-09-05 21:47:34 +00002986
cristy8ee7f242013-06-20 16:08:44 +00002987<p>Choose from <code>AdobeCustom</code>, <code>AdobeExpert</code>,
2988<code>AdobeStandard</code>, <code>AppleRoman</code>, <code>BIG5</code>,
2989<code>GB2312</code>, <code>Latin 2</code>, <code>None</code>, <code>SJIScode</code>,
2990<code>Symbol</code>, <code>Unicode</code>, <code>Wansung</code>.</p>
cristy3ed852e2009-09-05 21:47:34 +00002991
2992<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00002993 <h4><a id="endian"></a>-endian <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00002994</div>
2995
cristy149d58c2013-08-07 19:44:54 +00002996<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Specify endianness (<code>MSB</code> or <code>LSB</code>) of the image.</td><td style="text-align:right;"></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00002997
cristy751980d2012-06-03 23:18:35 +00002998<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 +00002999
cristy751980d2012-06-03 23:18:35 +00003000<p>Use <a href="command-line-options.html#endian">+endian</a> to revert to unspecified endianness.</p>
cristy3ed852e2009-09-05 21:47:34 +00003001
3002
3003<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003004 <h4><a id="enhance"></a>-enhance</h4>
cristy3ed852e2009-09-05 21:47:34 +00003005</div>
3006
cristy149d58c2013-08-07 19:44:54 +00003007<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>
cristy3ed852e2009-09-05 21:47:34 +00003008
3009
3010<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003011 <h4><a id="equalize"></a>-equalize</h4>
cristy3ed852e2009-09-05 21:47:34 +00003012</div>
3013
cristy149d58c2013-08-07 19:44:54 +00003014<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>
cristy3ed852e2009-09-05 21:47:34 +00003015
cristy751980d2012-06-03 23:18:35 +00003016<p>To perform histogram equalization on all channels in concert, transform the
3017image into some other color space, such as HSL, OHTA, YIQ or YUV, then
3018equalize the appropriate intensity-like channel, then convert back to RGB.</p>
cristy3ed852e2009-09-05 21:47:34 +00003019
cristy8ee7f242013-06-20 16:08:44 +00003020<p>For example using HSL, we have: ... <code>-colorspace HSL -channel lightness
3021-equalize -colorspace RGB</code> ...</p>
cristy3ed852e2009-09-05 21:47:34 +00003022
cristy751980d2012-06-03 23:18:35 +00003023<p>For YIQ, YUV and OHTA use the red channel. For example, OHTA is a principal
3024components transformation that puts most of the information in the first
cristy8ee7f242013-06-20 16:08:44 +00003025channel. Here we have ... <code>-colorspace OHTA -channel red -equalize
3026-colorspace RGB</code> ...</p>
cristy3ed852e2009-09-05 21:47:34 +00003027
3028<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003029 <h4><a id="evaluate"></a>-evaluate <em class="arg">operator value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003030</div>
3031
cristy149d58c2013-08-07 19:44:54 +00003032<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>
cristy3ed852e2009-09-05 21:47:34 +00003033
cristy149d58c2013-08-07 19:44:54 +00003034<p>(See the <a href="command-line-options.html#function">-function</a> operator for some
3035multi-parameter functions. See the <a href="command-line-options.html#fx">-fx</a> operator if more
cristy751980d2012-06-03 23:18:35 +00003036elaborate calculations are needed.)</p>
cristy3ed852e2009-09-05 21:47:34 +00003037
cristy751980d2012-06-03 23:18:35 +00003038<p>The behaviors of each <em class="arg">operator</em> are summarized in the
3039following list. For brevity, the numerical value of a "pixel" referred to
3040below is the value of the corresponding channel of that pixel, while
3041a "normalized pixel" is that number divided by the maximum
3042(installation-dependent) value <em class="QR">QuantumRange</em>. (If
3043normalized pixels are used, they are restored, following the other
cristy149d58c2013-08-07 19:44:54 +00003044calculations, to the full range by multiplying by <em class="QR">QuantumRange</em>.)</p>
cristy3ed852e2009-09-05 21:47:34 +00003045
3046<table class="doc">
cristy149d58c2013-08-07 19:44:54 +00003047 <col width="25%"></col>
3048 <col width="75%"></col>
cristy3ed852e2009-09-05 21:47:34 +00003049 <thead>
3050 <tr>
3051 <th><em class="arg">operator</em></th>
3052 <th>Summary (see further below for details)</th>
3053 </tr>
3054 </thead>
3055 <tbody>
3056
cristy3c98a4f2010-08-13 20:09:41 +00003057 <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 +00003058 <tr><td>Add </td> <td>Add <em class="arg">value</em> to pixels. </td></tr>
3059 <tr><td>AddModulus </td> <td>Add <em class="arg">value</em> to pixels modulo <em class="QR">QuantumRange</em>.</td></tr>
3060 <tr><td>And </td> <td>Binary AND of pixels with <em class="arg">value</em>.</td></tr>
3061 <tr><td>Cos, Cosine </td> <td>Apply cosine to pixels with frequency <em class="arg">value</em> with 50% bias added.</td></tr>
3062 <tr><td>Divide </td> <td>Divide pixels by <em class="arg">value</em>.</td></tr>
cristy5063d812010-10-19 16:28:10 +00003063 <tr><td>Exp </td> <td>base-e exponential function</td></tr>
3064 <tr><td>Exponential </td> <td>base-e exponential function</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00003065 <tr><td>LeftShift </td> <td>Shift the pixel values left by <em class="arg">value</em> bits (i.e., multiply pixels by 2<sup><em class="arg">value</em></sup>).</td></tr>
3066 <tr><td>Log </td> <td>Apply scaled logarithm to normalized pixels.</td></tr>
3067 <tr><td>Max </td> <td>Clip pixels at lower bound <em class="arg">value</em>.</td></tr>
cristy63fed272010-03-07 19:08:45 +00003068 <tr><td>Mean </td> <td>Add the <em class="arg">value</em> and divide by 2.</td></tr>
cristy61365ad2010-11-28 02:38:34 +00003069 <tr><td>Median </td> <td>Choose the median value from an image sequence.</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00003070 <tr><td>Min </td> <td>Clip pixels at upper bound <em class="arg">value</em>.</td></tr>
3071 <tr><td>Multiply </td> <td>Multiply pixels by <em class="arg">value</em>.</td></tr>
3072 <tr><td>Or </td> <td>Binary OR of pixels with <em class="arg">value</em>.</td></tr>
3073 <tr><td>Pow </td> <td>Raise normalized pixels to the power <em class="arg">value</em>.</td></tr>
3074 <tr><td>RightShift </td> <td>Shift the pixel values right by <em class="arg">value</em> bits (i.e., divide pixels by 2<sup><em class="arg">value</em></sup>).</td></tr>
3075 <tr><td>Set </td> <td>Set pixel equal to <em class="arg">value</em>.</td></tr>
3076 <tr><td>Sin, Sine </td> <td>Apply sine to pixels with frequency <em class="arg">value</em> with 50% bias added.</td></tr>
3077 <tr><td>Subtract </td> <td>Subtract <em class="arg">value</em> from pixels.</td></tr>
3078 <tr><td>Xor </td> <td>Binary XOR of pixels with <em class="arg">value.</em></td></tr>
3079
cristyac1b4322013-07-28 13:58:06 +00003080 <tr><td> </td></tr>
cristy3ed852e2009-09-05 21:47:34 +00003081
3082 <tr><td>Gaussian-noise</td></tr>
3083 <tr><td>Impulse-noise</td></tr>
3084 <tr><td>Laplacian-noise</td></tr>
cristy149d58c2013-08-07 19:44:54 +00003085 <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 +00003086 <tr><td>PoissonNoise</td></tr>
3087 <tr><td>Uniform-noise</td></tr>
3088
cristyac1b4322013-07-28 13:58:06 +00003089 <tr><td> </td></tr>
cristy3ed852e2009-09-05 21:47:34 +00003090
3091 <tr><td>Threshold </td> <td>Threshold pixels larger than <em class="arg">value</em>.</td></tr>
3092 <tr><td>ThresholdBlack </td> <td>Threshold pixels to zero values equal to or below <em class="arg">value</em>.</td></tr>
3093 <tr><td>ThresholdWhite </td> <td>Threshold pixels to maximum values above <em class="arg">value</em>. </td></tr>
3094 </tbody>
3095 </table>
3096
cristy149d58c2013-08-07 19:44:54 +00003097<p>The specified functions are applied only to each previously set <a href="command-line-options.html#channel">-channel</a> in the image. If necessary, the results of the
3098calculations are truncated (clipped) to fit in the interval [0, <em class="QR">QuantumRange</em>]. The transparency channel of the image is
cristy3ed852e2009-09-05 21:47:34 +00003099represented as a 'alpha' values (0 = fully transparent), so, for example, a
cristyac1b4322013-07-28 13:58:06 +00003100<code>Divide</code> by 2 of the alpha channel will make the image
cristy8ee7f242013-06-20 16:08:44 +00003101semi-transparent. Append the percent symbol '<code>%</code>' to specify a value
cristy3ed852e2009-09-05 21:47:34 +00003102as a percentage of the <em class="QR">QuantumRange</em>.</p>
3103
cristy751980d2012-06-03 23:18:35 +00003104<p>To print a complete list of <a href="command-line-options.html#evaluate">-evaluate</a> operators, use
3105<a href="command-line-options.html#list">-list evaluate</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003106
cristy8ee7f242013-06-20 16:08:44 +00003107<p>The results of the <code>Add</code>, <code>Subtract</code> and
cristy149d58c2013-08-07 19:44:54 +00003108<code>Multiply</code> methods can also be achieved using either the <a href="command-line-options.html#level">-level</a> or the <a href="command-line-options.html#level">+level</a> operator, with
cristy3ed852e2009-09-05 21:47:34 +00003109appropriate argument, to linearly modify the overall range of color values.
cristy149d58c2013-08-07 19:44:54 +00003110Please note, however, that <a href="command-line-options.html#level">-level</a> treats transparency as
3111'matte' values (0 = opaque), while <a href="command-line-options.html#level">-evaluate</a> works with
cristy3ed852e2009-09-05 21:47:34 +00003112'alpha' values.</p>
3113
cristy8ee7f242013-06-20 16:08:44 +00003114<p><code>AddModulus</code> has been added as of ImageMagick 6.4.8-4 and provides
cristy751980d2012-06-03 23:18:35 +00003115addition modulo the <em class="QR">QuantumRange</em>. It is therefore
cristy8ee7f242013-06-20 16:08:44 +00003116equivalent to <code>Add</code> unless the resulting pixel value is outside the
cristyac1b4322013-07-28 13:58:06 +00003117interval [0, <em class="QR">QuantumRange</em>]. </p>
cristy3ed852e2009-09-05 21:47:34 +00003118
cristy8ee7f242013-06-20 16:08:44 +00003119<p><code>Exp or Exponential</code> has been added as of ImageMagick 6.6.5-1 and
cristy751980d2012-06-03 23:18:35 +00003120works on normalized pixel values. The <em class="arg">value</em> used with
cristy8ee7f242013-06-20 16:08:44 +00003121<code>Exp</code> should be negative so as to produce a decaying exponential
cristy751980d2012-06-03 23:18:35 +00003122function. Non-negative values will always produce results larger unity and
cristyac1b4322013-07-28 13:58:06 +00003123thus outside the interval [0, <em class="QR">QuantumRange</em>]. The
cristy751980d2012-06-03 23:18:35 +00003124formula is expressed below. </p>
cristyce66ab12010-10-21 23:36:32 +00003125
3126 <div style="text-align:center;">
cristy149d58c2013-08-07 19:44:54 +00003127 exp(<em class="arg">value</em> × <b><em>u</em></b>)
cristyce66ab12010-10-21 23:36:32 +00003128 </div>
3129
cristy149d58c2013-08-07 19:44:54 +00003130<p> If the input image is squared, for example, using <a href="command-line-options.html#-function">-function polynomial "2 0 0"</a>, then a decaying Gaussian function will be
cristy751980d2012-06-03 23:18:35 +00003131the result.</p>
cristyce66ab12010-10-21 23:36:32 +00003132
cristy8ee7f242013-06-20 16:08:44 +00003133<p><code>Log</code> has been added as of ImageMagick 6.4.2-1 and works on
cristy149d58c2013-08-07 19:44:54 +00003134normalized pixel values. This a <em>scaled</em> log function. The <em class="arg">value</em> used with <code>Log</code> provides a <em>scaling
cristy751980d2012-06-03 23:18:35 +00003135factor</em> that adjusts the curvature in the graph of the log function. The
3136formula applied to a normalized value <b><em>u</em></b> is below. </p>
cristy3ed852e2009-09-05 21:47:34 +00003137
3138 <div style="text-align:center;">
cristy149d58c2013-08-07 19:44:54 +00003139 log(<em class="arg">value</em> × <b><em>u</em></b> + 1) / log(<em class="arg">value</em> + 1)
cristy3ed852e2009-09-05 21:47:34 +00003140 </div>
3141
cristy8ee7f242013-06-20 16:08:44 +00003142<p><code>Pow</code> has been added as of ImageMagick 6.4.1-9, and works on
cristy149d58c2013-08-07 19:44:54 +00003143normalized pixel values. Note that <code>Pow</code> is related to the <a href="command-line-options.html#gamma">-gamma</a> operator. For example, <b>-gamma 2</b> is equivalent
cristy3ed852e2009-09-05 21:47:34 +00003144to <b>-evaluate pow 0.5</b>, i.e., a 'square root' function. The value used
cristy149d58c2013-08-07 19:44:54 +00003145with <a href="command-line-options.html#gamma">-gamma</a> is simply the reciprocal of the value used
cristy8ee7f242013-06-20 16:08:44 +00003146with <code>Pow</code>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003147
cristy8ee7f242013-06-20 16:08:44 +00003148<p><code>Cosine</code> and <code>Sine</code> was added as of IM v6.4.8-8 and
cristy3ed852e2009-09-05 21:47:34 +00003149converts the image values into a value according to a (co)sine wave function.
cristy8ee7f242013-06-20 16:08:44 +00003150The synonyms <code>Cos</code> and <code>Sin</code> may also be used. The output
cristy3ed852e2009-09-05 21:47:34 +00003151is biased 50% and normalized by 50% so as to fit in the respective color value
3152range. The <em class="arg">value</em> scaling of the <em>period</em> of the
3153function (its frequency), and thus determines the number of 'waves' that will
cristy149d58c2013-08-07 19:44:54 +00003154be generated over the input color range. For example, if the <em class="arg">value</em> is 1, the effective period is simply the <em class="QR">QuantumRange</em>; but if the <em class="arg">value</em> is 2,
3155then the effective period is the <em>half</em> the <em class="QR">QuantumRange</em>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003156
3157 <div style="text-align:center;">
cristy149d58c2013-08-07 19:44:54 +00003158 0.5 + 0.5 × cos(2 π <b><em>u</em></b> × <em class="arg">value</em>).
cristy3ed852e2009-09-05 21:47:34 +00003159 </div>
3160
cristy149d58c2013-08-07 19:44:54 +00003161<p>See also the <a href="command-line-options.html#function">-function</a> operator, which is a
cristydcca3fa2010-12-29 21:50:07 +00003162multi-value version of evaluate. </p>
cristy3ed852e2009-09-05 21:47:34 +00003163
cristy63fed272010-03-07 19:08:45 +00003164<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003165 <h4><a id="evaluate-sequence"></a>-evaluate-sequence <em class="arg">operator</em></h4>
cristy63fed272010-03-07 19:08:45 +00003166</div>
3167
cristy149d58c2013-08-07 19:44:54 +00003168<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
3169logical expression over a sequence of images.</td><td style="text-align:right;"></td></tr></table>
cristy751980d2012-06-03 23:18:35 +00003170
cristy149d58c2013-08-07 19:44:54 +00003171<p>To print a complete list of <a href="command-line-options.html#evaluate-sequence">-evaluate-sequence</a> operators, use <a href="command-line-options.html#list">-list evaluate</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003172
3173<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003174 <h4><a id="extent"></a>-extent <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003175</div>
3176
cristy149d58c2013-08-07 19:44:54 +00003177<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>
cristy3ed852e2009-09-05 21:47:34 +00003178
cristy751980d2012-06-03 23:18:35 +00003179<p>If the image is enlarged, unfilled areas are set to the background color.
3180To position the image, use offsets in the <em class="arg">geometry</em>
3181specification or precede with a <a href="command-line-options.html#gravity">-gravity</a> setting. To
cristy149d58c2013-08-07 19:44:54 +00003182specify how to compose the image with the background, use <a href="command-line-options.html#compose">-compose</a>.</p>
cristy751980d2012-06-03 23:18:35 +00003183
cristy549177c2010-11-11 13:51:21 +00003184<p>This command reduces or expands a JPEG image to fit on an 800x600
3185display. If the aspect ratio of the input image isn't exactly 4:3, then the
3186image is centered on an 800x600 black canvas: </p>
3187
cristy149d58c2013-08-07 19:44:54 +00003188<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert input.jpg -resize 800x600 -background black -compose Copy \ <br></br> -gravity center -extent 800x600 -quality 92 output.jpg</span></p>
cristy549177c2010-11-11 13:51:21 +00003189
cristy3ed852e2009-09-05 21:47:34 +00003190
cristy751980d2012-06-03 23:18:35 +00003191<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 +00003192
3193<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003194 <h4><a id="extract"></a>-extract <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003195</div>
3196
cristy149d58c2013-08-07 19:44:54 +00003197<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>
cristy3ed852e2009-09-05 21:47:34 +00003198
cristy751980d2012-06-03 23:18:35 +00003199<p>This option is most useful for extracting a subregion of a very large raw
3200image. Note that these two commands are equivalent:</p>
cristy3ed852e2009-09-05 21:47:34 +00003201
cristy149d58c2013-08-07 19:44:54 +00003202<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert -size 16000x16000 -depth 8 -extract 640x480+1280+960 \ <br></br> image.rgb image.png</span><span class="crtout"></span><span class="crtprompt"> $ </span><span class="crtin">convert -size 16000x16000 -depth 8 'image.rgb[640x480+1280+960]' \ <br></br> image.rgb image.png</span></p><p>If you omit the offsets, as in</p>
cristy3ed852e2009-09-05 21:47:34 +00003203
cristy149d58c2013-08-07 19:44:54 +00003204<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert -size 16000x16000 -depth 8 -extract 640x480 \ <br></br> image.rgb image.png</span></p>
cristyd0bd44a2010-09-24 12:38:11 +00003205<p>the image is <em>resized</em> to the specified dimensions instead,
cristy3ed852e2009-09-05 21:47:34 +00003206equivalent to:</p>
3207
cristy149d58c2013-08-07 19:44:54 +00003208<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 +00003209<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 +00003210
3211<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003212 <h4><a id="family"></a>-family <em class="arg">fontFamily</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003213</div>
3214
cristy149d58c2013-08-07 19:44:54 +00003215<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>
cristy3ed852e2009-09-05 21:47:34 +00003216
cristy751980d2012-06-03 23:18:35 +00003217<p>This setting suggests a font family that ImageMagick should try to use for
3218rendering text. If the family can be found it is used; if not, a default font
3219(e.g., "Arial") or a family known to be similar is substituted (e.g.,
3220"Courier" might be used if "System" is requested but not found). </p>
cristy3ed852e2009-09-05 21:47:34 +00003221
cristy149d58c2013-08-07 19:44:54 +00003222<p>For other settings that affect fonts, see the options <a href="command-line-options.html#font">-font</a>, <a href="command-line-options.html#stretch">-stretch</a>, <a href="command-line-options.html#style">-style</a>, and <a href="command-line-options.html#weight">-weight</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00003223
3224<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003225 <h4><a id="features"></a>-features <em class="arg">distance</em></h4>
cristy7396d882010-01-27 02:37:56 +00003226</div>
3227
cristy149d58c2013-08-07 19:44:54 +00003228<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">display (cooccurrence matrix) texture measure features for each channel in the image in each of four directions (horizontal, vertical, left and right diagonals) for the specified distance.</td><td style="text-align:right;">[<a href="identify.html">identify</a>]</td></tr></table>
cristy8ee7f242013-06-20 16:08:44 +00003229
3230<pre class="text">
3231 Angular Second Moment
3232 Contrast
3233 Correlation
3234 Sum of Squares Variance
3235 Inverse Difference Moment
3236 Sum Average
3237 Sum Variance
3238 Sum Entropy
3239 Entropy
3240 Difference Variance
3241 Difference Entropy
3242 Information Measure of Correlation 1
3243 Information Measure of Correlation 2
3244 Maximum Correlation Coefficient
3245</pre>
3246
cristy7396d882010-01-27 02:37:56 +00003247
3248<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003249 <h4><a id="fft"></a>-fft</h4>
cristy3ed852e2009-09-05 21:47:34 +00003250</div>
3251
cristy149d58c2013-08-07 19:44:54 +00003252<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>
cristy3ed852e2009-09-05 21:47:34 +00003253
cristy751980d2012-06-03 23:18:35 +00003254<p>This option is new as of ImageMagick 6.5.4-3 (and now working for Windows
3255users in ImageMagick 6.6.0-9). It transforms an image from the normal
3256(spatial) domain to the frequency domain. In the frequency domain, an image is
3257represented as a superposition of complex sinusoidal waves of varying
3258amplitudes. The image x and y coordinates are the possible frequencies along
3259the x and y directions, respectively, and the pixel intensity values are
3260complex numbers that correspond to the sinusoidal wave amplitudes. See for
3261example, <a href="http://en.wikipedia.org/wiki/Fourier_transform">Fourier
3262Transform</a>, <a href="http://en.wikipedia.org/wiki/DFT">Discrete Fourier
3263Transform</a> and <a href="http://en.wikipedia.org/wiki/FFT">Fast Fourier
3264Transform</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003265
cristy751980d2012-06-03 23:18:35 +00003266<p>A single image name is provided as output for this option. However, the
3267output result will have two components. It is either a two-frame image or two
3268separate images, depending upon whether the image format specified supports
3269multi-frame images. The reason that we get a dual output result is because the
3270frequency domain represents an image using complex numbers, which cannot be
3271visualized directly. Therefore, the complex values are automagically separated
3272into a two-component image representation. The first component is the
3273magnitude of the complex number and the second is the phase of the complex
cristy149d58c2013-08-07 19:44:54 +00003274number. See for example, <a href="http://en.wikipedia.org/wiki/Complex_numbers">Complex Numbers</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003275
cristy751980d2012-06-03 23:18:35 +00003276<p>The magnitude and phase component images must be specified using image
3277formats that do not limit the color or compress the image. Thus, MIFF, TIF,
3278PFM, EXR and PNG are the recommended image formats to use. All of these
3279formats, except PNG support multi-frame images. So for example,</p>
cristy3ed852e2009-09-05 21:47:34 +00003280
cristy149d58c2013-08-07 19:44:54 +00003281<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert image.png -fft fft_image.miff</span></p>
cristy8ee7f242013-06-20 16:08:44 +00003282<p>generates a magnitude image as <code>fft_image.miff[0]</code> and a phase
3283image as <code>fft_image.miff[1]</code>. Similarly,</p>
cristy3ed852e2009-09-05 21:47:34 +00003284
cristy149d58c2013-08-07 19:44:54 +00003285<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert image.png -fft fft_image.png</span></p>
cristy8ee7f242013-06-20 16:08:44 +00003286<p>generates a magnitude image as <code>fft_image-0.png</code> and a phase image
3287as <code>fft_image-1.png</code>. If you prefer this representation, then you can
cristy149d58c2013-08-07 19:44:54 +00003288force any of the other formats to produce two output images by including <a href="command-line-options.html#adjoin">+adjoin</a> following -fft in the command line.</p>
cristy3ed852e2009-09-05 21:47:34 +00003289
cristy751980d2012-06-03 23:18:35 +00003290<p>The input image can be any size, but if not square and even-dimensioned, it
3291is padded automagically to the larger of the width or height of the input
3292image and to an even number of pixels. The padding will occur at the bottom
3293and/or right sides of the input image. The resulting output magnitude and
cristy149d58c2013-08-07 19:44:54 +00003294phase images is square at this size. The kind of padding relies on the <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting.</p>
cristy3ed852e2009-09-05 21:47:34 +00003295
cristy751980d2012-06-03 23:18:35 +00003296<p>Both output components will have dynamic ranges that fit within
cristyac1b4322013-07-28 13:58:06 +00003297[0, <em class="QR">QuantumRange</em>], so that HDRI need not be enabled.
cristy149d58c2013-08-07 19:44:54 +00003298Phase values nominally range from 0 to 2*π, but is scaled to span the full
cristy751980d2012-06-03 23:18:35 +00003299dynamic range. (The first few releases had non-HDRI scaled but HDRI not
3300scaled). The magnitude image is not scaled and thus generally will contain
3301very small values. As such, the image normally will appear totally black. In
3302order to view any detail, the magnitude image typically is enhanced with a log
3303function into what is usually called the spectrum. A log function is used to
3304enhance the darker values more in comparison to the lighter values. This can
3305be done, for example, as follows:</p>
cristy3ed852e2009-09-05 21:47:34 +00003306
cristy149d58c2013-08-07 19:44:54 +00003307<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert fft_image.miff[0] -contrast-stretch 0 \ <br></br>
cristy3ed852e2009-09-05 21:47:34 +00003308 -evaluate log 1000 fft_image_spectrum.png</span></p>
cristy149d58c2013-08-07 19:44:54 +00003309<p>where either <a href="command-line-options.html#contrast-stretch">-contrast-stretch</a> 0 or <a href="command-line-options.html#auto-level">-auto-level</a> is used to scale the image to full dynamic
cristy751980d2012-06-03 23:18:35 +00003310range, first. The argument to the <a href="command-line-options.html#evaluate">-evaluate</a> log
3311typically is specified between 100 and 10,000, depending upon the amount of
3312detail that one wants to bring out in the spectrum. Larger values produce more
3313visible detail. Too much detail, however, may hide the important features.</p>
cristy3ed852e2009-09-05 21:47:34 +00003314
cristy751980d2012-06-03 23:18:35 +00003315<p>The <a href="http://www.fftw.org/">FFTW</a> delegate library is required to
3316use <a href="command-line-options.html#fft">-fft</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003317
cristy751980d2012-06-03 23:18:35 +00003318<p>Use <a href="command-line-options.html#fft">+fft</a> to produce two output images that are the real
3319and imaginary components of the complex valued Fourier transform.</p>
cristy3ed852e2009-09-05 21:47:34 +00003320
cristy751980d2012-06-03 23:18:35 +00003321<p>However, as the real and imaginary components can contain negative values,
3322this requires that IM be configured with HDRI enabled. In this case, you must
3323use either MIFF, TIF, PFM or MPC formats for the real and imaginary component
3324results, since they are formats that preserve both negative and fractional
3325values without clipping them or truncating the fractional part. With either
3326MIFF or TIF, one should add -define quantum:format=32, to allow those image
cristyeed6cb62012-01-28 19:38:34 +00003327types to work properly in HDRI mode without clipping.</p>
cristy3ed852e2009-09-05 21:47:34 +00003328
cristy149d58c2013-08-07 19:44:54 +00003329<p>The real and imaginary component images resulting from <a href="command-line-options.html#fft">+fft</a> are also square, even dimensioned images due to the same
cristy751980d2012-06-03 23:18:35 +00003330padding that was discussed above for the magnitude and phase component
3331images.</p>
cristy3ed852e2009-09-05 21:47:34 +00003332
cristy149d58c2013-08-07 19:44:54 +00003333<p>See the discussion on HDRI implementations of ImageMagick on the page <a href="high-dynamic-range.html">High Dynamic-Range Images</a>. For more
3334about HDRI go the ImageMagick <a href="http://www.imagemagick.org/Usage/basics/#hdri">Usage</a> pages, <a href="http://www.fmwconcepts.com/imagemagick/fourier_transforms/fourier.html">Fred's Fourier Processing With ImageMagick page</a> or this <a href="http://en.wikipedia.org/wiki/High_dynamic_range_imaging">Wikipedia</a>
cristy751980d2012-06-03 23:18:35 +00003335 entry. </p>
cristy3ed852e2009-09-05 21:47:34 +00003336
3337
3338<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003339 <h4><a id="fill"></a>-fill <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003340</div>
3341
cristy149d58c2013-08-07 19:44:54 +00003342<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>
cristy3ed852e2009-09-05 21:47:34 +00003343
cristy751980d2012-06-03 23:18:35 +00003344<p>This option accepts a color name, a hex color, or a numerical RGB, RGBA,
cristy149d58c2013-08-07 19:44:54 +00003345HSL, HSLA, CMYK, or CMYKA specification. See <a href="color.html">Color Names</a> for
cristy751980d2012-06-03 23:18:35 +00003346a description of how to properly specify the color argument.</p>
cristy3ed852e2009-09-05 21:47:34 +00003347
cristy751980d2012-06-03 23:18:35 +00003348<p>Enclose the color specification in quotation marks to prevent the "#" or
3349the parentheses from being interpreted by your shell.</p>
cristy3ed852e2009-09-05 21:47:34 +00003350
3351<p>For example,</p>
3352
3353<p class="crtsnip">
3354 -fill blue
3355</p>
3356<p class="crtsnip">
3357 -fill "#ddddff"
3358</p>
3359<p class="crtsnip">
3360 -fill "rgb(255,255,255)"
3361</p>
3362
cristy751980d2012-06-03 23:18:35 +00003363<p>See <a href="command-line-options.html#draw">-draw</a> for further details.</p>
cristy3ed852e2009-09-05 21:47:34 +00003364
cristy751980d2012-06-03 23:18:35 +00003365<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 +00003366
3367<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003368 <h4><a id="filter"></a>-filter <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003369</div>
3370
cristy149d58c2013-08-07 19:44:54 +00003371<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
3372distorting an image.</td><td style="text-align:right;"></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00003373
cristyd0bda5e2010-09-21 16:22:45 +00003374<p>Use this option to affect the resizing operation of an image during
cristy149d58c2013-08-07 19:44:54 +00003375operations such as <a href="command-line-options.html#resize">-resize</a> and <a href="command-line-options.html#distort">-distort</a>. For example you can use a simple resize filter such as:</p>
cristy3ed852e2009-09-05 21:47:34 +00003376
3377<pre class="text">
3378 Point Hermite Cubic
3379 Box Gaussian Catrom
3380 Triangle Quadratic Mitchell
3381</pre>
3382
cristy8ee7f242013-06-20 16:08:44 +00003383<p>The <code>Bessel</code> and <code>Sinc</code> filter is also provided (as well
3384as a faster <code>SincFast</code> equivalent form). However these filters are
cristyd0bd44a2010-09-24 12:38:11 +00003385generally useless on their own as they are infinite filters that are being
3386clipped to the filters support size. Their direct use is not recommended
3387except via expert settings (see below). </p>
cristyd0bda5e2010-09-21 16:22:45 +00003388
cristydcca3fa2010-12-29 21:50:07 +00003389<p>Instead these special filter functions are typically windowed by a windowing
cristy149d58c2013-08-07 19:44:54 +00003390function that the <a href="command-line-options.html#filter">-filter</a> setting defines. That is
cristyd0bda5e2010-09-21 16:22:45 +00003391using these functions will define a 'Windowed' filter, appropriate to the
3392operator involved. Windowed filters include: </p>
cristy3ed852e2009-09-05 21:47:34 +00003393
3394<pre class="text">
3395 Lanczos Hamming Parzen
3396 Blackman Kaiser Welsh
3397 Hanning Bartlett Bohman
3398</pre>
3399
3400<p>Also one special self-windowing filter is also provided
cristy8ee7f242013-06-20 16:08:44 +00003401<code>Lagrange</code>, which will automagically re-adjust its function depending
cristy3ed852e2009-09-05 21:47:34 +00003402on the current 'support' or 'lobes' expert settings (see below).</p>
3403
cristyd0bda5e2010-09-21 16:22:45 +00003404<p>If you do not select a filter with this option, the filter defaults to
cristy8ee7f242013-06-20 16:08:44 +00003405<code>Mitchell</code> for a colormapped image, an image with a matte channel, or
cristyd0bda5e2010-09-21 16:22:45 +00003406if the image is enlarged. Otherwise the filter default to
cristy8ee7f242013-06-20 16:08:44 +00003407<code>Lanczos</code>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003408
cristy751980d2012-06-03 23:18:35 +00003409<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 +00003410filter</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00003411
3412<p>You can modify how the filter behaves as it scales your image through the
cristy149d58c2013-08-07 19:44:54 +00003413use of these expert settings (see also <a href="command-line-options.html#define">-define</a> and <a href="command-line-options.html#set">-set</a>):-</p>
cristy3ed852e2009-09-05 21:47:34 +00003414
3415<dl class="doc">
cristyd0bda5e2010-09-21 16:22:45 +00003416<dt>-define filter:blur=<em>factor</em></dt>
cristy3ed852e2009-09-05 21:47:34 +00003417<dd>Scale the X axis of the filter (and its window). Use &gt; 1.0 for
cristyd0bda5e2010-09-21 16:22:45 +00003418 blurry or &lt; 1.0 for sharp. This should only be used with Gaussian and
3419 Gaussian-like filters simple filters, or you may not get the expected
3420 results. </dd>
cristy3ed852e2009-09-05 21:47:34 +00003421
cristyd0bda5e2010-09-21 16:22:45 +00003422<dt>-define filter:support=<em>radius</em></dt>
3423<dd>Set the filter support radius. Defines how large the filter should be and
3424 thus directly defines how slow the filtered resampling process is. All
3425 filters have a default 'prefered' support size. Some filters like
cristy8ee7f242013-06-20 16:08:44 +00003426 <code>Lagrange</code> and windowed filters adjust themselves depending on
cristyd0bda5e2010-09-21 16:22:45 +00003427 this value. With simple filters this value either does nothing (but slow
3428 the resampling), or will clip the filter function in a detrimental way.
3429 </dd>
cristy3ed852e2009-09-05 21:47:34 +00003430
cristyd0bda5e2010-09-21 16:22:45 +00003431<dt>-define filter:lobes=<em>count</em></dt>
cristy3ed852e2009-09-05 21:47:34 +00003432<dd>Set the number of lobes to use for the Sinc/Bessel filter. This an
cristyd0bda5e2010-09-21 16:22:45 +00003433 alternative way of specifying the 'support' range of the filter, that is
3434 designed to be more suited to windowed filters, especially when used for
3435 image distorts.</dd>
cristy3ed852e2009-09-05 21:47:34 +00003436
cristy751980d2012-06-03 23:18:35 +00003437<dt>-define filter:sigma=<em>value</em></dt>
cristy8ee7f242013-06-20 16:08:44 +00003438<dd>The 'sigma' value used to define the <code>Gaussian</code> filter. Default
3439 sigma value is '<code>0.5</code>'. It only effects <code>Gaussian</code> but
cristy751980d2012-06-03 23:18:35 +00003440 does not shrink (but may enlarge) the filter's 'support'. It can be used
3441 to generate very small blurs but without the filter 'missing' pixels due
cristy8ee7f242013-06-20 16:08:44 +00003442 to using a small support setting. A larger value of '<code>0.707</code>'
cristy751980d2012-06-03 23:18:35 +00003443 (a value of '1/sqrt(2)') is another common setting. </dd>
3444
cristyd0bda5e2010-09-21 16:22:45 +00003445<dt>-define filter:b=<em>b-spline_factor</em></dt>
3446<dt>-define filter:c=<em>keys_alpha_factor</em></dt>
cristy8ee7f242013-06-20 16:08:44 +00003447<dd>Redefine the values used for cubic filters such as <code>Cubic</code>,
3448 <code>Catrom</code>, <code>Mitchel</code>, and <code>Hermite</code>, as well as
3449 the <code>Parzen</code> cubic windowing function. If only one of the values
cristy751980d2012-06-03 23:18:35 +00003450 are defined, the other is set so as to generate a 'Cubic-Keys' filter.
3451 The values meaning was defined by a research paper by
cristydcca3fa2010-12-29 21:50:07 +00003452 Mitchell-Netravali.</dd>
cristy3ed852e2009-09-05 21:47:34 +00003453
cristy751980d2012-06-03 23:18:35 +00003454<dt>-define filter:kaiser-beta=<em>value</em></dt>
3455<dd>The 'alpha' value used to as part of the Kaiser Windowing function.
3456 Default value is '6.5'. It only effects Kaiser windowing function, and
3457 does not effect any other attributes.</dd>
3458
3459<dd>Before IM v6.7.6-10, this option was known as "filter:alpha", (an
3460 inheritance from the very old "zoom" program). It was changed to bring the
3461 function in line with more modern academic research usage, and better
3462 assign it be more definitive. </dd>
3463
3464<dt>-define filter:kaiser-alpha=<em>value</em></dt>
3465<dd>This value when multiplied by 'PI' is equivelent to "kaiser-beta", and
3466 will override that setting. It only effects Kaiser windowing function,
3467 and does not effect any other attributes. </dd>
3468
cristyd0bda5e2010-09-21 16:22:45 +00003469<dt>-define filter:filter=<em>filter_function</em></dt>
cristy751980d2012-06-03 23:18:35 +00003470<dd>Use this function directly as the weighting filter. This will allow
cristy8ee7f242013-06-20 16:08:44 +00003471 you to directly use a windowing function such as <code>Blackman</code>,
cristy751980d2012-06-03 23:18:35 +00003472 as a resampling filter, rather than as its normal usage as a windowing
3473 function. </dd>
3474
3475<dd>If defined, no windowing function also defined, the window function is set
cristy8ee7f242013-06-20 16:08:44 +00003476 to <code>Box</code>). Directly specifying <code>Sinc</code> or <code>Jinc</code>
cristy751980d2012-06-03 23:18:35 +00003477 as a filter will also do this. </dd>
cristy3ed852e2009-09-05 21:47:34 +00003478
cristyd0bda5e2010-09-21 16:22:45 +00003479<dt>-define filter:window=<em>filter_function</em></dt>
cristy8ee7f242013-06-20 16:08:44 +00003480<dd>The IIR (infinite impulse response) filters <code>Sinc</code> and
3481 <code>Jinc</code> are windowed (brought down to zero over the defined
cristyd0bda5e2010-09-21 16:22:45 +00003482 support range) with the given filter. This allows you to specify a filter
cristy751980d2012-06-03 23:18:35 +00003483 function to be used as a windowing function for these IIR filters. </dd>
3484
3485<dd>Many of the defined filters are actually windowing functions for these IIR
cristy8ee7f242013-06-20 16:08:44 +00003486 filters. A typical choices is <code>Box</code>, (which effectively turns
cristy751980d2012-06-03 23:18:35 +00003487 off the windowing function). </dd>
cristyd0bda5e2010-09-21 16:22:45 +00003488
cristy8ee7f242013-06-20 16:08:44 +00003489<dt>-define filter:win-support=<em>radius</em></dt>
3490<dd>Scale windowing function to this size instead. This causes the windowing
3491 (or self-windowing Lagrange filter) to act is if the support window is
3492 larger than what is actually supplied to the calling operator. The filter
3493 however is still clipped to the real support size given. If unset this
3494 will equal the normal filter support size. </dd>
3495
cristyd0bda5e2010-09-21 16:22:45 +00003496<dt>-define filter:verbose=<em>1</em></dt>
3497<dd>This causes IM to print information on the final internal filter
3498 selection to standard output. This includes a commented header on the
3499 filter settings being used, and data allowing the filter weights to be
3500 easily graphed. </dd>
3501
3502<dd>Note however that some filters are internally defined in terms of other
cristy8ee7f242013-06-20 16:08:44 +00003503 filters. The <code>Lanczos</code> filter for example is defined in terms of
3504 a <code>SincFast</code> windowed <code>SincFast</code> filter, while
3505 <code>Mitchell</code> is defined as a general <code>Cubic</code> family filter
3506 with specific 'B' and 'C' settings. </dd>
cristy3ed852e2009-09-05 21:47:34 +00003507
3508</dl>
3509
cristy8ee7f242013-06-20 16:08:44 +00003510<p>For example, to get a 8 lobe jinc windowed sinc filter (Genseng filter?):</p>
cristy3ed852e2009-09-05 21:47:34 +00003511
cristy149d58c2013-08-07 19:44:54 +00003512<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert image.png \<br></br>
3513 -filter sinc \<br></br>
3514 -set filter:window=jinc \<br></br>
3515 -set filter:lobes=8 \<br></br>
cristy3ed852e2009-09-05 21:47:34 +00003516 -resize 150% image.jpg</span></p>
3517<p>Or a raw un-windowed Sinc filter with 4 lobes:</p>
3518
cristy149d58c2013-08-07 19:44:54 +00003519<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert image.png \<br></br>
3520 -set filter:filter=sinc \<br></br>
3521 -set filter:lobes=4 \<br></br>
cristy3ed852e2009-09-05 21:47:34 +00003522 -resize 150% image.jpg</span></p>
cristy751980d2012-06-03 23:18:35 +00003523<p>To extract the data for a raw windowing function, combine it with
cristy8ee7f242013-06-20 16:08:44 +00003524a '<code>Box</code>' filter. For example the '<code>Welch</code> parabolic
cristy751980d2012-06-03 23:18:35 +00003525windowing function. </p>
3526
cristy149d58c2013-08-07 19:44:54 +00003527<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert null: -define filter:filter=Box \<br></br>
3528 -define filter:window=Welch \<br></br>
3529 -define filter:support=1.0 \<br></br>
3530 -define filter:verbose=1 \<br></br>
3531 -resize 2 null: &gt; window_welch.dat<br></br>
3532 gnuplot<br></br>
3533 set grid<br></br>
cristy8ee7f242013-06-20 16:08:44 +00003534 plot "window_welch.dat" with lines</span></p>
cristy751980d2012-06-03 23:18:35 +00003535<p>Note that the use of expert options is provided for image processing experts
3536who have studied and understand how resize filters work. Without this
3537knowledge, and an understanding of the definition of the actual filters
3538involved, using expert settings are more likely to be detrimental to your image
3539resizing.</p>
cristy3ed852e2009-09-05 21:47:34 +00003540
3541
3542<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003543 <h4><a id="flatten"></a>-flatten</h4>
cristy3ed852e2009-09-05 21:47:34 +00003544</div>
3545
cristy149d58c2013-08-07 19:44:54 +00003546<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 +00003547
3548
3549<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003550 <h4><a id="flip"></a>-flip</h4>
cristy3ed852e2009-09-05 21:47:34 +00003551</div>
3552
cristy149d58c2013-08-07 19:44:54 +00003553<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>
cristy3ed852e2009-09-05 21:47:34 +00003554
cristy2dcd6822011-06-13 16:21:20 +00003555<p>reflect the scanlines in the vertical direction. The image will be mirrored
3556upside-down. </p>
3557
cristy3ed852e2009-09-05 21:47:34 +00003558
3559<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003560 <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 +00003561</div>
3562
cristy149d58c2013-08-07 19:44:54 +00003563<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>
cristy2dcd6822011-06-13 16:21:20 +00003564
3565<p>Flood fill starts from the given 'seed point' which is not gravity effected.
cristy149d58c2013-08-07 19:44:54 +00003566Any color that matches within <a href="command-line-options.html#fuzz">-fuzz</a> color distance of the
cristy2dcd6822011-06-13 16:21:20 +00003567given <em class="arg">color</em> argument, connected to that 'seed point'
cristy149d58c2013-08-07 19:44:54 +00003568will be replaced with the current <a href="command-line-options.html#fill">-fill</a> color. </p>
cristy2dcd6822011-06-13 16:21:20 +00003569
3570<p>Note that if the pixel at the 'seed point' does not itself match the given
cristy149d58c2013-08-07 19:44:54 +00003571<em class="arg">color</em> (according to <a href="command-line-options.html#fuzz">-fuzz</a>), then no
cristy2dcd6822011-06-13 16:21:20 +00003572action will be taken. </p>
3573
cristy149d58c2013-08-07 19:44:54 +00003574<p>This operator works more like the <a href="command-line-options.html#opaque">-opaque</a> option, than
cristy751980d2012-06-03 23:18:35 +00003575a more general flood fill that reads the matching color directly at the 'seed
cristy149d58c2013-08-07 19:44:54 +00003576point'. For this form of flood fill, look at <a href="command-line-options.html#draw">-draw</a> and
cristy751980d2012-06-03 23:18:35 +00003577its 'color floodfill' drawing method. </p>
cristy2dcd6822011-06-13 16:21:20 +00003578
cristy3ed852e2009-09-05 21:47:34 +00003579
3580<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003581 <h4><a id="flop"></a>-flop</h4>
cristy3ed852e2009-09-05 21:47:34 +00003582</div>
3583
cristy149d58c2013-08-07 19:44:54 +00003584<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>
cristy3ed852e2009-09-05 21:47:34 +00003585
cristy2dcd6822011-06-13 16:21:20 +00003586<p>Reflect the scanlines in the horizontal direction, just like the image in
3587a vertical mirror. </p>
cristy3ed852e2009-09-05 21:47:34 +00003588
3589
3590<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003591 <h4><a id="font"></a>-font <em class="arg">name</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003592</div>
3593
cristy149d58c2013-08-07 19:44:54 +00003594<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>
cristy3ed852e2009-09-05 21:47:34 +00003595
cristy751980d2012-06-03 23:18:35 +00003596<p>To print a complete list of fonts, use the <a href="command-line-options.html#list">-list font</a>
3597option (for versions prior to 6.3.6, use 'type' instead of 'font').</p>
cristy3ed852e2009-09-05 21:47:34 +00003598
3599<p>In addition to the fonts specified by the above pre-defined list, you can
cristy8ee7f242013-06-20 16:08:44 +00003600also specify a font from a specific source. For example <code>Arial.ttf</code>
3601is a TrueType font file, <code>ps:helvetica</code> is PostScript font, and
3602<code>x:fixed</code> is X11 font.</p>
cristy3ed852e2009-09-05 21:47:34 +00003603
cristy149d58c2013-08-07 19:44:54 +00003604<p>For other settings that affect fonts, see the options <a href="command-line-options.html#family">-family</a>, <a href="command-line-options.html#stretch">-stretch</a>, <a href="command-line-options.html#style">-style</a>, and <a href="command-line-options.html#weight">-weight</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00003605
3606
3607<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003608 <h4><a id="foreground"></a>-foreground <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003609</div>
3610
cristy149d58c2013-08-07 19:44:54 +00003611<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 +00003612
cristy149d58c2013-08-07 19:44:54 +00003613<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 +00003614
3615<p>The default foreground color is black.</p>
3616
3617<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003618 <h4><a id="format"></a>-format <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003619</div>
3620
cristy149d58c2013-08-07 19:44:54 +00003621<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>
cristy3ed852e2009-09-05 21:47:34 +00003622
cristy8ee7f242013-06-20 16:08:44 +00003623<p>When used with the <code>mogrify</code> utility, this option converts any
cristy751980d2012-06-03 23:18:35 +00003624image to the image <a href="formats.html">format</a> you specify.
cristy149d58c2013-08-07 19:44:54 +00003625For a list of image format types supported by ImageMagick, use <a href="command-line-options.html#list">-list format</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003626
cristy751980d2012-06-03 23:18:35 +00003627<p>By default the file is written to its original name. However, if the
3628filename extension matches a supported format, the extension is replaced with
3629the image format type specified with <a href="command-line-options.html#format">-format</a>. For
3630example, if you specify <em class="arg">tiff</em> as the format type and the
3631input image filename is <em class="arg">image.gif</em>, the output image
3632filename becomes <em class="arg">image.tiff</em>.</p>
cristy3ed852e2009-09-05 21:47:34 +00003633
3634<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003635 <h4><a id="format_identify_"></a>-format <em class="arg">string</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003636</div>
3637
cristy149d58c2013-08-07 19:44:54 +00003638<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 +00003639
cristy751980d2012-06-03 23:18:35 +00003640<p>See <a href="escape.html">Format and Print Image
3641Properties</a> for an explanation on how to specify the argument to this
3642option.</p>
cristy3ed852e2009-09-05 21:47:34 +00003643
3644<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003645 <h4><a id="frame"></a>-frame <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003646</div>
3647
cristy149d58c2013-08-07 19:44:54 +00003648<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>
cristy3ed852e2009-09-05 21:47:34 +00003649
cristy149d58c2013-08-07 19:44:54 +00003650<p>The color of the border is specified with the <a href="command-line-options.html#mattecolor">-mattecolor</a> command line option. </p>
cristy3ed852e2009-09-05 21:47:34 +00003651
cristy149d58c2013-08-07 19:44:54 +00003652<p>See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument. The <em class="arg">size</em> portion of the <em class="arg">geometry</em> argument indicates the amount of extra width and
cristybc9539a2010-08-16 18:06:20 +00003653height that is added to the dimensions of the image. If no offsets are given
3654in the <em class="arg">geometry</em> argument, then the border added is
3655a solid color. Offsets <em>x</em> and <em>y</em>, if present, specify that
3656the width and height of the border is partitioned to form an outer bevel of
cristyac1b4322013-07-28 13:58:06 +00003657thickness <em>x</em> pixels and an inner bevel of thickness
3658<em>y</em> pixels. Negative offsets make no sense as frame arguments.
cristybc9539a2010-08-16 18:06:20 +00003659</p>
3660
cristy149d58c2013-08-07 19:44:54 +00003661<p>The <a href="command-line-options.html#frame">-frame</a> option is affected by the current <a href="command-line-options.html#compose">-compose</a> setting and assumes that this is using the default
cristy8ee7f242013-06-20 16:08:44 +00003662'<code>Over</code>' composition method. It generates an image of the appropriate
cristy751980d2012-06-03 23:18:35 +00003663size with the current <a href="command-line-options.html#bordercolor">-bordercolor</a> setting, and then
cristy149d58c2013-08-07 19:44:54 +00003664draws the frame of four distinct colors close to the current <a href="command-line-options.html#mattecolor">-mattecolor</a>. The original image is then overlaid onto
cristybc9539a2010-08-16 18:06:20 +00003665center of this image. This means that with the default compose method of
cristy149d58c2013-08-07 19:44:54 +00003666'<code>Over</code>' any transparent parts may be replaced by the current <a href="command-line-options.html#bordercolor">-bordercolor</a> setting.</p>
cristybc9539a2010-08-16 18:06:20 +00003667
3668<p>The image composition is not
cristy751980d2012-06-03 23:18:35 +00003669affected by the <a href="command-line-options.html#gravity">-gravity</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00003670
3671
3672<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003673 <h4><a id="frame_import_"></a>-frame</h4>
cristy3ed852e2009-09-05 21:47:34 +00003674</div>
3675
cristy149d58c2013-08-07 19:44:54 +00003676<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 +00003677
3678<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003679 <h4><a id="function"></a>-function <em class="arg">function</em> <em class="arg">parameters</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003680</div>
3681
cristy149d58c2013-08-07 19:44:54 +00003682<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>
cristy3ed852e2009-09-05 21:47:34 +00003683
cristy751980d2012-06-03 23:18:35 +00003684<p>This operator performs calculations based on the given arguments to modify
cristy149d58c2013-08-07 19:44:54 +00003685each of the color values for each previously set <a href="command-line-options.html#channel">-channel</a> in the image. See <a href="command-line-options.html#evaluate">-evaluate</a> for details concerning how the results of the
cristy751980d2012-06-03 23:18:35 +00003686calculations are handled.</p>
cristy3ed852e2009-09-05 21:47:34 +00003687
cristy149d58c2013-08-07 19:44:54 +00003688<p>This is can be considered a multi-argument version of the <a href="command-line-options.html#evaluate">-evaluate</a> operator. (Added in
3689ImageMagick 6.4.8−8.)</p>
cristy3ed852e2009-09-05 21:47:34 +00003690
cristy751980d2012-06-03 23:18:35 +00003691<p>Here, <em class="arg">parameters</em> is a comma-separated list of
cristy149d58c2013-08-07 19:44:54 +00003692numerical values. The number of values varies depending on which <em class="arg">function</em> is selected. Choose the <em class="arg">function</em> from:</p>
cristy3ed852e2009-09-05 21:47:34 +00003693
3694<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00003695 Polynomial
3696 Sinusoid
3697 Arcsin
3698 Arctan
cristy3ed852e2009-09-05 21:47:34 +00003699</pre>
3700
cristy751980d2012-06-03 23:18:35 +00003701<p>To print a complete list of <a href="command-line-options.html#function">-function</a> operators,
3702use <a href="command-line-options.html#list">-list function</a>. Descriptions follow.</p>
cristy3ed852e2009-09-05 21:47:34 +00003703
3704<dl class="doc">
cristy8ee7f242013-06-20 16:08:44 +00003705<dt><code>Polynomial</code></dt>
cristy3ed852e2009-09-05 21:47:34 +00003706<dd>
cristy751980d2012-06-03 23:18:35 +00003707
cristy8ee7f242013-06-20 16:08:44 +00003708<p>The <code>Polynomial</code> function takes an arbitrary number of parameters,
cristy751980d2012-06-03 23:18:35 +00003709these being the coefficients of a polynomial, in decreasing order of degree.
3710That is, entering</p>
cristy3ed852e2009-09-05 21:47:34 +00003711
3712<div style="text-align: center">
3713 -function Polynomial <em>a</em><sub><em>n</em></sub>,<em>a</em><sub><em>n</em>-1</sub>,...<em>a</em><sub>1</sub>,<em>a</em><sub>0</sub>
3714</div>
3715
3716<p>will invoke a polynomial function given by</p>
3717
3718<div style="text-align: center">
3719 <em>a</em><sub><em>n</em></sub> <b><em>u</em></b><sup><em>n</em></sup> +
3720 <em>a</em><sub><em>n</em>-1</sub> <b><em>u</em></b><sup><em>n</em>-1</sup> +
cristyc9064b02013-07-28 14:00:52 +00003721 ··· <em>a</em><sub>1</sub> <b><em>u</em></b> + <em>a</em><sub>0</sub>,
cristy3ed852e2009-09-05 21:47:34 +00003722</div>
3723
3724<p>where <b><em>u</em></b> is pixel's original normalized channel value.</p>
3725
cristy8ee7f242013-06-20 16:08:44 +00003726<p>The <code>Polynomial</code> function can be used in place of <code>Set</code>
3727(the <em>constant</em> polynomial) and <code>Add</code>, <code>Divide</code>,
3728<code>Multiply</code>, and <code>Subtract</code> (some <em>linear</em>
cristy149d58c2013-08-07 19:44:54 +00003729polynomials) of the <a href="command-line-options.html#evaluate">-evaluate</a> operator. The <a href="command-line-options.html#level">-level</a> operator also affects channels linearly. Some
cristy751980d2012-06-03 23:18:35 +00003730correspondences follow.</p>
cristy3ed852e2009-09-05 21:47:34 +00003731
3732<table class="doc">
cristy149d58c2013-08-07 19:44:54 +00003733 <col width="35%"></col>
3734 <col width="35%"></col>
3735 <col width="30%"></col>
cristy3ed852e2009-09-05 21:47:34 +00003736 <tr>
3737 <td>-evaluate Set <em class="arg">value</em> </td>
3738 <td>-function Polynomial <em class="arg">value</em></td>
cristy149d58c2013-08-07 19:44:54 +00003739 <td>(Constant functions; set <em class="arg">value</em>×100% gray when channels are RGB.)</td>
cristy3ed852e2009-09-05 21:47:34 +00003740 </tr>
3741 <tr>
3742 <td>-evaluate Add <em class="arg">value</em> </td>
3743 <td>-function Polynomial 1,<em class="arg">value</em></td>
3744 </tr>
3745 <tr>
3746 <td>-evaluate Subtract <em class="arg">value</em> </td>
cristy149d58c2013-08-07 19:44:54 +00003747 <td>-function Polynomial 1,−<em class="arg">value</em></td>
cristy3ed852e2009-09-05 21:47:34 +00003748 </tr>
3749 <tr>
3750 <td>-evaluate Multiply <em class="arg">value</em> </td>
3751 <td>-function Polynomial <em class="arg">value</em>,0</td>
3752 </tr>
3753 <tr>
3754 <td>+level black% x white%</td>
3755 <td>-function Polynomial A,B</td>
3756 <td>(Reduce contrast. Here, A=(white-black)/100 and B=black/100.)</td>
3757 </tr>
3758</table>
3759
cristy8ee7f242013-06-20 16:08:44 +00003760<p>The <code>Polynomial</code> function gives great versatility, since
cristy751980d2012-06-03 23:18:35 +00003761polynomials can be used to fit any continuous curve to any degree of accuracy
3762desired.</p>
3763
cristy3ed852e2009-09-05 21:47:34 +00003764</dd>
3765
cristy8ee7f242013-06-20 16:08:44 +00003766<dt><code>Sinusoid</code></dt>
cristy3ed852e2009-09-05 21:47:34 +00003767<dd>
cristy8ee7f242013-06-20 16:08:44 +00003768<p>The <code>Sinusoid</code> function can be used to vary the channel values
cristy751980d2012-06-03 23:18:35 +00003769sinusoidally by setting frequency, phase shift, amplitude, and a bias. These
3770values are given as one to four parameters, as follows,</p>
cristy3ed852e2009-09-05 21:47:34 +00003771
3772<div style="text-align: center">
cristy8ee7f242013-06-20 16:08:44 +00003773 -function <code>Sinusoid</code> <em class="arg">freq</em>,[<em class="arg">phase</em>,[<em class="arg">amp</em>,[<em class="arg">bias</em>]]]
cristy3ed852e2009-09-05 21:47:34 +00003774</div>
3775
cristy751980d2012-06-03 23:18:35 +00003776<p>where <em>phase</em> is in degrees. (The domain [0,1] of the function
cristy149d58c2013-08-07 19:44:54 +00003777corresponds to 0 through <em class="arg">freq</em>×360 degrees.)
cristy751980d2012-06-03 23:18:35 +00003778The result is that if a pixel's normalized channel value is originally
3779<b><em>u</em></b>, its resulting normalized value is given by </p>
cristy3ed852e2009-09-05 21:47:34 +00003780
3781<div style="text-align: center">
cristy149d58c2013-08-07 19:44:54 +00003782<em class="arg">amp</em> * sin(2*π* (<em class="arg">freq</em> * <b><em>u</em></b> + <em class="arg">phase</em> / 360)) + <em class="arg">bias</em>
cristy3ed852e2009-09-05 21:47:34 +00003783</div>
3784
cristy751980d2012-06-03 23:18:35 +00003785<p> For example, the following generates a curve that starts and ends at 0.9
3786(when <b><em>u</em></b>=0 and 1, resp.), oscillating three times between
cristy149d58c2013-08-07 19:44:54 +00003787.7−.2=.5 and .7+.2=.9. </p>
cristy3ed852e2009-09-05 21:47:34 +00003788
3789<p class="crtsnip">
3790 -function Sinusoid 3,-90,.2,.7
3791</p>
3792
cristy149d58c2013-08-07 19:44:54 +00003793<p>The default values of <em class="arg">amp</em> and <em class="arg">bias</em> are both .5. The default for <em class="arg">phase</em>
cristy751980d2012-06-03 23:18:35 +00003794is 0.</p>
cristy3ed852e2009-09-05 21:47:34 +00003795
cristy8ee7f242013-06-20 16:08:44 +00003796<p>The <code>Sinusoid</code> function generalizes <code>Sin</code> and
3797<code>Cos</code> of the <a href="command-line-options.html#evaluate">-evaluate</a> operator by allowing
cristy751980d2012-06-03 23:18:35 +00003798varying amplitude, phase and bias. The correspondence is as follows.</p>
cristy3ed852e2009-09-05 21:47:34 +00003799
3800<table class="doc">
3801 <tr>
3802 <td>-evaluate Sin <em class="arg">freq</em> </td>
3803 <td>-function Sinusoid <em class="arg">freq</em>,0 </td>
3804 </tr>
3805 <tr>
3806 <td>-evaluate Cos <em class="arg">freq</em> </td>
3807 <td>-function Sinusoid <em class="arg">freq</em>,90 </td>
3808 </tr>
3809</table>
3810</dd>
3811
cristy8ee7f242013-06-20 16:08:44 +00003812<dt><code>ArcSin</code></dt>
cristy3ed852e2009-09-05 21:47:34 +00003813<dd>
cristy8ee7f242013-06-20 16:08:44 +00003814<p>The <code>ArcSin</code> function generates the inverse curve of a Sinusoid,
cristy3ed852e2009-09-05 21:47:34 +00003815and can be used to generate cylindrical distortion and displacement maps.
3816The curve can be adjusted relative to both the input values and output range
cristydcca3fa2010-12-29 21:50:07 +00003817of values.</p>
cristy3ed852e2009-09-05 21:47:34 +00003818
cristydcca3fa2010-12-29 21:50:07 +00003819<p style="text-align: center">
cristy8ee7f242013-06-20 16:08:44 +00003820 -function <code>ArcSin</code> <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 +00003821</p>
cristy3ed852e2009-09-05 21:47:34 +00003822
cristyeed6cb62012-01-28 19:38:34 +00003823<p>with all values given in terms of normalized color values (0.0 for black,
cristy3ed852e2009-09-05 21:47:34 +000038241.0 for white). Defaulting to values covering the full range from 0.0 to 1.0
cristy149d58c2013-08-07 19:44:54 +00003825for bout input (<em class="arg">width</em>), and output (<em class="arg">width</em>) values. '<code>1.0,0.5,1.0,0.5</code>' </p>
cristy3ed852e2009-09-05 21:47:34 +00003826
cristydcca3fa2010-12-29 21:50:07 +00003827<p style="text-align: center">
cristy149d58c2013-08-07 19:44:54 +00003828<em class="arg">range</em>/π * asin( 2/<em class="arg">width</em> * ( <b><em>u</em></b> - <em class="arg">center</em> ) ) + <em class="arg">bias</em>
cristydcca3fa2010-12-29 21:50:07 +00003829</p>
cristy3ed852e2009-09-05 21:47:34 +00003830
3831</dd>
3832
cristy8ee7f242013-06-20 16:08:44 +00003833<dt><code>ArcTan</code></dt>
cristy3ed852e2009-09-05 21:47:34 +00003834<dd>
cristy8ee7f242013-06-20 16:08:44 +00003835<p>The <code>ArcTan</code> function generates a curve that smooth crosses from
cristy3ed852e2009-09-05 21:47:34 +00003836limit values at infinities, though a center using the given slope value.
cristydcca3fa2010-12-29 21:50:07 +00003837All these values can be adjusted via the arguments.</p>
cristy3ed852e2009-09-05 21:47:34 +00003838
cristydcca3fa2010-12-29 21:50:07 +00003839<p style="text-align: center">
cristy8ee7f242013-06-20 16:08:44 +00003840 -function <code>ArcTan</code> <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 +00003841</p>
cristy3ed852e2009-09-05 21:47:34 +00003842
3843<p>Defaulting to '<code>1.0,0.5,1.0,0.5</code>'.
3844</p>
3845
cristydcca3fa2010-12-29 21:50:07 +00003846<p style="text-align: center">
cristy149d58c2013-08-07 19:44:54 +00003847<em class="arg">range</em>/π * atan( <em class="arg">slope</em>*π * ( <b><em>u</em></b> - <em class="arg">center</em> ) ) + <em class="arg">bias</em>
cristydcca3fa2010-12-29 21:50:07 +00003848</p>
cristy3ed852e2009-09-05 21:47:34 +00003849
3850</dd>
3851
3852</dl>
3853
3854
3855<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003856 <h4><a id="fuzz"></a>-fuzz <em class="arg">distance</em>{<em class="arg">%</em>}</h4>
cristy3ed852e2009-09-05 21:47:34 +00003857</div>
3858
cristy149d58c2013-08-07 19:44:54 +00003859<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>
cristy3ed852e2009-09-05 21:47:34 +00003860
cristy751980d2012-06-03 23:18:35 +00003861<p>A number of algorithms search for a target color. By default the color must
3862be exact. Use this option to match colors that are close to the target color
3863in RGB space. For example, if you want to automagically trim the edges of an
3864image with <a href="command-line-options.html#trim">-trim</a> but the image was scanned and the target
3865background color may differ by a small amount. This option can account for
3866these differences.</p>
cristy3ed852e2009-09-05 21:47:34 +00003867
cristy751980d2012-06-03 23:18:35 +00003868<p>The <em class="arg">distance</em> can be in absolute intensity units or, by
cristy8ee7f242013-06-20 16:08:44 +00003869appending <code>%</code> as a percentage of the maximum possible intensity (255,
cristy751980d2012-06-03 23:18:35 +0000387065535, or 4294967295).</p>
cristy3ed852e2009-09-05 21:47:34 +00003871
3872
3873<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003874 <h4><a id="fx"></a>-fx <em class="arg">expression</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003875</div>
3876
cristy149d58c2013-08-07 19:44:54 +00003877<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>
cristy3ed852e2009-09-05 21:47:34 +00003878
cristy8ee7f242013-06-20 16:08:44 +00003879<p>If the first character of <em class="arg">expression</em> is <code>@</code>,
cristy751980d2012-06-03 23:18:35 +00003880the expression is read from a file titled by the remaining characters in the
3881string.</p>
cristy3ed852e2009-09-05 21:47:34 +00003882
cristy751980d2012-06-03 23:18:35 +00003883<p>See <a href="fx.html">FX,
3884The Special Effects Image Operator</a> for a detailed discussion of this
3885option.</p>
cristy3ed852e2009-09-05 21:47:34 +00003886
3887
3888<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003889 <h4><a id="gamma"></a>-gamma <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003890</div>
3891
cristy149d58c2013-08-07 19:44:54 +00003892<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>
cristy3ed852e2009-09-05 21:47:34 +00003893
cristy751980d2012-06-03 23:18:35 +00003894<p>The same color image displayed on two different workstations may look
3895different due to differences in the display monitor. Use gamma correction to
3896adjust for this color difference. Reasonable values extend from
cristy8ee7f242013-06-20 16:08:44 +00003897<code>0.8</code> to <code>2.3</code>. Gamma less than 1.0 darkens the image and
cristy751980d2012-06-03 23:18:35 +00003898gamma greater than 1.0 lightens it. Large adjustments to image gamma may
3899result in the loss of some image information if the pixel quantum size is only
3900eight bits (quantum range 0 to 255).</p>
cristy3ed852e2009-09-05 21:47:34 +00003901
cristy751980d2012-06-03 23:18:35 +00003902<p>Gamma adjusts the image's channel values pixel-by-pixel according to
3903a power law, namely, pow(pixel,1/gamma) or pixel^(1/gamma), where pixel is the
3904normalized or 0 to 1 color value. For example, using a value of gamma=2 is the
3905same as taking the square root of the image.</p>
cristy3ed852e2009-09-05 21:47:34 +00003906
cristy751980d2012-06-03 23:18:35 +00003907<p>You can apply separate gamma values to the red, green, and blue channels of
3908the image with a gamma value list delimited with commas (e.g.,
cristy8ee7f242013-06-20 16:08:44 +00003909<code>1.7,2.3,1.2</code>).</p>
cristy3ed852e2009-09-05 21:47:34 +00003910
cristy751980d2012-06-03 23:18:35 +00003911<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 +00003912image gamma level without actually adjusting the image pixels. This option
3913is useful if the image is of a known gamma but not set as an image attribute
3914(e.g. PNG images). Write the "file gamma" which is the reciprocal of the
3915display gamma; e.g., if your image is sRGB and you want to write a PNG gAMA
cristy149d58c2013-08-07 19:44:54 +00003916chunk, use</p>
3917<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert input.png +gamma .45455 output.png</span></p><p>(0.45455 is 1/2.2)</p>
cristy3ed852e2009-09-05 21:47:34 +00003918
cristy751980d2012-06-03 23:18:35 +00003919<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 +00003920
3921<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00003922 <h4><a id="gaussian-blur"></a>-gaussian-blur <em class="arg">radius</em><br></br>-gaussian-blur <em class="arg">radius</em>x<em class="arg">sigma</em>+<em class="arg">bias</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003923</div>
3924
cristy149d58c2013-08-07 19:44:54 +00003925<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>
cristy3ed852e2009-09-05 21:47:34 +00003926
cristyb15553d2010-07-03 22:53:14 +00003927<p>Convolve the image with a Gaussian or normal distribution using the given
cristy149d58c2013-08-07 19:44:54 +00003928<em class="arg">Sigma</em> value. The formula is:</p>
cristy3ed852e2009-09-05 21:47:34 +00003929
cristy149d58c2013-08-07 19:44:54 +00003930<div class="eqn"><img alt="gaussian distribution" width="243px" height="42px" src="../images/gaussian-blur.png"></img>
cristy3ed852e2009-09-05 21:47:34 +00003931</div>
3932
cristy149d58c2013-08-07 19:44:54 +00003933<p>The <em class="arg">Sigma</em> value is the important argument, and
cristyefb2bdb2010-11-20 19:35:22 +00003934determines the actual amount of blurring that will take place. </p>
cristyb15553d2010-07-03 22:53:14 +00003935
cristy149d58c2013-08-07 19:44:54 +00003936<p>The <em class="arg">Radius</em> is only used to determine the size of the
cristyefb2bdb2010-11-20 19:35:22 +00003937array which will hold the calculated Gaussian distribution. It should be an
cristyd0bda5e2010-09-21 16:22:45 +00003938integer. If not given, or set to zero, IM will calculate the largest possible
cristyb15553d2010-07-03 22:53:14 +00003939radius that will provide meaningful results for the Gaussian distribution.
3940</p>
3941
cristy149d58c2013-08-07 19:44:54 +00003942<p>The larger the <em class="arg">Radius</em> the radius the slower the
3943operation is. However too small a <em class="arg">Radius</em>, and sever
3944aliasing effects may result. As a guideline, <em class="arg">Radius</em>
3945should be at least twice the <em class="arg">Sigma</em> value, though three
cristyeed6cb62012-01-28 19:38:34 +00003946times will produce a more accurate result. </p>
cristy3ed852e2009-09-05 21:47:34 +00003947
cristy751980d2012-06-03 23:18:35 +00003948<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 +00003949full 2-dimensional convolution is used to generate the weighted average of the
3950neighboring pixels. </p>
cristy3ed852e2009-09-05 21:47:34 +00003951
cristy751980d2012-06-03 23:18:35 +00003952<p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
cristy3ed852e2009-09-05 21:47:34 +00003953pixels which are outside the image proper are blurred into the final result.
3954</p>
3955
3956
3957<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003958 <h4><a id="geometry"></a>-geometry <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003959</div>
3960
cristy149d58c2013-08-07 19:44:54 +00003961<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>
cristy3ed852e2009-09-05 21:47:34 +00003962
cristy751980d2012-06-03 23:18:35 +00003963<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 +00003964
3965<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00003966 <h4><a id="gravity"></a>-gravity <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00003967</div>
3968
cristy149d58c2013-08-07 19:44:54 +00003969<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>
cristy3ed852e2009-09-05 21:47:34 +00003970
cristy8ee7f242013-06-20 16:08:44 +00003971<p>Choices include: <code>NorthWest</code>, <code>North</code>,
3972<code>NorthEast</code>, <code>West</code>, <code>Center</code>, <code>East</code>,
cristy149d58c2013-08-07 19:44:54 +00003973<code>SouthWest</code>, <code>South</code>, <code>SouthEast</code>. Use <a href="command-line-options.html#list">-list gravity</a> to get a complete list of <a href="command-line-options.html#gravity">-gravity</a> settings available in your ImageMagick
cristy3ed852e2009-09-05 21:47:34 +00003974installation.</p>
3975
cristy751980d2012-06-03 23:18:35 +00003976<p>The direction you choose specifies where to position text or subimages. For
cristy8ee7f242013-06-20 16:08:44 +00003977example, a gravity of <code>Center</code> forces the text to be centered within
cristy149d58c2013-08-07 19:44:54 +00003978the image. By default, the image gravity is <code>NorthWest</code>. See <a href="command-line-options.html#draw">-draw</a> for more details about graphic primitives. Only the
3979text primitive of <a href="command-line-options.html#draw">-draw</a> is affected by the <a href="command-line-options.html#gravity">-gravity</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00003980
cristy751980d2012-06-03 23:18:35 +00003981<p>The <a href="command-line-options.html#gravity">-gravity</a> option is also used in concert with the
3982<a href="command-line-options.html#geometry">-geometry</a> setting and other settings or options that
cristy149d58c2013-08-07 19:44:54 +00003983take <em class="arg">geometry</em> as an argument, such as the <a href="command-line-options.html#crop">-crop</a> option. </p>
cristy3ed852e2009-09-05 21:47:34 +00003984
cristy751980d2012-06-03 23:18:35 +00003985<p>If a <a href="command-line-options.html#gravity">-gravity</a> setting occurs before another option
3986or setting having a <em class="arg">geometry</em> argument that specifies an
3987offset, the offset is usually applied to the point within the image suggested
3988by the <a href="command-line-options.html#gravity">-gravity</a> argument. Thus, in the following
cristy8ee7f242013-06-20 16:08:44 +00003989command, for example, suppose the file <code>image.png</code> has dimensions
cristy751980d2012-06-03 23:18:35 +00003990200x100. The offset specified by the argument to <a href="command-line-options.html#region">-region</a>
cristy149d58c2013-08-07 19:44:54 +00003991is (−40,+20). The argument to <a href="command-line-options.html#gravity">-gravity</a> is
cristy8ee7f242013-06-20 16:08:44 +00003992<code>Center</code>, which suggests the midpoint of the image, at the point
cristy149d58c2013-08-07 19:44:54 +00003993(100,50). The offset (−40,20) is applied to that point, giving
3994(100−40,50+20)=(60,70), so the specified 10x10 region is located at
cristy751980d2012-06-03 23:18:35 +00003995that point. (In addition, the <a href="command-line-options.html#gravity">-gravity</a> affects the
3996region itself, which is <em>centered</em> at the pixel
cristyac1b4322013-07-28 13:58:06 +00003997coordinate (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 +00003998
cristy149d58c2013-08-07 19:44:54 +00003999<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert image.png -gravity Center -region 10x10-40+20 \ <br></br> -negate output.png</span></p>
4000<p>When used as an option to <a href="composite.html">composite</a>, <a href="command-line-options.html#gravity">-gravity</a> gives the direction that the image gravitates
cristy751980d2012-06-03 23:18:35 +00004001within the composite.</p>
cristy3ed852e2009-09-05 21:47:34 +00004002
cristy149d58c2013-08-07 19:44:54 +00004003<p>When used as an option to <a href="montage.html">montage</a>, <a href="command-line-options.html#gravity">-gravity</a> gives the direction that an image gravitates
cristy8ee7f242013-06-20 16:08:44 +00004004within a tile. The default gravity is <code>Center</code> for this purpose.</p>
4005
4006
4007<div style="margin: auto;">
4008 <h4><a id="grayscale"></a>-grayscale <em class="arg">method</em></h4>
4009</div>
4010
cristy149d58c2013-08-07 19:44:54 +00004011<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">convert image to grayscale.</td><td style="text-align:right;"></td></tr></table>
cristy8ee7f242013-06-20 16:08:44 +00004012
cristy149d58c2013-08-07 19:44:54 +00004013<p>This will use one of the <a href="command-line-options.html#intensity">-intensity</a> methods to
cristy8ee7f242013-06-20 16:08:44 +00004014convert the given image into a linear-grayscale image. </p>
4015
4016<p>For example, to convert an image to (linear) Rec709Luminance grayscale, type:</p>
4017
cristy149d58c2013-08-07 19:44:54 +00004018<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert in.png -grayscale Rec709Luminance out.png</span></p>
cristy8ee7f242013-06-20 16:08:44 +00004019<p>which is equivalent to:</p>
4020
cristy149d58c2013-08-07 19:44:54 +00004021<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert in.png -colorspace gray out.png</span></p>
cristy8ee7f242013-06-20 16:08:44 +00004022<p>Similarly, to convert an image to (non-linear) Rec709Luma grayscale, type:</p>
4023
cristy149d58c2013-08-07 19:44:54 +00004024<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert in.png -grayscale Rec709Luma out.png</span></p>
cristy8ee7f242013-06-20 16:08:44 +00004025<p>which is equivalent to:</p>
4026
cristy149d58c2013-08-07 19:44:54 +00004027<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert in.png -set colorspace RGB -colorspace gray out.png</span></p>
cristy8ee7f242013-06-20 16:08:44 +00004028<p>Note that a 'colorspace' intensity method will produce the same result
4029regardless of the current colorpsace of the image. But a 'mathematical'
4030intensity method will depend on the current colorspace the image is currently
4031using. </p>
4032
cristy149d58c2013-08-07 19:44:54 +00004033<p>While this operation uses an <a href="command-line-options.html#intensity">-intensity</a> method,
4034it does not use or set the <a href="command-line-options.html#intensity">-intensity</a> setting, so
cristy8ee7f242013-06-20 16:08:44 +00004035will not effect other operations that may use that setting.</p>
cristy3ed852e2009-09-05 21:47:34 +00004036
4037
4038<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004039 <h4><a id="green-primary"></a>-green-primary <em class="arg">x,y</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004040</div>
4041
cristy149d58c2013-08-07 19:44:54 +00004042<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>
cristy3ed852e2009-09-05 21:47:34 +00004043
4044
4045<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004046 <h4><a id="hald-clut"></a>-hald-clut</h4>
cristy3ed852e2009-09-05 21:47:34 +00004047</div>
4048
cristy149d58c2013-08-07 19:44:54 +00004049<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>
cristy3ed852e2009-09-05 21:47:34 +00004050
4051<p>A Hald color lookup table is a 3-dimensional color cube mapped to 2
cristy8ee7f242013-06-20 16:08:44 +00004052dimensions. Create it with the <code>HALD:</code> prefix (e.g. HALD:8). You
cristy3ed852e2009-09-05 21:47:34 +00004053can apply any color transformation to the Hald image and then use this option
4054to apply the transform to the image. </p>
4055
cristy149d58c2013-08-07 19:44:54 +00004056<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 +00004057<p>This option provides a convenient method for you to use Gimp or Photoshop
4058to make color corrections to the Hald CLUT image and subsequently apply them
4059to multiple images using an ImageMagick script. </p>
4060
4061<p>Note that the representation is only of the normal RGB color space and that
4062the whole color value triplet is used for the interpolated lookup of the
cristy149d58c2013-08-07 19:44:54 +00004063represented Hald color cube image. Because of this the operation is not <a href="command-line-options.html#channel">-channel</a> setting effected, nor can it adjust or modify an
cristy3ed852e2009-09-05 21:47:34 +00004064images transparency or alpha/matte channel.</p>
4065
cristy149d58c2013-08-07 19:44:54 +00004066<p>See also <a href="command-line-options.html#clut">-clut</a> which provides color value replacement
cristyeed6cb62012-01-28 19:38:34 +00004067of the individual color channels, usually involving a simpler gray-scale
cristy3ed852e2009-09-05 21:47:34 +00004068image. E.g: gray-scale to color replacement, or modification by a histogram
4069mapping. </p>
4070
4071
4072<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004073 <h4><a id="help"></a>-help</h4>
cristy3ed852e2009-09-05 21:47:34 +00004074</div>
4075
cristy149d58c2013-08-07 19:44:54 +00004076<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>
cristy3ed852e2009-09-05 21:47:34 +00004077
4078<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004079 <h4><a id="highlight-color"></a>-highlight-color <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004080</div>
4081
cristy149d58c2013-08-07 19:44:54 +00004082<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>
cristy3ed852e2009-09-05 21:47:34 +00004083
4084<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004085 <h4><a id="iconGeometry"></a>-iconGeometry <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004086</div>
4087
cristy149d58c2013-08-07 19:44:54 +00004088<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>
cristy3ed852e2009-09-05 21:47:34 +00004089
cristy751980d2012-06-03 23:18:35 +00004090<p>Offsets, if present in the geometry specification, are handled in the same
4091manner as the <a href="command-line-options.html#geometry">-geometry</a> option, using X11 style to
4092handle negative offsets.</p>
cristy3ed852e2009-09-05 21:47:34 +00004093
cristy751980d2012-06-03 23:18:35 +00004094<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 +00004095
4096<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004097 <h4><a id="iconic"></a>-iconic</h4>
cristy3ed852e2009-09-05 21:47:34 +00004098</div>
4099
cristy149d58c2013-08-07 19:44:54 +00004100<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">start in icon mode in X Windows</td><td style="text-align:right;">[<a href="animate.html">animate</a>, <a href="display.html">display</a>]</td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00004101
4102<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004103 <h4><a id="identify"></a>-identify</h4>
cristy3ed852e2009-09-05 21:47:34 +00004104</div>
4105
cristy149d58c2013-08-07 19:44:54 +00004106<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>
cristy3ed852e2009-09-05 21:47:34 +00004107
cristy751980d2012-06-03 23:18:35 +00004108<p>This information is printed: image scene number; image name; image size;
cristy149d58c2013-08-07 19:44:54 +00004109the image class (<em class="arg">DirectClass</em> or <em class="arg">PseudoClass</em>); the total number of unique colors; and the
cristy751980d2012-06-03 23:18:35 +00004110number of seconds to read and transform the image. Refer to <a href="miff.html">MIFF</a> for
4111a description of the image class.</p>
cristy3ed852e2009-09-05 21:47:34 +00004112
cristy751980d2012-06-03 23:18:35 +00004113<p>If <a href="command-line-options.html#colors">-colors</a> is also specified, the total unique colors
cristy149d58c2013-08-07 19:44:54 +00004114in the image and color reduction error values are printed. Refer to <a href="quantize.html">color
cristy751980d2012-06-03 23:18:35 +00004115reduction algorithm</a> for a description of these values.</p>
cristy3ed852e2009-09-05 21:47:34 +00004116
cristy751980d2012-06-03 23:18:35 +00004117<p>If <a href="command-line-options.html#verbose">-verbose</a> precedes this option, copious
cristy3ed852e2009-09-05 21:47:34 +00004118amounts of image properties are displayed including image statistics, profiles,
4119image histogram, and others.</p>
4120
4121<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004122 <h4><a id="ift"></a>-ift</h4>
cristy3ed852e2009-09-05 21:47:34 +00004123</div>
4124
cristy149d58c2013-08-07 19:44:54 +00004125<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>
cristy3ed852e2009-09-05 21:47:34 +00004126
cristy751980d2012-06-03 23:18:35 +00004127<p>This option is new as of ImageMagick 6.5.4-3 (and now working for Windows
4128users in ImageMagick 6.6.0-9). It transforms a pair of magnitude and phase
4129images from the frequency domain to a single image in the normal or spatial
cristy149d58c2013-08-07 19:44:54 +00004130domain. See for example, <a href="http://en.wikipedia.org/wiki/Fourier_transform">Fourier Transform</a>,
cristy751980d2012-06-03 23:18:35 +00004131<a href="http://en.wikipedia.org/wiki/DFT">Discrete Fourier Transform</a> and
4132<a href="http://en.wikipedia.org/wiki/FFT">Fast Fourier Transform</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00004133
cristy751980d2012-06-03 23:18:35 +00004134<p>For example, depending upon the image format used to store the result of
4135the <a href="command-line-options.html#fft">-fft</a>, one would use either</p>
cristy3ed852e2009-09-05 21:47:34 +00004136
cristy149d58c2013-08-07 19:44:54 +00004137<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 +00004138<p>or</p>
4139
cristy149d58c2013-08-07 19:44:54 +00004140<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 +00004141
cristy751980d2012-06-03 23:18:35 +00004142<p>The resulting image may need to be cropped due to padding introduced when
cristy149d58c2013-08-07 19:44:54 +00004143the original image, prior to the <a href="command-line-options.html#fft">-fft</a> or <a href="command-line-options.html#fft">+fft</a>, was not square or even dimensioned. Any padding is at
cristy751980d2012-06-03 23:18:35 +00004144the right and/or bottom sides of the image.</p>
cristy3ed852e2009-09-05 21:47:34 +00004145
cristy751980d2012-06-03 23:18:35 +00004146<p>The <a href="http://www.fftw.org/">FFTW</a> delegate library is required to
4147use <a href="command-line-options.html#ift">-ift</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00004148
cristy751980d2012-06-03 23:18:35 +00004149<p>Use <a href="command-line-options.html#ift">+ift</a> (with HDRI enabled) to transform a pair of real
4150and imaginary images from the frequency domain to a single image in the normal
4151(spatial) domain.</p>
cristy3ed852e2009-09-05 21:47:34 +00004152
4153<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004154 <h4><a id="immutable"></a>-immutable</h4>
cristy3ed852e2009-09-05 21:47:34 +00004155</div>
4156
cristy149d58c2013-08-07 19:44:54 +00004157<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>
cristy3ed852e2009-09-05 21:47:34 +00004158
4159<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004160 <h4><a id="implode"></a>-implode <em class="arg">factor</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004161</div>
4162
cristy149d58c2013-08-07 19:44:54 +00004163<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>
cristy3ed852e2009-09-05 21:47:34 +00004164
4165<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004166 <h4><a id="insert"></a>-insert <em class="arg">index</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004167</div>
4168
cristy149d58c2013-08-07 19:44:54 +00004169<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>
cristy3ed852e2009-09-05 21:47:34 +00004170
cristy751980d2012-06-03 23:18:35 +00004171<p>This option takes last image in the current image sequence and inserts it
4172at the given index. If a negative index is used, the insert position is
4173calculated before the last image is removed from the sequence. As such
cristy8ee7f242013-06-20 16:08:44 +00004174<code>-insert -1</code> will result in no change to the image sequence.</p>
cristy3ed852e2009-09-05 21:47:34 +00004175
cristy8ee7f242013-06-20 16:08:44 +00004176<p>The <code>+insert</code> option is equivalent to <code>-insert -1</code>. In
cristy751980d2012-06-03 23:18:35 +00004177other words, insert the last image, at the end of the current image sequence.
4178Consequently this has no effect on the image sequence order.</p>
cristy3ed852e2009-09-05 21:47:34 +00004179
4180<div style="margin: auto;">
cristy8ee7f242013-06-20 16:08:44 +00004181 <h4><a id="intensity"></a>-intensity <em class="arg">method</em></h4>
4182</div>
4183
cristy149d58c2013-08-07 19:44:54 +00004184<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">method to generate intensity value from pixel.</td><td style="text-align:right;"></td></tr></table>
cristy8ee7f242013-06-20 16:08:44 +00004185
4186<p>ImageMagick provides a number of methods used in situations where an
4187operatory needs to determine a single grayscale value for some purpose, from
4188an image with red, green, and blue pixel components. Typically the linear
4189<code>Rec709Luminance</code> formula is used, which is the same formula used when
4190converting images to <code>-colorspace gray</code>. </p>
4191
4192<p>The following formulas are currently provided, and will first convert
4193the pixel values to linear-RGB or non-linear sRGB colorspace before
4194being applied to calulate the final greyscale value. </p>
4195
4196<pre class="text">
4197 Rec601Luma 0.298839R' + 0.586811G'+ 0.114350B'
4198 Rec601Luminance 0.298839R + 0.586811G + 0.114350B
4199 Rec709Luma 0.212656R' + 0.715158G' + 0.072186B'
4200 Rec709Luminance 0.212656R + 0.715158G + 0.072186B
4201 Brightness max(R', G', B')
4202 Lightness (min(R', G', B') + max(R', G', B')) / 2.0
4203</pre>
4204<p>Note that the above R,G,B values is the image's linear-RGB values, while
4205R',G',B' are sRGB non-linear values. </p>
4206
4207<p>These intensity methods are mathematical in nature and will use the
4208current value in the images respective R,G,B channel regardless of
4209what that is, or what colorspace the image is currently using.</p>
4210
4211<pre class="text">
4212 Average (R + G + B) / 3.0
4213 MS (R^2 + G^2 + B^2) / 3.0
4214 RMS sqrt( (R^2 + G^2 + B^2) / 3.0 )
4215</pre>
4216
4217<p>These methods are often used for other purposes, such as generating a
cristy149d58c2013-08-07 19:44:54 +00004218grayscale difference image between two color images (using <a href="command-line-options.html#compose">-compose</a> '<code>Difference</code>' composition. </p>
cristy8ee7f242013-06-20 16:08:44 +00004219
4220<p> For example The 'MS' (Mean Squared) setting is good for minimizing color
4221error comparisions. While... The method 'RMS' (Root Mean Squared) for
4222example is appropriate for calculating color vector distance, from a color
cristy149d58c2013-08-07 19:44:54 +00004223difference image. This is equivelent to the color only component of the <a href="command-line-options.html#fuzz">-fuzz</a> factor color compare setting. </p>
cristy8ee7f242013-06-20 16:08:44 +00004224
cristy149d58c2013-08-07 19:44:54 +00004225<p>See also <a href="command-line-options.html#grayscale">-grayscale</a> which applies one of the above
4226grayscaling formula directly to an image without setting the <a href="command-line-options.html#intensity">-intensity</a> setting.</p>
cristy8ee7f242013-06-20 16:08:44 +00004227
cristy149d58c2013-08-07 19:44:54 +00004228<p>The <a href="command-line-options.html#colorspace">-colorspace gray</a> image conversion also uses
cristy8ee7f242013-06-20 16:08:44 +00004229the current intensity setting, but will always convert the image to the
4230appropriate sRGB or linear-RGB colorspace before appling the above
4231function.</p>
4232
4233<p>To print a complete list of posible pixel intensity setting methods, use <a href="command-line-options.html#list">-list intensity</a>.</p>
4234
cristy149d58c2013-08-07 19:44:54 +00004235<p>Operators affected by the <a href="command-line-options.html#intensity">-intensity</a> setting include:</p>
cristy8ee7f242013-06-20 16:08:44 +00004236
4237<pre class="text">
4238-adaptive-blur
4239-adaptive-sharpen
4240-black-threshold
4241-clut (when mapping greyscale CLUT image to alpha channel if set by -channels)
4242-colors for gray colorspace
4243-compose {LightenIntensity, DarkenIntensity, CopyOpacity, CopyBlack}
4244-contrast-stretch
4245-distort {ErodeIntensity, DilateIntensity}
4246-normalize
4247-random-threshold
4248-selective-blur
4249-shade
4250-threshold
4251-tint
4252-white-threshold
4253</pre>
4254
4255<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004256 <h4><a id="intent"></a>-intent <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004257</div>
4258
cristy149d58c2013-08-07 19:44:54 +00004259<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>
cristy3ed852e2009-09-05 21:47:34 +00004260
cristy751980d2012-06-03 23:18:35 +00004261<p>Use this option to affect the color management operation of an image (see
cristy8ee7f242013-06-20 16:08:44 +00004262<a href="command-line-options.html#profile">-profile</a>). Choose from these intents: <code>Absolute,
4263Perceptual, Relative, Saturation</code>.</p>
cristy3ed852e2009-09-05 21:47:34 +00004264
cristy751980d2012-06-03 23:18:35 +00004265<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 +00004266
cristy751980d2012-06-03 23:18:35 +00004267<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 +00004268
4269<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004270 <h4><a id="interlace"></a>-interlace <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004271</div>
4272
cristy149d58c2013-08-07 19:44:54 +00004273<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>
cristy3ed852e2009-09-05 21:47:34 +00004274
4275<p>Choose from:</p>
4276
4277<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00004278 none
4279 line
4280 plane
4281 partition
4282 JPEG
4283 GIF
4284 PNG
cristy3ed852e2009-09-05 21:47:34 +00004285</pre>
4286
cristy751980d2012-06-03 23:18:35 +00004287<p>This option is used to specify the type of interlacing scheme for raw image
cristy8ee7f242013-06-20 16:08:44 +00004288formats such as <code>RGB</code> or <code>YUV</code>.</p>
cristy3ed852e2009-09-05 21:47:34 +00004289
cristy8ee7f242013-06-20 16:08:44 +00004290<p><code>None</code> means do not interlace (RGBRGBRGBRGBRGBRGB...),</p>
cristy3ed852e2009-09-05 21:47:34 +00004291
cristy8ee7f242013-06-20 16:08:44 +00004292<p><code>Line</code> uses scanline interlacing (RRR...GGG...BBB...RRR...GGG...BBB...), and.</p>
cristy3ed852e2009-09-05 21:47:34 +00004293
cristy8ee7f242013-06-20 16:08:44 +00004294<p><code>Plane</code> uses plane interlacing (RRRRRR...GGGGGG...BBBBBB...).</p>
cristy3ed852e2009-09-05 21:47:34 +00004295
cristy8ee7f242013-06-20 16:08:44 +00004296<p><code>Partition</code> is like plane except the different planes are saved to
cristy751980d2012-06-03 23:18:35 +00004297individual files (e.g. image.R, image.G, and image.B).</p>
cristy3ed852e2009-09-05 21:47:34 +00004298
cristy8ee7f242013-06-20 16:08:44 +00004299<p>Use <code>Line</code> or <code>Plane</code> to create an <code>interlaced
4300PNG</code> or <code>GIF</code> or <code>progressive JPEG</code> image.</p>
cristy3ed852e2009-09-05 21:47:34 +00004301
cristy751980d2012-06-03 23:18:35 +00004302<p>To print a complete list of interlacing schemes, use <a href="command-line-options.html#list">-list
4303interlace</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00004304
4305<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004306 <h4><a id="interpolate"></a>-interpolate <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004307</div>
4308
cristy149d58c2013-08-07 19:44:54 +00004309<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>
cristy3ed852e2009-09-05 21:47:34 +00004310
cristyd0bda5e2010-09-21 16:22:45 +00004311<p>When looking up the color of a pixel using a non-integer floating point
cristy3ed852e2009-09-05 21:47:34 +00004312value, you typically fall in between the pixel colors defined by the source
4313image. This setting determines how the color is determined from the colors of
4314the pixels surrounding that point. That is how to determine the color of a
4315point that falls between two, or even four different colored pixels. </p>
4316
4317<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00004318 integer The color of the top-left pixel (floor function)
4319 nearest-neighbor The nearest pixel to the lookup point (rounded function)
4320 average The average color of the surrounding four pixels
4321 bilinear A double linear interpolation of pixels (the default)
4322 mesh Divide area into two flat triangular interpolations
4323 bicubic Fitted bicubic-spines of surrounding 16 pixels
4324 spline Direct spline curves (colors are blurred)
cristy751980d2012-06-03 23:18:35 +00004325 filter Use resize <a href="command-line-options.html#filter">-filter</a> settings
cristy3ed852e2009-09-05 21:47:34 +00004326</pre>
4327
cristy149d58c2013-08-07 19:44:54 +00004328<p>This most important for distortion operators such as <a href="command-line-options.html#distort">-distort</a>, <a href="command-line-options.html#implode">-implode</a>, <a href="command-line-options.html#transform">-transform</a> and <a href="command-line-options.html#fx">-fx</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00004329
cristy751980d2012-06-03 23:18:35 +00004330<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 +00004331
cristy149d58c2013-08-07 19:44:54 +00004332<p>See also <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a>, for control of the
cristy3ed852e2009-09-05 21:47:34 +00004333lookup for positions outside the boundaries of the image. </p>
4334
4335
4336<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004337 <h4><a id="interline-spacing"></a>-interline-spacing <em class="arg">value</em></h4>
cristyf3bb4782009-09-08 13:10:04 +00004338</div>
4339
cristy149d58c2013-08-07 19:44:54 +00004340<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>
cristyf3bb4782009-09-08 13:10:04 +00004341
4342<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004343 <h4><a id="interword-spacing"></a>-interword-spacing <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004344</div>
4345
cristy149d58c2013-08-07 19:44:54 +00004346<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>
cristy3ed852e2009-09-05 21:47:34 +00004347
4348<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004349 <h4><a id="kerning"></a>-kerning <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004350</div>
4351
cristy149d58c2013-08-07 19:44:54 +00004352<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>
cristy3ed852e2009-09-05 21:47:34 +00004353
4354<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004355 <h4><a id="label"></a>-label <em class="arg">name</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004356</div>
4357
cristy149d58c2013-08-07 19:44:54 +00004358<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>
cristy3ed852e2009-09-05 21:47:34 +00004359
cristy71a3f602010-09-15 12:38:16 +00004360<p>Use this option to assign a specific label to the image, as it is read in
cristy149d58c2013-08-07 19:44:54 +00004361or created. You can use the <a href="command-line-options.html#set">-set</a> operation to re-assign
cristy71a3f602010-09-15 12:38:16 +00004362a the labels of images already read in. Image formats such as TIFF, PNG,
4363MIFF, supports saving the label information with the image.</p>
cristy3ed852e2009-09-05 21:47:34 +00004364
cristy71a3f602010-09-15 12:38:16 +00004365<p>When saving an image to a <em class="arg">PostScript</em> file, any label
4366assigned to an image is used as a header string to print above the postscript
4367image. </p>
cristy3ed852e2009-09-05 21:47:34 +00004368
cristybc9539a2010-08-16 18:06:20 +00004369<p>You can include the image filename, type, width, height, or other image
cristy751980d2012-06-03 23:18:35 +00004370attribute by embedding special format character. See <a href="escape.html">Format and Print Image
cristybc9539a2010-08-16 18:06:20 +00004371Properties</a> for details of the percent escape codes.</p>
cristy3ed852e2009-09-05 21:47:34 +00004372
4373<p>For example,</p>
4374
4375<p class="crtsnip">
4376 -label "%m:%f %wx%h" bird.miff
4377</p>
4378
cristy8ee7f242013-06-20 16:08:44 +00004379<p>assigns an image label of <code>MIFF:bird.miff 512x480</code> to the
4380"<code>bird.miff</code>" image and whose width is 512 and height is 480, as it
cristy751980d2012-06-03 23:18:35 +00004381is read in. If a <a href="command-line-options.html#label">+label</a> option was used instead, any
cristy71a3f602010-09-15 12:38:16 +00004382existing label present in the image would be used. You can remove all labels
4383from an image by assigning the empty string. </p>
cristy3ed852e2009-09-05 21:47:34 +00004384
cristy71a3f602010-09-15 12:38:16 +00004385<p>A label is not drawn on the image, but is embedded in the image datastream
4386via <em>Label</em> tag or similar mechanism. If you want the label to be
cristy751980d2012-06-03 23:18:35 +00004387visible on the image itself, use the <a href="command-line-options.html#draw">-draw</a> option, or
cristy8ee7f242013-06-20 16:08:44 +00004388during the final processing in the creation of an image montage.</p>
cristy3ed852e2009-09-05 21:47:34 +00004389
cristy149d58c2013-08-07 19:44:54 +00004390<p>If the first character of <em class="arg">string</em> is <em class="arg">@</em>, the image label is read from a file titled by the
cristy71a3f602010-09-15 12:38:16 +00004391remaining characters in the string. Labels in a file are literal, no embedded
4392formatting characters are recognized.</p>
cristy3ed852e2009-09-05 21:47:34 +00004393
4394
4395<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00004396 <h4><a id="lat"></a>-lat <em class="arg">width</em><br></br>-lat <em class="arg">width</em>x<em class="arg">height</em>{<em class="arg">+-</em>}<em class="arg">offset</em>{<em class="arg">%</em>}</h4>
cristy3ed852e2009-09-05 21:47:34 +00004397</div>
4398
cristy149d58c2013-08-07 19:44:54 +00004399<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>
cristy3ed852e2009-09-05 21:47:34 +00004400
4401<p>Adaptively threshold each pixel based on the value of pixels in a
4402surrounding window. If the current pixel is lighter than this average plus
cristy8ee7f242013-06-20 16:08:44 +00004403the optional <code>offset</code>, then it is made white, otherwise it is made
cristy3ed852e2009-09-05 21:47:34 +00004404black. Small variations in pixel values such as found in scanned documents
4405can be ignored if offset is positive. A negative offset will make it more
4406sensitive to those small variations. </p>
4407
4408<p>This is commonly used to threshold images with an uneven background. It is
4409based on the assumption that average color of the small window is the
cristyeed6cb62012-01-28 19:38:34 +00004410the local background color, from which to separate the foreground color. </p>
cristy3ed852e2009-09-05 21:47:34 +00004411
4412
4413<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004414 <h4><a id="layers"></a>-layers <em class="arg">method</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004415</div>
4416
cristy149d58c2013-08-07 19:44:54 +00004417<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>
cristy3ed852e2009-09-05 21:47:34 +00004418
4419<p>Perform various image operation methods to a ordered sequence of images
4420which may represent either a set of overlaid 'image layers', a GIF disposal
4421animation, or a fully-'coalesced' animation sequence. </p>
4422
4423<table class="doc">
4424 <tbody>
4425 <tr valign="top">
4426 <th align="left" style="width: 8%">Method</th>
4427 <th align="left">Description</th>
4428 </tr>
4429
4430 <tr valign="top">
4431 <td valign="top">compare-any</td>
4432 <td valign="top">Crop the second and later frames to the smallest rectangle
cristy149d58c2013-08-07 19:44:54 +00004433 that contains all the differences between the two images. No GIF <a href="command-line-options.html#dispose">-dispose</a> methods are taken into account. </td>
cristy3ed852e2009-09-05 21:47:34 +00004434 </tr>
4435
cristy149d58c2013-08-07 19:44:54 +00004436 <tr><td></td><td>This exactly the same as the <a href="command-line-options.html#deconstruct">-deconstruct</a> operator, and does not preserve animations normal
cristy3ed852e2009-09-05 21:47:34 +00004437 working, especially when animation used layer disposal methods such as
cristy8ee7f242013-06-20 16:08:44 +00004438 '<code>Previous</code>' or '<code>Background</code>'. </td>
cristy3ed852e2009-09-05 21:47:34 +00004439 </tr>
4440
4441 <tr valign="top">
4442 <td valign="top">compare-clear</td>
cristy8ee7f242013-06-20 16:08:44 +00004443 <td valign="top">As '<code>compare-any</code>' but crop to the bounds of any
cristy3ed852e2009-09-05 21:47:34 +00004444 opaque pixels which become transparent in the second frame. That is the
4445 smallest image needed to mask or erase pixels for the next frame. </td>
4446 </tr>
4447
4448 <tr valign="top">
4449 <td valign="top">compare-overlay</td>
cristy8ee7f242013-06-20 16:08:44 +00004450 <td valign="top">As '<code>compare-any</code>' but crop to pixels that add
cristy3ed852e2009-09-05 21:47:34 +00004451 extra color to the next image, as a result of overlaying color pixels.
4452 That is the smallest single overlaid image to add or change colors. </td>
4453 </tr>
4454
cristy149d58c2013-08-07 19:44:54 +00004455 <tr><td></td><td>This can be used with the <a href="command-line-options.html#compose">-compose</a> alpha
cristy8ee7f242013-06-20 16:08:44 +00004456 composition method '<code>change-mask</code>', to reduce the image to
cristy3ed852e2009-09-05 21:47:34 +00004457 just the pixels that need to be overlaid. </td>
4458 </tr>
4459
4460 <tr valign="top">
4461 <td valign="top">coalesce</td>
cristy149d58c2013-08-07 19:44:54 +00004462 <td valign="top">Equivalent to a call to the <a href="command-line-options.html#coalesce">-coalesce</a> operator. Apply the layer disposal methods set in the
cristy3ed852e2009-09-05 21:47:34 +00004463 current image sequence to form a fully defined animation sequence, as
4464 it should be displayed. Effectively converting a GIF animation into a
4465 'film strip'-like animation. </td>
4466 </tr>
4467
4468 <tr valign="top">
4469 <td valign="top">composite</td>
4470 <td valign="top">Alpha Composition of two image lists, separated by a
cristy8ee7f242013-06-20 16:08:44 +00004471 "<code>null:</code>" image, with the destination image list first, and
cristy3ed852e2009-09-05 21:47:34 +00004472 the source images last. An image from each list are composited
4473 together until one list is finished. The separator image and source
4474 image lists are removed. </td>
4475 </tr>
4476
4477
cristybac7a162010-06-15 19:57:29 +00004478 <tr><td></td>
cristy149d58c2013-08-07 19:44:54 +00004479 <td>The <a href="command-line-options.html#geometry">-geometry</a> offset is adjusted according
4480 to <a href="command-line-options.html#gravity">-gravity</a> in accordance of the virtual
4481 canvas size of the first image in each list. Unlike a normal <a href="command-line-options.html#composite">-composite</a> operation, the canvas offset is also
cristybac7a162010-06-15 19:57:29 +00004482 added to the final composite positioning of each image. </td> </tr>
cristy3ed852e2009-09-05 21:47:34 +00004483
cristybac7a162010-06-15 19:57:29 +00004484 <tr><td></td>
4485 <td>If one of the image lists only contains one image, that image is
cristy3ed852e2009-09-05 21:47:34 +00004486 applied to all the images in the other image list, regardless of which
4487 list it is. In this case it is the image meta-data of the list which
4488 preserved. </td>
4489 </tr>
4490
4491
4492 <tr valign="top">
4493 <td valign="top">dispose</td>
cristy8ee7f242013-06-20 16:08:44 +00004494 <td valign="top">This like '<code>coalesce</code>' but shows the look of
cristy3ed852e2009-09-05 21:47:34 +00004495 the animation after the layer disposal method has been applied, before
4496 the next sub-frame image is overlaid. That is the 'dispose' image that
cristy149d58c2013-08-07 19:44:54 +00004497 results from the application of the GIF <a href="command-line-options.html#dispose">-dispose</a> method. This allows you to check what
cristy3ed852e2009-09-05 21:47:34 +00004498 is going wrong with a particular animation you may be developing.
4499 </td>
4500 </tr>
4501
4502 <tr valign="top">
4503 <td valign="top">flatten</td>
4504 <td valign="top">Create a canvas the size of the first images virtual
cristy149d58c2013-08-07 19:44:54 +00004505 canvas using the current <a href="command-line-options.html#background">-background</a> color,
4506 and <a href="command-line-options.html#compose">-compose</a> each image in turn onto that
cristy3ed852e2009-09-05 21:47:34 +00004507 canvas. Images falling outside that canvas is clipped. Final
4508 image will have a zero virtual canvas offset. </td>
4509 </tr>
4510
cristybac7a162010-06-15 19:57:29 +00004511 <tr><td></td>
cristyeed6cb62012-01-28 19:38:34 +00004512 <td>This usually used as one of the final 'image layering' operations
cristy3ed852e2009-09-05 21:47:34 +00004513 overlaying all the prepared image layers into a final image. </td>
4514 </tr>
4515
cristybac7a162010-06-15 19:57:29 +00004516 <tr><td></td>
4517 <td>For a single image this method can also be used to fillout a virtual
cristy751980d2012-06-03 23:18:35 +00004518 canvas with real pixels, or to underlay an opaque color to remove
cristy3ed852e2009-09-05 21:47:34 +00004519 transparency from an image.</td>
4520 </tr>
4521
4522
4523 <tr valign="top">
4524 <td valign="top">merge</td>
4525 <td valign="top">As 'flatten' method but merging all the given image
cristy10549a12011-05-15 19:04:46 +00004526 layers to create a new layer image just large enough to hold all the
4527 image without clipping or extra space. The new images virtual offset
4528 will preserve the position of the new layer, even if this offset is
4529 negative. The virtual canvas size of the first image is preserved.
cristy3ed852e2009-09-05 21:47:34 +00004530 </td>
cristy10549a12011-05-15 19:04:46 +00004531 </tr>
cristy3ed852e2009-09-05 21:47:34 +00004532
cristy10549a12011-05-15 19:04:46 +00004533 <tr><td></td><td>Caution is advised when handling image layers with
4534 negative offsets as few image file formats handle them correctly.
cristy149d58c2013-08-07 19:44:54 +00004535 Following this operation method with <a href="command-line-options.html#repage">+repage</a>
cristy8ee7f242013-06-20 16:08:44 +00004536 will remove the layer offset, and create an image in which all the
cristy10549a12011-05-15 19:04:46 +00004537 overlaid image positions relative to each other is preserved, though
cristyeed6cb62012-01-28 19:38:34 +00004538 not necessarily exactly where you specified them.
cristy10549a12011-05-15 19:04:46 +00004539 </td>
4540 </tr>
4541
cristyeed6cb62012-01-28 19:38:34 +00004542 <tr><td></td><td>See also 'trim-bounds' below which is closely related but
cristy10549a12011-05-15 19:04:46 +00004543 without doing the'flatten' to merge the images together. </td>
cristy3ed852e2009-09-05 21:47:34 +00004544 </tr>
4545
4546 <tr valign="top">
4547 <td valign="top">mosaic</td>
4548 <td valign="top">As 'flatten' method but expanding the initial canvas size
cristy10549a12011-05-15 19:04:46 +00004549 of the first image in a positive direction only so as to hold all the
4550 image layers. However as a virtual canvas is 'locked' to the origin,
4551 by its own definition, image layers with a negative offsets will still
4552 become clipped by the top and left edges. See 'merge' or 'trim-bounds'
4553 if this could be a problem. </td>
4554
cristy3ed852e2009-09-05 21:47:34 +00004555 </tr>
4556
cristy10549a12011-05-15 19:04:46 +00004557 <tr><td></td><td>This method is commonly used to layout individual image
4558 using various offset but without knowing the final canvas size. The
4559 resulting image will, like 'flatten' not have any virtual offset, so
4560 can be saved to any image file format. </td>
cristy3ed852e2009-09-05 21:47:34 +00004561 </tr>
4562
4563
4564 <tr valign="top">
4565 <td valign="top">optimize</td>
4566 <td valign="top">Optimize a coalesced animation, into GIF animation using
4567 a number of general techniques. This currently a short cut to
cristy8ee7f242013-06-20 16:08:44 +00004568 apply both the '<code>optimize-frame</code>', and
4569 '<code>optimize-transparency</code>' methods but may be expanded to
cristy3ed852e2009-09-05 21:47:34 +00004570 include other optimization methods as they are developed. </td>
4571 </tr>
4572
4573 <tr valign="top">
4574 <td valign="top">optimize-frame</td>
4575 <td valign="top">Optimize a coalesced animation, into GIF animation by
4576 reducing the number of pixels per frame as much as possible by
4577 attempting to pick the best layer disposal method to use, while ensuring
4578 the result will continue to animate properly. </td>
4579 </tr>
4580
cristy10549a12011-05-15 19:04:46 +00004581 <tr><td></td><td> There is no guarantee that the best optimization is found.
4582 But then no reasonably fast GIF optimization algorithm can do this.
cristy3ed852e2009-09-05 21:47:34 +00004583 However this does seem to do better than most other GIF frame
4584 optimizers seen. </td>
4585 </tr>
4586
4587 <tr valign="top">
4588 <td valign="top">optimize-plus</td>
cristy8ee7f242013-06-20 16:08:44 +00004589 <td valign="top">As '<code>optimize-frame</code>' but attempt to improve the
cristy3ed852e2009-09-05 21:47:34 +00004590 overall optimization by adding extra frames to the animation, without
4591 changing the final look or timing of the animation. The frames are
4592 added to attempt to separate the clearing of pixels from the
4593 overlaying of new additional pixels from one animation frame to the
4594 next. If this does not improve the optimization (for the next frame
4595 only), it will fall back to the results of the previous normal
cristy8ee7f242013-06-20 16:08:44 +00004596 '<code>optimize-frame</code>' technique. </td>
cristy3ed852e2009-09-05 21:47:34 +00004597 </tr>
4598
cristy10549a12011-05-15 19:04:46 +00004599 <tr><td></td><td>There is the possibility that the change in the disposal
4600 style will result in a worsening in the optimization of later frames,
4601 though this is unlikely. In other words there no guarantee that it is
cristy8ee7f242013-06-20 16:08:44 +00004602 better than the normal '<code>optimize-frame</code>' technique. For some
cristy10549a12011-05-15 19:04:46 +00004603 animations however you can get a vast improvement in the final
4604 animation size. </td>
cristy3ed852e2009-09-05 21:47:34 +00004605 </tr>
4606
4607 <tr valign="top">
4608 <td valign="top">optimize-transparency</td>
4609 <td valign="top">Given a GIF animation, replace any pixel in the sub-frame
4610 overlay images with transparency, if it does not change the resulting
cristy149d58c2013-08-07 19:44:54 +00004611 animation by more than the current <a href="command-line-options.html#fuzz">-fuzz</a> factor.
cristy3ed852e2009-09-05 21:47:34 +00004612 </td>
4613 </tr>
4614
cristy10549a12011-05-15 19:04:46 +00004615 <tr><td></td><td>This should allow a existing frame optimized GIF animation
4616 to compress into a smaller file size due to larger areas of one
4617 (transparent) color rather than a pattern of multiple colors repeating
4618 the current disposed image of the last frame. </td>
cristy3ed852e2009-09-05 21:47:34 +00004619 </tr>
4620
4621 <tr valign="top">
4622 <td valign="top">remove-dups</td>
4623 <td valign="top">Remove (and merge time delays) of duplicate consecutive
4624 images, so as to simplify layer overlays of coalesced animations.
4625 </td>
4626 </tr>
4627
cristy10549a12011-05-15 19:04:46 +00004628 <tr><td></td><td>Usually this a result of using a constant time delay
4629 across the whole animation, or after a larger animation was split into
4630 smaller sub-animations. The duplicate frames could also have been
4631 used as part of some frame optimization methods. </td>
cristy3ed852e2009-09-05 21:47:34 +00004632 </tr>
4633
4634 <tr valign="top">
4635 <td valign="top">remove-zero</td>
4636 <td valign="top">Remove any image with a zero time delay, unless ALL the
4637 images have a zero time delay (and is not a proper timed animation, a
4638 warning is then issued). </td>
4639 </tr>
4640
cristy10549a12011-05-15 19:04:46 +00004641 <tr><td></td><td>In a GIF animation, such images are usually frames which
4642 provide partial intermediary updates between the frames that are
cristyeed6cb62012-01-28 19:38:34 +00004643 actually displayed to users. These frames are usually added for
cristy10549a12011-05-15 19:04:46 +00004644 improved frame optimization in GIF animations. </td>
cristy3ed852e2009-09-05 21:47:34 +00004645 </tr>
4646
4647 <tr valign="top">
4648 <td valign="top">trim-bounds</td>
4649 <td valign="top">Find the bounds of all the images in the current
4650 image sequence, then adjust the offsets so all images are contained on
cristy10549a12011-05-15 19:04:46 +00004651 a minimal positive canvas. None of the image data is modified or
4652 merged, only the individual image virtual canvas size and offset.
4653 All the images is given the same canvas size, and and will have
4654 a positive offset, but will remain in the same position relative to
4655 each other. As a result of the minimal canvas size at least one image
4656 will touch every edge of that canvas. The image data touching those
4657 edges however may be transparent. </td>
4658 </tr>
4659
4660 <tr><td></td><td>The result is much like if you used 'merge' followed by a
cristy149d58c2013-08-07 19:44:54 +00004661 <a href="command-line-options.html#repage">+repage</a> option, except that all the images
cristy10549a12011-05-15 19:04:46 +00004662 have been kept separate. If 'flatten' is used after using
4663 'trim-bounds' you will get the same result. </td>
cristy3ed852e2009-09-05 21:47:34 +00004664 </tr>
4665
4666 </tbody>
4667</table>
4668
cristy751980d2012-06-03 23:18:35 +00004669<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 +00004670
cristy149d58c2013-08-07 19:44:54 +00004671<p>The operators <a href="command-line-options.html#coalesce">-coalesce</a>, <a href="command-line-options.html#deconstruct">-deconstruct</a>, <a href="command-line-options.html#flatten">-flatten</a>, and <a href="command-line-options.html#mosaic">-mosaic</a> are only aliases for the above methods and may be depreciated in
4672the future. Also see <a href="command-line-options.html#page">-page</a>, <a href="command-line-options.html#repage">-repage</a> operators, the <a href="command-line-options.html#compose">-compose</a> setting, and the
4673GIF <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 +00004674settings. </p>
cristy3ed852e2009-09-05 21:47:34 +00004675
4676
4677<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004678 <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 +00004679</div>
4680
cristy149d58c2013-08-07 19:44:54 +00004681<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>
cristy3ed852e2009-09-05 21:47:34 +00004682
4683<p>Given one, two or three values delimited with commas: black-point,
4684white-point, gamma (for example: 10,250,1.0 or 2%,98%,0.5). The black and
cristy751980d2012-06-03 23:18:35 +00004685white points range from 0 to <em class="QR">QuantumRange</em>, or from 0 to
cristy149d58c2013-08-07 19:44:54 +00004686100%; if the white point is omitted it is set to (<em class="QR">QuantumRange</em> - black_point), so as to center contrast changes.
cristy8ee7f242013-06-20 16:08:44 +00004687If a <code>%</code> sign is present anywhere in the string, both black and white
cristy149d58c2013-08-07 19:44:54 +00004688points are percentages of the full color range. Gamma will do a <a href="command-line-options.html#gamma">-gamma</a> adjustment of the values. If it is omitted, the
cristy751980d2012-06-03 23:18:35 +00004689default of 1.0 (no gamma correction) is assumed.</p>
cristy3ed852e2009-09-05 21:47:34 +00004690
cristy8ee7f242013-06-20 16:08:44 +00004691<p>In normal usage (<code>-level</code>) the image values are stretched so that
4692the given '<code>black_point</code>' value in the original image is set to zero
cristy149d58c2013-08-07 19:44:54 +00004693(or black), while the given '<code>white_point</code>' value is set to <em class="QR">QuantumRange</em> (or white). This provides you with direct
cristy8ee7f242013-06-20 16:08:44 +00004694contrast adjustments to the image. The '<code>gamma</code>' of the resulting
cristy751980d2012-06-03 23:18:35 +00004695image will then be adjusted. </p>
cristy3ed852e2009-09-05 21:47:34 +00004696
cristy751980d2012-06-03 23:18:35 +00004697<p>From ImageMagick v6.4.1-9 using the plus form of the operator
cristy8ee7f242013-06-20 16:08:44 +00004698(<code>+level</code>) or adding the special '!' flag anywhere in the argument
cristy751980d2012-06-03 23:18:35 +00004699list, will cause the operator to do the reverse of the level adjustment. That
4700is a zero, or <em class="QR">QuantumRange</em> value (black, and white, resp.)
4701in the original image, is adjusted to the given level values, allowing you to
4702de-contrast, or compress the channel values within the image. The
cristy8ee7f242013-06-20 16:08:44 +00004703'<code>gamma</code>' is adjusted before the level adjustment to de-contrast the
cristy751980d2012-06-03 23:18:35 +00004704image is made. </p>
cristy3ed852e2009-09-05 21:47:34 +00004705
cristy751980d2012-06-03 23:18:35 +00004706<p>Only the channels defined by the current <a href="command-line-options.html#channel">-channel</a>
cristy3ed852e2009-09-05 21:47:34 +00004707setting are adjusted (defaults to RGB color channels only), allowing you to
4708limit the effect of this operator. </p>
4709
4710<p>Please note that the transparency channel is treated as 'matte'
4711values (0 is opaque) and not as 'alpha' values (0 is transparent).</p>
4712
4713
4714<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00004715 <h4><a id="level-colors"></a>-level-colors {<em class="arg">black_color</em>}{,}{<em class="arg">white_color</em>}</h4>
cristy3ed852e2009-09-05 21:47:34 +00004716</div>
4717
cristy149d58c2013-08-07 19:44:54 +00004718<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 +00004719
cristy751980d2012-06-03 23:18:35 +00004720<p>This function is exactly like <a href="command-line-options.html#level">-level</a>, except that the
cristy3ed852e2009-09-05 21:47:34 +00004721value value for each color channel is determined by the
cristy8ee7f242013-06-20 16:08:44 +00004722'<code>black_color</code>' and '<code>white_color</code>' colors given (as
cristy751980d2012-06-03 23:18:35 +00004723described under the <a href="command-line-options.html#fill">-fill</a> option). </p>
cristy3ed852e2009-09-05 21:47:34 +00004724
cristy8ee7f242013-06-20 16:08:44 +00004725<p>This effectually means the colors provided to <code>-level-colors</code>
cristyd0bda5e2010-09-21 16:22:45 +00004726is mapped to become 'black' and 'white' respectively, with all the other
cristy3ed852e2009-09-05 21:47:34 +00004727colors linearly adjusted (or clipped) to match that change. Each channel is
cristyd0bda5e2010-09-21 16:22:45 +00004728adjusted separately using the channel values of the colors specified. </p>
cristy3ed852e2009-09-05 21:47:34 +00004729
cristy8ee7f242013-06-20 16:08:44 +00004730<p>On the other hand the plus form of the operator (<code>+level-colors</code>)
cristy3ed852e2009-09-05 21:47:34 +00004731will map the image color 'black' and 'white' to the given colors
cristyd0bda5e2010-09-21 16:22:45 +00004732respectively, resulting in a gradient (de-contrasting) tint of the image to
cristy3ed852e2009-09-05 21:47:34 +00004733those colors. This can also be used to convert a plain gray-scale image into a
4734one using the gradient of colors specified. </p>
4735
4736<p>By supplying a single color with a comma separator either before or after
4737that color, will just replace the respective 'black' or 'white' point
cristyd0bda5e2010-09-21 16:22:45 +00004738respectively. But if no comma separator is provided, the given color is
cristy3ed852e2009-09-05 21:47:34 +00004739used for both the black and white color points, making the operator either
4740threshold the images around that color (- form) or set all colors to that
4741color (+ form). </p>
4742
4743
4744<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004745 <h4><a id="limit"></a>-limit <em class="arg">type value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004746</div>
4747
cristy149d58c2013-08-07 19:44:54 +00004748<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>
cristy3ed852e2009-09-05 21:47:34 +00004749
cristy8ee7f242013-06-20 16:08:44 +00004750<p>Choose from: <code>area</code>, <code>disk</code>, <code>file</code>,
4751<code>map</code>, <code>memory</code>, <code>threads</code>, or <code>time</code>.</p>
cristy3ed852e2009-09-05 21:47:34 +00004752
cristy8ee7f242013-06-20 16:08:44 +00004753<p>The value for <code>file</code> is in number of files. The other limits are
cristy751980d2012-06-03 23:18:35 +00004754in bytes. Define arguments for the memory, map, area, and disk resource limits
cristy149d58c2013-08-07 19:44:54 +00004755with SI prefixes (.e.g 100MB).</p>
cristy751980d2012-06-03 23:18:35 +00004756
cristy8ee7f242013-06-20 16:08:44 +00004757<p>By default the limits are 768 files, 3GB of image area, 1.5GiB memory, 3GiB
cristy751980d2012-06-03 23:18:35 +00004758memory map, and 18.45EB of disk. These limits are adjusted relative to the
4759available resources on your computer if this information is available. When
4760any limit is reached, ImageMagick fails in some fashion but attempts to take
4761compensating actions, if possible. For example, the following limits
4762memory:</p>
cristy3ed852e2009-09-05 21:47:34 +00004763
4764<p class="crtsnip">
cristyd934d102009-10-10 12:55:13 +00004765 -limit memory 32MiB -limit map 64MiB
cristy3ed852e2009-09-05 21:47:34 +00004766</p>
4767
cristy751980d2012-06-03 23:18:35 +00004768<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 +00004769
cristy149d58c2013-08-07 19:44:54 +00004770<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 +00004771 File Area Memory Map Disk Thread Time
4772 ------------------------------------------------------------------------------
4773 768 12.404GB 8.6642GiB 23.104GiB 18.446744EB 8 unlimited
cristydcca3fa2010-12-29 21:50:07 +00004774</pre>
4775
cristy751980d2012-06-03 23:18:35 +00004776<p>Requests for pixel storage to keep intermediate images are satisfied by one
4777of three resource categories: in-memory pool, memory-mapped files pool, and
cristy149d58c2013-08-07 19:44:54 +00004778disk pool (in that order) depending on the <a href="command-line-options.html#limit">‑limit</a> settings
cristy751980d2012-06-03 23:18:35 +00004779and whether the system honors a resource request. If the total size of
4780allocated pixel storage in the given pool reaches the corresponding limit, the
4781request is passed to the next pool. Additionally, requests that exceed the
cristy8ee7f242013-06-20 16:08:44 +00004782<code>area</code> limit automagically are allocated on disk.</p>
cristy3ed852e2009-09-05 21:47:34 +00004783
cristy751980d2012-06-03 23:18:35 +00004784<p>To illustrate how ImageMagick utilizes resource limits, consider a typical
4785image resource request. First, ImageMagick tries to allocate the pixels in
4786memory. The request might be denied if the resource request exceeds the
cristy8ee7f242013-06-20 16:08:44 +00004787<code>memory</code> limit or if the system does not honor the request. If
cristy751980d2012-06-03 23:18:35 +00004788a memory request is not honored, the pixels are allocated to disk and the file
4789is memory-mapped. However, if the allocation request exceeds the
cristy8ee7f242013-06-20 16:08:44 +00004790<code>map</code> limit, the resource allocation goes to disk. In all cases, if
4791the resource request exceeds the <code>area</code> limit, the pixels are
cristy751980d2012-06-03 23:18:35 +00004792automagically cached to disk. If the disk has a hard limit, the program
4793fails.</p>
cristy3ed852e2009-09-05 21:47:34 +00004794
cristy751980d2012-06-03 23:18:35 +00004795<p>In most cases you simply do not need to concern yourself with resource
4796limits. ImageMagick chooses reasonable defaults and most images do not tax
4797your computer resources. Where limits do come in handy is when you process
4798images that are large or on shared systems where ImageMagick can consume all
4799or most of the available memory. In this case, the ImageMagick workflow slows
4800other processes or, in extreme cases, brings the system to a halt. Under
4801these circumstances, setting limits give some assurances that the ImageMagick
4802workflow will not interfere with other concurrent uses of the computer. For
4803example, assume you have a web interface that processes images uploaded from
cristy8ee7f242013-06-20 16:08:44 +00004804the Internet. To assure ImageMagick does not exceed 10MiB of memory you can
4805simply set the area limit to 10MiB:</p>
cristy3ed852e2009-09-05 21:47:34 +00004806
4807<p class="crtsnip">
cristy8ee7f242013-06-20 16:08:44 +00004808-limit area 10MB
cristy3ed852e2009-09-05 21:47:34 +00004809</p>
4810
cristy751980d2012-06-03 23:18:35 +00004811<p>Now whenever a large image is processed, the pixels are automagically
4812cached to disk instead of memory. This of course implies that large images
4813typically process very slowly, simply because pixel processing in memory can
4814be an order of magnitude faster than on disk. Because your web site users
4815might inadvertently upload a huge image to process, you should set a disk
4816limit as well:</p>
cristy3ed852e2009-09-05 21:47:34 +00004817
4818<p class="crtsnip">
cristy8ee7f242013-06-20 16:08:44 +00004819-limit area 10MB -limit disk 500MB
cristy3ed852e2009-09-05 21:47:34 +00004820</p>
4821
4822<p>Here ImageMagick stops processing if an image requires more than 500MB of disk storage.</p>
4823
cristy751980d2012-06-03 23:18:35 +00004824<p>In addition to command-line resource limit option, resources can be set
cristy149d58c2013-08-07 19:44:54 +00004825with <a href="resources.html#environment">environment variables</a>. Set the
cristy8ee7f242013-06-20 16:08:44 +00004826environment variables <code>MAGICK_AREA_LIMIT</code>,
4827<code>MAGICK_DISK_LIMIT</code>, <code>MAGICK_FILE_LIMIT</code>,
4828<code>MAGICK_MEMORY_LIMIT</code>, <code>MAGICK_MAP_LIMIT</code>,
4829<code>MAGICK_THREAD_LIMIT</code>, <code>MAGICK_TIME_LIMIT</code> for limits of
cristy751980d2012-06-03 23:18:35 +00004830image area, disk space, open files, heap memory, memory map, number of threads
4831of execution, and maximum elapsed time in seconds respectively.</p>
cristy3ed852e2009-09-05 21:47:34 +00004832
cristy751980d2012-06-03 23:18:35 +00004833<p> Inquisitive users can try adding <a href="command-line-options.html#debug">-debug cache</a> to
4834their commands and then scouring the generated output for references to the
4835pixel cache, in order to determine how the pixel cache was allocated and how
4836resources were consumed. Advanced Unix/Linux users can pipe that output
cristy8ee7f242013-06-20 16:08:44 +00004837through <code>grep memory|open|destroy|disk</code> for more readable sifting.
cristy3ed852e2009-09-05 21:47:34 +00004838</p>
4839
cristy751980d2012-06-03 23:18:35 +00004840<p>For more about ImageMagick's use of resources, see the section <b>Cache
cristy149d58c2013-08-07 19:44:54 +00004841Storage and Resource Requirements</b> on the <a href="architecture.html#cache ">Architecture</a> page. </p>
cristy3ed852e2009-09-05 21:47:34 +00004842
4843<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00004844 <h4><a id="linear-stretch"></a>-linear-stretch <em class="arg">black-point</em><br></br>-linear-stretch <em class="arg">black-point</em>{x<em class="arg">white-point</em>}{<em class="arg">%</em>}}</h4>
cristy3ed852e2009-09-05 21:47:34 +00004845</div>
4846
cristy149d58c2013-08-07 19:44:54 +00004847<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>
cristy3ed852e2009-09-05 21:47:34 +00004848
cristy149d58c2013-08-07 19:44:54 +00004849<p>This is very similar to <a href="command-line-options.html#contrast-stretch">-contrast-stretch</a>,
cristyd934d102009-10-10 12:55:13 +00004850and uses a 'histogram bin' to determine the range of color values that needs to
cristy149d58c2013-08-07 19:44:54 +00004851be stretched. However it then stretches those colors using the <a href="command-line-options.html#level">-level</a> operator.</p>
cristyd934d102009-10-10 12:55:13 +00004852
4853<p>As such while the initial determination may have 'binning' round off
4854effects, the image colors are stretched mathematically, rather than using the
4855histogram bins. This makes the operator more accurate. </p>
4856
cristy149d58c2013-08-07 19:44:54 +00004857<p>note however that a <a href="command-line-options.html#linear-stretch">-linear-stretch</a> of
cristy8ee7f242013-06-20 16:08:44 +00004858'<code>0</code>' does nothing, while a value of '<code>1</code>' does a near
cristyd934d102009-10-10 12:55:13 +00004859perfect stretch of the color range. </p>
4860
cristy149d58c2013-08-07 19:44:54 +00004861<p>See also <a href="command-line-options.html#auto-level">-auto-level</a> for a 'perfect'
cristyd934d102009-10-10 12:55:13 +00004862normalization of mathematical images. </p>
4863
4864<p>This operator is under review for re-development. </p>
4865
4866
cristy3ed852e2009-09-05 21:47:34 +00004867<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004868 <h4><a id="linewidth"></a>-linewidth</h4>
cristy3ed852e2009-09-05 21:47:34 +00004869</div>
4870
cristy149d58c2013-08-07 19:44:54 +00004871<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>
cristy3ed852e2009-09-05 21:47:34 +00004872
4873<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004874 <h4><a id="liquid-rescale"></a>-liquid-rescale <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004875</div>
4876
cristy149d58c2013-08-07 19:44:54 +00004877<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>
cristy3ed852e2009-09-05 21:47:34 +00004878
cristy751980d2012-06-03 23:18:35 +00004879<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 +00004880
4881<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004882 <h4><a id="list"></a>-list <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004883</div>
4884
cristy149d58c2013-08-07 19:44:54 +00004885<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>
cristy3ed852e2009-09-05 21:47:34 +00004886
4887<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00004888 Align Alpha Boolean Channel
4889 Class ClipPath Coder Color
4890 Colorspace Command Compose Compress
4891 Configure DataType Debug Decoration
4892 Delegate Direction Dispose Distort
4893 Dither Endian Evaluate FillRule
4894 Filter Font Format Function
4895 Gravity ImageList Intent Interlace
4896 Interpolate Kernel Layers LineCap
4897 LineJoin List Locale LogEvent
4898 Log Magic Method Metric
4899 Mime Mode Morphology Module
4900 Noise Orientation Policy PolicyDomain
4901 PolicyRights Preview Primitive QuantumFormat
4902 Resource SparseColor Storage Stretch
4903 Style Threshold Type Units
4904 Validate VirtualPixel
cristy3ed852e2009-09-05 21:47:34 +00004905</pre>
4906
cristy8ee7f242013-06-20 16:08:44 +00004907<p>These lists vary depending on your version of ImageMagick. Use "<code>-list
4908list</code>" to get a complete listing of all the "<code>-list</code>" arguments
cristybac7a162010-06-15 19:57:29 +00004909available:</p>
cristy3ed852e2009-09-05 21:47:34 +00004910
cristy149d58c2013-08-07 19:44:54 +00004911<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">identify -list list</span></p>
cristy3ed852e2009-09-05 21:47:34 +00004912<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004913 <h4><a id="log"></a>-log <em class="arg">string</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004914</div>
4915
cristy149d58c2013-08-07 19:44:54 +00004916<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>
cristy3ed852e2009-09-05 21:47:34 +00004917
cristy149d58c2013-08-07 19:44:54 +00004918<p>This option specifies the format for the log printed when the <a href="command-line-options.html#debug">-debug</a> option is active.</p>
cristy3ed852e2009-09-05 21:47:34 +00004919
cristybac7a162010-06-15 19:57:29 +00004920<p>You can display the following components by embedding special format
4921characters:</p>
cristy3ed852e2009-09-05 21:47:34 +00004922
4923<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00004924 %d domain
4925 %e event
4926 %f function
4927 %l line
4928 %m module
4929 %p process ID
4930 %r real CPU time
4931 %t wall clock time
4932 %u user CPU time
4933 %% percent sign
4934 \n newline
4935 \r carriage return
cristy3ed852e2009-09-05 21:47:34 +00004936</pre>
4937
4938<p>For example:</p>
4939
cristy149d58c2013-08-07 19:44:54 +00004940<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 +00004941<p>The default behavior is to print all of the components.</p>
4942
4943<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004944 <h4><a id="loop"></a>-loop <em class="arg">iterations</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004945</div>
4946
cristy149d58c2013-08-07 19:44:54 +00004947<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>
cristy3ed852e2009-09-05 21:47:34 +00004948
cristybac7a162010-06-15 19:57:29 +00004949<p>Set iterations to zero to repeat the animation an infinite number of times,
4950otherwise the animation repeats itself up to <em class="arg">iterations</em>
4951times.</p>
cristy3ed852e2009-09-05 21:47:34 +00004952
4953<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004954 <h4><a id="lowlight-color"></a>-lowlight-color <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004955</div>
4956
cristy149d58c2013-08-07 19:44:54 +00004957<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>
cristy3ed852e2009-09-05 21:47:34 +00004958
4959<div style="margin: auto;">
cristy8ee7f242013-06-20 16:08:44 +00004960 <h4><a id="magnify"></a>-magnify</h4>
cristy3ed852e2009-09-05 21:47:34 +00004961</div>
4962
cristy149d58c2013-08-07 19:44:54 +00004963<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">double the size of the image with pixel art scaling.</td><td style="text-align:right;"></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00004964
4965
4966<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004967 <h4><a id="map"></a>-map <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004968</div>
4969
cristy149d58c2013-08-07 19:44:54 +00004970<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 +00004971
4972<p>Choose from these <em class="arg">Standard Colormap</em> types:</p>
4973
4974<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00004975 best
4976 default
4977 gray
4978 red
4979 green
4980 blue
cristy3ed852e2009-09-05 21:47:34 +00004981</pre>
4982
cristybac7a162010-06-15 19:57:29 +00004983<p>The <em class="arg">X server</em> must support the <em class="arg">Standard
cristy8ee7f242013-06-20 16:08:44 +00004984Colormap</em> you choose, otherwise an error occurs. Use <code>list</code> as
4985the type and <code>display</code> searches the list of colormap types in
cristy149d58c2013-08-07 19:44:54 +00004986<code>top-to-bottom</code> order until one is located. See <em class="arg">xstdcmap(1)</em> for one way of creating Standard Colormaps.</p>
cristy3ed852e2009-09-05 21:47:34 +00004987
4988
4989<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00004990 <h4><a id="map_stream_"></a>-map <em class="arg">components</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00004991</div>
4992
cristy149d58c2013-08-07 19:44:54 +00004993<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 +00004994
4995<p>Here are the valid components of a map:</p>
4996
4997<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00004998 r red pixel component
4999 g green pixel component
5000 b blue pixel component
5001 a alpha pixel component (0 is transparent)
5002 o opacity pixel component (0 is opaque)
5003 i grayscale intensity pixel component
5004 c cyan pixel component
5005 m magenta pixel component
5006 y yellow pixel component
5007 k black pixel component
5008 p pad component (always 0)
cristy3ed852e2009-09-05 21:47:34 +00005009</pre>
5010
cristybac7a162010-06-15 19:57:29 +00005011<p>You can specify as many of these components as needed in any order (e.g.
5012bgr). The components can repeat as well (e.g. rgbr).</p>
5013
cristy3ed852e2009-09-05 21:47:34 +00005014
5015<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005016 <h4><a id="mask"></a>-mask
cristy3ed852e2009-09-05 21:47:34 +00005017<em class="arg">filename</em></h4>
5018</div>
5019
cristy149d58c2013-08-07 19:44:54 +00005020<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 +00005021
cristyacc04882011-05-04 23:03:43 +00005022<p>This the same as using a mask used for composite masking operations, with
5023grayscale values causing blended updates of the image the mask is attached to.
cristy149d58c2013-08-07 19:44:54 +00005024</p>
cristyacc04882011-05-04 23:03:43 +00005025
cristy751980d2012-06-03 23:18:35 +00005026<p>Use <a href="command-line-options.html#mask">+mask</a> to remove the mask from images.</p>
cristyacc04882011-05-04 23:03:43 +00005027
cristy751980d2012-06-03 23:18:35 +00005028<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 +00005029but with strict boolean masking. </p>
cristy3ed852e2009-09-05 21:47:34 +00005030
5031<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005032 <h4><a id="mattecolor"></a>-mattecolor <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005033</div>
5034
cristy149d58c2013-08-07 19:44:54 +00005035<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 +00005036
cristy751980d2012-06-03 23:18:35 +00005037<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 +00005038
cristy149d58c2013-08-07 19:44:54 +00005039<p>The default matte color is <code>#BDBDBD</code>, <span style="background-color: #bdbdbd;">this shade of gray</span>.</p>
cristy3ed852e2009-09-05 21:47:34 +00005040
5041<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005042 <h4><a id="maximum"></a>-maximum</h4>
cristyd2baf7d2010-03-06 04:26:44 +00005043</div>
5044
cristy149d58c2013-08-07 19:44:54 +00005045<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>
cristyd2baf7d2010-03-06 04:26:44 +00005046
cristyacc04882011-05-04 23:03:43 +00005047<p>Select the 'maximum' value from all the surrounding pixels. </p>
5048
cristy149d58c2013-08-07 19:44:54 +00005049<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 +00005050name. </p>
5051
cristyd2baf7d2010-03-06 04:26:44 +00005052<div style="margin: auto;">
cristye9a32c32011-04-07 01:11:05 +00005053 <h4><a id="median"></a>-median <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005054</div>
5055
cristy149d58c2013-08-07 19:44:54 +00005056<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>
cristy3ed852e2009-09-05 21:47:34 +00005057
cristyacc04882011-05-04 23:03:43 +00005058<p>Select the 'middle' value from all the surrounding pixels. </p>
5059
cristy149d58c2013-08-07 19:44:54 +00005060<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 +00005061name. </p>
5062
cristy3ed852e2009-09-05 21:47:34 +00005063<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005064 <h4><a id="metric"></a>-metric <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005065</div>
5066
cristy149d58c2013-08-07 19:44:54 +00005067<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>
cristy3ed852e2009-09-05 21:47:34 +00005068
5069<p>Choose from:</p>
5070
5071<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00005072 AE absolute error count, number of different pixels (-fuzz effected)
5073 FUZZ mean color distance
5074 MAE mean absolute error (normalized), average channel error distance
5075 MEPP mean error per pixel (normalized mean error, normalized peak error)
5076 MSE mean error squared, average of the channel error squared
5077 NCC normalized cross correlation
5078 PAE peak absolute (normalize peak absolute)
5079 PSNR peak signal to noise ratio
5080 RMSE root mean squared (normalized root mean squared)
cristy3ed852e2009-09-05 21:47:34 +00005081</pre>
5082
cristy8ee7f242013-06-20 16:08:44 +00005083<p>Control the '<code>AE</code>', or absolute count of pixels that are different,
cristy149d58c2013-08-07 19:44:54 +00005084with the <a href="command-line-options.html#fuzz">-fuzz</a> factor (ignore pixels which
cristy8ee7f242013-06-20 16:08:44 +00005085only changed by a small amount). Use '<code>PAE</code>' to find the
cristy149d58c2013-08-07 19:44:54 +00005086size of the <a href="command-line-options.html#fuzz">-fuzz</a> factor needed to make all pixels
cristy8ee7f242013-06-20 16:08:44 +00005087'similar', while '<code>MAE</code>' determines the factor needed
cristybac7a162010-06-15 19:57:29 +00005088for about half the pixels to be similar. </p>
cristy3ed852e2009-09-05 21:47:34 +00005089
cristy8ee7f242013-06-20 16:08:44 +00005090<p>The '<code>MEPP</code>' metric returns three different metrics
5091('<code>MAE</code>', '<code>MAE</code>' normalized, and '<code>PAE</code>'
cristyd0bda5e2010-09-21 16:22:45 +00005092normalized) from a single comparison run. </p>
cristy3ed852e2009-09-05 21:47:34 +00005093
cristy751980d2012-06-03 23:18:35 +00005094<p>To print a complete list of metrics, use the <a href="command-line-options.html#list">-list
cristy149d58c2013-08-07 19:44:54 +00005095metric</a> option.</p>
cristybac7a162010-06-15 19:57:29 +00005096
cristy3ed852e2009-09-05 21:47:34 +00005097
cristyd2baf7d2010-03-06 04:26:44 +00005098<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005099 <h4><a id="minimum"></a>-minimum</h4>
cristyd2baf7d2010-03-06 04:26:44 +00005100</div>
5101
cristy149d58c2013-08-07 19:44:54 +00005102<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>
cristyd2baf7d2010-03-06 04:26:44 +00005103
cristyacc04882011-05-04 23:03:43 +00005104<p>Select the 'minimal' value from all the surrounding pixels. </p>
5105
cristy149d58c2013-08-07 19:44:54 +00005106<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 +00005107name. </p>
5108
5109
cristy3ed852e2009-09-05 21:47:34 +00005110
5111<div style="margin: auto;">
cristye9a32c32011-04-07 01:11:05 +00005112 <h4><a id="mode"></a>-mode <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005113</div>
5114
cristy149d58c2013-08-07 19:44:54 +00005115<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 +00005116
5117<div style="margin: auto;">
5118 <h4>-mode <em class="arg">value</em></h4>
5119</div>
5120
cristy149d58c2013-08-07 19:44:54 +00005121<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 +00005122
cristy8ee7f242013-06-20 16:08:44 +00005123<p>Choose the <em class="arg">value</em> from these styles: <code>Frame,
5124Unframe, or Concatenate</code></p>
cristy3ed852e2009-09-05 21:47:34 +00005125
cristy149d58c2013-08-07 19:44:54 +00005126<p>Use the <a href="command-line-options.html#list">-list</a> option with a '<code>Mode</code>' argument
5127for a list of <a href="command-line-options.html#mode">-mode</a> arguments available in your
cristybac7a162010-06-15 19:57:29 +00005128ImageMagick installation.</p>
cristy3ed852e2009-09-05 21:47:34 +00005129
5130
5131<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005132 <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 +00005133</div>
5134
cristy149d58c2013-08-07 19:44:54 +00005135<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Vary the <em class="arg">brightness</em>, <em class="arg">saturation</em>, and <em class="arg">hue</em> of an image.</td><td style="text-align:right;"></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00005136
cristyb36feb22010-03-26 16:54:37 +00005137<p>The arguments are given as a percentages of variation. A value of 100 means
5138no change, and any missing values are taken to mean 100.</p>
cristy3ed852e2009-09-05 21:47:34 +00005139
cristyb36feb22010-03-26 16:54:37 +00005140<p>The <em class="arg">brightness</em> is a multiplier of the overall
5141brightness of the image, so 0 means pure black, 50 is half as bright, 200 is
cristy751980d2012-06-03 23:18:35 +00005142twice as bright. To invert its meaning <a href="command-line-options.html#negate">-negate</a> the image
cristyb36feb22010-03-26 16:54:37 +00005143before and after. </p>
cristy3ed852e2009-09-05 21:47:34 +00005144
cristyb36feb22010-03-26 16:54:37 +00005145<p>The <em class="arg">saturation</em> controls the amount of color in an
5146image. For example, 0 produce a grayscale image, while a large value such as
5147200 produce a very colorful, 'cartoonish' color.</p>
cristy3ed852e2009-09-05 21:47:34 +00005148
cristyb36feb22010-03-26 16:54:37 +00005149<p>The <em class="arg">hue</em> argument causes a "rotation" of the colors
5150within the image by the amount specified. For example, 50 results in
5151a counter-clockwise rotation of 90, mapping red shades to purple, and so on.
5152A value of either 0 or 200 results in a complete 180 degree rotation of the
5153image. Using a value of 300 is a 360 degree rotation resulting in no change to
5154the original image. </p>
cristy3ed852e2009-09-05 21:47:34 +00005155
cristyb36feb22010-03-26 16:54:37 +00005156<p>For example, to increase the color brightness by 20% and decrease the color
cristy149d58c2013-08-07 19:44:54 +00005157saturation by 10% and leave the hue unchanged, use <a href="command-line-options.html#modulate">-modulate 120,90</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00005158
cristy149d58c2013-08-07 19:44:54 +00005159<p>Use <a href="command-line-options.html#set">-set</a> attribute of '<code class="arg">option:modulate:colorspace</code>' to specify which colorspace to
cristy8ee7f242013-06-20 16:08:44 +00005160modulate. Choose from <code>HCL</code>, <code>HCLp</code>, <code>HSB</code>, <code>HSI</code>, <code>HSL</code> (the default), <code>HSV</code>, <code>HWB</code>, or <code>LCH</code> (LCHuv). For example,</p>
cristy3ed852e2009-09-05 21:47:34 +00005161
cristy149d58c2013-08-07 19:44:54 +00005162<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 +00005163
cristy3ed852e2009-09-05 21:47:34 +00005164<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005165 <h4><a id="monitor"></a>-monitor</h4>
cristy3ed852e2009-09-05 21:47:34 +00005166</div>
5167
cristy149d58c2013-08-07 19:44:54 +00005168<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>
cristy3ed852e2009-09-05 21:47:34 +00005169
5170
5171<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005172 <h4><a id="monochrome"></a>-monochrome</h4>
cristy3ed852e2009-09-05 21:47:34 +00005173</div>
5174
cristy149d58c2013-08-07 19:44:54 +00005175<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>
cristy3ed852e2009-09-05 21:47:34 +00005176
cristy3ed852e2009-09-05 21:47:34 +00005177<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005178 <h4><a id="morph"></a>-morph <em class="arg">frames</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005179</div>
5180
cristy149d58c2013-08-07 19:44:54 +00005181<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>
cristy3ed852e2009-09-05 21:47:34 +00005182
5183<p>Both the image pixels and size are linearly interpolated to give the
cristyeed6cb62012-01-28 19:38:34 +00005184appearance of a metamorphosis from one image to the next, over all the images
cristy149d58c2013-08-07 19:44:54 +00005185in the current image list. The added images are the equivalent of a <a href="command-line-options.html#blend">-blend</a> composition. The <em class="arg">frames</em>
cristy3ed852e2009-09-05 21:47:34 +00005186argument determine how many images to interpolate between each image. </p>
5187
5188
5189<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005190 <h4><a id="morphology"></a>-morphology</h4>
5191 <h4>-morphology <em class="arg">method</em> <em class="arg">kernel</em></h4>
cristy488844c2010-01-22 14:02:05 +00005192</div>
5193
cristy149d58c2013-08-07 19:44:54 +00005194<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 +00005195
cristy149d58c2013-08-07 19:44:54 +00005196<p>Until I get around to writing an option summary for this, see <a href="http://www.imagemagick.org/Usage/morphology/">IM Usage Examples,
cristydcca3fa2010-12-29 21:50:07 +00005197Morphology</a>. </p>
cristy83a272e2010-05-07 20:40:35 +00005198
5199
cristy488844c2010-01-22 14:02:05 +00005200<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005201 <h4><a id="mosaic"></a>-mosaic</h4>
cristy3ed852e2009-09-05 21:47:34 +00005202</div>
5203
cristy149d58c2013-08-07 19:44:54 +00005204<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 +00005205
5206
5207<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00005208 <h4><a id="motion-blur"></a>-motion-blur <em class="arg">radius</em><br></br>-motion-blur <em class="arg">radius</em>x<em class="arg">sigma</em>+<em class="arg">angle</em>+<em class="arg">bias</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005209</div>
5210
cristy149d58c2013-08-07 19:44:54 +00005211<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>
cristy3ed852e2009-09-05 21:47:34 +00005212
5213<p>Blur with the given radius, standard deviation (sigma), and angle. The
5214angle given is the angle toward which the image is blurred. That is the
5215direction people would consider the object is coming from. </p>
5216
5217<p>Note that the blur is not uniform distribution, giving the motion a
cristyd0bda5e2010-09-21 16:22:45 +00005218definite sense of direction of movement. </p>
cristy3ed852e2009-09-05 21:47:34 +00005219
cristy751980d2012-06-03 23:18:35 +00005220<p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
cristy3ed852e2009-09-05 21:47:34 +00005221pixels which are outside the image proper are blurred into the final result.
5222</p>
5223
5224<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005225 <h4><a id="name"></a>-name</h4>
cristy3ed852e2009-09-05 21:47:34 +00005226</div>
5227
cristy149d58c2013-08-07 19:44:54 +00005228<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>
cristy3ed852e2009-09-05 21:47:34 +00005229<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005230 <h4><a id="negate"></a>-negate</h4>
cristy3ed852e2009-09-05 21:47:34 +00005231</div>
5232
cristy149d58c2013-08-07 19:44:54 +00005233<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 +00005234
cristy751980d2012-06-03 23:18:35 +00005235<p>The red, green, and blue intensities of an image are negated. White becomes
5236black, yellow becomes blue, etc. Use <a href="command-line-options.html#negate">+negate</a> to only
5237negate the grayscale pixels of the image.</p>
cristy3ed852e2009-09-05 21:47:34 +00005238
5239<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00005240 <h4><a id="noise"></a>-noise <em class="arg">geometry</em><br></br>
cristy3ed852e2009-09-05 21:47:34 +00005241 +noise <em class="arg">type</em></h4>
5242</div>
5243
cristy149d58c2013-08-07 19:44:54 +00005244<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>
cristy3ed852e2009-09-05 21:47:34 +00005245
cristy751980d2012-06-03 23:18:35 +00005246<p>The principal function of noise peak elimination filter is to smooth the
5247objects within an image without losing edge information and without creating
5248undesired structures. The central idea of the algorithm is to replace a pixel
5249with its next neighbor in value within a pixel window, if this pixel has been
5250found to be noise. A pixel is defined as noise if and only if this pixel is
5251a maximum or minimum within the pixel window.</p>
cristy3ed852e2009-09-05 21:47:34 +00005252
cristy8ee7f242013-06-20 16:08:44 +00005253<p>Use <code><a href="command-line-options.html#noise">-noise</a> <em class="arg">radius</em></code> to
cristy751980d2012-06-03 23:18:35 +00005254specify the width of the neighborhood when reducing noise. This is equivelent
cristy149d58c2013-08-07 19:44:54 +00005255to using a <code><a href="command-line-options.html#statistic">-statistic</a> NonPeak</code> operation,
cristy751980d2012-06-03 23:18:35 +00005256which should be used in preference.</p>
cristy3ed852e2009-09-05 21:47:34 +00005257
cristy149d58c2013-08-07 19:44:54 +00005258<p>Use <a href="command-line-options.html#noise">+noise</a> followed by a noise <em class="arg">type</em> to add noise to an image. Choose from these noise
cristy751980d2012-06-03 23:18:35 +00005259types:</p>
cristy3ed852e2009-09-05 21:47:34 +00005260
5261<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00005262 Gaussian
5263 Impulse
5264 Laplacian
5265 Multiplicative
5266 Poisson
5267 Random
5268 Uniform
cristy3ed852e2009-09-05 21:47:34 +00005269</pre>
5270
cristy149d58c2013-08-07 19:44:54 +00005271<p>The amount of noise added can be controled by the <code><a href="command-line-options.html#attunuuate">-attenuate</a></code> setting. If unset the value is
cristy751980d2012-06-03 23:18:35 +00005272equivelent to 1.0, or a maximum noise addition.</p>
cristy3ed852e2009-09-05 21:47:34 +00005273
cristy149d58c2013-08-07 19:44:54 +00005274<p>Note that Random will replace the image with noise rather than add noise to the image. Use Uniform, if you wish to add random noise to the image.</p>
cristy8ee7f242013-06-20 16:08:44 +00005275
cristy751980d2012-06-03 23:18:35 +00005276<p>To print a complete list of noises, use the <a href="command-line-options.html#list">-list noise</a> option.</p>
5277
5278<p>Also see the <a href="command-line-options.html#evaluate">-evaluate</a> noise functions that allows
cristyeed6cb62012-01-28 19:38:34 +00005279the use of a controlling value to specify the amount of noise that should be
cristy83543962009-10-16 19:04:28 +00005280added to an image. </p>
5281
cristy3ed852e2009-09-05 21:47:34 +00005282
5283<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005284 <h4><a id="normalize"></a>-normalize</h4>
cristy3ed852e2009-09-05 21:47:34 +00005285</div>
5286
cristy149d58c2013-08-07 19:44:54 +00005287<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>
cristy3ed852e2009-09-05 21:47:34 +00005288
cristyd934d102009-10-10 12:55:13 +00005289<p>The intensity values are stretched to cover the entire range of possible
5290values. While doing so, black-out at most <em>2%</em> of the pixels and
5291white-out at most <em>1%</em> of the pixels.</p>
cristy3ed852e2009-09-05 21:47:34 +00005292
cristy149d58c2013-08-07 19:44:54 +00005293<p>Note that as of ImageMagick 6.4.7-0, <a href="command-line-options.html#normalize">-normalize</a>
5294is equivalent to <a href="command-line-options.html#contrast-stretch">-contrast-stretch 2%x1%</a>.
5295(Before this version, it was equivalent to <a href="command-line-options.html#contrast-stretch">-contrast-stretch 2%x99%</a>).</p>
cristy3ed852e2009-09-05 21:47:34 +00005296
cristyd934d102009-10-10 12:55:13 +00005297<p>All the channels are normalized in concert by the came amount so as to
cristy149d58c2013-08-07 19:44:54 +00005298preserve color integrity, when the default <a href="command-line-options.html#channel">+channel</a>
5299setting is in use. Specifying any other <a href="command-line-options.html#channel">-channel</a>
cristyd934d102009-10-10 12:55:13 +00005300setting will normalize the RGB channels independently.</p>
5301
cristy149d58c2013-08-07 19:44:54 +00005302<p>See <a href="command-line-options.html#contrast-stretch">-contrast-stretch</a> for more details.
5303Also see <a href="command-line-options.html#auto-level">-auto-level</a> for a 'perfect' normalization
cristy83543962009-10-16 19:04:28 +00005304that is better suited to mathematically generated images. </p>
cristyd934d102009-10-10 12:55:13 +00005305
5306<p>This operator is under review for re-development. </p>
cristy3ed852e2009-09-05 21:47:34 +00005307
5308
5309<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005310 <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 +00005311</div>
5312
cristy149d58c2013-08-07 19:44:54 +00005313<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">dither the image using a pre-defined ordered dither <em class="arg">threshold map</em> specified, and a uniform color map with the
5314given 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 +00005315
5316<p>You can choose from these standard threshold maps:</p>
5317
5318<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00005319 threshold 1x1 Threshold 1x1 (non-dither)
5320 checks 2x1 Checkerboard 2x1 (dither)
5321 o2x2 2x2 Ordered 2x2 (dispersed)
5322 o3x3 3x3 Ordered 3x3 (dispersed)
5323 o4x4 4x4 Ordered 4x4 (dispersed)
5324 o8x8 8x8 Ordered 8x8 (dispersed)
5325 h4x4a 4x1 Halftone 4x4 (angled)
5326 h6x6a 6x1 Halftone 6x6 (angled)
5327 h8x8a 8x1 Halftone 8x8 (angled)
5328 h4x4o Halftone 4x4 (orthogonal)
5329 h6x6o Halftone 6x6 (orthogonal)
5330 h8x8o Halftone 8x8 (orthogonal)
5331 h16x16o Halftone 16x16 (orthogonal)
5332 c5x5b c5x5 Circles 5x5 (black)
5333 c5x5w Circles 5x5 (white)
5334 c6x6b c6x6 Circles 6x6 (black)
5335 c6x6w Circles 6x6 (white)
5336 c7x7b c7x7 Circles 7x7 (black)
5337 c7x7w Circles 7x7 (white)
cristy3ed852e2009-09-05 21:47:34 +00005338</pre>
5339
cristy8ee7f242013-06-20 16:08:44 +00005340<p> The <code>threshold</code> generated a simple 50% threshold of the image.
cristy149d58c2013-08-07 19:44:54 +00005341This could be used with <em class="arg">level</em> to do the equivalent of <a href="command-line-options.html#posterize">-posterize</a> to reduce an image to basic primary colors.
cristy945bb352011-04-01 15:39:28 +00005342</p>
cristy3ed852e2009-09-05 21:47:34 +00005343
cristy8ee7f242013-06-20 16:08:44 +00005344<p>The <code>checks</code> pattern produces a 3 level checkerboard dither
cristy945bb352011-04-01 15:39:28 +00005345pattern. That is a grayscale will become a pattern of solid black, solid
5346white, and mid-tone colors into a checkerboard pattern of black and white.
5347</p>
cristy3ed852e2009-09-05 21:47:34 +00005348
cristy149d58c2013-08-07 19:44:54 +00005349<p>You can define your own <em class="arg">threshold map</em> for ordered
cristy945bb352011-04-01 15:39:28 +00005350dithering and halftoning your images, in either personal or system
cristy149d58c2013-08-07 19:44:54 +00005351<code>thresholds.xml</code> XML file. See <a href="resources.html">Resources</a>
cristy945bb352011-04-01 15:39:28 +00005352for more details of configuration files. </p>
cristy3ed852e2009-09-05 21:47:34 +00005353
cristy945bb352011-04-01 15:39:28 +00005354<p>To print a complete list of the thresholds that have been defined, use the
cristy149d58c2013-08-07 19:44:54 +00005355<a href="command-line-options.html#list">-list threshold</a> option.</p>
cristy945bb352011-04-01 15:39:28 +00005356
5357<p>Note that at this time the same threshold dithering map is used for all
5358color channels, no attempt is made to offset or rotate the map for different
5359channels is made, to create an offset printing effect. Also as the maps are
5360simple threshold levels, the halftone and circle maps will create incomplete
5361circles along the edges of a colored area. Also all the effects are purely
5362on/off boolean effects, without anti-aliasing to make the circles smooth
5363looking. Large dots can be made to look better with a small amount of blurring
5364after being created. </p>
cristy3ed852e2009-09-05 21:47:34 +00005365
5366
5367<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005368 <h4><a id="opaque"></a>-opaque <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005369</div>
5370
cristy149d58c2013-08-07 19:44:54 +00005371<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>
cristy3ed852e2009-09-05 21:47:34 +00005372
cristyc54f5d42009-11-27 21:36:31 +00005373<p>The <em class="arg">color</em> argument is defined using the format
cristy149d58c2013-08-07 19:44:54 +00005374described under the <a href="command-line-options.html#fill">-fill</a> option. The <a href="command-line-options.html#fuzz">-fuzz</a> setting can be used to match and replace colors similar to the one
cristyd934d102009-10-10 12:55:13 +00005375given.</p>
cristy3ed852e2009-09-05 21:47:34 +00005376
cristy751980d2012-06-03 23:18:35 +00005377<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 +00005378the target color. </p>
cristy3ed852e2009-09-05 21:47:34 +00005379
cristy751980d2012-06-03 23:18:35 +00005380<p>The <a href="command-line-options.html#transparent">-transparent</a> operator is exactly the same
cristy149d58c2013-08-07 19:44:54 +00005381as <a href="command-line-options.html#opaque">-opaque</a> but replaces the matching color with
cristy751980d2012-06-03 23:18:35 +00005382transparency rather than the current <a href="command-line-options.html#fill">-fill</a> color setting.
cristyb36feb22010-03-26 16:54:37 +00005383To ensure that it can do this it also ensures that the image has an alpha
cristy149d58c2013-08-07 19:44:54 +00005384channel enabled, as per "<code><a href="command-line-options.html#alpha">-alpha</a> set</code>", for
5385the new transparent colors, and does not require you to modify the <a href="command-line-options.html#channel">-channel</a> to enable alpha channel handling. </p>
cristyd934d102009-10-10 12:55:13 +00005386
cristy3ed852e2009-09-05 21:47:34 +00005387
5388<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005389 <h4><a id="orient"></a>-orient <em class="arg">image orientation</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005390</div>
5391
cristy149d58c2013-08-07 19:44:54 +00005392<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>
cristy3ed852e2009-09-05 21:47:34 +00005393
5394<p>Choose from these orientations:</p>
5395
5396<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00005397 bottom-left
5398 bottom-right
5399 left-bottom
5400 left-top
5401 right-bottom
5402 right-top
5403 top-left
5404 top-right
5405 undefined
cristy3ed852e2009-09-05 21:47:34 +00005406</pre>
5407
cristy149d58c2013-08-07 19:44:54 +00005408<p>To print a complete list of orientations, use the <a href="command-line-options.html#list">-list
cristyd934d102009-10-10 12:55:13 +00005409orientation</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00005410
5411
5412<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00005413 <h4><a id="page"></a>-page <em class="arg">geometry</em><br></br>
5414 -page <em class="arg">media</em>[<em class="arg">offset</em>][{<em class="arg">^!&lt;&gt;</em>}]<br></br>
cristy3ed852e2009-09-05 21:47:34 +00005415 +page
5416 </h4>
5417</div>
5418
cristy149d58c2013-08-07 19:44:54 +00005419<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>
cristy3ed852e2009-09-05 21:47:34 +00005420
cristy751980d2012-06-03 23:18:35 +00005421<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 +00005422
cristy149d58c2013-08-07 19:44:54 +00005423<p>For convenience you can specify the page size using <em class="arg">media</em> (see below). Offsets can then be added as with other
5424<em class="arg">geometry</em> arguments (e.g. <a href="command-line-options.html#page">-page</a> <code>Letter+43+43</code>).</p>
cristy3ed852e2009-09-05 21:47:34 +00005425
cristy149d58c2013-08-07 19:44:54 +00005426<p>Use <em class="arg">media</em> as shorthand to specify the dimensions (<em class="arg">width</em>x<em class="arg">height</em>) of the <em class="arg">PostScript</em> page in dots per inch or a TEXT page in pixels.
cristy751980d2012-06-03 23:18:35 +00005427The choices for a PostScript page are:</p>
5428
cristy149d58c2013-08-07 19:44:54 +00005429<table id="geometryTable" cellpadding="2" cellspacing="0" border="1" width="50%" style="margin-left: auto; margin-right: auto;">
cristy3ed852e2009-09-05 21:47:34 +00005430<thead>
5431 <tr valign="top">
5432 <th align="center"><em class="arg">media</em></th>
5433 <th align="center"><em class="arg">width</em></th>
5434 <th align="center"><em class="arg">height</em></th>
5435 </tr>
5436</thead>
5437<tbody>
5438<tr><td align="left"> 11x17 </td> <td align="right"> 792</td> <td align="right"> 1224</td> </tr>
5439<tr><td align="left"> Ledger </td> <td align="right"> 1224</td> <td align="right"> 792</td> </tr>
5440<tr><td align="left"> Legal </td> <td align="right"> 612</td> <td align="right"> 1008</td> </tr>
5441<tr><td align="left"> Letter </td> <td align="right"> 612</td> <td align="right"> 792</td> </tr>
5442<tr><td align="left"> LetterSmall</td> <td align="right"> 612</td> <td align="right"> 792</td> </tr>
5443<tr><td align="left"> ArchE </td> <td align="right"> 2592</td> <td align="right"> 3456</td> </tr>
5444<tr><td align="left"> ArchD </td> <td align="right"> 1728</td> <td align="right"> 2592</td> </tr>
5445<tr><td align="left"> ArchC </td> <td align="right"> 1296</td> <td align="right"> 1728</td> </tr>
5446<tr><td align="left"> ArchB </td> <td align="right"> 864</td> <td align="right"> 1296</td> </tr>
5447<tr><td align="left"> ArchA </td> <td align="right"> 648</td> <td align="right"> 864</td> </tr>
5448<tr><td align="left"> A0 </td> <td align="right"> 2380</td> <td align="right"> 3368</td> </tr>
5449<tr><td align="left"> A1 </td> <td align="right"> 1684</td> <td align="right"> 2380</td> </tr>
5450<tr><td align="left"> A2 </td> <td align="right"> 1190</td> <td align="right"> 1684</td> </tr>
5451<tr><td align="left"> A3 </td> <td align="right"> 842</td> <td align="right"> 1190</td> </tr>
5452<tr><td align="left"> A4 </td> <td align="right"> 595</td> <td align="right"> 842</td> </tr>
5453<tr><td align="left"> A4Small </td> <td align="right"> 595</td> <td align="right"> 842</td> </tr>
5454<tr><td align="left"> A5 </td> <td align="right"> 421</td> <td align="right"> 595</td> </tr>
5455<tr><td align="left"> A6 </td> <td align="right"> 297</td> <td align="right"> 421</td> </tr>
5456<tr><td align="left"> A7 </td> <td align="right"> 210</td> <td align="right"> 297</td> </tr>
5457<tr><td align="left"> A8 </td> <td align="right"> 148</td> <td align="right"> 210</td> </tr>
5458<tr><td align="left"> A9 </td> <td align="right"> 105</td> <td align="right"> 148</td> </tr>
5459<tr><td align="left"> A10 </td> <td align="right"> 74</td> <td align="right"> 105</td> </tr>
5460<tr><td align="left"> B0 </td> <td align="right"> 2836</td> <td align="right"> 4008</td> </tr>
5461<tr><td align="left"> B1 </td> <td align="right"> 2004</td> <td align="right"> 2836</td> </tr>
5462<tr><td align="left"> B2 </td> <td align="right"> 1418</td> <td align="right"> 2004</td> </tr>
5463<tr><td align="left"> B3 </td> <td align="right"> 1002</td> <td align="right"> 1418</td> </tr>
5464<tr><td align="left"> B4 </td> <td align="right"> 709</td> <td align="right"> 1002</td> </tr>
5465<tr><td align="left"> B5 </td> <td align="right"> 501</td> <td align="right"> 709</td> </tr>
5466<tr><td align="left"> C0 </td> <td align="right"> 2600</td> <td align="right"> 3677</td> </tr>
5467<tr><td align="left"> C1 </td> <td align="right"> 1837</td> <td align="right"> 2600</td> </tr>
5468<tr><td align="left"> C2 </td> <td align="right"> 1298</td> <td align="right"> 1837</td> </tr>
5469<tr><td align="left"> C3 </td> <td align="right"> 918</td> <td align="right"> 1298</td> </tr>
5470<tr><td align="left"> C4 </td> <td align="right"> 649</td> <td align="right"> 918</td> </tr>
5471<tr><td align="left"> C5 </td> <td align="right"> 459</td> <td align="right"> 649</td> </tr>
5472<tr><td align="left"> C6 </td> <td align="right"> 323</td> <td align="right"> 459</td> </tr>
5473<tr><td align="left"> Flsa </td> <td align="right"> 612</td> <td align="right"> 936</td> </tr>
5474<tr><td align="left"> Flse </td> <td align="right"> 612</td> <td align="right"> 936</td> </tr>
5475<tr><td align="left"> HalfLetter </td> <td align="right"> 396</td> <td align="right"> 612</td> </tr>
5476</tbody>
5477</table>
5478
5479
cristy751980d2012-06-03 23:18:35 +00005480<p>This option is also used to place subimages when writing to a multi-image
5481format that supports offsets, such as GIF89 and MNG. When used for this
5482purpose the offsets are always measured from the top left corner of the canvas
5483and are not affected by the <a href="command-line-options.html#gravity">-gravity</a> option. To
cristy149d58c2013-08-07 19:44:54 +00005484position a GIF or MNG image, use <a href="command-line-options.html#page">-page</a><em class="arg">{+-}x{+-}y</em> (e.g. -page +100+200). When writing to a MNG
cristy751980d2012-06-03 23:18:35 +00005485file, a <a href="command-line-options.html#page">-page</a> option appearing ahead of the first image in
5486the sequence with nonzero width and height defines the width and height values
cristy8ee7f242013-06-20 16:08:44 +00005487that are written in the <code>MHDR</code> chunk. Otherwise, the MNG width and
cristy751980d2012-06-03 23:18:35 +00005488height are computed from the bounding box that contains all images in the
5489sequence. When writing a GIF89 file, only the bounding box method is used to
5490determine its dimensions.</p>
cristy3ed852e2009-09-05 21:47:34 +00005491
cristy149d58c2013-08-07 19:44:54 +00005492<p>For a PostScript page, the image is sized as in <a href="command-line-options.html#geometry">-geometry</a> but positioned relative to the <em>lower
5493left-hand corner</em> of the page by {+-}<code>x</code><em class="arg">offset</em>{+-}<code>y</code> <em class="arg">offset</em>. Use <a href="command-line-options.html#page">-page 612x792</a>, for example, to center the image within the
cristy751980d2012-06-03 23:18:35 +00005494page. If the image size exceeds the PostScript page, it is reduced to fit the
cristy149d58c2013-08-07 19:44:54 +00005495page. The default gravity for the <a href="command-line-options.html#page">-page</a> option is <em class="arg">NorthWest</em>, i.e., positive <code>x</code> and <code>y</code> <em class="arg">offset</em> are measured rightward and downward from the top left
cristy751980d2012-06-03 23:18:35 +00005496corner of the page, unless the <a href="command-line-options.html#gravity">-gravity</a> option is
5497present with a value other than <em class="arg">NorthWest</em>.</p>
cristy3ed852e2009-09-05 21:47:34 +00005498
5499<p>The default page dimensions for a TEXT image is 612x792.</p>
5500
cristy751980d2012-06-03 23:18:35 +00005501<p>This option is used in concert with <a href="command-line-options.html#density">-density</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00005502
cristy751980d2012-06-03 23:18:35 +00005503<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 +00005504
5505<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005506 <h4><a id="paint"></a>-paint <em class="arg">radius</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005507</div>
5508
cristy149d58c2013-08-07 19:44:54 +00005509<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>
cristy3ed852e2009-09-05 21:47:34 +00005510
cristy751980d2012-06-03 23:18:35 +00005511<p>Each pixel is replaced by the most frequent color in a circular
5512neighborhood whose width is specified with <em class="arg">radius</em>.</p>
cristy3ed852e2009-09-05 21:47:34 +00005513
5514<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005515 <h4><a id="path"></a>-path <em class="arg">path</em></h4></div>
cristy3ed852e2009-09-05 21:47:34 +00005516
cristy149d58c2013-08-07 19:44:54 +00005517<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>
cristy3ed852e2009-09-05 21:47:34 +00005518
5519<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005520 <h4><a id="pause_animate_"></a>-pause <em class="arg">seconds</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005521</div>
5522
cristy149d58c2013-08-07 19:44:54 +00005523<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 +00005524
5525<p>Pause for the specified number of seconds before repeating the animation.</p>
5526
5527<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005528 <h4><a id="pause_import_"></a>-pause <em class="arg">seconds</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005529</div>
5530
cristy149d58c2013-08-07 19:44:54 +00005531<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 +00005532
5533<p>Pause for the specified number of seconds before taking the next snapshot.</p>
5534
5535<div style="margin: auto;">
cristy8ee7f242013-06-20 16:08:44 +00005536 <h4><a id="perceptible"></a>-perceptible <em class="arg">epsilon</em></h4>
5537</div>
5538
cristy149d58c2013-08-07 19:44:54 +00005539<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">set each pixel whose value is less than |<em>epsilon</em>| to <em>-epsilon</em> or <em>epsilon</em> (whichever is closer) otherwise the pixel value remains unchanged.</td><td style="text-align:right;"></td></tr></table>
cristy8ee7f242013-06-20 16:08:44 +00005540
5541<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005542 <h4><a id="ping"></a>-ping</h4>
cristy3ed852e2009-09-05 21:47:34 +00005543</div>
5544
cristy149d58c2013-08-07 19:44:54 +00005545<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>
cristy3ed852e2009-09-05 21:47:34 +00005546
5547<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005548 <h4><a id="pointsize"></a>-pointsize <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005549</div>
5550
cristy149d58c2013-08-07 19:44:54 +00005551<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>
cristy3ed852e2009-09-05 21:47:34 +00005552
5553<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005554 <h4><a id="polaroid"></a>-polaroid <em class="arg">angle</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005555</div>
5556
cristy149d58c2013-08-07 19:44:54 +00005557<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>
cristy3ed852e2009-09-05 21:47:34 +00005558
cristy8ee7f242013-06-20 16:08:44 +00005559<p>Use <code>+polaroid</code> to rotate the image at a random angle between -15 and +15 degrees.</p>
5560
5561<div style="margin: auto;">
5562 <h4><a id="poly"></a>-poly <em class="arg">"wt,exp ..."</em></h4>
5563</div>
5564
cristy149d58c2013-08-07 19:44:54 +00005565<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">combines multiple images according to a weighted sum of polynomials; one floating point weight (coefficient) and one floating point polynomial exponent (power) for each image expressed as comma separated pairs.</td><td style="text-align:right;"></td></tr></table>
cristy8ee7f242013-06-20 16:08:44 +00005566
cristy149d58c2013-08-07 19:44:54 +00005567<p> The weights should typically be fractions between -1 and 1. But the sum of weights should be 1 or at least between 0 and 1 to avoid clamping in non-hdri mode at black and white.</p>
cristy8ee7f242013-06-20 16:08:44 +00005568
5569<p>The exponents may be positive, negative or zero. A negative exponent is equivalent to 1 divided by the image raised to the corresponding positive exponent. A zero exponent always produces 1 scaled by quantumrange to white, i.e. wt*white, no matter what the image.</p>
5570
5571<p>The format is: output = wt1*image1^exp1 + wt2*image2^exp2 ...</p>
5572
5573<p>Some simple uses are:</p>
5574<ul>
5575<li>A weighted sum of each image provided all weights add to unity and all exponents=1. If the the weights are all equal to 1/(number of images), then this is equivalent to <a href="command-line-options.html#profile">-evaluate-sequence</a> <em class="arg">mean</em>.</li>
cristy8ee7f242013-06-20 16:08:44 +00005576<li>The sum of squares of two or more images, provided the weights are equal (and sum to 1 to avoid clamping) and the exponents equal 2.</li>
5577</ul>
5578
5579<p>Note that one may add a constant color to the expression simply by using xc:somecolor for one of the images and specifying the desired weight and exponent equal to 0.</p>
5580
5581<p>Similarly one may add white to the expression by simply using null: (or xc:white) for one of the images with the appropriate weight and exponent equal to 0.</p>
5582
cristy3ed852e2009-09-05 21:47:34 +00005583
5584<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005585 <h4><a id="posterize"></a>-posterize <em class="arg">levels</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005586</div>
5587
cristy149d58c2013-08-07 19:44:54 +00005588<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">reduce the image to a limited number of color levels per channel.</td><td style="text-align:right;"></td></tr></table>
cristy8ee7f242013-06-20 16:08:44 +00005589
5590<p>Very low values of <em class="arg">levels</em>, e.g., 2, 3, 4, have the most
5591visible effect.</p>
cristy3ed852e2009-09-05 21:47:34 +00005592
5593<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005594 <h4><a id="precision"></a>-precision <em class="arg">value</em></h4>
cristyd43a46b2010-01-21 02:13:41 +00005595</div>
5596
cristy149d58c2013-08-07 19:44:54 +00005597<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>
cristyd43a46b2010-01-21 02:13:41 +00005598
5599<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005600 <h4><a id="preview"></a>-preview <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005601</div>
5602
cristy149d58c2013-08-07 19:44:54 +00005603<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>
cristy3ed852e2009-09-05 21:47:34 +00005604
cristy751980d2012-06-03 23:18:35 +00005605<p>Use this option to affect the preview operation of an image (e.g.
cristy8ee7f242013-06-20 16:08:44 +00005606<code>convert file.png -preview Gamma Preview:gamma.png</code>). Choose from
cristy751980d2012-06-03 23:18:35 +00005607these previews:</p>
cristy3ed852e2009-09-05 21:47:34 +00005608
5609<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00005610 Rotate Shear Roll Hue
5611 Saturation Brightness Gamma Spiff
5612 Dull Grayscale Quantize Despeckle
5613 ReduceNoise Add Noise Sharpen Blur
5614 Threshold EdgeDetect Spread Shade
5615 Raise Segment Solarize Swirl
5616 Implode Wave OilPaint CharcoalDrawing
5617 JPEG
cristy3ed852e2009-09-05 21:47:34 +00005618</pre>
5619
cristy751980d2012-06-03 23:18:35 +00005620<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 +00005621
cristy8ee7f242013-06-20 16:08:44 +00005622<p>The default preview is <code>JPEG</code>.</p>
cristy3ed852e2009-09-05 21:47:34 +00005623
5624<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005625 <h4><a id="print"></a>-print <em class="arg">string</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005626</div>
5627
cristy149d58c2013-08-07 19:44:54 +00005628<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>
cristy3ed852e2009-09-05 21:47:34 +00005629
5630<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005631 <h4><a id="process"></a>-process <em class="arg">command</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005632</div>
5633
cristy149d58c2013-08-07 19:44:54 +00005634<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>
cristy3ed852e2009-09-05 21:47:34 +00005635
cristy8ee7f242013-06-20 16:08:44 +00005636<p>The command arguments has the form <code>"module arg1 arg2 arg3 ...
5637argN"</code> where <code>module</code> is the name of the module to invoke (e.g.
cristy751980d2012-06-03 23:18:35 +00005638"Analyze") and arg1 arg2 arg3 ... argN are an arbitrary number of arguments to
5639pass to the process module.</p>
cristy3ed852e2009-09-05 21:47:34 +00005640
5641<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00005642 <h4><a id="profile"></a>-profile <em class="arg">filename</em><br></br>
cristy3ed852e2009-09-05 21:47:34 +00005643 +profile <em class="arg">profile_name</em></h4>
5644</div>
5645
cristy149d58c2013-08-07 19:44:54 +00005646<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>
cristy3ed852e2009-09-05 21:47:34 +00005647
cristy751980d2012-06-03 23:18:35 +00005648<p>Using <a href="command-line-options.html#profile">-profile</a> <em class="arg">filename</em> adds an
5649ICM (ICC color management), IPTC (newswire information), or a generic profile
5650to the image.</p>
cristy3ed852e2009-09-05 21:47:34 +00005651
cristy751980d2012-06-03 23:18:35 +00005652<p>Use <a href="command-line-options.html#profile">+profile <em class="arg">profile_name</em></a> to
5653remove the indicated profile. ImageMagick uses standard filename globbing, so
5654wildcard expressions may be used to remove more than one profile. Here we
cristy8ee7f242013-06-20 16:08:44 +00005655remove all profiles from the image except for the XMP profile: <code>+profile
5656"!xmp,*"</code>. </p>
cristy3ed852e2009-09-05 21:47:34 +00005657
cristy8ee7f242013-06-20 16:08:44 +00005658<p>Use <code>identify -verbose</code> to find out which profiles are in the
cristy751980d2012-06-03 23:18:35 +00005659image file. Use <a href="command-line-options.html#strip">-strip</a> to remove all profiles (and
5660comments).</p>
cristy3ed852e2009-09-05 21:47:34 +00005661
cristy751980d2012-06-03 23:18:35 +00005662<p>To extract a profile, the <a href="command-line-options.html#profile">-profile</a> option is not
cristy149d58c2013-08-07 19:44:54 +00005663used. Instead, simply write the file to an image format such as <em class="arg">APP1, 8BIM, ICM,</em> or <em class="arg">IPTC</em>.</p>
cristy3ed852e2009-09-05 21:47:34 +00005664
cristy751980d2012-06-03 23:18:35 +00005665<p>For example, to extract the Exif data (which is stored in JPEG files in the
5666<em class="arg">APP1</em> profile), use.</p>
cristy3ed852e2009-09-05 21:47:34 +00005667
cristy149d58c2013-08-07 19:44:54 +00005668<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert cockatoo.jpg profile.exif</span></p>
cristy751980d2012-06-03 23:18:35 +00005669<p>It is important to note that results may depend on whether or not the
cristy149d58c2013-08-07 19:44:54 +00005670original image already has an included profile. Also, keep in mind that <a href="command-line-options.html#profile">-profile</a> is an "operator" (as opposed to a "setting") and
cristy751980d2012-06-03 23:18:35 +00005671therefore a conversion is made each time it is encountered, in order, in the
5672command-line. For instance, in the following example, if the original image is
5673CMYK with profile, a CMYK-CMYK-RGB conversion results.</p>
cristy3ed852e2009-09-05 21:47:34 +00005674
cristy149d58c2013-08-07 19:44:54 +00005675<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 +00005676<p>Furthermore, since ICC profiles are not necessarily symmetric, extra
5677conversion steps can yield unwanted results. CMYK profiles are often very
cristy149d58c2013-08-07 19:44:54 +00005678asymmetric since they involve 3−&gt;4 and 4−&gt;3 channel mapping.
cristy3ed852e2009-09-05 21:47:34 +00005679</p>
5680
5681<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005682 <h4><a id="quality"></a>-quality <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005683</div>
5684
cristy149d58c2013-08-07 19:44:54 +00005685<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>
cristy3ed852e2009-09-05 21:47:34 +00005686
cristy87a7f072011-07-01 00:08:52 +00005687<p>For the JPEG and MPEG image formats, quality is 1 (lowest image quality and
5688highest compression) to 100 (best quality but least effective compression).
5689The default is to use the estimated quality of your input image if it can
5690be determined, otherwise 92. When the quality is greater than 90, then the
5691chroma channels are not downsampled.
cristy751980d2012-06-03 23:18:35 +00005692Use the <a href="command-line-options.html#sampling-factor">-sampling-factor</a> option to specify the
cristy87a7f072011-07-01 00:08:52 +00005693factors for chroma downsampling.</p>
cristy3ed852e2009-09-05 21:47:34 +00005694
cristy751980d2012-06-03 23:18:35 +00005695<p>For the MIFF image format, quality/10 is the zlib compression level, which
5696is 0 (worst but fastest compression) to 9 (best but slowest). It has no effect
5697on the image appearance, since the compression is always lossless.</p>
cristy3ed852e2009-09-05 21:47:34 +00005698
cristy751980d2012-06-03 23:18:35 +00005699<p>For the JPEG-2000 image format, quality is mapped using a non-linear
5700equation to the compression ratio required by the Jasper library. This
5701non-linear equation is intended to loosely approximate the quality provided by
5702the JPEG v1 format. The default quality value 100, a request for non-lossy
5703compression. A quality of 75 results in a request for 16:1 compression.</p>
cristy3ed852e2009-09-05 21:47:34 +00005704
cristy87a7f072011-07-01 00:08:52 +00005705<p>For the MNG and PNG image formats, the quality value sets the zlib
5706compression level (quality / 10) and filter-type (quality % 10). The default
5707PNG "quality" is 75, which means compression level 7 with adaptive PNG
5708filtering, unless the image has a color map, in which case it means
5709compression level 7 with no PNG filtering.</p>
5710
cristy751980d2012-06-03 23:18:35 +00005711<p>For compression level 0, the Huffman-only strategy is used, which is
5712fastest but not necessarily the worst compression.</p>
cristy3ed852e2009-09-05 21:47:34 +00005713
cristya4dfb122011-07-07 19:01:57 +00005714<p>If filter-type is 4 or less, the specified PNG filter-type is used for
5715all scanlines:</p>
cristy3ed852e2009-09-05 21:47:34 +00005716
5717<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00005718 0: none
5719 1: sub
5720 2: up
5721 3: average
5722 4: Paeth
cristy3ed852e2009-09-05 21:47:34 +00005723</pre>
5724
cristy87a7f072011-07-01 00:08:52 +00005725<p>If filter-type is 5, adaptive filtering is used when quality is greater
5726than 50 and the image does not have a color map, otherwise no filtering is
5727used.</p>
cristy3ed852e2009-09-05 21:47:34 +00005728
cristy87a7f072011-07-01 00:08:52 +00005729<p>If filter-type is 6, adaptive filtering
5730with <em class="arg">minimum-sum-of-absolute-values</em> is used.</p>
cristy3ed852e2009-09-05 21:47:34 +00005731
cristy87a7f072011-07-01 00:08:52 +00005732<p>Only if the output is MNG, if filter-type is 7, the LOCO color
5733transformation (intrapixel differencing) and adaptive filtering
5734with <em class="arg">minimum-sum-of-absolute-values</em> are used.</p>
cristy3ed852e2009-09-05 21:47:34 +00005735
cristy87a7f072011-07-01 00:08:52 +00005736<p>If the filter-type is 8 the zlib Z_RLE compression strategy is used with
5737 no PNG filtering.</p>
cristy3ed852e2009-09-05 21:47:34 +00005738
cristy87a7f072011-07-01 00:08:52 +00005739<p>If the filter-type is 9 the zlib Z_RLE compression strategy is used with
5740 adaptive PNG filtering.</p>
5741
cristya4dfb122011-07-07 19:01:57 +00005742<p>The quality setting has no effect on the appearance or signature of PNG
5743and MNG images, since the compression is always lossless.</p>
5744
5745<p>Not all combinations of compression level, strategy, and PNG filter type
5746can be obtained using the -quality option. For more precise control,
5747you can use the PNG:compression-level=N, PNG:compression-strategy=N, and
5748PNG:compression-filter=N defines, respectively, instead.
cristy751980d2012-06-03 23:18:35 +00005749See <a href="command-line-options.html#define">-define</a>. Values from the defines take precedence
cristya4dfb122011-07-07 19:01:57 +00005750over values from the -quality option.</p>
cristy87a7f072011-07-01 00:08:52 +00005751
5752<p>For further information, see
5753the <a href="http://www.w3.org/pub/WWW/TR">PNG</a> specification.</p>
cristy3ed852e2009-09-05 21:47:34 +00005754
cristy3ed852e2009-09-05 21:47:34 +00005755<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005756 <h4><a id="quantize"></a>-quantize <em class="arg">colorspace</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005757</div>
5758
cristy149d58c2013-08-07 19:44:54 +00005759<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 +00005760
cristy3c98a4f2010-08-13 20:09:41 +00005761<p>This setting defines the colorspace used to sort out and reduce the number
cristy149d58c2013-08-07 19:44:54 +00005762of colors needed by an image (for later dithering) by operators such as <a href="command-line-options.html#colors">-colors</a>, Note that color reduction also happens
cristy3c98a4f2010-08-13 20:09:41 +00005763automatically when saving images to color-limited image file formats, such as
5764GIF, and PNG8.</p>
cristy3ed852e2009-09-05 21:47:34 +00005765
5766
5767<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005768 <h4><a id="quiet"></a>-quiet</h4>
cristy3ed852e2009-09-05 21:47:34 +00005769</div>
5770
cristy149d58c2013-08-07 19:44:54 +00005771<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>
cristy3ed852e2009-09-05 21:47:34 +00005772
5773<div style="margin: auto;">
cristy751980d2012-06-03 23:18:35 +00005774 <h4><a id="radial-blur"></a>-radial-blur <em class="arg">angle</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005775</div>
5776
cristy149d58c2013-08-07 19:44:54 +00005777<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>
cristy3ed852e2009-09-05 21:47:34 +00005778
5779<p>Note that this is actually a rotational blur rather than a radial and as
5780such actually mis-named. </p>
5781
cristy751980d2012-06-03 23:18:35 +00005782<p>The <a href="command-line-options.html#virtual-pixel">-virtual-pixel</a> setting will determine how
cristy3ed852e2009-09-05 21:47:34 +00005783pixels which are outside the image proper are blurred into the final result.
5784</p>
5785
5786
5787<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005788 <h4><a id="raise"></a>-raise <em class="arg">thickness</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005789</div>
5790
cristy149d58c2013-08-07 19:44:54 +00005791<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>
cristy3ed852e2009-09-05 21:47:34 +00005792
cristy751980d2012-06-03 23:18:35 +00005793<p>This will create a 3-D effect. Use <a href="command-line-options.html#raise">-raise</a> to create
5794a raised effect, otherwise use <a href="command-line-options.html#raise">+raise</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00005795
cristy149d58c2013-08-07 19:44:54 +00005796<p>Unlike the similar <a href="command-line-options.html#frame">-frame</a> option, <a href="command-line-options.html#raise">-raise</a> does not alter the dimensions of the image.</p>
cristy3ed852e2009-09-05 21:47:34 +00005797
5798<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005799 <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 +00005800</div>
5801
cristy149d58c2013-08-07 19:44:54 +00005802<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>
cristy3ed852e2009-09-05 21:47:34 +00005803
5804<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005805 <h4><a id="red-primary"></a>-red-primary <em class="arg">x,y</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005806</div>
5807
cristy149d58c2013-08-07 19:44:54 +00005808<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>
cristy3ed852e2009-09-05 21:47:34 +00005809
5810<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005811 <h4><a id="regard-warnings"></a>-regard-warnings</h4>
cristy3ed852e2009-09-05 21:47:34 +00005812</div>
5813
cristy149d58c2013-08-07 19:44:54 +00005814<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>
cristy3ed852e2009-09-05 21:47:34 +00005815
cristy8ee7f242013-06-20 16:08:44 +00005816<p>This option causes some warnings in some image formats to be treated
5817as errors. </p>
5818
cristy3ed852e2009-09-05 21:47:34 +00005819<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005820 <h4><a id="remap"></a>-remap <em class="arg">filename</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005821</div>
5822
cristy149d58c2013-08-07 19:44:54 +00005823<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>
cristy3ed852e2009-09-05 21:47:34 +00005824
cristy751980d2012-06-03 23:18:35 +00005825<p>If the <a href="command-line-options.html#dither">-dither</a> setting is enabled (the default) then
cristy3ed852e2009-09-05 21:47:34 +00005826the given colors are dithered over the image as necessary, otherwise the closest
5827color (in RGB colorspace) is selected to replace that pixel in the image. </p>
5828
cristy751980d2012-06-03 23:18:35 +00005829<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 +00005830images in the current image sequence, all the images will have the same color
5831table. That means that when saved to a file format such as GIF, it will use
5832that color table as a single common or global color table, for all the images,
5833without requiring extra local color tables. </p>
5834
cristy751980d2012-06-03 23:18:35 +00005835<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 +00005836sequence to use a common color map over all the images. This equivalent to
5837appending all the images together (without extra background colors) and color
cristy751980d2012-06-03 23:18:35 +00005838reducing those images using <a href="command-line-options.html#colors">-colors</a> with a 256 color
5839limit, then <a href="command-line-options.html#remap">-remap</a> those colors over the original list of
cristy3ed852e2009-09-05 21:47:34 +00005840images. This ensures all the images follow a single color map. </p>
5841
cristy149d58c2013-08-07 19:44:54 +00005842<p>If the number of colors over all the images is less than 256, then <a href="command-line-options.html#remap">+remap</a> should not perform any color reduction or dithering, as
cristy3ed852e2009-09-05 21:47:34 +00005843no color changes are needed. In that case, its only effect is to force the use
cristy149d58c2013-08-07 19:44:54 +00005844of a global color table. This recommended after using either <a href="command-line-options.html#colors">-colors</a> or <a href="command-line-options.html#ordered-dither">-ordered-dither</a> to
cristy3ed852e2009-09-05 21:47:34 +00005845reduce the number of colors in an animated image sequence. </p>
5846
cristy8ee7f242013-06-20 16:08:44 +00005847<p>Note, the remap image colormap has at most 8-bits of precision. Deeper color maps are automagically coalesced with other colors to meet this requirement.</p>
5848
cristy3ed852e2009-09-05 21:47:34 +00005849<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005850 <h4><a id="region"></a>-region <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005851</div>
5852
cristy149d58c2013-08-07 19:44:54 +00005853<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>
cristy3ed852e2009-09-05 21:47:34 +00005854
cristy751980d2012-06-03 23:18:35 +00005855<p>The <em class="arg">x</em> and <em class="arg">y</em> offsets are treated
5856in the same manner as in <a href="command-line-options.html#crop">-crop</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00005857
cristy751980d2012-06-03 23:18:35 +00005858<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 +00005859
5860<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005861 <h4><a id="remote"></a>-remote</h4>
cristy3ed852e2009-09-05 21:47:34 +00005862</div>
5863
cristy149d58c2013-08-07 19:44:54 +00005864<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>
cristy3ed852e2009-09-05 21:47:34 +00005865
5866<p>The only command recognized is the name of an image file to load.</p>
5867
cristy751980d2012-06-03 23:18:35 +00005868<p>If you have more than one <a href="display.html">display</a> application
5869running simultaneously, use the <a href="command-line-options.html#window"> window</a> option to
5870specify which application to control.</p>
cristy3ed852e2009-09-05 21:47:34 +00005871
5872<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005873 <h4><a id="render"></a>-render</h4>
cristy3ed852e2009-09-05 21:47:34 +00005874</div>
5875
cristy149d58c2013-08-07 19:44:54 +00005876<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>
cristy3ed852e2009-09-05 21:47:34 +00005877
cristy751980d2012-06-03 23:18:35 +00005878<p>Use <a href="command-line-options.html#render">+render</a> to turn off rendering vector operations.
5879This useful when saving the result to vector formats such as MVG or SVG.</p>
cristy3ed852e2009-09-05 21:47:34 +00005880
5881<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005882<h4><a id="repage"></a>-repage <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005883</div>
5884
cristy149d58c2013-08-07 19:44:54 +00005885<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>
cristy3ed852e2009-09-05 21:47:34 +00005886
cristy751980d2012-06-03 23:18:35 +00005887<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 +00005888rather than a setting. You can separately set the canvas size or the offset
5889of the image on that canvas by only providing those components. </p>
5890
cristy751980d2012-06-03 23:18:35 +00005891<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 +00005892
cristy8ee7f242013-06-20 16:08:44 +00005893<p>If a <code>!</code> flag is given the offset given is added to the existing
cristy3ed852e2009-09-05 21:47:34 +00005894offset to move the image relative to its previous position. This useful for
5895animation sequences. </p>
5896
cristy8ee7f242013-06-20 16:08:44 +00005897<p>A given a canvas size of zero such as '<code>0x0</code>' forces it to
cristy3ed852e2009-09-05 21:47:34 +00005898recalculate the canvas size so the image (at its current offset) will appear
5899completely on that canvas (unless it has a negative offset).</p>
5900
cristy751980d2012-06-03 23:18:35 +00005901<p>Use <a href="command-line-options.html#repage">+repage</a> to completely remove/reset the virtual
cristy3ed852e2009-09-05 21:47:34 +00005902canvas meta-data from the images. </p>
5903
cristy8ee7f242013-06-20 16:08:44 +00005904<p>The <a href="command-line-options.html#set">-set</a> '<code>page</code>' option can be used to
cristy3ed852e2009-09-05 21:47:34 +00005905directly assign virtual canvas meta-data. </p>
5906
5907
5908<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005909 <h4><a id="resample"></a>-resample <em class="arg">horizontal</em>x<em class="arg">vertical</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005910</div>
5911
cristy149d58c2013-08-07 19:44:54 +00005912<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>
cristy3ed852e2009-09-05 21:47:34 +00005913
cristy751980d2012-06-03 23:18:35 +00005914<p>Resize the image so that its rendered size remains the same as the original
5915at the specified target resolution. For example, if a 300 DPI image renders at
59163 inches by 2 inches on a 300 DPI device, when the image has been resampled to
591772 DPI, it will render at 3 inches by 2 inches on a 72 DPI device. Note that
5918only a small number of image formats (e.g. JPEG, PNG, and TIFF) are capable of
5919storing the image resolution. For formats which do not support an image
cristy149d58c2013-08-07 19:44:54 +00005920resolution, the original resolution of the image must be specified via <a href="command-line-options.html#density">-density</a> on the command line prior to specifying the
cristy751980d2012-06-03 23:18:35 +00005921resample resolution.</p>
cristy3ed852e2009-09-05 21:47:34 +00005922
cristy751980d2012-06-03 23:18:35 +00005923<p>Note that Photoshop stores and obtains image resolution from a proprietary
5924embedded profile. If this profile exists in the image, then Photoshop will
5925continue to treat the image using its former resolution, ignoring the image
5926resolution specified in the standard file header.</p>
cristy3ed852e2009-09-05 21:47:34 +00005927
5928<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005929 <h4><a id="resize"></a>-resize <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005930</div>
5931
cristy149d58c2013-08-07 19:44:54 +00005932<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>
cristy3ed852e2009-09-05 21:47:34 +00005933
cristy751980d2012-06-03 23:18:35 +00005934<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
5935ignored, and the <a href="command-line-options.html#gravity">-gravity</a> option has no effect.</p>
cristy3ed852e2009-09-05 21:47:34 +00005936
cristy149d58c2013-08-07 19:44:54 +00005937<p>If the <a href="command-line-options.html#filter">-filter</a> option precedes the <a href="command-line-options.html#resize">-resize</a> option, the image is resized with the specified
cristy751980d2012-06-03 23:18:35 +00005938filter.</p>
cristy3ed852e2009-09-05 21:47:34 +00005939
cristy751980d2012-06-03 23:18:35 +00005940<p>Many image processing algorithms assume your image is in a linear-light
5941coding. If your image is gamma-corrected, you can remove the nonlinear gamma
5942correction, apply the transform, then restore it like this:</p>
cristy13538962010-02-26 17:53:04 +00005943
cristy149d58c2013-08-07 19:44:54 +00005944<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert portrait.jpg -gamma .45455 -resize 25% -gamma 2.2 \ <br></br> -quality 92 passport.jpg</span></p>
cristy3ed852e2009-09-05 21:47:34 +00005945<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005946 <h4><a id="respect-parentheses"></a>-respect-parentheses</h4>
cristy3ed852e2009-09-05 21:47:34 +00005947</div>
5948
cristy149d58c2013-08-07 19:44:54 +00005949<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>
cristy3ed852e2009-09-05 21:47:34 +00005950
5951<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005952 <h4><a id="reverse"></a>-reverse</h4>
cristy3ed852e2009-09-05 21:47:34 +00005953</div>
5954
cristy149d58c2013-08-07 19:44:54 +00005955<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>
cristy3ed852e2009-09-05 21:47:34 +00005956
5957
5958<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005959 <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 +00005960</div>
5961
cristy149d58c2013-08-07 19:44:54 +00005962<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>
cristy3ed852e2009-09-05 21:47:34 +00005963
cristy751980d2012-06-03 23:18:35 +00005964<p>A negative <em class="arg">x</em> offset rolls the image left-to-right.
5965A negative <em class="arg">y</em> offset rolls the image top-to-bottom.</p>
cristy3ed852e2009-09-05 21:47:34 +00005966
5967
5968<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005969 <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 +00005970</div>
5971
cristy149d58c2013-08-07 19:44:54 +00005972<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>
cristy3ed852e2009-09-05 21:47:34 +00005973
cristy8ee7f242013-06-20 16:08:44 +00005974<p>Use <code>&gt;</code> to rotate the image only if its width exceeds the
5975height. <code>&lt;</code> rotates the image <em>only</em> if its width is less
5976than the height. For example, if you specify <code>-rotate "-90&gt;"</code> and
cristy751980d2012-06-03 23:18:35 +00005977the image size is 480x640, the image is not rotated. However, if the image is
cristy8ee7f242013-06-20 16:08:44 +00005978640x480, it is rotated by -90 degrees. If you use <code>&gt;</code> or
5979<code>&lt;</code>, enclose it in quotation marks to prevent it from being
cristy751980d2012-06-03 23:18:35 +00005980misinterpreted as a file redirection.</p>
cristy3ed852e2009-09-05 21:47:34 +00005981
5982<p>Empty triangles in the corners, left over from rotating the image, are
cristy8ee7f242013-06-20 16:08:44 +00005983filled with the <code>background</code> color. </p>
cristy3ed852e2009-09-05 21:47:34 +00005984
cristy751980d2012-06-03 23:18:35 +00005985<p>See also the <a href="command-line-options.html#distort">-distort</a> operator and specifically the
cristy8ee7f242013-06-20 16:08:44 +00005986'<code>ScaleRotateTranslate</code>' distort method. </p>
cristy3ed852e2009-09-05 21:47:34 +00005987
5988
5989<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00005990 <h4><a id="sample"></a>-sample <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00005991</div>
5992
cristy149d58c2013-08-07 19:44:54 +00005993<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">minify / magnify the image with pixel subsampling and pixel replication, respectively.</td><td style="text-align:right;"></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00005994
cristyd0bd44a2010-09-24 12:38:11 +00005995<p>Change the image size simply by directly sampling the pixels original
cristy8ee7f242013-06-20 16:08:44 +00005996from the image. When magnifying, pixels are replicated in blocks. When
5997minifying, pixels are sub-sampled (i.e., some rows and columns are skipped
5998over). </p>
cristy3ed852e2009-09-05 21:47:34 +00005999
cristy751980d2012-06-03 23:18:35 +00006000<p>The results are thus equivalent to using <a href="command-line-options.html#resize">-resize</a> with
cristy8ee7f242013-06-20 16:08:44 +00006001a <a href="command-line-options.html#filter">-filter</a> setting of <code>point</code> (nearest
cristy751980d2012-06-03 23:18:35 +00006002neighbour), though <a href="command-line-options.html#sample">-sample</a> is a lot faster, as it
cristyd0bd44a2010-09-24 12:38:11 +00006003avoids all the filter processing of the image. As such it completely ignores
cristy751980d2012-06-03 23:18:35 +00006004the current <a href="command-line-options.html#filter">-filter</a> setting. </p>
cristyd0bd44a2010-09-24 12:38:11 +00006005
cristy751980d2012-06-03 23:18:35 +00006006<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 +00006007will be added to the resulting image, though some colors may disappear. </p>
6008
cristy751980d2012-06-03 23:18:35 +00006009<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
6010ignored, unlike <a href="command-line-options.html#resize">-resize</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00006011
6012
cristy8ee7f242013-06-20 16:08:44 +00006013<p>The actual sampling point is the middle of the sub-region being sampled.
6014As such a single pixel sampling of an image will take the middle pixel, (or
cristy149d58c2013-08-07 19:44:54 +00006015top-left-middle if image has even dimensions). However the <a href="command-line-options.html#define">-define</a> '<code>sample:offset</code>' can be set to modify
cristy8ee7f242013-06-20 16:08:44 +00006016this position some other location within each sub-region being sampled, as
6017a percentage offset.</p>
6018
6019<p>By default this value is '<code>50</code>' for the midpoint, but could be set
6020to '<code>0</code>' for top-left, '<code>100</code>' for bottom-right, or with
6021separate X and Y offsets such as '<code>0x50</code>' for left-middle edge of
6022sampling sub-region.</p>
6023
6024
cristy3ed852e2009-09-05 21:47:34 +00006025<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006026 <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 +00006027</div>
6028
cristy149d58c2013-08-07 19:44:54 +00006029<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>
cristy3ed852e2009-09-05 21:47:34 +00006030
cristy751980d2012-06-03 23:18:35 +00006031<p>This option specifies the sampling factors to be used by the JPEG encoder
6032for chroma downsampling. If this option is omitted, the JPEG library will use
6033its own default values. When reading or writing the YUV format and when
cristy149d58c2013-08-07 19:44:54 +00006034writing the M2V (MPEG-2) format, use <a href="command-line-options.html#sampling-factor">-sampling-factor 2x1</a> or <a href="command-line-options.html#sampling-factor">-sampling-factor 4:2:2</a> to specify the 4:2:2
cristy751980d2012-06-03 23:18:35 +00006035downsampling method.</p>
cristy3ed852e2009-09-05 21:47:34 +00006036
6037<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006038 <h4><a id="scale"></a>-scale <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006039</div>
6040
cristy149d58c2013-08-07 19:44:54 +00006041<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">minify / magnify the image with pixel block averaging and pixel replication, respectively.</td><td style="text-align:right;"></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00006042
cristyd0bd44a2010-09-24 12:38:11 +00006043<p>Change the image size simply by replacing pixels by averaging pixels
cristyeed6cb62012-01-28 19:38:34 +00006044together when minifying, or replacing pixels when magnifying. </p>
cristyd0bd44a2010-09-24 12:38:11 +00006045
cristy751980d2012-06-03 23:18:35 +00006046<p>The results are thus equivalent to using <a href="command-line-options.html#resize">-resize</a> with
cristy8ee7f242013-06-20 16:08:44 +00006047a <a href="command-line-options.html#filter">-filter</a> setting of <code>box</code>. Though it is a lot
cristyd0bd44a2010-09-24 12:38:11 +00006048faster, as it avoids all the filter processing of the image. As such it
cristy751980d2012-06-03 23:18:35 +00006049completely ignores the current <a href="command-line-options.html#filter">-filter</a> setting. </p>
cristyd0bd44a2010-09-24 12:38:11 +00006050
6051<p>If when shrinking (minifying) images the original image is some integer
cristyeed6cb62012-01-28 19:38:34 +00006052multiple of the new image size, the number of pixels averaged together to
cristyd0bd44a2010-09-24 12:38:11 +00006053produce the new pixel color is the same across the whole image. This is
6054a special case known as 'binning' and is often used as a method of reducing
6055noise in image such as those generated by digital cameras, especially in low
6056light conditions. </p>
6057
cristy3ed852e2009-09-05 21:47:34 +00006058
6059<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006060 <h4><a id="scene"></a>-scene <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006061</div>
6062
cristy149d58c2013-08-07 19:44:54 +00006063<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>
cristy3ed852e2009-09-05 21:47:34 +00006064
6065<p>This option sets the scene number of an image or the first image in an image sequence.</p>
6066
6067<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006068 <h4><a id="screen"></a>-screen</h4>
cristy3ed852e2009-09-05 21:47:34 +00006069</div>
6070
cristy149d58c2013-08-07 19:44:54 +00006071<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>
cristy3ed852e2009-09-05 21:47:34 +00006072
cristy751980d2012-06-03 23:18:35 +00006073<p>This option indicates that the GetImage request used to obtain the image
6074should be done on the root window, rather than directly on the specified
6075window. In this way, you can obtain pieces of other windows that overlap the
6076specified window, and more importantly, you can capture menus or other popups
6077that are independent windows but appear over the specified window.</p>
cristy3ed852e2009-09-05 21:47:34 +00006078
6079<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006080 <h4><a id="seed"></a>-seed</h4>
cristy3ed852e2009-09-05 21:47:34 +00006081</div>
6082
cristy149d58c2013-08-07 19:44:54 +00006083<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>
cristy3ed852e2009-09-05 21:47:34 +00006084
6085<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006086 <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 +00006087</div>
6088
cristy149d58c2013-08-07 19:44:54 +00006089<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>
cristy3ed852e2009-09-05 21:47:34 +00006090
cristy751980d2012-06-03 23:18:35 +00006091<p>Segment an image by analyzing the histograms of the color components and
6092identifying units that are homogeneous with the fuzzy c-means technique. This
6093is part of the ImageMagick color quantization routines. </p>
cristy3ed852e2009-09-05 21:47:34 +00006094
cristy751980d2012-06-03 23:18:35 +00006095<p>Specify <em class="arg">cluster threshold</em> as the number of pixels in
6096each cluster that must exceed the cluster threshold to be considered valid.
6097<em class="arg">Smoothing threshold</em> eliminates noise in the second
6098derivative of the histogram. As the value is increased, you can expect
6099a smoother second derivative. The default is 1.5.</p>
cristy3ed852e2009-09-05 21:47:34 +00006100
cristy751980d2012-06-03 23:18:35 +00006101<p>If the <a href="command-line-options.html#verbose">-verbose</a> setting is defined, a detailed report
cristy3ed852e2009-09-05 21:47:34 +00006102of the color clusters is returned.</p>
6103
6104
6105<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00006106 <h4><a id="selective-blur"></a>-selective-blur <em class="arg">radius</em><br></br>-selective-blur <em class="arg">radius</em>x<em class="arg">sigma</em>{<em class="arg">+threshold</em>}</h4>
cristy2e2662a2010-10-09 14:29:37 +00006107</div>
6108
cristy149d58c2013-08-07 19:44:54 +00006109<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>
cristy3ed852e2009-09-05 21:47:34 +00006110
cristy751980d2012-06-03 23:18:35 +00006111<p>Blurs those pixels that are less than or equal to the threshold in
cristy149d58c2013-08-07 19:44:54 +00006112contrast. The threshold may be expressed as a fraction of <em class="QR">QuantumRange</em> or as a percentage.</p>
cristy2e2662a2010-10-09 14:29:37 +00006113
cristy3ed852e2009-09-05 21:47:34 +00006114<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006115 <h4><a id="separate"></a>-separate</h4>
cristy3ed852e2009-09-05 21:47:34 +00006116</div>
6117
cristy149d58c2013-08-07 19:44:54 +00006118<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 +00006119
6120<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006121 <h4><a id="sepia-tone"></a>-sepia-tone <em class="arg">threshold</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006122</div>
6123
cristy149d58c2013-08-07 19:44:54 +00006124<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>
cristy3ed852e2009-09-05 21:47:34 +00006125
6126<p>Specify <em class="arg">threshold</em> as the percent threshold of the intensity (0 - 99.9%).</p>
6127
cristy751980d2012-06-03 23:18:35 +00006128<p>This option applies a special effect to the image, similar to the effect
cristy149d58c2013-08-07 19:44:54 +00006129achieved in a photo darkroom by sepia toning. Threshold ranges from 0 to <em class="QR">QuantumRange</em> and is a measure of the extent of the sepia
cristy751980d2012-06-03 23:18:35 +00006130toning. A threshold of 80% is a good starting point for a reasonable
6131tone.</p>
cristy3ed852e2009-09-05 21:47:34 +00006132
cristyd0bda5e2010-09-21 16:22:45 +00006133
6134
cristy3ed852e2009-09-05 21:47:34 +00006135<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006136 <h4><a id="set"></a>-set <em class="arg">key value</em></h4>
6137 <h4>+set <em class="arg">key</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006138</div>
6139
cristy149d58c2013-08-07 19:44:54 +00006140<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
6141image sequence.</td><td style="text-align:right;"></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00006142
cristyd0bd44a2010-09-24 12:38:11 +00006143<p>This will assign (or modify) specific settings attached to all the images
cristy751980d2012-06-03 23:18:35 +00006144in the current image sequence. Using the <a href="command-line-options.html#set">+set</a> form of the
cristyd0bd44a2010-09-24 12:38:11 +00006145option will either remove, or reset that setting to a default state, as
6146appropriate. </p>
cristy3ed852e2009-09-05 21:47:34 +00006147
cristyd0bd44a2010-09-24 12:38:11 +00006148<p>For example, it will modify specific well known image meta-data
cristy149d58c2013-08-07 19:44:54 +00006149'attributes' such as those normally overridden by: the options <a href="command-line-options.html#delay">-delay</a>, <a href="command-line-options.html#dispose">-dispose</a>, and <a href="command-line-options.html#page">-page</a>, <a href="command-line-options.html#colorspace">-colorspace</a>; generally
cristyd0bd44a2010-09-24 12:38:11 +00006150assigned before the image is read in, by using a <em class="arg">key</em> of
6151the same name. </p>
cristy3ed852e2009-09-05 21:47:34 +00006152
cristyd0bd44a2010-09-24 12:38:11 +00006153<p>If the given <em class="arg">key</em> does not match a specific known
6154'attribute ', such as shown above, the setting is stored as a a free form
cristy149d58c2013-08-07 19:44:54 +00006155'property' string. Such settings are listed in <a href="command-line-options.html#verbose">-verbose</a> information ("<code>info:</code>" output format) as "Properties".
cristyd0bda5e2010-09-21 16:22:45 +00006156</p>
6157
cristy84134182011-06-15 22:59:00 +00006158<p>This includes string 'properties' that are set by and assigned to images
cristy149d58c2013-08-07 19:44:54 +00006159using the options <a href="command-line-options.html#comment">-comment</a>, <a href="command-line-options.html#label">-label</a>, <a href="command-line-options.html#caption">-caption</a>. These options actually assign
6160a global 'artifact' which are automatically assigned (and any <a href="escape.html">Format Percent
cristyd0bd44a2010-09-24 12:38:11 +00006161Escapes</a> expanded) to images as they are read in. For example:</p>
cristyd0bda5e2010-09-21 16:22:45 +00006162
cristy149d58c2013-08-07 19:44:54 +00006163<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert rose: -set comment 'Rose is a rose is a rose is a rose' rose.png</span><span class="crtout">identify -format %c rose.png</span><span class="crtprompt"> $ </span><span class="crtin">Rose is a rose is a rose is a rose</span></p>
6164<p>The set value can also make use of <a href="escape.html">Format and Print Image
cristyd0bd44a2010-09-24 12:38:11 +00006165Properties</a> in the defined value. For example:</p>
6166
cristy149d58c2013-08-07 19:44:54 +00006167<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 +00006168<p>Other well known 'properties' that are availible include:
cristy8ee7f242013-06-20 16:08:44 +00006169'<code>date:create</code>' and '<code>date:modify</code>' and
6170'<code>signature</code>'. </p>
cristyd0bd44a2010-09-24 12:38:11 +00006171
cristy751980d2012-06-03 23:18:35 +00006172<p>The <a href="command-line-options.html#repage">-repage</a> operator will also allow you to modify
cristy8ee7f242013-06-20 16:08:44 +00006173the '<code>page</code>' attribute of an image for images already in memory (also
cristy751980d2012-06-03 23:18:35 +00006174see <a href="command-line-options.html#repage">-page</a>). However it is designed to provide a finer
6175control of the sub-parts of this 'attribute'. The <a href="command-line-options.html#set">-set page</a>
cristy8ee7f242013-06-20 16:08:44 +00006176option will only provide a direct, unmodified assignment of '<code>page</code>'
cristyd0bd44a2010-09-24 12:38:11 +00006177attribute. </p>
6178
6179<p>This option can also associate a colorspace or profile with your image.
6180For example,</p>
6181
cristy149d58c2013-08-07 19:44:54 +00006182<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 +00006183<p>Some 'properties' must be defined in a specific way to be used. For
cristy8ee7f242013-06-20 16:08:44 +00006184example only 'properties' prefixed with "<code>filename:</code>" can be used to
cristyd0bda5e2010-09-21 16:22:45 +00006185modify the output filename of an image. For example</p>
6186
cristy149d58c2013-08-07 19:44:54 +00006187<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert rose: -set filename:mysize '%wx%h' 'rose_%[filename:mysize].png'</span></p>
cristy8ee7f242013-06-20 16:08:44 +00006188<p>If the setting value is prefixed with "<code>option:</code>" the setting will
cristy149d58c2013-08-07 19:44:54 +00006189be saved as a global "Artifact" exactly as if it was set using the <a href="command-line-options.html#define">-define</a> option. As such settings are global in scope, they
cristy84134182011-06-15 22:59:00 +00006190can be used to pass 'attributes' and 'properties' of one specific image,
cristyd0bd44a2010-09-24 12:38:11 +00006191in a way that allows you to use them in a completely different image, even if
6192the original image has long since been modified or destroyed. For example: </p>
6193
cristy149d58c2013-08-07 19:44:54 +00006194<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert rose: -set option:rosesize '%wx%h' -delete 0 \</span><span class="crtout"> label:'%[rosesize]' label_size_of_rose.gif</span></p>
6195<p>Note that <a href="escape.html">Format Percent Escapes</a> will only match
cristyd0bd44a2010-09-24 12:38:11 +00006196a 'artifact' if the given <em class="arg">key</em> does not match an existing
cristy323f35b2011-03-24 23:05:13 +00006197'attribute' or 'property'. </p>
cristyd0bda5e2010-09-21 16:22:45 +00006198
6199<p>You can set the attributes of the image registry by prefixing the value
cristy8ee7f242013-06-20 16:08:44 +00006200with <code>registry:</code>.</p>
cristyd0bda5e2010-09-21 16:22:45 +00006201
cristy751980d2012-06-03 23:18:35 +00006202<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 +00006203previously-formatted ancillary chunks into the output PNG file, using
6204the commandline option as shown below or by setting the profile via a
6205programming interface:</p>
6206
cristy149d58c2013-08-07 19:44:54 +00006207<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 +00006208<p>where <em>x</em> is a location flag and
6209<em class="arg">filename</em> is a file containing the chunk
6210name in the first 4 bytes, then a colon (":"), followed by the chunk data.
6211This encoder will compute the chunk length and CRC, so those must not
6212be included in the file.</p>
6213
6214<p>"x" can be "b" (before PLTE), "m" (middle, i.e., between PLTE and IDAT),
6215or "e" (end, i.e., after IDAT). If you want to write multiple chunks
6216of the same type, then add a short unique string after the "x" to prevent
6217subsequent profiles from overwriting the preceding ones, e.g.,</p>
6218
6219
cristy149d58c2013-08-07 19:44:54 +00006220<p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert in.png -set profile PNG-chunk-b01:file01 / <br></br>
cristy84134182011-06-15 22:59:00 +00006221 -profile PNG-chunk-b02:file02 out.png</span></p>
cristy3ed852e2009-09-05 21:47:34 +00006222
6223<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006224 <h4><a id="shade"></a>-shade <em class="arg">azimuth</em>x<em class="arg">elevation</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006225</div>
6226
cristy149d58c2013-08-07 19:44:54 +00006227<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>
cristy3ed852e2009-09-05 21:47:34 +00006228
cristy751980d2012-06-03 23:18:35 +00006229<p>Specify <em class="arg">azimuth</em> and <em class="arg">elevation</em> as
6230the position of the light source. Use <a href="command-line-options.html#shade">+shade</a> to return
6231the shading results as a grayscale image.</p>
cristy3ed852e2009-09-05 21:47:34 +00006232
6233<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006234 <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 +00006235</div>
6236
cristy149d58c2013-08-07 19:44:54 +00006237<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>
cristy3ed852e2009-09-05 21:47:34 +00006238
6239<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00006240 <h4><a id="shared-memory"></a>-shared-memory</h4>
cristy3ed852e2009-09-05 21:47:34 +00006241</div>
6242
cristy149d58c2013-08-07 19:44:54 +00006243<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>
cristy3ed852e2009-09-05 21:47:34 +00006244
cristy751980d2012-06-03 23:18:35 +00006245<p>This option specifies whether the utility should attempt to use shared
6246memory for pixmaps. ImageMagick must be compiled with shared memory support,
6247and the display must support the <em class="arg">MIT-SHM</em> extension.
cristy8ee7f242013-06-20 16:08:44 +00006248Otherwise, this option is ignored. The default is <code>True</code>.</p>
cristy3ed852e2009-09-05 21:47:34 +00006249
6250<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00006251 <h4><a id="sharpen"></a>-sharpen <em class="arg">radius</em><br></br>-sharpen <em class="arg">radius</em>x<em class="arg">sigma</em>+<em class="arg">bias</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006252</div>
6253
cristy149d58c2013-08-07 19:44:54 +00006254<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>
cristy3ed852e2009-09-05 21:47:34 +00006255
6256<p>Use a Gaussian operator of the given radius and standard deviation (sigma).</p>
6257
6258<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006259 <h4><a id="shave"></a>-shave <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006260</div>
6261
cristy149d58c2013-08-07 19:44:54 +00006262<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>
cristy3ed852e2009-09-05 21:47:34 +00006263
cristy751980d2012-06-03 23:18:35 +00006264<p>The <em class="arg">size</em> portion of the <em class="arg">geometry</em>
6265argument specifies the width of the region to be removed from both sides of
6266the image and the height of the regions to be removed from top and bottom.
6267Offsets are ignored.</p>
cristy3ed852e2009-09-05 21:47:34 +00006268
cristy751980d2012-06-03 23:18:35 +00006269<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 +00006270
6271<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006272 <h4><a id="shear"></a>-shear <em class="arg">Xdegrees</em>[x<em class="arg">Ydegrees</em>]</h4>
cristy3ed852e2009-09-05 21:47:34 +00006273</div>
6274
cristy149d58c2013-08-07 19:44:54 +00006275<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>
cristy3ed852e2009-09-05 21:47:34 +00006276
cristy149d58c2013-08-07 19:44:54 +00006277<p>The shear angles may be positive, negative, or zero. When <em class="arg">Ydegrees</em> is omitted it defaults to 0. When both angles are
cristy751980d2012-06-03 23:18:35 +00006278given, the horizontal component of the shear is performed before the vertical
6279component.</p>
cristy3ed852e2009-09-05 21:47:34 +00006280
cristy751980d2012-06-03 23:18:35 +00006281<p>Shearing slides one edge of an image along the x-axis or y-axis (i.e.,
6282horizontally or vertically, respectively),creating a parallelogram. The amount
6283of each is controlled by the respective shear angle. For horizontal shears,
6284<em class="arg">Xdegrees</em> is measured clockwise relative to "up" (the
cristy149d58c2013-08-07 19:44:54 +00006285negative y-axis), sliding the top edge to the right when 0°&lt;<em class="arg">Xdegrees</em>&lt;90° and to the left when 90°&lt;<em class="arg">Xdegrees</em>&lt;180°. For vertical shears <em class="arg">Ydegrees</em> is measured clockwise relative to "right" (the
6286positive x-axis), sliding the right edge down when 0°&lt;<em class="arg">Ydegrees</em>&lt;90° and up when 90°&lt;<em class="arg">Ydegrees</em>&lt;180°.</p>
cristy3ed852e2009-09-05 21:47:34 +00006287
cristy751980d2012-06-03 23:18:35 +00006288<p>Empty triangles left over from shearing the image are filled with the color
6289defined by the <a href="command-line-options.html#fill">-background</a> option. The color is specified
6290using the format described under the <a href="command-line-options.html#fill">-fill</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00006291
cristy751980d2012-06-03 23:18:35 +00006292<p>The horizontal shear is performed before the vertical part. This is
6293important to note, since horizontal and vertical shears do not
6294<em>commute</em>, i.e., the order matters in a sequence of shears. For
6295example, the following two commands are not equivalent.</p>
cristy3ed852e2009-09-05 21:47:34 +00006296
cristy149d58c2013-08-07 19:44:54 +00006297<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 +00006298<p>The first of the two commands above is equivalent to the following, except
6299for the amount of empty space created; the command that follows generates
6300a smaller image, and so is a better choice in terms of time and space.</p>
cristy3ed852e2009-09-05 21:47:34 +00006301
cristy149d58c2013-08-07 19:44:54 +00006302<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 +00006303<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006304 <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 +00006305</div>
6306
cristy149d58c2013-08-07 19:44:54 +00006307<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>
cristy3ed852e2009-09-05 21:47:34 +00006308
cristy751980d2012-06-03 23:18:35 +00006309<p>Increase the contrast of the image using a sigmoidal transfer function
6310without saturating highlights or shadows. <em class="arg">Contrast</em>
cristy8ee7f242013-06-20 16:08:44 +00006311indicates how much to increase the contrast. For example, near 1 is none, 3 is
6312typical and 20 is a lot. Note that exactly zero is mathematically invalid.
6313</p>
cristy751980d2012-06-03 23:18:35 +00006314
cristy8ee7f242013-06-20 16:08:44 +00006315<p>The <em class="arg">mid-point</em> indicates where the maximum change
6316'slope' in contrast should fall in the resultant image (0 is white; 50% is
6317middle-gray; 100% is black). </p>
6318
cristy149d58c2013-08-07 19:44:54 +00006319<p>By default the image contrast is increased, use <em class="arg">+sigmoidal-contrast</em> to decrease the contrast.</p>
cristy8ee7f242013-06-20 16:08:44 +00006320
6321<p>To achieve the equivalent of a sigmoidal brightness change (similar to
6322a gamma adjustment), you would use <em class="arg">-sigmoidal-contrast
cristy149d58c2013-08-07 19:44:54 +00006323{brightness}x0%</em> to increase brightness and <em class="arg">+sigmoidal-contrast {brightness}x0%</em> to decrease brightness.
cristy8ee7f242013-06-20 16:08:44 +00006324Note the use of '0' fo rthe mid-point of the sigmoidal curve. </p>
6325
6326<p>Using a very high <em class="arg">contrast</em> will produce a sort of
6327'smoothed thresholding' of the image. Not as sharp (with high aliasing
6328effects) of a true threshold, but with tapered gray-levels around the threshold
6329<em class="arg">mid-point</em>. </p>
cristy3ed852e2009-09-05 21:47:34 +00006330
6331<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006332 <h4><a id="silent"></a>-silent</h4>
cristy3ed852e2009-09-05 21:47:34 +00006333</div>
6334
cristy149d58c2013-08-07 19:44:54 +00006335<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>
cristy3ed852e2009-09-05 21:47:34 +00006336
6337<div style="margin: auto;">
cristy8ee7f242013-06-20 16:08:44 +00006338 <h4><a id="similarity-threshold"></a>-similarity-threshold <em class="arg">value</em></h4>
6339</div>
6340
cristy149d58c2013-08-07 19:44:54 +00006341<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">minimum RMSE for subimage match.</td><td style="text-align:right;">[<a href="compare.html">compare</a>]</td></tr></table>
6342
6343<p>If this setting is used, then the search will stop as soon as it finds a match whose metric is less than or equal to the value. A partially filled second output image will result. Using a value of zero, will cause the search to stop at the first perfect match it finds. If this setting is left off, then the search will proceed to completion or as limited by <em class="arg">-dissimilarity-threshold</em>.</p>
cristy8ee7f242013-06-20 16:08:44 +00006344
6345<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006346 <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 +00006347</div>
6348
cristy149d58c2013-08-07 19:44:54 +00006349<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>
cristy3ed852e2009-09-05 21:47:34 +00006350
cristy751980d2012-06-03 23:18:35 +00006351<p>Use this option to specify the width and height of raw images whose
cristy8ee7f242013-06-20 16:08:44 +00006352dimensions are unknown such as <code>GRAY</code>, <code>RGB</code>, or
cristy149d58c2013-08-07 19:44:54 +00006353<code>CMYK</code>. In addition to width and height, use <a href="command-line-options.html#size">-size</a> with an offset to skip any header information in the
cristy8ee7f242013-06-20 16:08:44 +00006354image or tell the number of colors in a <code>MAP</code> image file, (e.g. -size
cristy751980d2012-06-03 23:18:35 +00006355640x512+256).</p>
cristy3ed852e2009-09-05 21:47:34 +00006356
6357<p>For Photo CD images, choose from these sizes:</p>
6358
6359<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00006360 192x128
6361 384x256
6362 768x512
6363 1536x1024
6364 3072x2048
cristy3ed852e2009-09-05 21:47:34 +00006365</pre>
6366
cristy3ed852e2009-09-05 21:47:34 +00006367<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00006368 <h4><a id="sketch"></a>-sketch <em class="arg">radius</em><br></br>-sketch <em class="arg">radius</em>x<em class="arg">sigma</em>+<em class="arg">angle</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006369</div>
6370
cristy149d58c2013-08-07 19:44:54 +00006371<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>
cristy3ed852e2009-09-05 21:47:34 +00006372
cristy751980d2012-06-03 23:18:35 +00006373<p>Sketch with the given radius, standard deviation (sigma), and angle. The
6374angle given is the angle toward which the image is sketched. That is the
6375direction people would consider the object is coming from. </p>
cristy3ed852e2009-09-05 21:47:34 +00006376
6377<div style="margin: auto;">
cristy2d67ddd2011-02-13 15:38:23 +00006378 <h4><a id="smush"></a>-smush <em class="arg">offset</em></h4>
6379</div>
6380
cristy149d58c2013-08-07 19:44:54 +00006381<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>
cristy2d67ddd2011-02-13 15:38:23 +00006382
6383<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006384 <h4><a id="snaps"></a>-snaps <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006385</div>
6386
cristy149d58c2013-08-07 19:44:54 +00006387<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 +00006388
6389<p>Use this option to grab more than one image from the X server screen, to create an animation sequence.</p>
6390
6391<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006392 <h4><a id="solarize"></a>-solarize <em class="arg">threshold</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006393</div>
6394
cristy149d58c2013-08-07 19:44:54 +00006395<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>
cristy3ed852e2009-09-05 21:47:34 +00006396
6397<p>Specify <em class="arg">factor</em> as the percent threshold of the intensity (0 - 99.9%).</p>
6398
cristy751980d2012-06-03 23:18:35 +00006399<p>This option produces a <em class="arg">solarization</em> effect seen when
6400exposing a photographic film to light during the development process.</p>
cristy3ed852e2009-09-05 21:47:34 +00006401
6402<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00006403 <h4><a id="sparse-color"></a>-sparse-color <em class="arg">method</em> '<em class="arg">x</em>,<em class="arg">y</em> <em class="arg">color</em> ...'</h4>
cristy3ed852e2009-09-05 21:47:34 +00006404</div>
6405
cristy149d58c2013-08-07 19:44:54 +00006406<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>
cristy3ed852e2009-09-05 21:47:34 +00006407
6408
6409<table class="doc">
6410 <tbody>
6411 <tr valign="top">
6412 <th align="left" style="width: 8%">Method</th>
6413 <th align="left">Description</th>
6414 </tr>
6415
6416 <tr valign="top">
cristyacc04882011-05-04 23:03:43 +00006417 <td valign="top">barycentric</td>
6418 <td valign="top">three point triangle of color given 3 points.
6419 Giving only 2 points will form a linear gradient between those points.
6420 The gradient generated extends beyond the triangle created by those
6421 3 points. </td>
6422 </tr>
6423
6424 <tr valign="top">
6425 <td valign="top">bilinear</td>
6426 <td valign="top">Like barycentric but for 4 points. Less than 4 points
6427 fall back to barycentric. </td>
6428 </tr>
6429 <tr valign="top">
cristy3ed852e2009-09-05 21:47:34 +00006430 <td valign="top">voronoi</td>
6431 <td valign="top">Simply map each pixel to the to nearest color point
6432 given. The result are polygonal 'cells' of solid color. </td>
6433 </tr>
6434
6435 <tr valign="top">
6436 <td valign="top">shepards</td>
cristyd0bda5e2010-09-21 16:22:45 +00006437 <td valign="top">Colors points biased on the ratio of inverse distance
cristy3ed852e2009-09-05 21:47:34 +00006438 squared. Generating spots of color in a sea of the average of
6439 colors. </td>
cristy3ed852e2009-09-05 21:47:34 +00006440 </tr>
6441
6442 <tr valign="top">
cristyacc04882011-05-04 23:03:43 +00006443 <td valign="top">inverse</td>
6444 <td valign="top">Colors points biased on the ratio of inverse distance.
6445 This generates sharper points of color rather than rounded spots of
cristy8ee7f242013-06-20 16:08:44 +00006446 '<code>shepards</code>' Generating spots of color in a sea of the
cristyacc04882011-05-04 23:03:43 +00006447 average of colors. </td>
cristy3ed852e2009-09-05 21:47:34 +00006448 </tr>
6449
6450 </tbody>
6451</table>
6452
6453<p>The points are placed according to the images location on the virtual
cristy149d58c2013-08-07 19:44:54 +00006454canvas (<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 +00006455offset), and do not actually have to exist on the given image, but may be
6456some point beyond the edge of the image. All points are floating point values.
6457</p>
6458
cristy149d58c2013-08-07 19:44:54 +00006459<p>Only the color channels defined by the <a href="command-line-options.html#channel">-channel</a> are
cristyacc04882011-05-04 23:03:43 +00006460modified, which means that by default matte/alpha transparency channel is not
6461effected. Typically transparency channel is turned off either before or after
cristy149d58c2013-08-07 19:44:54 +00006462the operation. </p>
cristyacc04882011-05-04 23:03:43 +00006463
cristy149d58c2013-08-07 19:44:54 +00006464<p>Of course if some color points are transparent to generate a transparent
cristyacc04882011-05-04 23:03:43 +00006465gradient, then the image also requires transparency enabled to store the
6466values. </p>
cristy3ed852e2009-09-05 21:47:34 +00006467
6468<p>All the above methods when given a single point of color will replace all
6469the colors in the image with the color given, regardless of the point. This is
cristy8ee7f242013-06-20 16:08:44 +00006470logical, and provides an alternative technique to recolor an image to some
cristy3ed852e2009-09-05 21:47:34 +00006471default value. </p>
6472
6473
6474<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006475 <h4><a id="splice"></a>-splice <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006476</div>
6477
cristy149d58c2013-08-07 19:44:54 +00006478<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>
cristy3ed852e2009-09-05 21:47:34 +00006479
cristy149d58c2013-08-07 19:44:54 +00006480<p>This will add rows and columns of the current <a href="command-line-options.html#background">-background</a> color into the given image according to the
6481given <a href="command-line-options.html#gravity">-gravity</a> geometry setting. &gt;See <a href="command-line-processing.html#geometry">Image Geometry</a> for complete details about the <em class="arg">geometry</em> argument. Essentially <a href="command-line-options.html#splice">-splice</a> will divide the
cristyacc04882011-05-04 23:03:43 +00006482image into four quadrants, separating them by the inserted rows and columns.
cristy149d58c2013-08-07 19:44:54 +00006483</p>
cristyacc04882011-05-04 23:03:43 +00006484
cristy149d58c2013-08-07 19:44:54 +00006485<p>If a dimension of geometry is zero no rows or columns will be added for that
6486dimension. Similarly using a zero offset with the appropriate <a href="command-line-options.html#gravity">-gravity</a> setting will add rows and columns to the edges of
6487the image, padding the image only along that one edge. Edge padding is what <a href="command-line-options.html#splice">-splice</a> is most commonly used for. </p>
cristyacc04882011-05-04 23:03:43 +00006488
cristy149d58c2013-08-07 19:44:54 +00006489<p>If the exact same <em class="arg">geometry</em> and <a href="command-line-options.html#gravity">-gravity</a> is later used with <a href="command-line-options.html#chop">-chop</a> the
cristyacc04882011-05-04 23:03:43 +00006490added added all splices removed. </p>
cristy3ed852e2009-09-05 21:47:34 +00006491
6492<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006493 <h4><a id="spread"></a>-spread <em class="arg">amount</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006494</div>
6495
cristy149d58c2013-08-07 19:44:54 +00006496<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>
cristy3ed852e2009-09-05 21:47:34 +00006497
cristy751980d2012-06-03 23:18:35 +00006498<p>The argument <em class="arg">amount</em> defines the size of the
6499neighborhood around each pixel from which to choose a candidate pixel to
6500swap.</p>
cristy3ed852e2009-09-05 21:47:34 +00006501
6502<div style="margin: auto;">
cristy323f35b2011-03-24 23:05:13 +00006503 <h4><a id="statistic"></a>-statistic <em class="arg">type</em> <em class="arg">geometry</em></h4>
cristyb52981c2011-03-19 17:09:31 +00006504</div>
6505
cristy149d58c2013-08-07 19:44:54 +00006506<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 +00006507
6508<p>Choose from these statistic types:</p>
6509<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00006510 Gradient maximum difference in area
6511 Maximum maximum value per channel in neighborhood
6512 Minimum minimum value per channel in neighborhood
6513 Mean average value per channel in neighborhood
6514 Median median value per channel in neighborhood
6515 Mode mode (most frequent) value per channel in neighborhood
6516 Nonpeak value just before or after the median value per channel in neighborhood
cristyb52981c2011-03-19 17:09:31 +00006517</pre>
6518
6519<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006520 <h4><a id="stegano"></a>-stegano <em class="arg">offset</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006521</div>
6522
cristy149d58c2013-08-07 19:44:54 +00006523<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>
cristy3ed852e2009-09-05 21:47:34 +00006524
cristy751980d2012-06-03 23:18:35 +00006525<p>Use an offset to start the image hiding some number of pixels from the
6526beginning of the image. Note this offset and the image size. You will need
6527this information to recover the steganographic image (e.g. display -size
6528320x256+35 stegano:image.png).</p>
cristy3ed852e2009-09-05 21:47:34 +00006529
6530<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006531 <h4><a id="stereo"></a>-stereo <em class="arg">+x</em>{<em class="arg">+y</em>}</h4>
cristy3ed852e2009-09-05 21:47:34 +00006532</div>
6533
cristy149d58c2013-08-07 19:44:54 +00006534<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">composite two images to create a red / cyan stereo anaglyph.</td><td style="text-align:right;">[<a href="composite.html">composite</a>]</td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00006535
cristy8ee7f242013-06-20 16:08:44 +00006536<p>The left side of the stereo pair (second image) is saved as the red channel of the output image. The right side (first image) is saved as the green and blue channels. Red-green stereo glasses are required to properly view the stereo image.</p>
cristy3ed852e2009-09-05 21:47:34 +00006537
6538<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006539 <h4><a id="storage-type"></a>-storage-type <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006540</div>
6541
cristy149d58c2013-08-07 19:44:54 +00006542<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>
cristy3ed852e2009-09-05 21:47:34 +00006543
6544<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00006545 char unsigned characters
6546 double doubles
6547 float floats
6548 integer integers
6549 long longs
6550 quantum pixels in the native depth of your ImageMagick distribution
6551 short unsigned shorts
cristy3ed852e2009-09-05 21:47:34 +00006552</pre>
6553
6554<p>Float and double types are normalized from 0.0 to 1.0 otherwise the pixels
6555values range from 0 to the maximum value the storage type can support.</p>
6556
6557<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006558 <h4><a id="stretch"></a>-stretch <em class="arg">fontStretch</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006559</div>
6560
cristy149d58c2013-08-07 19:44:54 +00006561<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>
cristy3ed852e2009-09-05 21:47:34 +00006562
cristy751980d2012-06-03 23:18:35 +00006563<p>This setting suggests a type of stretch that ImageMagick should try to
cristy149d58c2013-08-07 19:44:54 +00006564apply to the currently selected font family. Select <em class="arg">fontStretch</em> from the following.</p>
cristy3ed852e2009-09-05 21:47:34 +00006565
6566<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00006567 Any
6568 Condensed
6569 Expanded
6570 ExtraCondensed
6571 ExtraExpanded
6572 Normal
6573 SemiCondensed
6574 SemiExpanded
6575 UltraCondensed
6576 UltraExpanded
cristy3ed852e2009-09-05 21:47:34 +00006577</pre>
6578
cristy751980d2012-06-03 23:18:35 +00006579<p>To print a complete list of stretch types, use <a href="command-line-options.html#list">-list
6580stretch</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00006581
cristy149d58c2013-08-07 19:44:54 +00006582<p>For other settings that affect fonts, see the options <a href="command-line-options.html#font">-font</a>, <a href="command-line-options.html#family">-family</a>, <a href="command-line-options.html#style">-style</a>, and <a href="command-line-options.html#weight">-weight</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00006583
6584<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006585 <h4><a id="strip"></a>-strip</h4>
cristy3ed852e2009-09-05 21:47:34 +00006586</div>
6587
cristy149d58c2013-08-07 19:44:54 +00006588<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>
cristy3ed852e2009-09-05 21:47:34 +00006589
6590<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006591 <h4><a id="stroke"></a>-stroke <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006592</div>
6593
cristy149d58c2013-08-07 19:44:54 +00006594<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>
cristy3ed852e2009-09-05 21:47:34 +00006595
cristy751980d2012-06-03 23:18:35 +00006596<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 +00006597
cristy751980d2012-06-03 23:18:35 +00006598<p>See <a href="command-line-options.html#draw">-draw</a> for further details.</p>
cristy3ed852e2009-09-05 21:47:34 +00006599
6600<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006601 <h4><a id="strokewidth"></a>-strokewidth <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006602</div>
6603
cristy149d58c2013-08-07 19:44:54 +00006604<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>
cristy3ed852e2009-09-05 21:47:34 +00006605
cristy751980d2012-06-03 23:18:35 +00006606<p>See <a href="command-line-options.html#draw">-draw</a> for further details.</p>
cristy3ed852e2009-09-05 21:47:34 +00006607
6608<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006609 <h4><a id="style"></a>-style <em class="arg">fontStyle</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006610</div>
6611
cristy149d58c2013-08-07 19:44:54 +00006612<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>
cristy3ed852e2009-09-05 21:47:34 +00006613
cristy71a3f602010-09-15 12:38:16 +00006614<p>This setting suggests a font style that ImageMagick should try to apply to
6615the currently selected font family. Select <em class="arg">fontStyle</em> from
6616the following.</p>
cristy3ed852e2009-09-05 21:47:34 +00006617
6618<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00006619 Any
6620 Italic
6621 Normal
6622 Oblique
cristy3ed852e2009-09-05 21:47:34 +00006623</pre>
6624
cristy149d58c2013-08-07 19:44:54 +00006625<p>For other settings that affect fonts, see the options <a href="command-line-options.html#font">-font</a>, <a href="command-line-options.html#family">-family</a>, <a href="command-line-options.html#stretch">-stretch</a>, and <a href="command-line-options.html#weight">-weight</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00006626
6627<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006628 <h4><a id="subimage-search"></a>-subimage-search</h4>
cristyae6203d2010-08-09 01:12:14 +00006629</div>
6630
cristy149d58c2013-08-07 19:44:54 +00006631<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 +00006632
cristy71a3f602010-09-15 12:38:16 +00006633<p>This option is required to have compare search for the best match location
6634of a small image within a larger image. This search will produce two images
cristyd0bd44a2010-09-24 12:38:11 +00006635(or two frames). The first is the "difference" image and the second will
cristy71a3f602010-09-15 12:38:16 +00006636be the "match score" image.</p>
6637
cristyd0bd44a2010-09-24 12:38:11 +00006638<p>The "match-score" image is smaller containing a pixel for ever possible
cristy71a3f602010-09-15 12:38:16 +00006639position of the top-left corner of the given sub-image. that is its size will
6640be the size of the larger_image - sub_image + 1. The brightest location in
6641this image is the location s the locate on the best match that is also
cristy8ee7f242013-06-20 16:08:44 +00006642reported. Note that this may or may not be a perfect match, and the actual
cristy71a3f602010-09-15 12:38:16 +00006643brightness will reflect this. Other bright 'peaks' can be used to locate other
cristyeed6cb62012-01-28 19:38:34 +00006644possible matching locations. </p>
cristy71a3f602010-09-15 12:38:16 +00006645
cristyeed6cb62012-01-28 19:38:34 +00006646<p>Note that the search will try to compare the sub-image at every possible
cristy71a3f602010-09-15 12:38:16 +00006647location in the larger image, as such it can be very slow. The smaller the
cristyd0bd44a2010-09-24 12:38:11 +00006648sub-image the faster this search is. </p>
cristy71a3f602010-09-15 12:38:16 +00006649
cristyae6203d2010-08-09 01:12:14 +00006650
6651<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006652 <h4><a id="swap"></a>-swap <em class="arg">index,index</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006653</div>
6654
cristy149d58c2013-08-07 19:44:54 +00006655<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>
cristy3ed852e2009-09-05 21:47:34 +00006656
cristy751980d2012-06-03 23:18:35 +00006657<p>For example, <a href="command-line-options.html#swap">-swap 0,2</a> swaps the first and the third
6658images in the current image sequence. Use <a href="command-line-options.html#swap">+swap</a> to switch
cristy71a3f602010-09-15 12:38:16 +00006659the last two images in the sequence.</p>
cristy3ed852e2009-09-05 21:47:34 +00006660
6661<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006662 <h4><a id="swirl"></a>-swirl <em class="arg">degrees</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006663</div>
6664
cristy149d58c2013-08-07 19:44:54 +00006665<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>
cristy3ed852e2009-09-05 21:47:34 +00006666
6667<p><em class="arg">Degrees</em> defines the tightness of the swirl.</p>
6668
6669<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006670 <h4><a id="synchronize"></a>-synchronize</h4>
cristy5063d812010-10-19 16:28:10 +00006671</div>
6672
cristy149d58c2013-08-07 19:44:54 +00006673<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>
cristy5063d812010-10-19 16:28:10 +00006674
cristy8ee7f242013-06-20 16:08:44 +00006675<p>Set to "true" to ensure all image data is fully flushed and synchronized to disk. There is a performance penalty, but the benefit include ensuring a valid image file in the event of a system crash and early reporting if there is not anout disk space for the image pixel cache.</p>
6676
cristy5063d812010-10-19 16:28:10 +00006677<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006678 <h4><a id="taint"></a>-taint</h4>
cristy3ed852e2009-09-05 21:47:34 +00006679</div>
6680
cristy149d58c2013-08-07 19:44:54 +00006681<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 +00006682
6683<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006684 <h4><a id="text-font"></a>-text-font <em class="arg">name</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006685</div>
6686
cristy149d58c2013-08-07 19:44:54 +00006687<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>
cristy3ed852e2009-09-05 21:47:34 +00006688
cristy751980d2012-06-03 23:18:35 +00006689<p>Specifies the name of the preferred font to use in fixed (typewriter style)
6690formatted text. The default is 14 point <em class="arg">Courier</em>.</p>
cristy3ed852e2009-09-05 21:47:34 +00006691
cristy751980d2012-06-03 23:18:35 +00006692<p>You can tag a font to specify whether it is a PostScript, TrueType, or
cristy8ee7f242013-06-20 16:08:44 +00006693OPTION1 font. For example, <code>Courier.ttf</code> is a TrueType font and
6694<code>x:fixed</code> is OPTION1.</p>
cristy3ed852e2009-09-05 21:47:34 +00006695
6696<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006697 <h4><a id="texture"></a>-texture <em class="arg">filename</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006698</div>
6699
cristy149d58c2013-08-07 19:44:54 +00006700<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>
cristy3ed852e2009-09-05 21:47:34 +00006701
6702<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006703 <h4><a id="threshold"></a>-threshold <em class="arg">value</em>{<em class="arg">%</em>}</h4>
cristy3ed852e2009-09-05 21:47:34 +00006704</div>
6705
6706<!-- {<em class="arg">green,blue,opacity</em>}
cristy751980d2012-06-03 23:18:35 +00006707<p>If the green or blue value is omitted, these channels use the same value as
6708the first one provided. If all three color values are the same, the result is
6709a bi-level image. If the opacity threshold is omitted, OpaqueOpacity is used
6710and any partially transparent pixel becomes fully transparent.</p>
cristy3ed852e2009-09-05 21:47:34 +00006711-->
6712
cristy149d58c2013-08-07 19:44:54 +00006713<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>
cristy3ed852e2009-09-05 21:47:34 +00006714
cristy149d58c2013-08-07 19:44:54 +00006715<p>Any pixel values (more specifically, those channels set using <a href="command-line-options.html#channel">‑channel</a>) that exceed the specified threshold are reassigned the
cristy751980d2012-06-03 23:18:35 +00006716maximum channel value, while all other values are assigned the minimum.</p>
cristy3ed852e2009-09-05 21:47:34 +00006717
cristy751980d2012-06-03 23:18:35 +00006718<p> The threshold value can be given as a percentage or as an absolute integer
6719value corresponding to the desired channel value. When given as an integer,
6720the minimum attainable value is 0 (corresponding to black when all channels
6721are affected), but the maximum value (corresponding to white) is that of the
cristy8ee7f242013-06-20 16:08:44 +00006722<code>quantum depth</code> of the particular build of ImageMagick, and is
cristy751980d2012-06-03 23:18:35 +00006723therefore dependent on the installation. For that reason, a reasonable
6724recommendation for most applications is to specify the threshold values as
6725a percentage. </p>
6726
6727<p> The following would force pixels with red values above 50% to have 100%
6728red values, while those at or below 50% red would be set to 0 in the red
6729channel. The green, blue, and alpha channels (if present) would be unchanged.
cristy3ed852e2009-09-05 21:47:34 +00006730</p>
6731
cristy149d58c2013-08-07 19:44:54 +00006732<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 +00006733<p>As (possibly) impractical but instructive examples, the following would
6734generate an all-black and an all-white image with the same dimensions as the
6735input image.</p>
cristy3ed852e2009-09-05 21:47:34 +00006736
6737
cristy149d58c2013-08-07 19:44:54 +00006738<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 +00006739<p>Note that the values of the transparency channel is treated as 'matte'
6740values (0 is opaque) and not as 'alpha' values (0 is transparent).</p>
6741
cristy149d58c2013-08-07 19:44:54 +00006742<p> See also <a href="command-line-options.html#black-threshold">‑black‑threshold</a> and <a href="command-line-options.html#white-threshold">‑white‑threshold</a>.
cristy3ed852e2009-09-05 21:47:34 +00006743</p>
6744
6745<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006746 <h4><a id="thumbnail"></a>-thumbnail <em class="arg">geometry</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006747</div>
6748
cristy149d58c2013-08-07 19:44:54 +00006749<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>
cristy3ed852e2009-09-05 21:47:34 +00006750
cristy751980d2012-06-03 23:18:35 +00006751<p>This is similar to <a href="command-line-options.html#resize">-resize</a>, except it is optimized
6752for speed and any image profile, other than a color profile, is removed to
cristy149d58c2013-08-07 19:44:54 +00006753reduce the thumbnail size. To strip the color profiles as well, add <a href="command-line-options.html#strip">-strip</a> just before of after this option.</p>
cristy3ed852e2009-09-05 21:47:34 +00006754
cristy751980d2012-06-03 23:18:35 +00006755<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 +00006756
6757<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006758 <h4><a id="tile"></a>-tile <em class="arg">filename</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006759</div>
6760
cristy149d58c2013-08-07 19:44:54 +00006761<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>
cristy3ed852e2009-09-05 21:47:34 +00006762
6763<div style="margin: auto;">
6764 <h4>-tile <em class="arg">geometry</em></h4>
6765</div>
6766
cristy149d58c2013-08-07 19:44:54 +00006767<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 +00006768
cristy751980d2012-06-03 23:18:35 +00006769<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 +00006770
6771<div style="margin: auto;">
6772 <h4>-tile</h4>
6773</div>
6774
cristy149d58c2013-08-07 19:44:54 +00006775<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 +00006776
6777<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006778 <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 +00006779</div>
6780
cristy149d58c2013-08-07 19:44:54 +00006781<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>
cristy3ed852e2009-09-05 21:47:34 +00006782
cristy149d58c2013-08-07 19:44:54 +00006783<p>This should be set before the tiling image is set by <a href="command-line-options.html#tile">-tile</a> or <a href="command-line-options.html#texture">-texture</a>, or directly applied for
cristy8ee7f242013-06-20 16:08:44 +00006784creating a tiled canvas using <code>TILE:</code> or <code>PATTERN:</code> input
cristy751980d2012-06-03 23:18:35 +00006785formats. </p>
cristy3ed852e2009-09-05 21:47:34 +00006786
cristy149d58c2013-08-07 19:44:54 +00006787<p>Internally ImageMagick does a <a href="command-line-options.html#roll">-roll</a> of the tile image
cristy751980d2012-06-03 23:18:35 +00006788by the arguments given when the tile image is set. </p>
cristy3ed852e2009-09-05 21:47:34 +00006789
6790<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006791 <h4><a id="tint"></a>-tint <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006792</div>
6793
cristy149d58c2013-08-07 19:44:54 +00006794<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>
cristy3ed852e2009-09-05 21:47:34 +00006795
6796<p>Tint the image with the fill color.</p>
6797
cristy751980d2012-06-03 23:18:35 +00006798<p>Specify the amount of tinting as a percentage. Pure colors like black,
6799white red, yellow, will not be affected by -tint. Only mid-range colors such
6800as the various shades of grey.</p>
cristy3ed852e2009-09-05 21:47:34 +00006801
6802<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006803 <h4><a id="title"></a>-title <em class="arg">string</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006804</div>
6805
cristy149d58c2013-08-07 19:44:54 +00006806<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 +00006807
cristy751980d2012-06-03 23:18:35 +00006808<p>Use this option to assign a specific title to the image. This assigned to
6809the image window and is typically displayed in the window title bar.
6810Optionally you can include the image filename, type, width, height, Exif data,
6811or other image attribute by embedding special format characters described
6812under the <a href="command-line-options.html#format">-format</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00006813
6814<p>For example,</p>
6815
6816<p class="crtsnip">
6817 -title "%m:%f %wx%h"
6818</p>
6819
cristy8ee7f242013-06-20 16:08:44 +00006820<p>produces an image title of <code>MIFF:bird.miff 512x480</code> for an image
6821titled <code>bird.miff</code> and whose width is 512 and height is 480.</p>
cristy3ed852e2009-09-05 21:47:34 +00006822
6823
6824<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006825 <h4><a id="transform"></a>-transform</h4>
cristy3ed852e2009-09-05 21:47:34 +00006826</div>
6827
cristy149d58c2013-08-07 19:44:54 +00006828<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>
cristy3ed852e2009-09-05 21:47:34 +00006829
cristy751980d2012-06-03 23:18:35 +00006830<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 +00006831
cristy149d58c2013-08-07 19:44:54 +00006832<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 +00006833
cristy149d58c2013-08-07 19:44:54 +00006834<p>This operator has been now been superseded by the <a href="command-line-options.html#distort">-distort</a> '<code>AffineProjection</code>' method. </p>
cristy83a272e2010-05-07 20:40:35 +00006835
6836
cristy3ed852e2009-09-05 21:47:34 +00006837<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006838 <h4><a id="transparent"></a>-transparent <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006839</div>
6840
cristy149d58c2013-08-07 19:44:54 +00006841<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>
cristy3ed852e2009-09-05 21:47:34 +00006842
6843<p>The <em class="arg">color</em> argument is defined using the format
cristy149d58c2013-08-07 19:44:54 +00006844described under the <a href="command-line-options.html#fill">-fill</a> option. The <a href="command-line-options.html#fuzz">-fuzz</a> setting can be used to match and replace colors similar to the one
cristy3ed852e2009-09-05 21:47:34 +00006845given. </p>
6846
cristy149d58c2013-08-07 19:44:54 +00006847<p>Use <a href="command-line-options.html#transparent">+transparent</a> to invert the pixels matched.
cristyb36feb22010-03-26 16:54:37 +00006848that is make all non-matching colors transparent. </p>
6849
cristy149d58c2013-08-07 19:44:54 +00006850<p>The <a href="command-line-options.html#opaque">-opaque</a> operator is exactly the same as <a href="command-line-options.html#transparent">-transparent</a> but replaces the matching color with the
cristy751980d2012-06-03 23:18:35 +00006851current <a href="command-line-options.html#fill">-fill</a> color setting, rather than transparent.
cristy149d58c2013-08-07 19:44:54 +00006852However the <a href="command-line-options.html#transparent">-transparent</a> operator also ensures
6853that the image has an alpha channel enabled, as per "<code><a href="command-line-options.html#alpha">-alpha</a> set</code>", and does not require you to modify the <a href="command-line-options.html#channel">-channel</a> to enable alpha channel handling. </p>
cristy3ed852e2009-09-05 21:47:34 +00006854
cristyb36feb22010-03-26 16:54:37 +00006855<p>Note that this does not define the color as being the 'transparency color'
cristy149d58c2013-08-07 19:44:54 +00006856used for color-mapped image formats, such as GIF. For that use <a href="command-line-options.html#transparent-color">-transparent-color</a> </p>
cristy3ed852e2009-09-05 21:47:34 +00006857
6858
6859<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006860 <h4><a id="transparent-color"></a>-transparent-color <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006861</div>
6862
cristy149d58c2013-08-07 19:44:54 +00006863<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>
cristy3ed852e2009-09-05 21:47:34 +00006864
6865<p>Sometimes this is used for saving to image formats such as
6866GIF and PNG8 which uses this color to represent boolean transparency. This
6867does not make a color transparent, it only defines what color the transparent
cristy149d58c2013-08-07 19:44:54 +00006868color is in the color palette of the saved image. Use <a href="command-line-options.html#transparent">-transparent</a> to make an opaque color transparent.</p>
cristy3ed852e2009-09-05 21:47:34 +00006869
6870<p>This option allows you to have both an opaque visible color, as well as a
6871transparent color of the same color value without conflict. That is, you can
6872use the same color for both the transparent and opaque color areas within an
6873image. This, in turn, frees to you to select a transparent color that is
6874appropriate when an image is displayed by an application that does not handle a
6875transparent color index, while allowing ImageMagick to correctly handle images of this
6876type. </p>
6877
cristy8ee7f242013-06-20 16:08:44 +00006878<p>The default transparent color is <code>#00000000</code>, which is fully transparent black.</p>
cristy3ed852e2009-09-05 21:47:34 +00006879
6880<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006881 <h4><a id="transpose"></a>-transpose</h4>
cristy3ed852e2009-09-05 21:47:34 +00006882</div>
6883
cristy149d58c2013-08-07 19:44:54 +00006884<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>
cristy3ed852e2009-09-05 21:47:34 +00006885
cristy8ee7f242013-06-20 16:08:44 +00006886<p> This option mathematically transposes the pixel array. It is equivalent to the sequence <code>-flip -rotate 90</code>.
cristy3ed852e2009-09-05 21:47:34 +00006887</p>
6888
6889<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006890 <h4><a id="transverse"></a>-transverse</h4>
cristy3ed852e2009-09-05 21:47:34 +00006891</div>
6892
cristy149d58c2013-08-07 19:44:54 +00006893<table style="background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%"><tr><td style="width:75%">Mirror the image along the images bottom-left top-right diagonal. Equivalent to the operations <code>-flop -rotate 90</code>.</td><td style="text-align:right;"></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00006894
6895
6896<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006897 <h4><a id="treedepth"></a>-treedepth <em class="arg">value</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006898</div>
6899
cristy149d58c2013-08-07 19:44:54 +00006900<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>
cristy3ed852e2009-09-05 21:47:34 +00006901
cristy751980d2012-06-03 23:18:35 +00006902<p>Normally, this integer value is zero or one. A value of zero or one causes
6903the use of an optimal tree depth for the color reduction algorithm.</p>
cristy3ed852e2009-09-05 21:47:34 +00006904
cristy751980d2012-06-03 23:18:35 +00006905<p>An optimal depth generally allows the best representation of the source
6906image with the fastest computational speed and the least amount of memory.
6907However, the default depth is inappropriate for some images. To assure the
6908best representation, try values between 2 and 8 for this parameter. Refer to
cristy149d58c2013-08-07 19:44:54 +00006909the <a href="quantize.html">color reduction algorithm</a> for more details.</p>
cristy3ed852e2009-09-05 21:47:34 +00006910
cristy751980d2012-06-03 23:18:35 +00006911<p>The <a href="command-line-options.html#colors">-colors</a> or <a href="command-line-options.html#monochrome">-monochrome</a>
6912option, or writing to an image format which requires color reduction, is
6913required for this option to take effect.</p>
cristy3ed852e2009-09-05 21:47:34 +00006914
6915<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006916 <h4><a id="trim"></a>-trim</h4>
cristy3ed852e2009-09-05 21:47:34 +00006917</div>
6918
cristy149d58c2013-08-07 19:44:54 +00006919<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>
cristy3ed852e2009-09-05 21:47:34 +00006920
cristy751980d2012-06-03 23:18:35 +00006921<p>This option removes any edges that are exactly the same color as the corner
6922pixels. Use <a href="command-line-options.html#fuzz">-fuzz</a> to make <a href="command-line-options.html#trim">-trim</a> remove
6923edges that are nearly the same color as the corner pixels.</p>
cristy3ed852e2009-09-05 21:47:34 +00006924
6925<p>The page or virtual canvas information of the image is preserved allowing
cristy751980d2012-06-03 23:18:35 +00006926you to extract the result of the <a href="command-line-options.html#trim">-trim</a> operation from the
6927image. Use a <a href="command-line-options.html#repage">+repage</a> to remove the virtual canvas page
cristy3ed852e2009-09-05 21:47:34 +00006928information if it is unwanted.</p>
6929
6930<p>If the trimmed image 'disappears' an warning is produced, and a special
6931single pixel transparent 'missed' image is returned, in the same way as when a
cristy751980d2012-06-03 23:18:35 +00006932<a href="command-line-options.html#crop">-crop</a> operation 'misses' the image proper. </p>
cristy3ed852e2009-09-05 21:47:34 +00006933
6934
6935<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006936 <h4><a id="type"></a>-type <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006937</div>
6938
cristy149d58c2013-08-07 19:44:54 +00006939<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>
cristy8ee7f242013-06-20 16:08:44 +00006940 <p>Choose from: <code>Bilevel</code>,
6941<code>Grayscale</code>, <code>GrayscaleMatte</code>, <code>Palette</code>,
6942<code>PaletteMatte</code>, <code>TrueColor</code>, <code>TrueColorMatte</code>,
6943<code>ColorSeparation</code>, or <code>ColorSeparationMatte</code>.</p>
cristy3ed852e2009-09-05 21:47:34 +00006944
cristy751980d2012-06-03 23:18:35 +00006945<p>Normally, when a format supports different subformats such as grayscale and
cristy149d58c2013-08-07 19:44:54 +00006946truecolor, the encoder will try to choose an efficient subformat. The <a href="command-line-options.html#type">-type</a> option can be used to override this behavior. For
cristy751980d2012-06-03 23:18:35 +00006947example, to prevent a JPEG from being written in grayscale format even though
6948only gray pixels are present, use.</p>
cristy3ed852e2009-09-05 21:47:34 +00006949
cristy149d58c2013-08-07 19:44:54 +00006950<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 +00006951<p>Similarly, use <a href="command-line-options.html#type">-type TrueColorMatte</a> to force the
6952encoder to write an alpha channel even though the image is opaque, if the
6953output format supports transparency.</p>
cristy3ed852e2009-09-05 21:47:34 +00006954
cristy751980d2012-06-03 23:18:35 +00006955<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 +00006956
6957<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006958 <h4><a id="undercolor"></a>-undercolor <em class="arg">color</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006959</div>
6960
cristy149d58c2013-08-07 19:44:54 +00006961<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>
cristy3ed852e2009-09-05 21:47:34 +00006962
cristy751980d2012-06-03 23:18:35 +00006963<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 +00006964
cristy751980d2012-06-03 23:18:35 +00006965<p>See <a href="command-line-options.html#draw">-draw</a> for further details.</p>
cristy3ed852e2009-09-05 21:47:34 +00006966
6967
6968<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006969 <h4><a id="update"></a>-update <em class="arg">seconds</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006970</div>
6971
cristy149d58c2013-08-07 19:44:54 +00006972<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>
cristy3ed852e2009-09-05 21:47:34 +00006973
cristy751980d2012-06-03 23:18:35 +00006974<p>Suppose that while you are displaying an image the file that is currently
cristy8ee7f242013-06-20 16:08:44 +00006975displayed is over-written. <code>display</code> will automagically detect that
cristy751980d2012-06-03 23:18:35 +00006976the input file has been changed and update the displayed image
6977accordingly.</p>
cristy3ed852e2009-09-05 21:47:34 +00006978
6979
6980<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006981 <h4><a id="unique-colors"></a>-unique-colors</h4>
cristy3ed852e2009-09-05 21:47:34 +00006982</div>
6983
cristy149d58c2013-08-07 19:44:54 +00006984<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>
cristy3ed852e2009-09-05 21:47:34 +00006985
6986
6987<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00006988 <h4><a id="units"></a>-units <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00006989</div>
6990
cristy149d58c2013-08-07 19:44:54 +00006991<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>
cristy3ed852e2009-09-05 21:47:34 +00006992
cristy8ee7f242013-06-20 16:08:44 +00006993<p>Choose from: <code>Undefined</code>, <code>PixelsPerInch</code>, or
6994<code>PixelsPerCentimeter</code>. This option is normally used in conjunction
cristy751980d2012-06-03 23:18:35 +00006995with the <a href="command-line-options.html#density">-density</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00006996
6997
6998<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00006999 <h4><a id="unsharp"></a>-unsharp <em class="arg">radius</em><br></br>-unsharp <em class="arg">radius</em>x<em class="arg">sigma</em>{<em class="arg">+gain</em>}{<em class="arg">+threshold</em>}</h4>
cristy3ed852e2009-09-05 21:47:34 +00007000</div>
7001
cristy149d58c2013-08-07 19:44:54 +00007002<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>
cristy3ed852e2009-09-05 21:47:34 +00007003
cristy751980d2012-06-03 23:18:35 +00007004<p>The <a href="command-line-options.html#unsharp">-unsharp</a> option sharpens an image. The image is
7005convolved with a Gaussian operator of the given radius and standard deviation
7006(sigma). For reasonable results, radius should be larger than sigma. Use
7007a radius of 0 to have the method select a suitable radius.</p>
cristy3ed852e2009-09-05 21:47:34 +00007008
7009<p>The parameters are:</p>
7010
7011<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00007012 radius The radius of the Gaussian, in pixels, not counting the center
7013 pixel (default 0).
7014 sigma The standard deviation of the Gaussian, in pixels (default 1.0).
cristy8ee7f242013-06-20 16:08:44 +00007015 gain The fraction of the difference between the original and the blur
cristye9a32c32011-04-07 01:11:05 +00007016 image that is added back into the original (default 1.0).
7017 threshold The threshold, as a fraction of <em class="QR">QuantumRange</em>, needed to apply the
7018 difference amount (default 0.05).
cristy3ed852e2009-09-05 21:47:34 +00007019</pre>
7020
7021
7022<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007023 <h4><a id="verbose"></a>-verbose</h4>
cristy3ed852e2009-09-05 21:47:34 +00007024</div>
7025
cristy149d58c2013-08-07 19:44:54 +00007026<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
cristy751980d2012-06-03 23:18:35 +00007027precedes the <a href="command-line-options.html#identify">-identify</a> option or
cristy149d58c2013-08-07 19:44:54 +00007028<code>info:</code>.</td><td style="text-align:right;"></td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00007029
7030
7031<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007032 <h4><a id="version"></a>-version</h4>
cristy3ed852e2009-09-05 21:47:34 +00007033</div>
7034
cristy149d58c2013-08-07 19:44:54 +00007035<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>
cristy3ed852e2009-09-05 21:47:34 +00007036
7037
7038<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007039 <h4><a id="view"></a>-view <em class="arg">string</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00007040</div>
7041
cristy149d58c2013-08-07 19:44:54 +00007042<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>
cristy3ed852e2009-09-05 21:47:34 +00007043
7044
7045<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007046 <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 +00007047</div>
7048
cristy149d58c2013-08-07 19:44:54 +00007049<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>
cristy3ed852e2009-09-05 21:47:34 +00007050
7051
7052<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007053 <h4><a id="virtual-pixel"></a>-virtual-pixel <em class="arg">method</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00007054</div>
7055
cristy149d58c2013-08-07 19:44:54 +00007056<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>
cristy3ed852e2009-09-05 21:47:34 +00007057
7058<p>This option defines what color source should be used if and when a color
7059lookup completely 'misses' the source image. The color(s) that appear to
7060surround the source image. Generally this color is derived from the source
7061image, but could also be set to a specify background color. </p>
7062
7063<p>Choose from these methods:</p>
7064
7065<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00007066 background the area surrounding the image is the background color
7067 black the area surrounding the image is black
7068 checker-tile alternate squares with image and background color
7069 dither non-random 32x32 dithered pattern
7070 edge extend the edge pixel toward infinity
7071 gray the area surrounding the image is gray
7072 horizontal-tile horizontally tile the image, background color above/below
7073 horizontal-tile-edge horizontally tile the image and replicate the side edge pixels
7074 mirror mirror tile the image
7075 random choose a random pixel from the image
7076 tile tile the image (default)
7077 transparent the area surrounding the image is transparent blackness
7078 vertical-tile vertically tile the image, sides are background color
7079 vertical-tile-edge vertically tile the image and replicate the side edge pixels
7080 white the area surrounding the image is white
cristy3ed852e2009-09-05 21:47:34 +00007081</pre>
7082
7083<p>The default value is "edge".</p>
7084
cristy149d58c2013-08-07 19:44:54 +00007085<p>This most important for distortion operators such as <a href="command-line-options.html#distort">-distort</a>, <a href="command-line-options.html#implode">-implode</a>, and <a href="command-line-options.html#fx">-fx</a>.
cristy3ed852e2009-09-05 21:47:34 +00007086However it also effects operations that may access pixels just outside the
cristy149d58c2013-08-07 19:44:54 +00007087image proper, such as <a href="command-line-options.html#convolve">-convolve</a>, <a href="command-line-options.html#blur">-blur</a>, and <a href="command-line-options.html#sharpen">-sharpen</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00007088
cristy149d58c2013-08-07 19:44:54 +00007089<p>To print a complete list of virtual pixel types, use the <a href="command-line-options.html#list">-list virtual-pixel</a> option.</p>
cristy3ed852e2009-09-05 21:47:34 +00007090
7091
7092<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007093 <h4><a id="visual"></a>-visual <em class="arg">type</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00007094</div>
7095
cristy149d58c2013-08-07 19:44:54 +00007096<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 +00007097
7098<p>Choose from these visual classes:</p>
7099
7100<pre class="text">
cristye9a32c32011-04-07 01:11:05 +00007101 StaticGray
7102 GrayScale
7103 StaticColor
7104 PseudoColor
7105 TrueColor
7106 DirectColor
7107 default
7108 visual id
cristy3ed852e2009-09-05 21:47:34 +00007109</pre>
7110
cristy751980d2012-06-03 23:18:35 +00007111<p>The X server must support the visual you choose, otherwise an error occurs.
7112If a visual is not specified, the visual class that can display the most
7113simultaneous colors on the default screen is chosen.</p>
cristy3ed852e2009-09-05 21:47:34 +00007114
7115
7116<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00007117 <h4><a id="watermark"></a>-watermark <em class="arg">brightness</em>x<em class="arg">saturation</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00007118</div>
7119
cristy149d58c2013-08-07 19:44:54 +00007120<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
7121saturation.</td><td style="text-align:right;">[<a href="composite.html">composite</a>]</td></tr></table>
cristy3ed852e2009-09-05 21:47:34 +00007122
7123<p>Take a grayscale image (with alpha mask) and modify the destination image's
cristy149d58c2013-08-07 19:44:54 +00007124brightness according to watermark image's grayscale value and the <em class="arg">brightness</em> percentage. The destinations color saturation
cristy3ed852e2009-09-05 21:47:34 +00007125attribute is just direct modified by the <em class="arg">saturation</em>
7126percentage, which defaults to 100 percent (no color change). </p>
7127
7128
7129<div style="margin: auto;">
cristy149d58c2013-08-07 19:44:54 +00007130 <h4><a id="wave"></a>-wave <em class="arg">amplitude</em><br></br>-wave <em class="arg">amplitude</em>x<em class="arg">wavelength</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00007131</div>
7132
cristy149d58c2013-08-07 19:44:54 +00007133<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>
cristy3ed852e2009-09-05 21:47:34 +00007134
cristy751980d2012-06-03 23:18:35 +00007135<p>Specify <em class="arg">amplitude</em> and <em class="arg">wavelength</em>
7136of the wave.</p>
cristy3ed852e2009-09-05 21:47:34 +00007137
7138<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007139 <h4><a id="weight"></a>-weight <em class="arg">fontWeight</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00007140</div>
7141
cristy149d58c2013-08-07 19:44:54 +00007142<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>
cristy3ed852e2009-09-05 21:47:34 +00007143
cristy751980d2012-06-03 23:18:35 +00007144<p>This setting suggests a font weight that ImageMagick should try to apply to
cristy149d58c2013-08-07 19:44:54 +00007145the currently selected font family. Use a positive integer for <em class="arg">fontWeight</em> or select from the following.</p>
cristy3ed852e2009-09-05 21:47:34 +00007146
7147<table class="doc">
cristy149d58c2013-08-07 19:44:54 +00007148 <col width="25%"></col>
7149 <col width="75%"></col>
cristy3ed852e2009-09-05 21:47:34 +00007150 <thead>
7151 <tr>
7152 <th><em class="arg">fontWeight</em></th>
7153 <th>Description</th>
7154 </tr>
7155 </thead>
7156 <tbody>
cristy751980d2012-06-03 23:18:35 +00007157 <tr><td>All </td>
7158 <td>No effect. </td></tr>
7159 <tr><td>Bold </td>
7160 <td>Same as <em class="arg">fontWeight</em> = 700.</td></tr>
7161 <tr><td>Bolder </td>
cristy149d58c2013-08-07 19:44:54 +00007162 <td>Add 100 to font weight if currently ≤ 800.</td></tr>
cristy751980d2012-06-03 23:18:35 +00007163 <tr><td>Lighter </td>
cristy149d58c2013-08-07 19:44:54 +00007164 <td>Subtract 100 to font weight if currently ≤ 100.</td></tr>
cristy751980d2012-06-03 23:18:35 +00007165 <tr><td>Normal </td>
7166 <td>Same as <em class="arg">fontWeight</em> = 400.</td></tr>
cristy3ed852e2009-09-05 21:47:34 +00007167 </tbody>
7168 </table>
7169
cristy751980d2012-06-03 23:18:35 +00007170<p>To print a complete list of weight types, use <a href="command-line-options.html#list">-list
7171weight</a>.</p>
cristy3ed852e2009-09-05 21:47:34 +00007172
cristy149d58c2013-08-07 19:44:54 +00007173<p>For other settings that affect fonts, see the options <a href="command-line-options.html#font">-font</a>, <a href="command-line-options.html#family">-family</a>, <a href="command-line-options.html#stretch">-stretch</a>, and <a href="command-line-options.html#style">-style</a>. </p>
cristy3ed852e2009-09-05 21:47:34 +00007174
7175<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007176 <h4><a id="white-point"></a>-white-point <em class="arg">x,y</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00007177</div>
7178
cristy149d58c2013-08-07 19:44:54 +00007179<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>
cristy3ed852e2009-09-05 21:47:34 +00007180
7181<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007182 <h4><a id="white-threshold"></a>-white-threshold <em class="arg">value</em>{<em class="arg">%</em>}</h4>
cristy3ed852e2009-09-05 21:47:34 +00007183</div>
7184
cristy149d58c2013-08-07 19:44:54 +00007185<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
7186pixels at or below the threshold unchanged.</td><td style="text-align:right;"></td></tr></table>
cristy5cadd612009-09-21 19:33:41 +00007187
cristy751980d2012-06-03 23:18:35 +00007188<p> The threshold value can be given as a percentage or as an absolute integer
cristyac1b4322013-07-28 13:58:06 +00007189value within [0, <em class="QR">QuantumRange</em>] corresponding to the
cristy149d58c2013-08-07 19:44:54 +00007190desired <a href="command-line-options.html#channel">‑channel</a> value. See <a href="command-line-options.html#threshold">‑threshold</a>for more details on thresholds and resulting values. </p>
cristy3ed852e2009-09-05 21:47:34 +00007191
7192<div style="margin: auto;">
cristydcca3fa2010-12-29 21:50:07 +00007193 <h4><a id="window"></a>-window <em class="arg">id</em></h4>
cristy3ed852e2009-09-05 21:47:34 +00007194</div>
7195
cristy149d58c2013-08-07 19:44:54 +00007196<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 +00007197
cristy8ee7f242013-06-20 16:08:44 +00007198<p><em class="arg">id</em> can be a window id or name. Specify <code>root</code>
cristy751980d2012-06-03 23:18:35 +00007199to select X's root window as the target window.</p>
cristy3ed852e2009-09-05 21:47:34 +00007200
cristy751980d2012-06-03 23:18:35 +00007201<p>By default the image is tiled onto the background of the target window. If
cristy8ee7f242013-06-20 16:08:44 +00007202<code>backdrop</code> or <a href="command-line-options.html#geometry">-resize</a> are specified, the
7203image is surrounded by the background color. Refer to <code>X RESOURCES</code>
cristy751980d2012-06-03 23:18:35 +00007204for details.</p>
cristy3ed852e2009-09-05 21:47:34 +00007205
cristy751980d2012-06-03 23:18:35 +00007206<p>The image will not display on the root window if the image has more unique
cristy149d58c2013-08-07 19:44:54 +00007207colors than the target window colormap allows. Use <a href="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
cristy149d58c2013-08-07 19:44:54 +00007213<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>
cristy3ed852e2009-09-05 21:47:34 +00007214
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
cristy149d58c2013-08-07 19:44:54 +00007219<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
cristy149d58c2013-08-07 19:44:54 +00007226
cristyad41c0c2012-10-31 00:49:28 +00007227</div>
7228
7229<div id="linkbar">
cristyac1b4322013-07-28 13:58:06 +00007230 <span id="linkbar-west"> </span>
cristy8ee7f242013-06-20 16:08:44 +00007231
cristyad41c0c2012-10-31 00:49:28 +00007232 <span id="linkbar-center">
cristy149d58c2013-08-07 19:44:54 +00007233 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a>
7234 <a href="../discourse-server">Discourse Server</a>
7235 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
cristy8ee7f242013-06-20 16:08:44 +00007236 <a href="http://jqmagick.imagemagick.org/">JqMagick</a>
cristyad41c0c2012-10-31 00:49:28 +00007237 </span>
cristyac1b4322013-07-28 13:58:06 +00007238 <span id="linkbar-east"> </span>
cristy149d58c2013-08-07 19:44:54 +00007239</div>
7240<div class="footer">
7241 <span id="footer-west">© 1999-2013 ImageMagick Studio LLC</span>
7242 <span id="footer-east"> <a href="contact.html">Contact the Wizards</a></span>
7243</div>
7244<div style="clear: both; margin: 0; width: 100%; "></div>
cristyad41c0c2012-10-31 00:49:28 +00007245</body>
7246</html>