blob: ea96eb1d93f3b682dc06ab9112f99e406d543fb7 [file] [log] [blame]
cristyd2432012015-05-04 23:15:15 +00001<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2<html lang="en">
cristyad41c0c2012-10-31 00:49:28 +00003<head>
cristyd2432012015-05-04 23:15:15 +00004 <meta charset="utf-8">
5 <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 <meta name="viewport" content="width=device-width, initial-scale=1">
cristyba1758d2011-06-03 01:29:12 +00007 <title>ImageMagick: Porting to ImageMagick Version 7</title>
cristyd2432012015-05-04 23:15:15 +00008 <meta http-equiv="content-language" content="en-US">
9 <meta http-equiv="content-type" content="text/html; charset=utf-8">
10 <meta http-equiv="reply-to" content="magick-users@imagemagick.org">
11 <meta name="application-name" content="ImageMagick">
12 <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.">
13 <meta name="application-url" content="http://www.imagemagick.org">
14 <meta name="generator" content="PHP">
15 <meta name="keywords" content="porting, to, imagemagick, version, 7, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert">
16 <meta name="rating" content="GENERAL">
17 <meta name="robots" content="INDEX, FOLLOW">
18 <meta name="generator" content="ImageMagick Studio LLC">
19 <meta name="author" content="ImageMagick Studio LLC">
20 <meta name="revisit-after" content="2 DAYS">
21 <meta name="resource-type" content="document">
22 <meta name="copyright" content="Copyright (c) 1999-2012 ImageMagick Studio LLC">
23 <meta name="distribution" content="Global">
cristy44443b92015-05-05 00:06:07 +000024 <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1">
cristyd2432012015-05-04 23:15:15 +000025 <link rel="icon" href="../images/wand.png">
26 <link rel="shortcut icon" href="../images/wand.ico" type="images/x-icon">
cristy44443b92015-05-05 00:06:07 +000027 <link rel="stylesheet" href="css/bootstrap.min.css">
28 <link rel="stylesheet" href="css/magick.css">
cristyad41c0c2012-10-31 00:49:28 +000029</head>
30
cristyd2432012015-05-04 23:15:15 +000031<body>
cristyad41c0c2012-10-31 00:49:28 +000032<div class="main">
cristyd2432012015-05-04 23:15:15 +000033<div class="magick-masthead">
34 <div class="container">
35 <script type="text/javascript">
36 <!--
37 google_ad_client = "pub-3129977114552745";
38 google_ad_slot = "5439289906";
39 google_ad_width = 728;
40 google_ad_height = 90;
41 //-->
42 </script>
43 <center><script type="text/javascript" src="http://localhost/pagead/show_ads.js">
44 </script></center>
45 <nav class="magick-nav">
cristy44443b92015-05-05 00:06:07 +000046 <a class="magick-nav-item " href="../index.html">Home</a>
cristyd2432012015-05-04 23:15:15 +000047 <a class="magick-nav-item " href="binary-releases.html">Downloads</a>
48 <a class="magick-nav-item " href="command-line-tools.html">Tools</a>
49 <a class="magick-nav-item " href="command-line-options.html">Options</a>
50 <a class="magick-nav-item " href="api.html">Development</a>
cristy44443b92015-05-05 00:06:07 +000051 <a class="magick-nav-item" href="http://www.imagemagick.org/discourse-server/">Community</a>
cristyd2432012015-05-04 23:15:15 +000052 <a class="magick-nav-item navbar-right " href="search.html">Search</a>
53 </nav>
54 </div>
55</div>
56<div class="container">
57<div class="magick-header">
cristyad41c0c2012-10-31 00:49:28 +000058
cristyd2432012015-05-04 23:15:15 +000059<p class="text-center"><a href="porting.html#imv7">ImageMagick Version 7</a><a href="porting.html#hdri">High Dynamic Range Imaging</a><a href="porting.html#channels">Pixel Channels</a><a href="porting.html#alpha">Alpha</a><a href="porting.html#grayscale">Grayscale</a><a href="porting.html#mask">Masks</a><a href="porting.html#core">MagickCore API</a><a href="porting.html#headers">Header Files</a><a href="porting.html#deprecate">Deprecated Features Removed</a><a href="porting.html#cli">Command-line Interface</a><a href="porting.html#summary">Version 7 Change Summary</a> </p>
cristyba1758d2011-06-03 01:29:12 +000060
cristyd2432012015-05-04 23:15:15 +000061<p class="lead magick-description">The design of ImageMagick is an evolutionary process, with the design and implementation efforts serving to influence and guide further progress in the other. With ImageMagick version 7 we aim to improve the design based on lessons learned from the version 6 implementation. ImageMagick was originally designed to display RGB images to an X Windows server. Over time we extended support to RGBA images and then to the CMYK and CMYKA image format. With ImageMagick version 7, we extend support to arbitrary colorspaces with an arbitrary number of pixel channels. Other design changes are in the works and we will document them here so be sure to revisit periodically.</p>
cristyba1758d2011-06-03 01:29:12 +000062
cristyd2432012015-05-04 23:15:15 +000063<p>To support variable pixel channels in the MagickCore API, pixel handling has changed when getting or setting the pixel channels. You can access channels as an array, <var>pixel[i]</var>, or use an accessor such as GetPixelRed() or SetPixelRed(). There are some modest changes to the MagickCore and MagickWand API. Magick++ and PerlMagick should behave exactly as it does for ImageMagick version 6.</p>
cristy29c5c992011-06-25 13:58:49 +000064
cristy751980d2012-06-03 23:18:35 +000065<p>The shell API (command line) of ImageMagick version 7 is also undergoing
66a major overhaul, with specific emphasis on the ability to read 'options' not
67only from the command line, but also from scripts, and file streams. This
68allows for the use of 'co-processing' programming techniques or performing
69image handling using 'deamon/server backends', and even multi-machine
70distributed processing.</p>
71
72<p>With shell API overhaul other improvements are being made, including:
cristy8ee7f242013-06-20 16:08:44 +000073better reporting of which option failed, the consolidation and deprecation of
cristy751980d2012-06-03 23:18:35 +000074options, and more global use of 'image properities' (more commonly known as
75'percent escapes' in option arguments. </p>
76
cristy91469932014-07-25 11:00:25 +000077<p>ImageMagick version 7 is available now as an <a href="http://www.imagemagick.org/download/beta/">Beta</a> release. Look for an official release around 1st Q 2016. An official ImageMagick version 7 release depends on how smoothly the Beta cycle progresses. During the Beta cycle, version 6 developers can attempt to port their software to version 7.</p>
cristy29c5c992011-06-25 13:58:49 +000078
cristy91469932014-07-25 11:00:25 +000079<p>Once ImageMagick version 7 is released, we will continue to support and enhance version 6 for a minimum of 10 years.</p>
cristyba1758d2011-06-03 01:29:12 +000080
cristyd2432012015-05-04 23:15:15 +000081<h2 class="magick-header"><a id="hdri"></a>High Dynamic Range Imaging</h2>
cristy37b3d442015-02-28 14:00:30 +000082<p>ImageMagick version 7 enables <a href="high-dynamic-range.html">high dynamic range imaging</a> (HDRI) by default. HDRI accurately represents the wide range of intensity levels found in real scenes ranging from the brightest direct sunlight to the deepest darkest shadows. In addition, image processing results are more accurate. The disadvantage is it requires more memory and may result in slower processing times. If you see differences in the results of your version 6 command-line with version 7, it is likely due to HDRI. You may need to add <code>-clamp</code> to your command-line to constrain pixels to the 0 .. QuantumRange range, or disable HDRI when you build ImaegMagick version 7. To disable HDRI (recommended for smart phone builds such as iOS), simply add <code>--disable-hdri</code> to the configure script command line when building ImageMagick.</p>
cristy149d58c2013-08-07 19:44:54 +000083
cristyd2432012015-05-04 23:15:15 +000084<h2 class="magick-header"><a id="channels"></a>Pixel Channels</h2>
85<p>A pixel is comprised of one or more color values, or <var>channels</var> (e.g. red pixel channel).</p>
cristy1efc1ab2011-08-01 14:47:02 +000086<p>Prior versions of ImageMagick (4-6), support 4 to 5 pixel channels (RGBA or CMYKA). The first 4 channels are accessed with the PixelPacket data structure. The structure includes 4 members of type Quantum (typically 16-bits) of red, green, blue, and opacity. The black channel or colormap indexes are supported by a separate method and structure, IndexPacket. As an example, here is a code snippet from ImageMagick version 6 that negates the color components (but not the alpha component) of the image pixels:</p>
cristyba1758d2011-06-03 01:29:12 +000087
cristyd2432012015-05-04 23:15:15 +000088<code>
89<textarea class="form-control" rows="15">for (y=0; y &lt; (ssize_t) image-&gt;rows; y++)
cristy91469932014-07-25 11:00:25 +000090{
91 register IndexPacket
92 *indexes;
cristyba1758d2011-06-03 01:29:12 +000093
cristy91469932014-07-25 11:00:25 +000094 register PixelPacket
95 *q;
cristyba1758d2011-06-03 01:29:12 +000096
cristyd2432012015-05-04 23:15:15 +000097 q=GetCacheViewAuthenticPixels(image_view,0,y,image-&gt;columns,1,exception);
cristy91469932014-07-25 11:00:25 +000098 if (q == (PixelPacket *) NULL)
cristyba1758d2011-06-03 01:29:12 +000099 {
cristyba1758d2011-06-03 01:29:12 +0000100 status=MagickFalse;
cristy91469932014-07-25 11:00:25 +0000101 continue;
102 }
103 indexes=GetCacheViewAuthenticIndexQueue(image_view);
cristyd2432012015-05-04 23:15:15 +0000104 for (x=0; x &lt; (ssize_t) image-&gt;columns; x++)
cristy91469932014-07-25 11:00:25 +0000105 {
106 if ((channel &amp; RedChannel) != 0)
cristyd2432012015-05-04 23:15:15 +0000107 q-&gt;red=(Quantum) QuantumRange-q-&gt;red;
cristy91469932014-07-25 11:00:25 +0000108 if ((channel &amp; GreenChannel) != 0)
cristyd2432012015-05-04 23:15:15 +0000109 q-&gt;green=(Quantum) QuantumRange-q-&gt;green;
cristy91469932014-07-25 11:00:25 +0000110 if ((channel &amp; BlueChannel) != 0)
cristyd2432012015-05-04 23:15:15 +0000111 q-&gt;blue=(Quantum) QuantumRange-q-&gt;blue;
cristy91469932014-07-25 11:00:25 +0000112 if (((channel &amp; IndexChannel) != 0) &amp;&amp;
cristyd2432012015-05-04 23:15:15 +0000113 (image-&gt;colorspace == CMYKColorspace))
cristy91469932014-07-25 11:00:25 +0000114 indexes[x]=(IndexPacket) QuantumRange-indexes[x];
115 q++;
cristyba1758d2011-06-03 01:29:12 +0000116 }
cristy91469932014-07-25 11:00:25 +0000117 if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
118 status=MagickFalse;
cristyd2432012015-05-04 23:15:15 +0000119}</textarea>
120</code>
cristyba1758d2011-06-03 01:29:12 +0000121
cristyeed6cb62012-01-28 19:38:34 +0000122<p>ImageMagick version 7 supports any number of channels from 1 to 32 (and beyond) and simplifies access with a single method that returns an array of pixel channels of type Quantum. Source code that compiles against prior versions of ImageMagick requires refactoring to work with ImageMagick version 7. We illustrate with an example. Let's naively refactor the version 6 code snippet from above so it works with the ImageMagick version 7 API:</p>
cristyba1758d2011-06-03 01:29:12 +0000123
cristyd2432012015-05-04 23:15:15 +0000124<code>
125<textarea class="form-control" rows="15">for (y=0; y &lt; (ssize_t) image-&gt;rows; y++)
cristy91469932014-07-25 11:00:25 +0000126{
127 register Quantum
128 *q;
cristyba1758d2011-06-03 01:29:12 +0000129
cristyd2432012015-05-04 23:15:15 +0000130 q=GetCacheViewAuthenticPixels(image_view,0,y,image-&gt;columns,1,exception);
cristy91469932014-07-25 11:00:25 +0000131 if (q == (Quantum *) NULL)
cristy29c5c992011-06-25 13:58:49 +0000132 {
cristy29c5c992011-06-25 13:58:49 +0000133 status=MagickFalse;
cristy91469932014-07-25 11:00:25 +0000134 continue;
135 }
cristyd2432012015-05-04 23:15:15 +0000136 for (x=0; x &lt; (ssize_t) image-&gt;columns; x++)
cristy91469932014-07-25 11:00:25 +0000137 {
138 if ((GetPixelRedTraits(image) &amp; UpdatePixelTrait) != 0)
139 SetPixelRed(image,QuantumRange-GetPixelRed(image,q),q);
140 if ((GetPixelGreenTraits(image) &amp; UpdatePixelTrait) != 0)
141 SetPixelGreen(image,QuantumRange-GetPixelGreen(image,q),q);
142 if ((GetPixelBlueTraits(image) &amp; UpdatePixelTrait) != 0)
143 SetPixelBlue(image,QuantumRange-GetPixelBlue(image,q),q);
144 if ((GetPixelBlackTraits(image) &amp; UpdatePixelTrait) != 0)
145 SetPixelBlack(image,QuantumRange-GetPixelBlack(image,q),q);
146 if ((GetPixelAlphaTraits(image) &amp; UpdatePixelTrait) != 0)
147 SetPixelAlpha(image,QuantumRange-GetPixelAlpha(image,q),q);
148 q+=GetPixelChannels(image);
cristy29c5c992011-06-25 13:58:49 +0000149 }
cristy91469932014-07-25 11:00:25 +0000150 if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
151 status=MagickFalse;
152}
cristyd2432012015-05-04 23:15:15 +0000153</textarea>
154</code>
cristy29c5c992011-06-25 13:58:49 +0000155
cristy1efc1ab2011-08-01 14:47:02 +0000156<p>Let's do that again but take full advantage of the new variable pixel channel support:</p>
cristy29c5c992011-06-25 13:58:49 +0000157
cristyd2432012015-05-04 23:15:15 +0000158<code>
159<textarea class="form-control" rows="15">for (y=0; y &lt; (ssize_t) image-&gt;rows; y++)
cristy91469932014-07-25 11:00:25 +0000160{
161 register Quantum
162 *q;
163
cristyd2432012015-05-04 23:15:15 +0000164 q=GetCacheViewAuthenticPixels(image_view,0,y,image-&gt;columns,1,exception);
cristy91469932014-07-25 11:00:25 +0000165 if (q == (Quantum *) NULL)
166 {
167 status=MagickFalse;
168 continue;
169 }
cristyd2432012015-05-04 23:15:15 +0000170 for (x = 0; x &lt; (ssize_t) image-&gt;columns; x++)
cristy91469932014-07-25 11:00:25 +0000171 {
172 register ssize_t
173 i;
174
175 if (GetPixelReadMask(image,q) == 0)
cristy29c5c992011-06-25 13:58:49 +0000176 {
cristy91469932014-07-25 11:00:25 +0000177 q+=GetPixelChannels(image);
cristy29c5c992011-06-25 13:58:49 +0000178 continue;
179 }
cristy91469932014-07-25 11:00:25 +0000180 for (i=0; i &lt; (ssize_t) GetPixelChannels(image); i++)
cristy1efc1ab2011-08-01 14:47:02 +0000181 {
cristy91469932014-07-25 11:00:25 +0000182 PixelChannel channel=GetPixelChannelChannel(image,i);
183 PixelTrait traits=GetPixelChannelTraits(image,channel);
184 if ((traits &amp; UpdatePixelTrait) == 0)
185 continue;
186 q[i]=QuantumRange-q[i];
cristy1efc1ab2011-08-01 14:47:02 +0000187 }
cristy91469932014-07-25 11:00:25 +0000188 q+=GetPixelChannels(image);
cristyba1758d2011-06-03 01:29:12 +0000189 }
cristy91469932014-07-25 11:00:25 +0000190 if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
191 status=MagickFalse;
192}
cristyd2432012015-05-04 23:15:15 +0000193</textarea>
194</code>
cristyba1758d2011-06-03 01:29:12 +0000195
cristyeed6cb62012-01-28 19:38:34 +0000196<p>Note, how we use GetPixelChannels() to advance to the next set of pixel channels.</p>
cristye6e84152011-06-06 14:16:49 +0000197
cristy7865f2d2015-03-08 13:15:40 +0000198<p>The colormap indexes and black pixel channel (for the CMYK colorspace) are no longer stored in the index channel, previously accessed with GetAuthenticIndexQueue() and GetCacheViewAuthenticIndexQueue(). Instead they are now a first class pixel channel and accessed as a member of the pixel array (e.g. <code>pixel[4]</code>) or with the convenience pixel accessor methods GetPixelIndex(), SetPixelIndex(), GetPixelBlack(), and SetPixelBlack().</p>
cristy29c5c992011-06-25 13:58:49 +0000199
cristy91469932014-07-25 11:00:25 +0000200<p>As a consequence of using an array structure for variable pixel channels, auto-vectorization compilers have additional opportunities to speed up pixel loops.</p>
201
cristy149d58c2013-08-07 19:44:54 +0000202<h4>Pixel Accessors</h4>
cristy7865f2d2015-03-08 13:15:40 +0000203<p>You can access pixel channel as array elements (e.g. <code>pixel[1]</code>) or use convenience accessors to get or set pixel channels:</p>
cristy87a7f072011-07-01 00:08:52 +0000204
cristyd2432012015-05-04 23:15:15 +0000205<pre>
206GetPixela() SetPixela()
207GetPixelAlpha() SetPixelAlpha()
208GetPixelb() SetPixelb()
209GetPixelBlack() SetPixelBlack()
210GetPixelBlue() SetPixelBlue()
211GetPixelCb() SetPixelCb()
212GetPixelCr() SetPixelCr()
213GetPixelCyan() SetPixelCyan()
214GetPixelGray() SetPixelGray()
215GetPixelGreen() SetPixelGreen()
216GetPixelIndex() SetPixelIndex()
217GetPixelL() SetPixelL()
218GetPixelMagenta() SetPixelMagenta()
219GetPixelReadMask() SetPixelReadMask()
220GetPixelWriteMask() SetPixelWriteMask()
221GetPixelMetacontentExtent() SetPixelMetacontentExtent()
222GetPixelOpacity() SetPixelOpacity()
223GetPixelRed() SetPixelRed()
224GetPixelYellow() SetPixelYellow()
225GetPixelY() SetPixelY()
cristy87a7f072011-07-01 00:08:52 +0000226</pre>
227
cristy8ee7f242013-06-20 16:08:44 +0000228<p>You can find these accessors defined in the header file, <code>MagickCore/pixel-accessor.h</code></p>
cristy87a7f072011-07-01 00:08:52 +0000229
cristy149d58c2013-08-07 19:44:54 +0000230<h4>Pixel Traits</h4>
cristy1efc1ab2011-08-01 14:47:02 +0000231<p>Each pixel channel includes one or more of these traits:</p>
cristya4dfb122011-07-07 19:01:57 +0000232<dl>
233<dt>Undefined</dt>
cristy149d58c2013-08-07 19:44:54 +0000234<dd>no traits associated with this pixel channel</dd>
cristy1efc1ab2011-08-01 14:47:02 +0000235<dt>Copy</dt>
cristy149d58c2013-08-07 19:44:54 +0000236<dd>do not update this pixel channel, just copy it</dd>
cristy1efc1ab2011-08-01 14:47:02 +0000237<dt>Update</dt>
cristy149d58c2013-08-07 19:44:54 +0000238<dd>update this pixel channel</dd>
cristya4dfb122011-07-07 19:01:57 +0000239<dt>Blend</dt>
cristy149d58c2013-08-07 19:44:54 +0000240<dd>blend this pixel channel with the alpha mask if it's enabled</dd>
cristya4dfb122011-07-07 19:01:57 +0000241</dl>
242<p>We provide these methods to set and get pixel traits:</p>
cristyd2432012015-05-04 23:15:15 +0000243<pre>
244GetPixelAlphaTraits() SetPixelAlphaTraits()
245GetPixelBlackTraits() SetPixelBlackTraits()
246GetPixelBlueTraits() SetPixelBlueTraits()
247GetPixelCbTraits() SetPixelCbTraits()
248GetPixelChannelTraits() SetPixelChannelTraits()
249GetPixelCrTraits() SetPixelCrTraits()
250GetPixelGrayTraits() SetPixelGrayTraits()
251GetPixelGreenTraits() SetPixelGreenTraits()
252GetPixelIndexTraits() SetPixelIndexTraits()
253GetPixelMagentaTraits() SetPixelMagentaTraits()
254GetPixelRedTraits() SetPixelRedTraits()
255GetPixelYellowTraits() SetPixelYellowTraits()
256GetPixelYTraits() SetPixelYTraits()
cristya4dfb122011-07-07 19:01:57 +0000257</pre>
cristy1efc1ab2011-08-01 14:47:02 +0000258<p>For convenience you can set the active trait for a set of pixel channels with a channel mask and these methods:</p>
cristyd2432012015-05-04 23:15:15 +0000259<pre>
260PopPixelChannelMap()
261SetPixelChannelMap()
262SetPixelChannelMask()
cristya4dfb122011-07-07 19:01:57 +0000263</pre>
264
cristy8ee7f242013-06-20 16:08:44 +0000265<p>Previously MagickCore methods had channel analogs, for example, NegateImage() and NegateImageChannels(). The channel analog methods are no longer necessary because the pixel channel traits specify whether to act on a particular pixel channel or whether to blend with the alpha mask. For example, instead of</p>
cristyd2432012015-05-04 23:15:15 +0000266<pre>
267NegateImageChannel(image,channel);
cristya4dfb122011-07-07 19:01:57 +0000268</pre>
269<p>we use:</p>
cristyd2432012015-05-04 23:15:15 +0000270<pre>
271channel_mask=SetPixelChannelMask(image,channel);
272NegateImage(image,exception);
273(void) SetPixelChannelMap(image,channel_mask);
cristya4dfb122011-07-07 19:01:57 +0000274</pre>
275
cristy149d58c2013-08-07 19:44:54 +0000276<h4>Pixel User Channels</h4>
cristyeed6cb62012-01-28 19:38:34 +0000277<p>In version 7, we introduce pixel user channels. Traditionally we utilize 4 channels, red, green, blue, and alpha. For CMYK we also have a black channel. User channels are designed to contain whatever additional channel information that makes sense for your application. Some examples include extra channels in TIFF or PSD images or perhaps you require a channel with infrared information for the pixel. You can associate traits with the user channels so that they when they are acted upon by an image processing algorithm (e.g. blur) the pixels are copied, acted upon by the algorithm, or even blended with the alpha channel if that makes sense.</p>
cristy149d58c2013-08-07 19:44:54 +0000278<h4>Pixel Metacontent</h4>
cristyeed6cb62012-01-28 19:38:34 +0000279<p>In version 7, we introduce pixel metacontent. Metacontent is content about content. So rather than being the content itself, it's something that describes or is associated with the content. Here the content is a pixel. The pixel metacontent is for your exclusive use and is accessed with these MagickCore API methods:</p>
cristyd2432012015-05-04 23:15:15 +0000280<pre>
281SetImageMetacontentExtent()
282GetImageMetacontentExtent()
283GetVirtualMetacontent()
284GetAuthenticMetacontent()
285GetCacheViewAuthenticMetacontent()
286GetCacheViewVirtualMetacontent()
cristy87a7f072011-07-01 00:08:52 +0000287</pre>
cristyba1758d2011-06-03 01:29:12 +0000288
cristyd2432012015-05-04 23:15:15 +0000289<h2 class="magick-header"><a id="alpha"></a>Alpha</h2>
cristy8ee7f242013-06-20 16:08:44 +0000290<p>We support alpha now, previously opacity. With alpha, a value of 0 means that the pixel does not have any coverage information and is transparent; i.e. there was no color contribution from any geometry because the geometry did not overlap this pixel. A value of QuantumRange means that the pixel is opaque because the geometry completely overlapped the pixel. As a consequence, in version 7, the PixelInfo structure member alpha has replaced the previous opacity member. Another consequence is the alpha part of a sRGB value in hexadecimal notation is now reversed (e.g. #0000 is fully transparent).</p>
cristyd2432012015-05-04 23:15:15 +0000291<h2 class="magick-header"><a id="colorspace"></a>Colorspace</h2>
cristy37b3d442015-02-28 14:00:30 +0000292<p>The <code>Rec601Luma</code> and <code>Rec709Luma</code> colorspaces are no longer supported. Instead, specify the <code>gray</code> colorspace and choose from these intensity options:</p>
cristyd2432012015-05-04 23:15:15 +0000293<pre>
cristy37b3d442015-02-28 14:00:30 +0000294Rec601Luma
295Rec601Luminance
296Rec709Luma
297Rec709Luminance
298</pre>
299<p>For example,</p>
cristyd2432012015-05-04 23:15:15 +0000300<pre>
cristy37b3d442015-02-28 14:00:30 +0000301convert myImage.png -intensity Rec709Luminance -colorspace gray myImage.jpg
302</pre>
303
cristyd2432012015-05-04 23:15:15 +0000304<h2 class="magick-header"><a id="grayscale"></a>Grayscale</h2>
cristy8ee7f242013-06-20 16:08:44 +0000305<p>Previously, grayscale images were Rec601Luminance and consumed 4 channels: red, green, blue, and alpha. With version 7, grayscale consumes only 1 channel requiring far less resources as a result.</p>
cristy8ee7f242013-06-20 16:08:44 +0000306
cristyd2432012015-05-04 23:15:15 +0000307<h2 class="magick-header"><a id="mask"></a>Masks</h2>
cristy149d58c2013-08-07 19:44:54 +0000308<p>Version 7 supports masks for most image operators. As an example, here are two methods to compute the statistics of any pixel selected by the image mask:</p>
cristyd2432012015-05-04 23:15:15 +0000309<pre>
cristy8ee7f242013-06-20 16:08:44 +0000310identify -verbose -clip r statue.tif
311identify -verbose -mask r mask.png statue.tif
312</pre>
cristyba1758d2011-06-03 01:29:12 +0000313
cristyd2432012015-05-04 23:15:15 +0000314<h2 class="magick-header"><a id="core"></a>MagickCore API</h2>
315<p>Here are a list of changes to the MagickCore API:</p>
316<ul>
317<li>Almost all image processing algorithms are now channel aware.</li>
318<li>MagickCore, version 7, adds an ExceptionInfo argument to those methods that lacked it in version 6, e.g. <code>NegateImage(image,MagickTrue,exception</code>);</li>
319<li>All method channel analogs have been removed (e.g. BlurImageChannel()), they are no longer necessary, use pixel traits instead.</li>
320<li>Public and private API calls are now declared with the GCC visibility attribute. The MagickCore and MagickWand dynamic libraries now only export public struct and function declarations.</li>
321<li>The InterpolatePixelMethod enum is now PixelInterpolateMethod.</li>
322<li>The IntegerPixel storage type is removed (use LongPixel instead) and LongLongPixel is added</li>
323<li>Image signatures have changed to account for variable pixel channels.</li>
324<li>All color packet structures, PixelPacket, LongPacket, and DoublePacket, are consolidated to a single color structure, PixelInfo.</li>
325<li>The ChannelMoments structure member <code>I</code> is now <code>invariant</code>. <code>I</code> conflicts with the <code>complex.h</code> header.</li>
326<li>We added a length parameter to FormatMagickSize() to permit variable length buffers.</li>
327</ul>
328<h2 class="magick-header"><a id="headers"></a>Header Files</h2>
cristy8ee7f242013-06-20 16:08:44 +0000329<p>Prior versions of ImageMagick (4-6) reference the ImageMagick header files as <code>magick/</code> and <code>wand/</code>. ImageMagick 7 instead uses <code>MagickCore/</code> and <code>MagickWand/</code> respectively. For example,</p>
cristyd2432012015-05-04 23:15:15 +0000330<pre><code>#include &lt;MagickCore/MagickCore.h&gt;
331#include &lt;MagickWand/MagickWand.h&gt;</code></pre>
cristy751980d2012-06-03 23:18:35 +0000332
cristyd2432012015-05-04 23:15:15 +0000333<h2 class="magick-header"><a id="deprecate"></a>Deprecated Features Removed</h2>
cristy8ee7f242013-06-20 16:08:44 +0000334<p>All deprecated features from ImageMagick version 6 are removed in version 7. These include the <code>Magick-config</code> and <code>Wand-config</code> configuration utilities. Instead use:</p>
cristyba1758d2011-06-03 01:29:12 +0000335
cristyd2432012015-05-04 23:15:15 +0000336<pre>MagickCore-config
cristy91469932014-07-25 11:00:25 +0000337MagickWand-config
cristyba1758d2011-06-03 01:29:12 +0000338</pre>
cristyeed6cb62012-01-28 19:38:34 +0000339<p>The FilterImage() method has been removed. Use ConvolveImage() instead.</p>
cristyba1758d2011-06-03 01:29:12 +0000340
cristy149d58c2013-08-07 19:44:54 +0000341<p>In addition, all deprecated <a href="http://magick.imagemagick.org/api/deprecate.html">MagickCore</a> and <a href="http://magick.imagemagick.org/api/magick-deprecate.html">MagickWand</a> methods are no longer available in version 7.</p>
cristy751980d2012-06-03 23:18:35 +0000342
343
cristyd2432012015-05-04 23:15:15 +0000344<h2 class="magick-header"><a id="cli"></a>Shell API or Command-line Interface</h2>
cristy751980d2012-06-03 23:18:35 +0000345
346<p>As mentioned the primary focus of the changes to the Shell API or Command
cristyd2432012015-05-04 23:15:15 +0000347Line Interface is the abstraction so that not only can <var>options</var> be read
cristy751980d2012-06-03 23:18:35 +0000348from command line arguments, but also from a file (script) or from a file
349stream (interactive commands, or co-processing). </p>
350
351<p>To do this the CLI parser needed to be re-written, so as to always perform
352all options, in a strict, do-it-as-you-see it order. Previously in IMv6
353options were performed in groups (known as 'FireOptions), this awkwardness is
cristy37b3d442015-02-28 14:00:30 +0000354now gone. However the strict order means that you can no longer give operations
cristy751980d2012-06-03 23:18:35 +0000355before providing an image for the operations to work on. To do so will now
356produce an error. </p>
357
358<p>Error reporting is now reporting exactly which option (by argument count on
359command line, or line,column in scripts) caused the 'exception'. This is not
360complete as yet but getting better. Also not complete is 'regard-warnings'
361handling or its replacement, which will allow you to ignore reported errors
362and continue processing (as appropriate due to error) in co-processes or
363interactive usage. </p>
364
365<p>The parenthesis options used to 'push' the current image list, and image
cristy8ee7f242013-06-20 16:08:44 +0000366settings (EG: '<code>(</code>' and '<code>)</code>' ) on to a stack now has
cristy91469932014-07-25 11:00:25 +0000367a completely separate image settings stack. That is parenthesis 'push/pull'
cristy8ee7f242013-06-20 16:08:44 +0000368image lists, and curly braces (EG: '<code>{</code>' and '<code>}</code>' ) will
cristy751980d2012-06-03 23:18:35 +0000369'push/pull' image settings. </p>
370
371<p>Of course due to the previously reported changes to the underlying channel
372handling will result be many side effects to almost all options. Here are some
373specific </p>
374
375<p>Most algorithms update the red, green, blue, black (for CMYK), and alpha
376channels. Most operators will blend alpha the other color channels, but other
377operators (and situations) may require this blending to be disabled, and is
378currently done by removing alpha from teh active channels via
cristy8ee7f242013-06-20 16:08:44 +0000379<code>-channel</code> option. (e.g. <code>convert castle.gif -channel RGB
380-negate castle.png</code>). </p>
cristy751980d2012-06-03 23:18:35 +0000381
cristy37b3d442015-02-28 14:00:30 +0000382<p>Reading gray-scale images generate an image with only one channel. If
cristy8ee7f242013-06-20 16:08:44 +0000383that image is to then accept color the <code>-colorspace</code> setting needs to
cristy751980d2012-06-03 23:18:35 +0000384be applied to expand the one channel into separate RGB (or other) channels.
385</p>
cristyd2432012015-05-04 23:15:15 +0000386<p>Previously, command-line arguments were limited to 4096 characters, with ImageMagick version 7 the limit has increased to 131072 characters.</p>
cristy751980d2012-06-03 23:18:35 +0000387
388<h3>Command Changes</h3>
cristyd2432012015-05-04 23:15:15 +0000389<p>Here are a list of changes to the ImageMagick commands:</p>
390<dl class="dl-horizontal">
cristy751980d2012-06-03 23:18:35 +0000391<dt>magick</dt>
cristy8ee7f242013-06-20 16:08:44 +0000392<dd>The "<code>magick</code>" command is the new primary command of the Shell
393 API, replacing the old "<code>convert</code>" command. This allows you to
394 create a 'magick script' of the form "<code>#!/path/to/command/magick
395 -script</code>", or pipe options into a command "<code>magick -script
396 -</code>, as abackground process. </dd>
cristy751980d2012-06-03 23:18:35 +0000397
398<dt>magick-script</dt>
cristy8ee7f242013-06-20 16:08:44 +0000399<dd>This the same as "<code>magick</code>", (only command name is different)
400 but which has an implict "<code>-script</code>" option. This allows you to
401 use it in an "<code>env</code>" style script form. That is a magick script
402 starts with the 'she-bang' line of "<code>#!/usr/bin/env
403 magick-script</code>" allowing the script interpreter to be found anywhere
404 on the users command "<code>PATH</code>". This is required to get around
cristy751980d2012-06-03 23:18:35 +0000405 a "one argument she-bang bug" that is common on most UNIX systems
406 (including Linux, but not MacOSX).</dd>
407
408</dl>
409
cristy37b3d442015-02-28 14:00:30 +0000410<h3>Behavioral Changes</h3>
411<p>Image settings are applied to each image on the command line. To associate a setting with a particular image, use parenthesis to remove ambiguity. In this example we assign a unique page offset to each image:</p>
cristyd2432012015-05-04 23:15:15 +0000412<pre>
cristy37b3d442015-02-28 14:00:30 +0000413convert \( -page +10+20 first.png \) \( -page +100+200 second.png \) ...
414</pre>
415
416<p>By default, image operations such as convolution blends alpha with each channel. To convolve each channel independently, deactivate the alpha channel as follows:</p>
cristyd2432012015-05-04 23:15:15 +0000417<pre>
cristy37b3d442015-02-28 14:00:30 +0000418convert ... -alpha discrete -blur 0x1 ...
419</pre>
420<p>To just copy the alpha values, use <code>-alpha off</code>.</p>
cristy8ee7f242013-06-20 16:08:44 +0000421<p>Some options have changed in ImageMagick version 7. These include:</p>
422<dl>
cristy37b3d442015-02-28 14:00:30 +0000423<dt>+combine</dt>
424<dd>This option now requires an argument, the image colorspace (e.g. +combine sRGB).</dd>
cristy8ee7f242013-06-20 16:08:44 +0000425</dl>
426
cristy751980d2012-06-03 23:18:35 +0000427<h3>New Options</h3>
428<p>ImageMagick version 7 supports these new options, though most are limited
cristy8ee7f242013-06-20 16:08:44 +0000429to the "<code>magick</code>" command, or to use in "<code>magick</code>"
cristy751980d2012-06-03 23:18:35 +0000430scripts.</p>
431
cristyd2432012015-05-04 23:15:15 +0000432<dl class="dl-horizontal">
cristy751980d2012-06-03 23:18:35 +0000433<dt>{ ... }</dt>
434<dd>Save (and restore) the current image settings (internally known as the
435 "image_info" structure). This is automatically done with parenthesis (EG:
cristy8ee7f242013-06-20 16:08:44 +0000436 '<code>(</code>' and '<code>)</code>') is "<code>-regard-parenthesis</code>" has
cristy751980d2012-06-03 23:18:35 +0000437 been set, just as in IMv6. Caution is advised to prevent un-balanced
cristy149d58c2013-08-07 19:44:54 +0000438 braces errors.</dd>
cristy751980d2012-06-03 23:18:35 +0000439
440<dt>--</dt>
cristy8ee7f242013-06-20 16:08:44 +0000441<dd>End of options, to be used in IMv7 "<code>mogrify</code>" command to
cristy37b3d442015-02-28 14:00:30 +0000442 explicitly separate the operations to be applied and the images that
cristy751980d2012-06-03 23:18:35 +0000443 are to be processed 'in-place'. (not yet implemented). However if
cristy8ee7f242013-06-20 16:08:44 +0000444 not provided, "<code>-read</code>" can still be used to differentiate
cristy751980d2012-06-03 23:18:35 +0000445 secondary image reads (for use in things like alpha composition) from
446 the 'in-place' image being processed. </dd>
447
cristy37b3d442015-02-28 14:00:30 +0000448<dd>In other commands (such as "magick") it is equivalent to a explicit
cristy8ee7f242013-06-20 16:08:44 +0000449 "<code>-read</code>" (see below) of the next option as a image (as it was in
cristy751980d2012-06-03 23:18:35 +0000450 IMv6). </dd>
451
cristyd2432012015-05-04 23:15:15 +0000452<dt>-alpha discreta</dt>
453<dd>treat the alpha channel independently (do not blend).</dd>
454
455<dt>-channel-fx <var>expression</var> </dt>
cristy751980d2012-06-03 23:18:35 +0000456<dd>
457<p>exchange, extract, or copy one or more image channels.</p>
458
cristy8ee7f242013-06-20 16:08:44 +0000459<p>The expression consists of one or more channels, either mnemonic or numeric (e.g. red or 0, green or 1, etc.), separated by certain operation symbols as follows:</p>
cristy751980d2012-06-03 23:18:35 +0000460
cristyd2432012015-05-04 23:15:15 +0000461<pre>
462&lt;=&gt; exchange two channels (e.g. red&lt;=&gt;blue)
463=&gt; copy one channel to another channel (e.g. red=&gt;green)
464= assign a constant value to a channel (e.g. red=50%)
465, write new image with channels in the specified order (e.g. red, green)
466; add a new output image for the next set of channel operations (e.g. red; green; blue)
467| move to the next input image for the source of channel data (e.g. | gray=&gt;alpha)
cristy751980d2012-06-03 23:18:35 +0000468</pre>
469
470<p>For example, to create 3 grayscale images from the red, green, and blue channels of an image, use:</p>
471
cristyd2432012015-05-04 23:15:15 +0000472<pre>
473-channel-fx "red; green; blue"
cristy751980d2012-06-03 23:18:35 +0000474</pre>
475
476<p>A channel without an operation symbol implies separate (i.e, semicolon).</p>
477
cristy8ee7f242013-06-20 16:08:44 +0000478<p>Here we take an sRGB image and a grayscale image and inject the grayscale image into the alpha channel:</p>
cristyd2432012015-05-04 23:15:15 +0000479<pre>
480convert wizard.png mask.pgm -channel-fx '| gray=&gt;alpha' wizard-alpha.png
cristy8ee7f242013-06-20 16:08:44 +0000481</pre>
482<p>Use a similar command to define a read mask:</p>
cristyd2432012015-05-04 23:15:15 +0000483<pre>
484convert wizard.png mask.pgm -channel-fx '| gray=&gt;read-mask' wizard-mask.png
cristy8ee7f242013-06-20 16:08:44 +0000485</pre>
486
487<p>Add <code>-debug pixel</code> prior to the <code>-channel-fx</code> option to track the channel morphology.</p>
488
cristy751980d2012-06-03 23:18:35 +0000489</dd>
490
491<dt>-exit</dt>
492<dd>Stop processing at this point. No further options will be processed after
cristy8ee7f242013-06-20 16:08:44 +0000493 this option. Can be used in a script to force the "<code>magick</code>"
cristy751980d2012-06-03 23:18:35 +0000494 command to exit, without actually closing the pipeline that it is
495 processing options from. </dd>
496
cristy8ee7f242013-06-20 16:08:44 +0000497<dd>May also be used as a 'final' option on the "<code>magick</code>" command
cristy751980d2012-06-03 23:18:35 +0000498 line, instead of a implicit output image, to completely prevent any image
cristy8ee7f242013-06-20 16:08:44 +0000499 write. ASIDE: even the "<code>NULL:</code>" coder requires at least one
cristy751980d2012-06-03 23:18:35 +0000500 image, for it to 'not write'! This option does not require any images at
501 all. </dd>
502
503<dt>-read {image}</dt>
504<dd>Explicit read of an image, rather than an implicit read. This allows you
505 to read from filenames that start with an 'option' character, and which
506 otherwise could be mistaken as an option (unknown or otherwise). This will
cristy8ee7f242013-06-20 16:08:44 +0000507 eventually be used in "<code>mogrify</code>" to allow the reading of
cristy751980d2012-06-03 23:18:35 +0000508 secondary images, and allow the use of image list operations within that
509 command. </dd>
510
511<dt>-region</dt>
cristy8ee7f242013-06-20 16:08:44 +0000512<dd>not yet implemented in "<code>magick</code>". (very soon)</dd>
cristy751980d2012-06-03 23:18:35 +0000513
514<dt>-script {file}</dt>
cristy8ee7f242013-06-20 16:08:44 +0000515<dd>In "<code>magick</code>", stop the processing of command line arguments as
cristy751980d2012-06-03 23:18:35 +0000516 image operations, and read all further options from the given file or
517 pipeline.</dd>
518
519</dl>
520
521<h3>Changed Options</h3>
522<p>These options are known to have changed, in some way.</p>
cristyd2432012015-05-04 23:15:15 +0000523<dl class="dl-horizontal">
524<dt>-bias</dt>
525<dd>The option is no longer recognized. Use <code>-define convolve:bias=<var>value</var></code> instead.</dd>
526<dt>-draw</dt>
527<dd>The <code>matte</code> primitive is now <code>alpha</code> (e.g. <code>-draw 'alpha 0,0 floodfill'</code>).</dd>
cristy751980d2012-06-03 23:18:35 +0000528<dt>-negate</dt>
529<dd>currently negates all channels, including alpha if present. As such you
530 may need to use the -channel option to prevent alpha negation. </dd>
cristy751980d2012-06-03 23:18:35 +0000531</dl>
532
cristy8ee7f242013-06-20 16:08:44 +0000533<h3>Deprecated warning given, but will work (for now)</h3>
cristyd2432012015-05-04 23:15:15 +0000534<dl class="dl-horizontal">
cristy751980d2012-06-03 23:18:35 +0000535<dt>-affine</dt>
cristy8ee7f242013-06-20 16:08:44 +0000536<dd>Replaced by <code>-draw "affine ..."</code>. (see transform)</dd>
cristy751980d2012-06-03 23:18:35 +0000537<dt>-average</dt>
cristy8ee7f242013-06-20 16:08:44 +0000538<dd>Replaced by <code>-evaluate-sequence Mean</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000539<dt>-box</dt>
cristy8ee7f242013-06-20 16:08:44 +0000540<dd>Replaced by <code>-undercolor</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000541<dt>-deconstruct</dt>
cristy8ee7f242013-06-20 16:08:44 +0000542<dd>Replaced by <code>-layers CompareAny</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000543<dt>-gaussian</dt>
cristy8ee7f242013-06-20 16:08:44 +0000544<dd>Replaced by <code>-gaussian-blur</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000545<dt>-/+map</dt>
cristy8ee7f242013-06-20 16:08:44 +0000546<dd>Replaced by <code>-/+remap</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000547<dt>-/+matte</dt>
cristy8ee7f242013-06-20 16:08:44 +0000548<dd>Replaced by <code>-alpha Set/Off</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000549<dt>-transform</dt>
cristy8ee7f242013-06-20 16:08:44 +0000550<dd>Replaced by <code>-distort Affine "..."</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000551</dl>
552
cristy8ee7f242013-06-20 16:08:44 +0000553<h3>Deprecated warning given, and ignored (for now)</h3>
cristy751980d2012-06-03 23:18:35 +0000554<p>Almost 'plus' (+) option that did not do anything has been marked as
cristy8ee7f242013-06-20 16:08:44 +0000555deprecated, and does nothing. It does not even have associated code. For
cristy751980d2012-06-03 23:18:35 +0000556example "+annotate", "+resize", "+clut", and "+draw" .</p>
557
cristyd2432012015-05-04 23:15:15 +0000558<dl class="dl-horizontal">
cristy751980d2012-06-03 23:18:35 +0000559<dt>-affinity</dt>
cristy37b3d442015-02-28 14:00:30 +0000560<dd>Replaced by <code>-remap</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000561<dt>-maximum</dt>
cristy8ee7f242013-06-20 16:08:44 +0000562<dd>Replaced by <code>-evaluate-sequence Max</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000563<dt>-median</dt>
cristy8ee7f242013-06-20 16:08:44 +0000564<dd>Replaced by <code>-evaluate-sequence Median</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000565<dt>-minimum</dt>
cristy8ee7f242013-06-20 16:08:44 +0000566<dd>Replaced by <code>-evaluate-sequence Min</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000567<dt>-recolor</dt>
cristy149d58c2013-08-07 19:44:54 +0000568<dd>Replaced by <code>-color-matrix</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000569</dl>
570
571<h3>Removed / Replaced Options ("no such option" error and abort)</h3>
572
cristyd2432012015-05-04 23:15:15 +0000573<dl class="dl-horizontal">
cristy751980d2012-06-03 23:18:35 +0000574<dt>-origin</dt>
575<dd>old option, unknown meaning.</dd>
576<dt>-pen</dt>
cristy149d58c2013-08-07 19:44:54 +0000577<dd>Replaced by <code>-fill</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000578<dt>-passphrase</dt>
579<dd>old option, unknown meaning</dd>
580</dl>
cristyd2432012015-05-04 23:15:15 +0000581<h2 class="magick-header"><a id="summary"></a>Version 7 Change Summary</h2>
cristye6e84152011-06-06 14:16:49 +0000582<p>Changes from ImageMagick version 6 to version 7 are summarized here:</p>
cristy8ee7f242013-06-20 16:08:44 +0000583<h4>High Dynamic Range Imaging</h4>
cristyd2432012015-05-04 23:15:15 +0000584<ul>
cristy8ee7f242013-06-20 16:08:44 +0000585<li>ImageMagick version 7 enables HDRI by default. Expect more accurate image processing results with higher memory requirement and possible slower processing times.</li>
cristyd2432012015-05-04 23:15:15 +0000586</ul>
cristy8ee7f242013-06-20 16:08:44 +0000587<h4>Pixels</h4>
cristyd2432012015-05-04 23:15:15 +0000588<ul>
cristy1efc1ab2011-08-01 14:47:02 +0000589<li>Pixels are no longer addressed with PixelPacket structure members (e.g. red, green, blue, opacity) but as an array of channels (e.g. pixel[PixelRedChannel]).</li>
590<li>Use convenience macros to access pixel channels (e.g. GetPixelRed(), SetPixelRed()).</li>
cristy8ee7f242013-06-20 16:08:44 +0000591<li>The black channel for the CMYK colorspace is no longer stored in the index channel, previously accessed with GetAuthenticIndexQueue() and GetCacheViewAuthenticIndexQueue(). Instead it is now a pixel channel and accessed with the convenience pixel macros GetPixelBlack() and SetPixelBlack().</li>
592<li>The index channel for colormapped images is no longer stored in the index channel, previously accessed with GetAuthenticIndexQueue() and GetCacheViewAuthenticIndexQueue(). Instead it is now a pixel channel and accessed with the convenience pixel macros GetPixelIndex() and SetPixelIndex().</li>
cristy1efc1ab2011-08-01 14:47:02 +0000593<li>Use GetPixelChannels() to advance to the next set of pixel channels.</li>
cristyd2432012015-05-04 23:15:15 +0000594<li>Use the <var>metacontent</var> channel to associate metacontent with each pixel.</li>
cristyeed6cb62012-01-28 19:38:34 +0000595<li>All color packet structures, PixelPacket, LongPacket, and DoublePacket, are consolidated to a single color structure, PixelInfo.</li>
cristyd2432012015-05-04 23:15:15 +0000596</ul>
cristy8ee7f242013-06-20 16:08:44 +0000597<h4>Alpha</h4>
cristyd2432012015-05-04 23:15:15 +0000598<ul>
cristyba1758d2011-06-03 01:29:12 +0000599<li>We support alpha rather than opacity (0 transparent; QuantumRange opaque).</li>
cristy1efc1ab2011-08-01 14:47:02 +0000600<li>Use GetPixelAlpha() or SetPixelAlpha() to get or set the alpha pixel channel value.</li>
cristyd2432012015-05-04 23:15:15 +0000601</ul>
cristy8ee7f242013-06-20 16:08:44 +0000602<h4>Grayscale</h4>
cristyd2432012015-05-04 23:15:15 +0000603<ul>
cristy1efc1ab2011-08-01 14:47:02 +0000604<li>Grayscale images consume one pixel channel in ImageMagick version 7. To process RGB, set the colorspace to RGB (e.g. -colorspace rgb).</li>
cristyd2432012015-05-04 23:15:15 +0000605</ul>
cristy8ee7f242013-06-20 16:08:44 +0000606<h4>MagickCore API</h4>
cristyd2432012015-05-04 23:15:15 +0000607<ul>
cristyeed6cb62012-01-28 19:38:34 +0000608<li>Almost all image processing algorithms are now channel aware.</li>
cristy1efc1ab2011-08-01 14:47:02 +0000609<li>MagickCore, version 7, adds an ExceptionInfo argument to those methods that lacked it in version 6, e.g. NegateImage(image,MagickTrue,exception);</li>
610<li>All method channel analogs have been removed (e.g. BlurImageChannel()), they are no longer necessary, use pixel traits instead.</li>
cristyeed6cb62012-01-28 19:38:34 +0000611<li>Public and private API calls are now declared with the GCC visibility attribute. The MagickCore and MagickWand dynamic libraries now only export public struct and function declarations.</li>
612<li>The InterpolatePixelMethod enum is now PixelInterpolateMethod.</li>
613<li>To account for variable pixel channels, images may now return a different signature.</li>
cristyd2432012015-05-04 23:15:15 +0000614</ul>
cristy8ee7f242013-06-20 16:08:44 +0000615<h4>Deprecated Methods</h4>
cristyd2432012015-05-04 23:15:15 +0000616<ul>
cristy2dcd6822011-06-13 16:21:20 +0000617<li>All ImageMagick version 6 MagickCore and MagickWand deprecated methods are removed and no longer available in ImageMagick version 7.</li>
cristya4dfb122011-07-07 19:01:57 +0000618<li>All MagickCore channel method analogs are removed (e.g. NegateImageChannels()). For version 7, use pixel traits instead.</li>
cristy1efc1ab2011-08-01 14:47:02 +0000619<li>The FilterImage() method has been removed. Use ConvolveImage() instead.</li>
cristyd2432012015-05-04 23:15:15 +0000620</ul>
cristyba1758d2011-06-03 01:29:12 +0000621</div>
cristyd2432012015-05-04 23:15:15 +0000622 <footer class="magick-footer">
623 <div class="magick-nav-item navbar-left">
624 <a href="support.html">Donations</a>
625 </div>
626 <div class="magick-nav-item navbar-right">
cristy44443b92015-05-05 00:06:07 +0000627 <a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="../index.html"></a>
cristyd2432012015-05-04 23:15:15 +0000628 <noscript>
629 <a href="http://flattr.com/thing/947300/Convert-Edit-And-Compose-Images" target="_blank">
630 <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0"></a>
631 </noscript>
632 </div>
633 <p><a href="sitemap.html">Sitemap</a>
634 <a href="links.html">Related</a>
635 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Image Studio</a>
636 <a href="http://jqmagick.imagemagick.org/">JqMagick</a>
637 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a>
638</p>
639 <p><a href="porting.html#">Back to top</a>
640 <a href="contact.html">Contact Us</a></p>
641 </footer>
642</div><!-- /.container -->
cristy751980d2012-06-03 23:18:35 +0000643
cristyd2432012015-05-04 23:15:15 +0000644 <script src="https://localhost/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
645 <script src="../js/bootstrap.min.js"></script>
646 <script type="text/javascript">
647 /* */
648 (function() {
649 var s = document.createElement('offline-script'), t = document.getElementsByTagName('offline-script')[0];
650 s.type = 'text/javascript';
651 s.async = true;
652 s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
653 t.parentNode.insertBefore(s, t);
654 })();
655 /* */
656 </script>
cristyad41c0c2012-10-31 00:49:28 +0000657</div>
cristyad41c0c2012-10-31 00:49:28 +0000658</body>
cristy5a367e42015-05-05 12:39:18 +0000659</html>