blob: 3123fa79c7e2c8bb98af1bde70b3ef6474f66653 [file] [log] [blame]
cristy44443b92015-05-05 00:06:07 +00001<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2<html lang="en">
cristy06f63f22012-10-31 00:50:07 +00003<head>
cristy44443b92015-05-05 00:06:07 +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">
cristyffb69ed2010-12-25 00:06:48 +00007 <title>ImageMagick: MagickWand, C API for ImageMagick: Wand Methods</title>
cristy44443b92015-05-05 00:06:07 +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="magickwc, api, for, imagemagick:, wmethods, 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 <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1">
25 <link rel="icon" href="../../images/wand.png">
26 <link rel="shortcut icon" href="../../images/wand.ico" type="images/x-icon">
cristy85893d32015-05-06 13:44:09 +000027 <link rel="stylesheet" href="../../css/bootstrap.min.css">
28 <link rel="stylesheet" href="../../css/magick.css">
cristy06f63f22012-10-31 00:50:07 +000029</head>
30
cristy44443b92015-05-05 00:06:07 +000031<body>
cristy06f63f22012-10-31 00:50:07 +000032<div class="main">
cristy44443b92015-05-05 00:06:07 +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://pagead2.googlesyndication.com/pagead/show_ads.js">
44 </script></center>
45 <nav class="magick-nav">
46 <a class="magick-nav-item " href="../../index.html">Home</a>
47 <a class="magick-nav-item " href="../../www/binary-releases.html">Downloads</a>
48 <a class="magick-nav-item " href="../../www/command-line-tools.html">Tools</a>
49 <a class="magick-nav-item " href="../../www/command-line-options.html">Options</a>
50 <a class="magick-nav-item " href="../../www/api.html">Development</a>
51 <a class="magick-nav-item" href="http://www.imagemagick.org/discourse-server/">Community</a>
cristy85893d32015-05-06 13:44:09 +000052 <a class="magick-nav-item navbar-right " href="../../www/search.html">Search</a>
cristy44443b92015-05-05 00:06:07 +000053 </nav>
54 </div>
55</div>
56<div class="container">
57<p class="text-center"><a href="magick-wand.html#ClearMagickWand">ClearMagickWand</a><a href="magick-wand.html#CloneMagickWand">CloneMagickWand</a><a href="magick-wand.html#DestroyMagickWand">DestroyMagickWand</a><a href="magick-wand.html#IsMagickWand">IsMagickWand</a><a href="magick-wand.html#MagickClearException">MagickClearException</a><a href="magick-wand.html#MagickGetException">MagickGetException</a><a href="magick-wand.html#MagickGetExceptionType">MagickGetExceptionType</a><a href="magick-wand.html#MagickGetIteratorIndex">MagickGetIteratorIndex</a><a href="magick-wand.html#MagickQueryConfigureOption">MagickQueryConfigureOption</a><a href="magick-wand.html#MagickQueryConfigureOptions">MagickQueryConfigureOptions</a><a href="magick-wand.html#MagickQueryFontMetrics">MagickQueryFontMetrics</a><a href="magick-wand.html#MagickQueryMultilineFontMetrics">MagickQueryMultilineFontMetrics</a><a href="magick-wand.html#MagickQueryFonts">MagickQueryFonts</a><a href="magick-wand.html#MagickQueryFormats">MagickQueryFormats</a><a href="magick-wand.html#MagickRelinquishMemory">MagickRelinquishMemory</a><a href="magick-wand.html#MagickResetIterator">MagickResetIterator</a><a href="magick-wand.html#MagickSetFirstIterator">MagickSetFirstIterator</a><a href="magick-wand.html#MagickSetIteratorIndex">MagickSetIteratorIndex</a><a href="magick-wand.html#MagickSetLastIterator">MagickSetLastIterator</a><a href="magick-wand.html#MagickWandGenesis">MagickWandGenesis</a><a href="magick-wand.html#MagickWandTerminus">MagickWandTerminus</a><a href="magick-wand.html#NewMagickWand">NewMagickWand</a><a href="magick-wand.html#NewMagickWandFromImage">NewMagickWandFromImage</a><a href="magick-wand.html#IsMagickWandInstantiated">IsMagickWandInstantiated</a></p>
cristy06f63f22012-10-31 00:50:07 +000058
cristy44443b92015-05-05 00:06:07 +000059<div class="magick-header">
cristy20398432011-08-11 01:31:50 +000060<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="ClearMagickWand">ClearMagickWand</a></h2>
cristy20398432011-08-11 01:31:50 +000061
cristy751980d2012-06-03 23:18:35 +000062<p>ClearMagickWand() clears resources associated with the wand, leaving the wand blank, and ready to be used for a new set of images.</p>
cristy20398432011-08-11 01:31:50 +000063
64<p>The format of the ClearMagickWand method is:</p>
65
cristy44443b92015-05-05 00:06:07 +000066<pre class="text">
67void ClearMagickWand(MagickWand *wand)
cristy20398432011-08-11 01:31:50 +000068</pre>
69
70<p>A description of each parameter follows:</p>
71
cristy44443b92015-05-05 00:06:07 +000072<dd>
73</dd>
cristy20398432011-08-11 01:31:50 +000074
cristy44443b92015-05-05 00:06:07 +000075<dd> </dd>
76<dl class="dl-horizontal">
77<dt>wand</dt>
78<dd>the magick wand. </dd>
79
80<dd> </dd>
81</dl>
cristy20398432011-08-11 01:31:50 +000082<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="CloneMagickWand">CloneMagickWand</a></h2>
cristy20398432011-08-11 01:31:50 +000083
84<p>CloneMagickWand() makes an exact copy of the specified wand.</p>
85
86<p>The format of the CloneMagickWand method is:</p>
87
cristy44443b92015-05-05 00:06:07 +000088<pre class="text">
89MagickWand *CloneMagickWand(const MagickWand *wand)
cristy20398432011-08-11 01:31:50 +000090</pre>
91
92<p>A description of each parameter follows:</p>
93
cristy44443b92015-05-05 00:06:07 +000094<dd>
95</dd>
cristy20398432011-08-11 01:31:50 +000096
cristy44443b92015-05-05 00:06:07 +000097<dd> </dd>
98<dl class="dl-horizontal">
99<dt>wand</dt>
100<dd>the magick wand. </dd>
101
102<dd> </dd>
103</dl>
cristy20398432011-08-11 01:31:50 +0000104<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="DestroyMagickWand">DestroyMagickWand</a></h2>
cristy20398432011-08-11 01:31:50 +0000105
106<p>DestroyMagickWand() deallocates memory associated with an MagickWand.</p>
107
108<p>The format of the DestroyMagickWand method is:</p>
109
cristy44443b92015-05-05 00:06:07 +0000110<pre class="text">
111MagickWand *DestroyMagickWand(MagickWand *wand)
cristy20398432011-08-11 01:31:50 +0000112</pre>
113
114<p>A description of each parameter follows:</p>
115
cristy44443b92015-05-05 00:06:07 +0000116<dd>
117</dd>
cristy20398432011-08-11 01:31:50 +0000118
cristy44443b92015-05-05 00:06:07 +0000119<dd> </dd>
120<dl class="dl-horizontal">
121<dt>wand</dt>
122<dd>the magick wand. </dd>
123
124<dd> </dd>
125</dl>
cristy20398432011-08-11 01:31:50 +0000126<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="IsMagickWand">IsMagickWand</a></h2>
cristy20398432011-08-11 01:31:50 +0000127
128<p>IsMagickWand() returns MagickTrue if the wand is verified as a magick wand.</p>
129
130<p>The format of the IsMagickWand method is:</p>
131
cristy44443b92015-05-05 00:06:07 +0000132<pre class="text">
133MagickBooleanType IsMagickWand(const MagickWand *wand)
cristy20398432011-08-11 01:31:50 +0000134</pre>
135
136<p>A description of each parameter follows:</p>
137
cristy44443b92015-05-05 00:06:07 +0000138<dd>
139</dd>
cristy20398432011-08-11 01:31:50 +0000140
cristy44443b92015-05-05 00:06:07 +0000141<dd> </dd>
142<dl class="dl-horizontal">
143<dt>wand</dt>
144<dd>the magick wand. </dd>
145
146<dd> </dd>
147</dl>
cristy20398432011-08-11 01:31:50 +0000148<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="MagickClearException">MagickClearException</a></h2>
cristy20398432011-08-11 01:31:50 +0000149
150<p>MagickClearException() clears any exceptions associated with the wand.</p>
151
152<p>The format of the MagickClearException method is:</p>
153
cristy44443b92015-05-05 00:06:07 +0000154<pre class="text">
155MagickBooleanType MagickClearException(MagickWand *wand)
cristy20398432011-08-11 01:31:50 +0000156</pre>
157
158<p>A description of each parameter follows:</p>
159
cristy44443b92015-05-05 00:06:07 +0000160<dd>
161</dd>
cristy20398432011-08-11 01:31:50 +0000162
cristy44443b92015-05-05 00:06:07 +0000163<dd> </dd>
164<dl class="dl-horizontal">
165<dt>wand</dt>
166<dd>the magick wand. </dd>
167
168<dd> </dd>
169</dl>
cristy20398432011-08-11 01:31:50 +0000170<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="MagickGetException">MagickGetException</a></h2>
cristy20398432011-08-11 01:31:50 +0000171
172<p>MagickGetException() returns the severity, reason, and description of any error that occurs when using other methods in this API.</p>
173
174<p>The format of the MagickGetException method is:</p>
175
cristy44443b92015-05-05 00:06:07 +0000176<pre class="text">
177char *MagickGetException(const MagickWand *wand,ExceptionType *severity)
cristy20398432011-08-11 01:31:50 +0000178</pre>
179
180<p>A description of each parameter follows:</p>
181
cristy44443b92015-05-05 00:06:07 +0000182<dd>
183</dd>
cristy20398432011-08-11 01:31:50 +0000184
cristy44443b92015-05-05 00:06:07 +0000185<dd> </dd>
186<dl class="dl-horizontal">
187<dt>wand</dt>
188<dd>the magick wand. </dd>
cristy20398432011-08-11 01:31:50 +0000189
cristy44443b92015-05-05 00:06:07 +0000190<dd> </dd>
191<dt>severity</dt>
192<dd>the severity of the error is returned here. </dd>
193
194<dd> </dd>
195</dl>
cristy20398432011-08-11 01:31:50 +0000196<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="MagickGetExceptionType">MagickGetExceptionType</a></h2>
cristy20398432011-08-11 01:31:50 +0000197
198<p>MagickGetExceptionType() returns the exception type associated with the wand. If no exception has occurred, UndefinedExceptionType is returned.</p>
199
200<p>The format of the MagickGetExceptionType method is:</p>
201
cristy44443b92015-05-05 00:06:07 +0000202<pre class="text">
203ExceptionType MagickGetExceptionType(const MagickWand *wand)
cristy20398432011-08-11 01:31:50 +0000204</pre>
205
206<p>A description of each parameter follows:</p>
207
cristy44443b92015-05-05 00:06:07 +0000208<dd>
209</dd>
cristy20398432011-08-11 01:31:50 +0000210
cristy44443b92015-05-05 00:06:07 +0000211<dd> </dd>
212<dl class="dl-horizontal">
213<dt>wand</dt>
214<dd>the magick wand. </dd>
215
216<dd> </dd>
217</dl>
cristy20398432011-08-11 01:31:50 +0000218<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="MagickGetIteratorIndex">MagickGetIteratorIndex</a></h2>
cristy20398432011-08-11 01:31:50 +0000219
220<p>MagickGetIteratorIndex() returns the position of the iterator in the image list.</p>
221
222<p>The format of the MagickGetIteratorIndex method is:</p>
223
cristy44443b92015-05-05 00:06:07 +0000224<pre class="text">
225ssize_t MagickGetIteratorIndex(MagickWand *wand)
cristy20398432011-08-11 01:31:50 +0000226</pre>
227
228<p>A description of each parameter follows:</p>
229
cristy44443b92015-05-05 00:06:07 +0000230<dd>
231</dd>
cristy20398432011-08-11 01:31:50 +0000232
cristy44443b92015-05-05 00:06:07 +0000233<dd> </dd>
234<dl class="dl-horizontal">
235<dt>wand</dt>
236<dd>the magick wand. </dd>
237
238<dd> </dd>
239</dl>
cristy20398432011-08-11 01:31:50 +0000240<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="MagickQueryConfigureOption">MagickQueryConfigureOption</a></h2>
cristy20398432011-08-11 01:31:50 +0000241
242<p>MagickQueryConfigureOption() returns the value associated with the specified configure option.</p>
243
244<p>The format of the MagickQueryConfigureOption function is:</p>
245
246<pre class="text">
cristy44443b92015-05-05 00:06:07 +0000247char *MagickQueryConfigureOption(const char *option)
cristy20398432011-08-11 01:31:50 +0000248</pre>
249
250<p>A description of each parameter follows:</p>
251
cristy44443b92015-05-05 00:06:07 +0000252<dd>
253</dd>
cristy20398432011-08-11 01:31:50 +0000254
cristy44443b92015-05-05 00:06:07 +0000255<dd> </dd>
256<dl class="dl-horizontal">
257<dt>option</dt>
258<dd>the option name. </dd>
259
260<dd> </dd>
261</dl>
cristy20398432011-08-11 01:31:50 +0000262<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="MagickQueryConfigureOptions">MagickQueryConfigureOptions</a></h2>
cristy20398432011-08-11 01:31:50 +0000263
264<p>MagickQueryConfigureOptions() returns any configure options that match the specified pattern (e.g. "*" for all). Options include NAME, VERSION, LIB_VERSION, etc.</p>
265
266<p>The format of the MagickQueryConfigureOptions function is:</p>
267
268<pre class="text">
cristy44443b92015-05-05 00:06:07 +0000269char **MagickQueryConfigureOptions(const char *pattern,
270 size_t *number_options)
cristy20398432011-08-11 01:31:50 +0000271</pre>
272
273<p>A description of each parameter follows:</p>
274
cristy44443b92015-05-05 00:06:07 +0000275<dd>
276</dd>
cristy20398432011-08-11 01:31:50 +0000277
cristy44443b92015-05-05 00:06:07 +0000278<dd> </dd>
279<dl class="dl-horizontal">
280<dt>pattern</dt>
281<dd>Specifies a pointer to a text string containing a pattern. </dd>
cristy20398432011-08-11 01:31:50 +0000282
cristy44443b92015-05-05 00:06:07 +0000283<dd> </dd>
284<dt>number_options</dt>
285<dd> Returns the number of configure options in the list. </dd>
cristy20398432011-08-11 01:31:50 +0000286
cristy44443b92015-05-05 00:06:07 +0000287<dd> </dd>
288
289<dd> </dd>
290</dl>
cristy20398432011-08-11 01:31:50 +0000291<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="MagickQueryFontMetrics">MagickQueryFontMetrics</a></h2>
cristy20398432011-08-11 01:31:50 +0000292
293<p>MagickQueryFontMetrics() returns a 13 element array representing the following font metrics:</p>
294
295<pre class="text">
cristy44443b92015-05-05 00:06:07 +0000296 Element Description
297 -------------------------------------------------
298 0 character width
299 1 character height
300 2 ascender
301 3 descender
302 4 text width
303 5 text height
304 6 maximum horizontal advance
305 7 bounding box: x1
306 8 bounding box: y1
307 9 bounding box: x2
308 10 bounding box: y2
309 11 origin: x
310 12 origin: y
cristy20398432011-08-11 01:31:50 +0000311</pre>
312
313<p>The format of the MagickQueryFontMetrics method is:</p>
314
cristy44443b92015-05-05 00:06:07 +0000315<pre class="text">
316double *MagickQueryFontMetrics(MagickWand *wand,
317 const DrawingWand *drawing_wand,const char *text)
cristy20398432011-08-11 01:31:50 +0000318</pre>
319
320<p>A description of each parameter follows:</p>
321
cristy44443b92015-05-05 00:06:07 +0000322<dd>
323</dd>
cristy20398432011-08-11 01:31:50 +0000324
cristy44443b92015-05-05 00:06:07 +0000325<dd> </dd>
326<dl class="dl-horizontal">
327<dt>wand</dt>
328<dd>the Magick wand. </dd>
cristy20398432011-08-11 01:31:50 +0000329
cristy44443b92015-05-05 00:06:07 +0000330<dd> </dd>
331<dt>drawing_wand</dt>
332<dd>the drawing wand. </dd>
cristy20398432011-08-11 01:31:50 +0000333
cristy44443b92015-05-05 00:06:07 +0000334<dd> </dd>
335<dt>text</dt>
336<dd>the text. </dd>
337
338<dd> </dd>
339</dl>
cristy20398432011-08-11 01:31:50 +0000340<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="MagickQueryMultilineFontMetrics">MagickQueryMultilineFontMetrics</a></h2>
cristy20398432011-08-11 01:31:50 +0000341
342<p>MagickQueryMultilineFontMetrics() returns a 13 element array representing the following font metrics:</p>
343
344<pre class="text">
cristy44443b92015-05-05 00:06:07 +0000345 Element Description
346 -------------------------------------------------
347 0 character width
348 1 character height
349 2 ascender
350 3 descender
351 4 text width
352 5 text height
353 6 maximum horizontal advance
354 7 bounding box: x1
355 8 bounding box: y1
356 9 bounding box: x2
357 10 bounding box: y2
358 11 origin: x
359 12 origin: y
cristy20398432011-08-11 01:31:50 +0000360</pre>
361
362<p>This method is like MagickQueryFontMetrics() but it returns the maximum text width and height for multiple lines of text.</p>
363
364<p>The format of the MagickQueryFontMetrics method is:</p>
365
cristy44443b92015-05-05 00:06:07 +0000366<pre class="text">
367double *MagickQueryMultilineFontMetrics(MagickWand *wand,
368 const DrawingWand *drawing_wand,const char *text)
cristy20398432011-08-11 01:31:50 +0000369</pre>
370
371<p>A description of each parameter follows:</p>
372
cristy44443b92015-05-05 00:06:07 +0000373<dd>
374</dd>
cristy20398432011-08-11 01:31:50 +0000375
cristy44443b92015-05-05 00:06:07 +0000376<dd> </dd>
377<dl class="dl-horizontal">
378<dt>wand</dt>
379<dd>the Magick wand. </dd>
cristy20398432011-08-11 01:31:50 +0000380
cristy44443b92015-05-05 00:06:07 +0000381<dd> </dd>
382<dt>drawing_wand</dt>
383<dd>the drawing wand. </dd>
cristy20398432011-08-11 01:31:50 +0000384
cristy44443b92015-05-05 00:06:07 +0000385<dd> </dd>
386<dt>text</dt>
387<dd>the text. </dd>
388
389<dd> </dd>
390</dl>
cristy20398432011-08-11 01:31:50 +0000391<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="MagickQueryFonts">MagickQueryFonts</a></h2>
cristy20398432011-08-11 01:31:50 +0000392
393<p>MagickQueryFonts() returns any font that match the specified pattern (e.g. "*" for all).</p>
394
395<p>The format of the MagickQueryFonts function is:</p>
396
397<pre class="text">
cristy44443b92015-05-05 00:06:07 +0000398char **MagickQueryFonts(const char *pattern,size_t *number_fonts)
cristy20398432011-08-11 01:31:50 +0000399</pre>
400
401<p>A description of each parameter follows:</p>
402
cristy44443b92015-05-05 00:06:07 +0000403<dd>
404</dd>
cristy20398432011-08-11 01:31:50 +0000405
cristy44443b92015-05-05 00:06:07 +0000406<dd> </dd>
407<dl class="dl-horizontal">
408<dt>pattern</dt>
409<dd>Specifies a pointer to a text string containing a pattern. </dd>
cristy20398432011-08-11 01:31:50 +0000410
cristy44443b92015-05-05 00:06:07 +0000411<dd> </dd>
412<dt>number_fonts</dt>
413<dd> Returns the number of fonts in the list. </dd>
cristy20398432011-08-11 01:31:50 +0000414
cristy44443b92015-05-05 00:06:07 +0000415<dd> </dd>
cristy20398432011-08-11 01:31:50 +0000416
cristy44443b92015-05-05 00:06:07 +0000417<dd> </dd>
418</dl>
419<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="MagickQueryFormats">MagickQueryFormats</a></h2>
cristy20398432011-08-11 01:31:50 +0000420
cristy44443b92015-05-05 00:06:07 +0000421<p>MagickQueryFormats() returns any image formats that match the specified pattern (e.g. "*" for all).</p>
422
423<p>The format of the MagickQueryFormats function is:</p>
cristy20398432011-08-11 01:31:50 +0000424
425<pre class="text">
cristy44443b92015-05-05 00:06:07 +0000426char **MagickQueryFormats(const char *pattern,size_t *number_formats)
cristy20398432011-08-11 01:31:50 +0000427</pre>
428
429<p>A description of each parameter follows:</p>
430
cristy44443b92015-05-05 00:06:07 +0000431<dd>
432</dd>
cristy20398432011-08-11 01:31:50 +0000433
cristy44443b92015-05-05 00:06:07 +0000434<dd> </dd>
435<dl class="dl-horizontal">
436<dt>pattern</dt>
437<dd>Specifies a pointer to a text string containing a pattern. </dd>
cristy20398432011-08-11 01:31:50 +0000438
cristy44443b92015-05-05 00:06:07 +0000439<dd> </dd>
440<dt>number_formats</dt>
441<dd> This integer returns the number of image formats in the list. </dd>
442
443<dd> </dd>
444</dl>
cristy20398432011-08-11 01:31:50 +0000445<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="MagickRelinquishMemory">MagickRelinquishMemory</a></h2>
cristy20398432011-08-11 01:31:50 +0000446
447<p>MagickRelinquishMemory() relinquishes memory resources returned by such methods as MagickIdentifyImage(), MagickGetException(), etc.</p>
448
449<p>The format of the MagickRelinquishMemory method is:</p>
450
cristy44443b92015-05-05 00:06:07 +0000451<pre class="text">
452void *MagickRelinquishMemory(void *resource)
cristy20398432011-08-11 01:31:50 +0000453</pre>
454
455<p>A description of each parameter follows:</p>
456
cristy44443b92015-05-05 00:06:07 +0000457<dd>
458</dd>
cristy20398432011-08-11 01:31:50 +0000459
cristy44443b92015-05-05 00:06:07 +0000460<dd> </dd>
461<dl class="dl-horizontal">
462<dt>resource</dt>
463<dd>Relinquish the memory associated with this resource. </dd>
464
465<dd> </dd>
466</dl>
cristy20398432011-08-11 01:31:50 +0000467<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="MagickResetIterator">MagickResetIterator</a></h2>
cristy20398432011-08-11 01:31:50 +0000468
cristy751980d2012-06-03 23:18:35 +0000469<p>MagickResetIterator() resets the wand iterator.</p>
470
471<p>It is typically used either before iterating though images, or before calling specific functions such as MagickAppendImages() to append all images together.</p>
472
473<p>Afterward you can use MagickNextImage() to iterate over all the images in a wand container, starting with the first image.</p>
474
475<p>Using this before MagickAddImages() or MagickReadImages() will cause new images to be inserted between the first and second image.</p>
cristy20398432011-08-11 01:31:50 +0000476
477<p>The format of the MagickResetIterator method is:</p>
478
cristy44443b92015-05-05 00:06:07 +0000479<pre class="text">
480void MagickResetIterator(MagickWand *wand)
cristy20398432011-08-11 01:31:50 +0000481</pre>
482
483<p>A description of each parameter follows:</p>
484
cristy44443b92015-05-05 00:06:07 +0000485<dd>
486</dd>
cristy20398432011-08-11 01:31:50 +0000487
cristy44443b92015-05-05 00:06:07 +0000488<dd> </dd>
489<dl class="dl-horizontal">
490<dt>wand</dt>
491<dd>the magick wand. </dd>
492
493<dd> </dd>
494</dl>
cristy20398432011-08-11 01:31:50 +0000495<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="MagickSetFirstIterator">MagickSetFirstIterator</a></h2>
cristy20398432011-08-11 01:31:50 +0000496
497<p>MagickSetFirstIterator() sets the wand iterator to the first image.</p>
498
cristy751980d2012-06-03 23:18:35 +0000499<p>After using any images added to the wand using MagickAddImage() or MagickReadImage() will be prepended before any image in the wand.</p>
500
501<p>Also the current image has been set to the first image (if any) in the Magick Wand. Using MagickNextImage() will then set teh current image to the second image in the list (if present).</p>
502
503<p>This operation is similar to MagickResetIterator() but differs in how MagickAddImage(), MagickReadImage(), and MagickNextImage() behaves afterward.</p>
504
cristy20398432011-08-11 01:31:50 +0000505<p>The format of the MagickSetFirstIterator method is:</p>
506
cristy44443b92015-05-05 00:06:07 +0000507<pre class="text">
508void MagickSetFirstIterator(MagickWand *wand)
cristy20398432011-08-11 01:31:50 +0000509</pre>
510
511<p>A description of each parameter follows:</p>
512
cristy44443b92015-05-05 00:06:07 +0000513<dd>
514</dd>
cristy20398432011-08-11 01:31:50 +0000515
cristy44443b92015-05-05 00:06:07 +0000516<dd> </dd>
517<dl class="dl-horizontal">
518<dt>wand</dt>
519<dd>the magick wand. </dd>
520
521<dd> </dd>
522</dl>
cristy20398432011-08-11 01:31:50 +0000523<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="MagickSetIteratorIndex">MagickSetIteratorIndex</a></h2>
cristy20398432011-08-11 01:31:50 +0000524
cristy751980d2012-06-03 23:18:35 +0000525<p>MagickSetIteratorIndex() set the iterator to the given position in the image list specified with the index parameter. A zero index will set the first image as current, and so on. Negative indexes can be used to specify an image relative to the end of the images in the wand, with -1 being the last image in the wand.</p>
526
527<p>If the index is invalid (range too large for number of images in wand) the function will return MagickFalse, but no 'exception' will be raised, as it is not actually an error. In that case the current image will not change.</p>
528
529<p>After using any images added to the wand using MagickAddImage() or MagickReadImage() will be added after the image indexed, regardless of if a zero (first image in list) or negative index (from end) is used.</p>
530
531<p>Jumping to index 0 is similar to MagickResetIterator() but differs in how MagickNextImage() behaves afterward.</p>
cristy20398432011-08-11 01:31:50 +0000532
533<p>The format of the MagickSetIteratorIndex method is:</p>
534
cristy44443b92015-05-05 00:06:07 +0000535<pre class="text">
536MagickBooleanType MagickSetIteratorIndex(MagickWand *wand,
537 const ssize_t index)
cristy20398432011-08-11 01:31:50 +0000538</pre>
539
540<p>A description of each parameter follows:</p>
541
cristy44443b92015-05-05 00:06:07 +0000542<dd>
543</dd>
cristy20398432011-08-11 01:31:50 +0000544
cristy44443b92015-05-05 00:06:07 +0000545<dd> </dd>
546<dl class="dl-horizontal">
547<dt>wand</dt>
548<dd>the magick wand. </dd>
cristy20398432011-08-11 01:31:50 +0000549
cristy44443b92015-05-05 00:06:07 +0000550<dd> </dd>
551<dt>index</dt>
552<dd>the scene number. </dd>
553
554<dd> </dd>
555</dl>
cristy20398432011-08-11 01:31:50 +0000556<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="MagickSetLastIterator">MagickSetLastIterator</a></h2>
cristy20398432011-08-11 01:31:50 +0000557
558<p>MagickSetLastIterator() sets the wand iterator to the last image.</p>
559
cristy751980d2012-06-03 23:18:35 +0000560<p>The last image is actually the current image, and the next use of MagickPreviousImage() will not change this allowing this function to be used to iterate over the images in the reverse direction. In this sense it is more like MagickResetIterator() than MagickSetFirstIterator().</p>
561
562<p>Typically this function is used before MagickAddImage(), MagickReadImage() functions to ensure new images are appended to the very end of wand's image list.</p>
563
cristy20398432011-08-11 01:31:50 +0000564<p>The format of the MagickSetLastIterator method is:</p>
565
cristy44443b92015-05-05 00:06:07 +0000566<pre class="text">
567void MagickSetLastIterator(MagickWand *wand)
cristy20398432011-08-11 01:31:50 +0000568</pre>
569
570<p>A description of each parameter follows:</p>
571
cristy44443b92015-05-05 00:06:07 +0000572<dd>
573</dd>
cristy20398432011-08-11 01:31:50 +0000574
cristy44443b92015-05-05 00:06:07 +0000575<dd> </dd>
576<dl class="dl-horizontal">
577<dt>wand</dt>
578<dd>the magick wand. </dd>
579
580<dd> </dd>
581</dl>
cristy20398432011-08-11 01:31:50 +0000582<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="MagickWandGenesis">MagickWandGenesis</a></h2>
cristy20398432011-08-11 01:31:50 +0000583
584<p>MagickWandGenesis() initializes the MagickWand environment.</p>
585
586<p>The format of the MagickWandGenesis method is:</p>
587
cristy44443b92015-05-05 00:06:07 +0000588<pre class="text">
589void MagickWandGenesis(void)
cristy20398432011-08-11 01:31:50 +0000590</pre>
591
cristy20398432011-08-11 01:31:50 +0000592<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="MagickWandTerminus">MagickWandTerminus</a></h2>
cristy20398432011-08-11 01:31:50 +0000593
594<p>MagickWandTerminus() terminates the MagickWand environment.</p>
595
596<p>The format of the MaickWandTerminus method is:</p>
597
cristy44443b92015-05-05 00:06:07 +0000598<pre class="text">
599void MagickWandTerminus(void)
cristy20398432011-08-11 01:31:50 +0000600</pre>
601
cristy20398432011-08-11 01:31:50 +0000602<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="NewMagickWand">NewMagickWand</a></h2>
cristy20398432011-08-11 01:31:50 +0000603
604<p>NewMagickWand() returns a wand required for all other methods in the API. A fatal exception is thrown if there is not enough memory to allocate the wand. Use DestroyMagickWand() to dispose of the wand when it is no longer needed.</p>
605
606<p>The format of the NewMagickWand method is:</p>
607
cristy44443b92015-05-05 00:06:07 +0000608<pre class="text">
609MagickWand *NewMagickWand(void)
cristy20398432011-08-11 01:31:50 +0000610</pre>
611
cristy20398432011-08-11 01:31:50 +0000612<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="NewMagickWandFromImage">NewMagickWandFromImage</a></h2>
cristy20398432011-08-11 01:31:50 +0000613
614<p>NewMagickWandFromImage() returns a wand with an image.</p>
615
616<p>The format of the NewMagickWandFromImage method is:</p>
617
cristy44443b92015-05-05 00:06:07 +0000618<pre class="text">
619MagickWand *NewMagickWandFromImage(const Image *image)
cristy20398432011-08-11 01:31:50 +0000620</pre>
621
622<p>A description of each parameter follows:</p>
623
cristy44443b92015-05-05 00:06:07 +0000624<dd>
625</dd>
cristy20398432011-08-11 01:31:50 +0000626
cristy44443b92015-05-05 00:06:07 +0000627<dd> </dd>
628<dl class="dl-horizontal">
629<dt>image</dt>
630<dd>the image. </dd>
631
632<dd> </dd>
633</dl>
634<h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand_8c.html" id="IsMagickWandInstantiated">IsMagickWandInstantiated</a></h2>
635
636<p>IsMagickWandInstantiated() returns MagickTrue if the ImageMagick environment is currently instantiated-- that is, MagickWandGenesis() has been called but MagickWandTerminus() has not.</p>
637
638<p>The format of the IsMagickWandInstantiated method is:</p>
639
640<pre class="text">
641MagickBooleanType IsMagickWandInstantiated(void)
642</pre>
cristy06f63f22012-10-31 00:50:07 +0000643
644</div>
cristy44443b92015-05-05 00:06:07 +0000645 <footer class="magick-footer">
646 <div class="magick-nav-item navbar-left">
cristy85893d32015-05-06 13:44:09 +0000647 <a href="../../www/support.html">Donate</a>
cristy44443b92015-05-05 00:06:07 +0000648 </div>
649 <div class="magick-nav-item navbar-right">
650 <a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="../../index.html"></a>
651 <noscript>
652 <a href="http://flattr.com/thing/947300/Convert-Edit-And-Compose-Images" target="_blank">
653 <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0"></a>
654 </noscript>
655 </div>
656 <p><a href="../../www/sitemap.html">Sitemap</a>
657 <a href="../../www/links.html">Related</a>
658 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Image Studio</a>
659 <a href="http://jqmagick.imagemagick.org/">JqMagick</a>
660 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a>
661</p>
662 <p><a href="magick-wand.html#">Back to top</a>
cristy85893d32015-05-06 13:44:09 +0000663 <a href="../../www/http://www.imagemagick.org/script/contact.php">Contact Us</a></p>
cristy44443b92015-05-05 00:06:07 +0000664 </footer>
665</div><!-- /.container -->
cristy06f63f22012-10-31 00:50:07 +0000666
cristy44443b92015-05-05 00:06:07 +0000667 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
668 <script src="../../js/bootstrap.min.js"></script>
669 <script type="text/javascript">
670 /* */
671 (function() {
672 var s = document.createElement('offline-script'), t = document.getElementsByTagName('offline-script')[0];
673 s.type = 'text/javascript';
674 s.async = true;
675 s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
676 t.parentNode.insertBefore(s, t);
677 })();
678 /* */
679 </script>
cristy44cbd482013-08-04 20:53:36 +0000680</div>
cristy06f63f22012-10-31 00:50:07 +0000681</body>
cristy5a367e42015-05-05 12:39:18 +0000682</html>