blob: b42b431fce467292e4bbda5372efaad0d84d0f94 [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">
24 <link rel="icon" href="../images/wand.png">
25 <link rel="shortcut icon" href="../images/wand.ico" type="images/x-icon">
26 <link rel="stylesheet" href="www/css/bootstrap.min.css">
27 <link rel="stylesheet" href="www/css/magick.css">
cristyad41c0c2012-10-31 00:49:28 +000028</head>
29
cristyd2432012015-05-04 23:15:15 +000030<body>
cristyad41c0c2012-10-31 00:49:28 +000031<div class="main">
cristyd2432012015-05-04 23:15:15 +000032<div class="magick-masthead">
33 <div class="container">
34 <script type="text/javascript">
35 <!--
36 google_ad_client = "pub-3129977114552745";
37 google_ad_slot = "5439289906";
38 google_ad_width = 728;
39 google_ad_height = 90;
40 //-->
41 </script>
42 <center><script type="text/javascript" src="http://localhost/pagead/show_ads.js">
43 </script></center>
44 <nav class="magick-nav">
45 <a class="magick-nav-item " href="http://www.imagemagick.org/ImageMagick-7.0.0/index.html">Home</a>
46 <a class="magick-nav-item " href="binary-releases.html">Downloads</a>
47 <a class="magick-nav-item " href="command-line-tools.html">Tools</a>
48 <a class="magick-nav-item " href="command-line-options.html">Options</a>
49 <a class="magick-nav-item " href="api.html">Development</a>
50 <a class="magick-nav-item" href="../discourse-server">Community</a>
51 <a class="magick-nav-item navbar-right " href="search.html">Search</a>
52 </nav>
53 </div>
54</div>
55<div class="container">
56<div class="magick-header">
cristyad41c0c2012-10-31 00:49:28 +000057
cristyd2432012015-05-04 23:15:15 +000058<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 +000059
cristyd2432012015-05-04 23:15:15 +000060<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 +000061
cristyd2432012015-05-04 23:15:15 +000062<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 +000063
cristy751980d2012-06-03 23:18:35 +000064<p>The shell API (command line) of ImageMagick version 7 is also undergoing
65a major overhaul, with specific emphasis on the ability to read 'options' not
66only from the command line, but also from scripts, and file streams. This
67allows for the use of 'co-processing' programming techniques or performing
68image handling using 'deamon/server backends', and even multi-machine
69distributed processing.</p>
70
71<p>With shell API overhaul other improvements are being made, including:
cristy8ee7f242013-06-20 16:08:44 +000072better reporting of which option failed, the consolidation and deprecation of
cristy751980d2012-06-03 23:18:35 +000073options, and more global use of 'image properities' (more commonly known as
74'percent escapes' in option arguments. </p>
75
cristy91469932014-07-25 11:00:25 +000076<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 +000077
cristy91469932014-07-25 11:00:25 +000078<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 +000079
cristyd2432012015-05-04 23:15:15 +000080<h2 class="magick-header"><a id="hdri"></a>High Dynamic Range Imaging</h2>
cristy37b3d442015-02-28 14:00:30 +000081<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 +000082
cristyd2432012015-05-04 23:15:15 +000083<h2 class="magick-header"><a id="channels"></a>Pixel Channels</h2>
84<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 +000085<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 +000086
cristyd2432012015-05-04 23:15:15 +000087<code>
88<textarea class="form-control" rows="15">for (y=0; y &lt; (ssize_t) image-&gt;rows; y++)
cristy91469932014-07-25 11:00:25 +000089{
90 register IndexPacket
91 *indexes;
cristyba1758d2011-06-03 01:29:12 +000092
cristy91469932014-07-25 11:00:25 +000093 register PixelPacket
94 *q;
cristyba1758d2011-06-03 01:29:12 +000095
cristyd2432012015-05-04 23:15:15 +000096 q=GetCacheViewAuthenticPixels(image_view,0,y,image-&gt;columns,1,exception);
cristy91469932014-07-25 11:00:25 +000097 if (q == (PixelPacket *) NULL)
cristyba1758d2011-06-03 01:29:12 +000098 {
cristyba1758d2011-06-03 01:29:12 +000099 status=MagickFalse;
cristy91469932014-07-25 11:00:25 +0000100 continue;
101 }
102 indexes=GetCacheViewAuthenticIndexQueue(image_view);
cristyd2432012015-05-04 23:15:15 +0000103 for (x=0; x &lt; (ssize_t) image-&gt;columns; x++)
cristy91469932014-07-25 11:00:25 +0000104 {
105 if ((channel &amp; RedChannel) != 0)
cristyd2432012015-05-04 23:15:15 +0000106 q-&gt;red=(Quantum) QuantumRange-q-&gt;red;
cristy91469932014-07-25 11:00:25 +0000107 if ((channel &amp; GreenChannel) != 0)
cristyd2432012015-05-04 23:15:15 +0000108 q-&gt;green=(Quantum) QuantumRange-q-&gt;green;
cristy91469932014-07-25 11:00:25 +0000109 if ((channel &amp; BlueChannel) != 0)
cristyd2432012015-05-04 23:15:15 +0000110 q-&gt;blue=(Quantum) QuantumRange-q-&gt;blue;
cristy91469932014-07-25 11:00:25 +0000111 if (((channel &amp; IndexChannel) != 0) &amp;&amp;
cristyd2432012015-05-04 23:15:15 +0000112 (image-&gt;colorspace == CMYKColorspace))
cristy91469932014-07-25 11:00:25 +0000113 indexes[x]=(IndexPacket) QuantumRange-indexes[x];
114 q++;
cristyba1758d2011-06-03 01:29:12 +0000115 }
cristy91469932014-07-25 11:00:25 +0000116 if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
117 status=MagickFalse;
cristyd2432012015-05-04 23:15:15 +0000118}</textarea>
119</code>
cristyba1758d2011-06-03 01:29:12 +0000120
cristyeed6cb62012-01-28 19:38:34 +0000121<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 +0000122
cristyd2432012015-05-04 23:15:15 +0000123<code>
124<textarea class="form-control" rows="15">for (y=0; y &lt; (ssize_t) image-&gt;rows; y++)
cristy91469932014-07-25 11:00:25 +0000125{
126 register Quantum
127 *q;
cristyba1758d2011-06-03 01:29:12 +0000128
cristyd2432012015-05-04 23:15:15 +0000129 q=GetCacheViewAuthenticPixels(image_view,0,y,image-&gt;columns,1,exception);
cristy91469932014-07-25 11:00:25 +0000130 if (q == (Quantum *) NULL)
cristy29c5c992011-06-25 13:58:49 +0000131 {
cristy29c5c992011-06-25 13:58:49 +0000132 status=MagickFalse;
cristy91469932014-07-25 11:00:25 +0000133 continue;
134 }
cristyd2432012015-05-04 23:15:15 +0000135 for (x=0; x &lt; (ssize_t) image-&gt;columns; x++)
cristy91469932014-07-25 11:00:25 +0000136 {
137 if ((GetPixelRedTraits(image) &amp; UpdatePixelTrait) != 0)
138 SetPixelRed(image,QuantumRange-GetPixelRed(image,q),q);
139 if ((GetPixelGreenTraits(image) &amp; UpdatePixelTrait) != 0)
140 SetPixelGreen(image,QuantumRange-GetPixelGreen(image,q),q);
141 if ((GetPixelBlueTraits(image) &amp; UpdatePixelTrait) != 0)
142 SetPixelBlue(image,QuantumRange-GetPixelBlue(image,q),q);
143 if ((GetPixelBlackTraits(image) &amp; UpdatePixelTrait) != 0)
144 SetPixelBlack(image,QuantumRange-GetPixelBlack(image,q),q);
145 if ((GetPixelAlphaTraits(image) &amp; UpdatePixelTrait) != 0)
146 SetPixelAlpha(image,QuantumRange-GetPixelAlpha(image,q),q);
147 q+=GetPixelChannels(image);
cristy29c5c992011-06-25 13:58:49 +0000148 }
cristy91469932014-07-25 11:00:25 +0000149 if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
150 status=MagickFalse;
151}
cristyd2432012015-05-04 23:15:15 +0000152</textarea>
153</code>
cristy29c5c992011-06-25 13:58:49 +0000154
cristy1efc1ab2011-08-01 14:47:02 +0000155<p>Let's do that again but take full advantage of the new variable pixel channel support:</p>
cristy29c5c992011-06-25 13:58:49 +0000156
cristyd2432012015-05-04 23:15:15 +0000157<code>
158<textarea class="form-control" rows="15">for (y=0; y &lt; (ssize_t) image-&gt;rows; y++)
cristy91469932014-07-25 11:00:25 +0000159{
160 register Quantum
161 *q;
162
cristyd2432012015-05-04 23:15:15 +0000163 q=GetCacheViewAuthenticPixels(image_view,0,y,image-&gt;columns,1,exception);
cristy91469932014-07-25 11:00:25 +0000164 if (q == (Quantum *) NULL)
165 {
166 status=MagickFalse;
167 continue;
168 }
cristyd2432012015-05-04 23:15:15 +0000169 for (x = 0; x &lt; (ssize_t) image-&gt;columns; x++)
cristy91469932014-07-25 11:00:25 +0000170 {
171 register ssize_t
172 i;
173
174 if (GetPixelReadMask(image,q) == 0)
cristy29c5c992011-06-25 13:58:49 +0000175 {
cristy91469932014-07-25 11:00:25 +0000176 q+=GetPixelChannels(image);
cristy29c5c992011-06-25 13:58:49 +0000177 continue;
178 }
cristy91469932014-07-25 11:00:25 +0000179 for (i=0; i &lt; (ssize_t) GetPixelChannels(image); i++)
cristy1efc1ab2011-08-01 14:47:02 +0000180 {
cristy91469932014-07-25 11:00:25 +0000181 PixelChannel channel=GetPixelChannelChannel(image,i);
182 PixelTrait traits=GetPixelChannelTraits(image,channel);
183 if ((traits &amp; UpdatePixelTrait) == 0)
184 continue;
185 q[i]=QuantumRange-q[i];
cristy1efc1ab2011-08-01 14:47:02 +0000186 }
cristy91469932014-07-25 11:00:25 +0000187 q+=GetPixelChannels(image);
cristyba1758d2011-06-03 01:29:12 +0000188 }
cristy91469932014-07-25 11:00:25 +0000189 if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
190 status=MagickFalse;
191}
cristyd2432012015-05-04 23:15:15 +0000192</textarea>
193</code>
cristyba1758d2011-06-03 01:29:12 +0000194
cristyeed6cb62012-01-28 19:38:34 +0000195<p>Note, how we use GetPixelChannels() to advance to the next set of pixel channels.</p>
cristye6e84152011-06-06 14:16:49 +0000196
cristy7865f2d2015-03-08 13:15:40 +0000197<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 +0000198
cristy91469932014-07-25 11:00:25 +0000199<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>
200
cristy149d58c2013-08-07 19:44:54 +0000201<h4>Pixel Accessors</h4>
cristy7865f2d2015-03-08 13:15:40 +0000202<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 +0000203
cristyd2432012015-05-04 23:15:15 +0000204<pre>
205GetPixela() SetPixela()
206GetPixelAlpha() SetPixelAlpha()
207GetPixelb() SetPixelb()
208GetPixelBlack() SetPixelBlack()
209GetPixelBlue() SetPixelBlue()
210GetPixelCb() SetPixelCb()
211GetPixelCr() SetPixelCr()
212GetPixelCyan() SetPixelCyan()
213GetPixelGray() SetPixelGray()
214GetPixelGreen() SetPixelGreen()
215GetPixelIndex() SetPixelIndex()
216GetPixelL() SetPixelL()
217GetPixelMagenta() SetPixelMagenta()
218GetPixelReadMask() SetPixelReadMask()
219GetPixelWriteMask() SetPixelWriteMask()
220GetPixelMetacontentExtent() SetPixelMetacontentExtent()
221GetPixelOpacity() SetPixelOpacity()
222GetPixelRed() SetPixelRed()
223GetPixelYellow() SetPixelYellow()
224GetPixelY() SetPixelY()
cristy87a7f072011-07-01 00:08:52 +0000225</pre>
226
cristy8ee7f242013-06-20 16:08:44 +0000227<p>You can find these accessors defined in the header file, <code>MagickCore/pixel-accessor.h</code></p>
cristy87a7f072011-07-01 00:08:52 +0000228
cristy149d58c2013-08-07 19:44:54 +0000229<h4>Pixel Traits</h4>
cristy1efc1ab2011-08-01 14:47:02 +0000230<p>Each pixel channel includes one or more of these traits:</p>
cristya4dfb122011-07-07 19:01:57 +0000231<dl>
232<dt>Undefined</dt>
cristy149d58c2013-08-07 19:44:54 +0000233<dd>no traits associated with this pixel channel</dd>
cristy1efc1ab2011-08-01 14:47:02 +0000234<dt>Copy</dt>
cristy149d58c2013-08-07 19:44:54 +0000235<dd>do not update this pixel channel, just copy it</dd>
cristy1efc1ab2011-08-01 14:47:02 +0000236<dt>Update</dt>
cristy149d58c2013-08-07 19:44:54 +0000237<dd>update this pixel channel</dd>
cristya4dfb122011-07-07 19:01:57 +0000238<dt>Blend</dt>
cristy149d58c2013-08-07 19:44:54 +0000239<dd>blend this pixel channel with the alpha mask if it's enabled</dd>
cristya4dfb122011-07-07 19:01:57 +0000240</dl>
241<p>We provide these methods to set and get pixel traits:</p>
cristyd2432012015-05-04 23:15:15 +0000242<pre>
243GetPixelAlphaTraits() SetPixelAlphaTraits()
244GetPixelBlackTraits() SetPixelBlackTraits()
245GetPixelBlueTraits() SetPixelBlueTraits()
246GetPixelCbTraits() SetPixelCbTraits()
247GetPixelChannelTraits() SetPixelChannelTraits()
248GetPixelCrTraits() SetPixelCrTraits()
249GetPixelGrayTraits() SetPixelGrayTraits()
250GetPixelGreenTraits() SetPixelGreenTraits()
251GetPixelIndexTraits() SetPixelIndexTraits()
252GetPixelMagentaTraits() SetPixelMagentaTraits()
253GetPixelRedTraits() SetPixelRedTraits()
254GetPixelYellowTraits() SetPixelYellowTraits()
255GetPixelYTraits() SetPixelYTraits()
cristya4dfb122011-07-07 19:01:57 +0000256</pre>
cristy1efc1ab2011-08-01 14:47:02 +0000257<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 +0000258<pre>
259PopPixelChannelMap()
260SetPixelChannelMap()
261SetPixelChannelMask()
cristya4dfb122011-07-07 19:01:57 +0000262</pre>
263
cristy8ee7f242013-06-20 16:08:44 +0000264<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 +0000265<pre>
266NegateImageChannel(image,channel);
cristya4dfb122011-07-07 19:01:57 +0000267</pre>
268<p>we use:</p>
cristyd2432012015-05-04 23:15:15 +0000269<pre>
270channel_mask=SetPixelChannelMask(image,channel);
271NegateImage(image,exception);
272(void) SetPixelChannelMap(image,channel_mask);
cristya4dfb122011-07-07 19:01:57 +0000273</pre>
274
cristy149d58c2013-08-07 19:44:54 +0000275<h4>Pixel User Channels</h4>
cristyeed6cb62012-01-28 19:38:34 +0000276<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 +0000277<h4>Pixel Metacontent</h4>
cristyeed6cb62012-01-28 19:38:34 +0000278<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 +0000279<pre>
280SetImageMetacontentExtent()
281GetImageMetacontentExtent()
282GetVirtualMetacontent()
283GetAuthenticMetacontent()
284GetCacheViewAuthenticMetacontent()
285GetCacheViewVirtualMetacontent()
cristy87a7f072011-07-01 00:08:52 +0000286</pre>
cristyba1758d2011-06-03 01:29:12 +0000287
cristyd2432012015-05-04 23:15:15 +0000288<h2 class="magick-header"><a id="alpha"></a>Alpha</h2>
cristy8ee7f242013-06-20 16:08:44 +0000289<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 +0000290<h2 class="magick-header"><a id="colorspace"></a>Colorspace</h2>
cristy37b3d442015-02-28 14:00:30 +0000291<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 +0000292<pre>
cristy37b3d442015-02-28 14:00:30 +0000293Rec601Luma
294Rec601Luminance
295Rec709Luma
296Rec709Luminance
297</pre>
298<p>For example,</p>
cristyd2432012015-05-04 23:15:15 +0000299<pre>
cristy37b3d442015-02-28 14:00:30 +0000300convert myImage.png -intensity Rec709Luminance -colorspace gray myImage.jpg
301</pre>
302
cristyd2432012015-05-04 23:15:15 +0000303<h2 class="magick-header"><a id="grayscale"></a>Grayscale</h2>
cristy8ee7f242013-06-20 16:08:44 +0000304<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 +0000305
cristyd2432012015-05-04 23:15:15 +0000306<h2 class="magick-header"><a id="mask"></a>Masks</h2>
cristy149d58c2013-08-07 19:44:54 +0000307<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 +0000308<pre>
cristy8ee7f242013-06-20 16:08:44 +0000309identify -verbose -clip r statue.tif
310identify -verbose -mask r mask.png statue.tif
311</pre>
cristyba1758d2011-06-03 01:29:12 +0000312
cristyd2432012015-05-04 23:15:15 +0000313<h2 class="magick-header"><a id="core"></a>MagickCore API</h2>
314<p>Here are a list of changes to the MagickCore API:</p>
315<ul>
316<li>Almost all image processing algorithms are now channel aware.</li>
317<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>
318<li>All method channel analogs have been removed (e.g. BlurImageChannel()), they are no longer necessary, use pixel traits instead.</li>
319<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>
320<li>The InterpolatePixelMethod enum is now PixelInterpolateMethod.</li>
321<li>The IntegerPixel storage type is removed (use LongPixel instead) and LongLongPixel is added</li>
322<li>Image signatures have changed to account for variable pixel channels.</li>
323<li>All color packet structures, PixelPacket, LongPacket, and DoublePacket, are consolidated to a single color structure, PixelInfo.</li>
324<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>
325<li>We added a length parameter to FormatMagickSize() to permit variable length buffers.</li>
326</ul>
327<h2 class="magick-header"><a id="headers"></a>Header Files</h2>
cristy8ee7f242013-06-20 16:08:44 +0000328<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 +0000329<pre><code>#include &lt;MagickCore/MagickCore.h&gt;
330#include &lt;MagickWand/MagickWand.h&gt;</code></pre>
cristy751980d2012-06-03 23:18:35 +0000331
cristyd2432012015-05-04 23:15:15 +0000332<h2 class="magick-header"><a id="deprecate"></a>Deprecated Features Removed</h2>
cristy8ee7f242013-06-20 16:08:44 +0000333<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 +0000334
cristyd2432012015-05-04 23:15:15 +0000335<pre>MagickCore-config
cristy91469932014-07-25 11:00:25 +0000336MagickWand-config
cristyba1758d2011-06-03 01:29:12 +0000337</pre>
cristyeed6cb62012-01-28 19:38:34 +0000338<p>The FilterImage() method has been removed. Use ConvolveImage() instead.</p>
cristyba1758d2011-06-03 01:29:12 +0000339
cristy149d58c2013-08-07 19:44:54 +0000340<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 +0000341
342
cristyd2432012015-05-04 23:15:15 +0000343<h2 class="magick-header"><a id="cli"></a>Shell API or Command-line Interface</h2>
cristy751980d2012-06-03 23:18:35 +0000344
345<p>As mentioned the primary focus of the changes to the Shell API or Command
cristyd2432012015-05-04 23:15:15 +0000346Line Interface is the abstraction so that not only can <var>options</var> be read
cristy751980d2012-06-03 23:18:35 +0000347from command line arguments, but also from a file (script) or from a file
348stream (interactive commands, or co-processing). </p>
349
350<p>To do this the CLI parser needed to be re-written, so as to always perform
351all options, in a strict, do-it-as-you-see it order. Previously in IMv6
352options were performed in groups (known as 'FireOptions), this awkwardness is
cristy37b3d442015-02-28 14:00:30 +0000353now gone. However the strict order means that you can no longer give operations
cristy751980d2012-06-03 23:18:35 +0000354before providing an image for the operations to work on. To do so will now
355produce an error. </p>
356
357<p>Error reporting is now reporting exactly which option (by argument count on
358command line, or line,column in scripts) caused the 'exception'. This is not
359complete as yet but getting better. Also not complete is 'regard-warnings'
360handling or its replacement, which will allow you to ignore reported errors
361and continue processing (as appropriate due to error) in co-processes or
362interactive usage. </p>
363
364<p>The parenthesis options used to 'push' the current image list, and image
cristy8ee7f242013-06-20 16:08:44 +0000365settings (EG: '<code>(</code>' and '<code>)</code>' ) on to a stack now has
cristy91469932014-07-25 11:00:25 +0000366a completely separate image settings stack. That is parenthesis 'push/pull'
cristy8ee7f242013-06-20 16:08:44 +0000367image lists, and curly braces (EG: '<code>{</code>' and '<code>}</code>' ) will
cristy751980d2012-06-03 23:18:35 +0000368'push/pull' image settings. </p>
369
370<p>Of course due to the previously reported changes to the underlying channel
371handling will result be many side effects to almost all options. Here are some
372specific </p>
373
374<p>Most algorithms update the red, green, blue, black (for CMYK), and alpha
375channels. Most operators will blend alpha the other color channels, but other
376operators (and situations) may require this blending to be disabled, and is
377currently done by removing alpha from teh active channels via
cristy8ee7f242013-06-20 16:08:44 +0000378<code>-channel</code> option. (e.g. <code>convert castle.gif -channel RGB
379-negate castle.png</code>). </p>
cristy751980d2012-06-03 23:18:35 +0000380
cristy37b3d442015-02-28 14:00:30 +0000381<p>Reading gray-scale images generate an image with only one channel. If
cristy8ee7f242013-06-20 16:08:44 +0000382that image is to then accept color the <code>-colorspace</code> setting needs to
cristy751980d2012-06-03 23:18:35 +0000383be applied to expand the one channel into separate RGB (or other) channels.
384</p>
cristyd2432012015-05-04 23:15:15 +0000385<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 +0000386
387<h3>Command Changes</h3>
cristyd2432012015-05-04 23:15:15 +0000388<p>Here are a list of changes to the ImageMagick commands:</p>
389<dl class="dl-horizontal">
cristy751980d2012-06-03 23:18:35 +0000390<dt>magick</dt>
cristy8ee7f242013-06-20 16:08:44 +0000391<dd>The "<code>magick</code>" command is the new primary command of the Shell
392 API, replacing the old "<code>convert</code>" command. This allows you to
393 create a 'magick script' of the form "<code>#!/path/to/command/magick
394 -script</code>", or pipe options into a command "<code>magick -script
395 -</code>, as abackground process. </dd>
cristy751980d2012-06-03 23:18:35 +0000396
397<dt>magick-script</dt>
cristy8ee7f242013-06-20 16:08:44 +0000398<dd>This the same as "<code>magick</code>", (only command name is different)
399 but which has an implict "<code>-script</code>" option. This allows you to
400 use it in an "<code>env</code>" style script form. That is a magick script
401 starts with the 'she-bang' line of "<code>#!/usr/bin/env
402 magick-script</code>" allowing the script interpreter to be found anywhere
403 on the users command "<code>PATH</code>". This is required to get around
cristy751980d2012-06-03 23:18:35 +0000404 a "one argument she-bang bug" that is common on most UNIX systems
405 (including Linux, but not MacOSX).</dd>
406
407</dl>
408
cristy37b3d442015-02-28 14:00:30 +0000409<h3>Behavioral Changes</h3>
410<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 +0000411<pre>
cristy37b3d442015-02-28 14:00:30 +0000412convert \( -page +10+20 first.png \) \( -page +100+200 second.png \) ...
413</pre>
414
415<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 +0000416<pre>
cristy37b3d442015-02-28 14:00:30 +0000417convert ... -alpha discrete -blur 0x1 ...
418</pre>
419<p>To just copy the alpha values, use <code>-alpha off</code>.</p>
cristy8ee7f242013-06-20 16:08:44 +0000420<p>Some options have changed in ImageMagick version 7. These include:</p>
421<dl>
cristy37b3d442015-02-28 14:00:30 +0000422<dt>+combine</dt>
423<dd>This option now requires an argument, the image colorspace (e.g. +combine sRGB).</dd>
cristy8ee7f242013-06-20 16:08:44 +0000424</dl>
425
cristy751980d2012-06-03 23:18:35 +0000426<h3>New Options</h3>
427<p>ImageMagick version 7 supports these new options, though most are limited
cristy8ee7f242013-06-20 16:08:44 +0000428to the "<code>magick</code>" command, or to use in "<code>magick</code>"
cristy751980d2012-06-03 23:18:35 +0000429scripts.</p>
430
cristyd2432012015-05-04 23:15:15 +0000431<dl class="dl-horizontal">
cristy751980d2012-06-03 23:18:35 +0000432<dt>{ ... }</dt>
433<dd>Save (and restore) the current image settings (internally known as the
434 "image_info" structure). This is automatically done with parenthesis (EG:
cristy8ee7f242013-06-20 16:08:44 +0000435 '<code>(</code>' and '<code>)</code>') is "<code>-regard-parenthesis</code>" has
cristy751980d2012-06-03 23:18:35 +0000436 been set, just as in IMv6. Caution is advised to prevent un-balanced
cristy149d58c2013-08-07 19:44:54 +0000437 braces errors.</dd>
cristy751980d2012-06-03 23:18:35 +0000438
439<dt>--</dt>
cristy8ee7f242013-06-20 16:08:44 +0000440<dd>End of options, to be used in IMv7 "<code>mogrify</code>" command to
cristy37b3d442015-02-28 14:00:30 +0000441 explicitly separate the operations to be applied and the images that
cristy751980d2012-06-03 23:18:35 +0000442 are to be processed 'in-place'. (not yet implemented). However if
cristy8ee7f242013-06-20 16:08:44 +0000443 not provided, "<code>-read</code>" can still be used to differentiate
cristy751980d2012-06-03 23:18:35 +0000444 secondary image reads (for use in things like alpha composition) from
445 the 'in-place' image being processed. </dd>
446
cristy37b3d442015-02-28 14:00:30 +0000447<dd>In other commands (such as "magick") it is equivalent to a explicit
cristy8ee7f242013-06-20 16:08:44 +0000448 "<code>-read</code>" (see below) of the next option as a image (as it was in
cristy751980d2012-06-03 23:18:35 +0000449 IMv6). </dd>
450
cristyd2432012015-05-04 23:15:15 +0000451<dt>-alpha discreta</dt>
452<dd>treat the alpha channel independently (do not blend).</dd>
453
454<dt>-channel-fx <var>expression</var> </dt>
cristy751980d2012-06-03 23:18:35 +0000455<dd>
456<p>exchange, extract, or copy one or more image channels.</p>
457
cristy8ee7f242013-06-20 16:08:44 +0000458<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 +0000459
cristyd2432012015-05-04 23:15:15 +0000460<pre>
461&lt;=&gt; exchange two channels (e.g. red&lt;=&gt;blue)
462=&gt; copy one channel to another channel (e.g. red=&gt;green)
463= assign a constant value to a channel (e.g. red=50%)
464, write new image with channels in the specified order (e.g. red, green)
465; add a new output image for the next set of channel operations (e.g. red; green; blue)
466| move to the next input image for the source of channel data (e.g. | gray=&gt;alpha)
cristy751980d2012-06-03 23:18:35 +0000467</pre>
468
469<p>For example, to create 3 grayscale images from the red, green, and blue channels of an image, use:</p>
470
cristyd2432012015-05-04 23:15:15 +0000471<pre>
472-channel-fx "red; green; blue"
cristy751980d2012-06-03 23:18:35 +0000473</pre>
474
475<p>A channel without an operation symbol implies separate (i.e, semicolon).</p>
476
cristy8ee7f242013-06-20 16:08:44 +0000477<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 +0000478<pre>
479convert wizard.png mask.pgm -channel-fx '| gray=&gt;alpha' wizard-alpha.png
cristy8ee7f242013-06-20 16:08:44 +0000480</pre>
481<p>Use a similar command to define a read mask:</p>
cristyd2432012015-05-04 23:15:15 +0000482<pre>
483convert wizard.png mask.pgm -channel-fx '| gray=&gt;read-mask' wizard-mask.png
cristy8ee7f242013-06-20 16:08:44 +0000484</pre>
485
486<p>Add <code>-debug pixel</code> prior to the <code>-channel-fx</code> option to track the channel morphology.</p>
487
cristy751980d2012-06-03 23:18:35 +0000488</dd>
489
490<dt>-exit</dt>
491<dd>Stop processing at this point. No further options will be processed after
cristy8ee7f242013-06-20 16:08:44 +0000492 this option. Can be used in a script to force the "<code>magick</code>"
cristy751980d2012-06-03 23:18:35 +0000493 command to exit, without actually closing the pipeline that it is
494 processing options from. </dd>
495
cristy8ee7f242013-06-20 16:08:44 +0000496<dd>May also be used as a 'final' option on the "<code>magick</code>" command
cristy751980d2012-06-03 23:18:35 +0000497 line, instead of a implicit output image, to completely prevent any image
cristy8ee7f242013-06-20 16:08:44 +0000498 write. ASIDE: even the "<code>NULL:</code>" coder requires at least one
cristy751980d2012-06-03 23:18:35 +0000499 image, for it to 'not write'! This option does not require any images at
500 all. </dd>
501
502<dt>-read {image}</dt>
503<dd>Explicit read of an image, rather than an implicit read. This allows you
504 to read from filenames that start with an 'option' character, and which
505 otherwise could be mistaken as an option (unknown or otherwise). This will
cristy8ee7f242013-06-20 16:08:44 +0000506 eventually be used in "<code>mogrify</code>" to allow the reading of
cristy751980d2012-06-03 23:18:35 +0000507 secondary images, and allow the use of image list operations within that
508 command. </dd>
509
510<dt>-region</dt>
cristy8ee7f242013-06-20 16:08:44 +0000511<dd>not yet implemented in "<code>magick</code>". (very soon)</dd>
cristy751980d2012-06-03 23:18:35 +0000512
513<dt>-script {file}</dt>
cristy8ee7f242013-06-20 16:08:44 +0000514<dd>In "<code>magick</code>", stop the processing of command line arguments as
cristy751980d2012-06-03 23:18:35 +0000515 image operations, and read all further options from the given file or
516 pipeline.</dd>
517
518</dl>
519
520<h3>Changed Options</h3>
521<p>These options are known to have changed, in some way.</p>
cristyd2432012015-05-04 23:15:15 +0000522<dl class="dl-horizontal">
523<dt>-bias</dt>
524<dd>The option is no longer recognized. Use <code>-define convolve:bias=<var>value</var></code> instead.</dd>
525<dt>-draw</dt>
526<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 +0000527<dt>-negate</dt>
528<dd>currently negates all channels, including alpha if present. As such you
529 may need to use the -channel option to prevent alpha negation. </dd>
cristy751980d2012-06-03 23:18:35 +0000530</dl>
531
cristy8ee7f242013-06-20 16:08:44 +0000532<h3>Deprecated warning given, but will work (for now)</h3>
cristyd2432012015-05-04 23:15:15 +0000533<dl class="dl-horizontal">
cristy751980d2012-06-03 23:18:35 +0000534<dt>-affine</dt>
cristy8ee7f242013-06-20 16:08:44 +0000535<dd>Replaced by <code>-draw "affine ..."</code>. (see transform)</dd>
cristy751980d2012-06-03 23:18:35 +0000536<dt>-average</dt>
cristy8ee7f242013-06-20 16:08:44 +0000537<dd>Replaced by <code>-evaluate-sequence Mean</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000538<dt>-box</dt>
cristy8ee7f242013-06-20 16:08:44 +0000539<dd>Replaced by <code>-undercolor</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000540<dt>-deconstruct</dt>
cristy8ee7f242013-06-20 16:08:44 +0000541<dd>Replaced by <code>-layers CompareAny</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000542<dt>-gaussian</dt>
cristy8ee7f242013-06-20 16:08:44 +0000543<dd>Replaced by <code>-gaussian-blur</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000544<dt>-/+map</dt>
cristy8ee7f242013-06-20 16:08:44 +0000545<dd>Replaced by <code>-/+remap</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000546<dt>-/+matte</dt>
cristy8ee7f242013-06-20 16:08:44 +0000547<dd>Replaced by <code>-alpha Set/Off</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000548<dt>-transform</dt>
cristy8ee7f242013-06-20 16:08:44 +0000549<dd>Replaced by <code>-distort Affine "..."</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000550</dl>
551
cristy8ee7f242013-06-20 16:08:44 +0000552<h3>Deprecated warning given, and ignored (for now)</h3>
cristy751980d2012-06-03 23:18:35 +0000553<p>Almost 'plus' (+) option that did not do anything has been marked as
cristy8ee7f242013-06-20 16:08:44 +0000554deprecated, and does nothing. It does not even have associated code. For
cristy751980d2012-06-03 23:18:35 +0000555example "+annotate", "+resize", "+clut", and "+draw" .</p>
556
cristyd2432012015-05-04 23:15:15 +0000557<dl class="dl-horizontal">
cristy751980d2012-06-03 23:18:35 +0000558<dt>-affinity</dt>
cristy37b3d442015-02-28 14:00:30 +0000559<dd>Replaced by <code>-remap</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000560<dt>-maximum</dt>
cristy8ee7f242013-06-20 16:08:44 +0000561<dd>Replaced by <code>-evaluate-sequence Max</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000562<dt>-median</dt>
cristy8ee7f242013-06-20 16:08:44 +0000563<dd>Replaced by <code>-evaluate-sequence Median</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000564<dt>-minimum</dt>
cristy8ee7f242013-06-20 16:08:44 +0000565<dd>Replaced by <code>-evaluate-sequence Min</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000566<dt>-recolor</dt>
cristy149d58c2013-08-07 19:44:54 +0000567<dd>Replaced by <code>-color-matrix</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000568</dl>
569
570<h3>Removed / Replaced Options ("no such option" error and abort)</h3>
571
cristyd2432012015-05-04 23:15:15 +0000572<dl class="dl-horizontal">
cristy751980d2012-06-03 23:18:35 +0000573<dt>-origin</dt>
574<dd>old option, unknown meaning.</dd>
575<dt>-pen</dt>
cristy149d58c2013-08-07 19:44:54 +0000576<dd>Replaced by <code>-fill</code>.</dd>
cristy751980d2012-06-03 23:18:35 +0000577<dt>-passphrase</dt>
578<dd>old option, unknown meaning</dd>
579</dl>
cristyd2432012015-05-04 23:15:15 +0000580<h2 class="magick-header"><a id="summary"></a>Version 7 Change Summary</h2>
cristye6e84152011-06-06 14:16:49 +0000581<p>Changes from ImageMagick version 6 to version 7 are summarized here:</p>
cristy8ee7f242013-06-20 16:08:44 +0000582<h4>High Dynamic Range Imaging</h4>
cristyd2432012015-05-04 23:15:15 +0000583<ul>
cristy8ee7f242013-06-20 16:08:44 +0000584<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 +0000585</ul>
cristy8ee7f242013-06-20 16:08:44 +0000586<h4>Pixels</h4>
cristyd2432012015-05-04 23:15:15 +0000587<ul>
cristy1efc1ab2011-08-01 14:47:02 +0000588<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>
589<li>Use convenience macros to access pixel channels (e.g. GetPixelRed(), SetPixelRed()).</li>
cristy8ee7f242013-06-20 16:08:44 +0000590<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>
591<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 +0000592<li>Use GetPixelChannels() to advance to the next set of pixel channels.</li>
cristyd2432012015-05-04 23:15:15 +0000593<li>Use the <var>metacontent</var> channel to associate metacontent with each pixel.</li>
cristyeed6cb62012-01-28 19:38:34 +0000594<li>All color packet structures, PixelPacket, LongPacket, and DoublePacket, are consolidated to a single color structure, PixelInfo.</li>
cristyd2432012015-05-04 23:15:15 +0000595</ul>
cristy8ee7f242013-06-20 16:08:44 +0000596<h4>Alpha</h4>
cristyd2432012015-05-04 23:15:15 +0000597<ul>
cristyba1758d2011-06-03 01:29:12 +0000598<li>We support alpha rather than opacity (0 transparent; QuantumRange opaque).</li>
cristy1efc1ab2011-08-01 14:47:02 +0000599<li>Use GetPixelAlpha() or SetPixelAlpha() to get or set the alpha pixel channel value.</li>
cristyd2432012015-05-04 23:15:15 +0000600</ul>
cristy8ee7f242013-06-20 16:08:44 +0000601<h4>Grayscale</h4>
cristyd2432012015-05-04 23:15:15 +0000602<ul>
cristy1efc1ab2011-08-01 14:47:02 +0000603<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 +0000604</ul>
cristy8ee7f242013-06-20 16:08:44 +0000605<h4>MagickCore API</h4>
cristyd2432012015-05-04 23:15:15 +0000606<ul>
cristyeed6cb62012-01-28 19:38:34 +0000607<li>Almost all image processing algorithms are now channel aware.</li>
cristy1efc1ab2011-08-01 14:47:02 +0000608<li>MagickCore, version 7, adds an ExceptionInfo argument to those methods that lacked it in version 6, e.g. NegateImage(image,MagickTrue,exception);</li>
609<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 +0000610<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>
611<li>The InterpolatePixelMethod enum is now PixelInterpolateMethod.</li>
612<li>To account for variable pixel channels, images may now return a different signature.</li>
cristyd2432012015-05-04 23:15:15 +0000613</ul>
cristy8ee7f242013-06-20 16:08:44 +0000614<h4>Deprecated Methods</h4>
cristyd2432012015-05-04 23:15:15 +0000615<ul>
cristy2dcd6822011-06-13 16:21:20 +0000616<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 +0000617<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 +0000618<li>The FilterImage() method has been removed. Use ConvolveImage() instead.</li>
cristyd2432012015-05-04 23:15:15 +0000619</ul>
cristyba1758d2011-06-03 01:29:12 +0000620</div>
cristyd2432012015-05-04 23:15:15 +0000621 <footer class="magick-footer">
622 <div class="magick-nav-item navbar-left">
623 <a href="support.html">Donations</a>
624 </div>
625 <div class="magick-nav-item navbar-right">
626 <a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="http://www.imagemagick.org/"></a>
627 <noscript>
628 <a href="http://flattr.com/thing/947300/Convert-Edit-And-Compose-Images" target="_blank">
629 <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0"></a>
630 </noscript>
631 </div>
632 <p><a href="sitemap.html">Sitemap</a>
633 <a href="links.html">Related</a>
634 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Image Studio</a>
635 <a href="http://jqmagick.imagemagick.org/">JqMagick</a>
636 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a>
637</p>
638 <p><a href="porting.html#">Back to top</a>
639 <a href="contact.html">Contact Us</a></p>
640 </footer>
641</div><!-- /.container -->
cristy751980d2012-06-03 23:18:35 +0000642
cristyd2432012015-05-04 23:15:15 +0000643 <script src="https://localhost/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
644 <script src="../js/bootstrap.min.js"></script>
645 <script type="text/javascript">
646 /* */
647 (function() {
648 var s = document.createElement('offline-script'), t = document.getElementsByTagName('offline-script')[0];
649 s.type = 'text/javascript';
650 s.async = true;
651 s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
652 t.parentNode.insertBefore(s, t);
653 })();
654 /* */
655 </script>
cristyad41c0c2012-10-31 00:49:28 +0000656</div>
cristyad41c0c2012-10-31 00:49:28 +0000657</body>
658</html>