• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2
3
4
5<!doctype html>
6<html lang="en">
7<head>
8  <meta charset="utf-8"  />
9  <meta name="viewport" content="width=device-width, initial-scale=1"  />
10  <title>ImageMagick - MagickWand, C API: Wand Methods</title>
11  <meta name="application-name" content="ImageMagick" />
12  <meta name="description" content="Use ImageMagick® to create, edit, compose, and convert digital images. Resize an image, crop it, change its shades and colors, add captions, and more." />
13  <meta name="application-url" content="https://imagemagick.org" />
14  <meta name="generator" content="PHP" />
15  <meta name="keywords" content="magickwc, api:, wmethods, image processing software" />
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-2020 ImageMagick Studio LLC" />
23  <meta name="distribution" content="Global" />
24  <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1" />
25  <meta property='og:url' content='../../' />
26  <meta property='og:title' content='ImageMagick' />
27  <meta property='og:image' content='../../../images/logo.png' />
28  <meta property='og:type' content='website' />
29  <meta property='og:site_name' content='ImageMagick' />
30  <meta property='og:description' content="Create, Edit, Compose, or Convert Digital Images" />
31  <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
32  <link href="magick-wand.html" rel="canonical" />
33  <link href="../../../images/wand.png" rel="icon" />
34  <link href="../../../images/wand.ico" rel="shortcut icon" />
35  <link href="../../assets/magick.css" rel="stylesheet" />
36</head>
37<body>
38  <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
39  <div class="container-fluid">
40    <a class="navbar-brand" href="../../"><img class="d-block" id="icon" alt="ImageMagick" width="32" height="32" src="../../../images/wand.ico"/></a>
41    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#magick-navbars" aria-controls="magick-navbars" aria-expanded="false" aria-label="Toggle navigation">
42      <span class="navbar-toggler-icon"></span>
43    </button>
44
45    <div class="collapse navbar-collapse" id="magick-navbars">
46      <ul class="navbar-nav me-auto mb-2 mb-md-0">
47        <li class="nav-item">
48          <a class="nav-link " href="../../www/index.html">Home</a>
49        </li>
50        <li class="nav-item">
51          <a class="nav-link " href="../../www/download.html">Download</a>
52        </li>
53        <li class="nav-item">
54          <a class="nav-link " href="../../www/command-line-tools.html">Tools</a>
55        </li>
56        <li class="nav-item">
57          <a class="nav-link " href="../../www/command-line-processing.html">CLI</a>
58        </li>
59        <li class="nav-item">
60          <a class="nav-link " href="../../www/develop.html">Develop</a>
61        </li>
62        <li class="nav-item">
63          <a class="nav-link" target="_blank" href="https://github.com/ImageMagick/ImageMagick/discussions">Community</a>
64        </li>
65        <li class="nav-item">
66          <iframe src="https://github.com/sponsors/ImageMagick/button" title="Sponsor ImageMagick" height="35" width="107" style="border: 0;"></iframe>
67        </li>
68      </ul>
69      <form class="d-flex form-inline" action="https://imagemagick.org/script/search.php">
70        <input class="form-control me-2" type="text" name="q" placeholder="Search" aria-label="Search">
71        <button class="btn btn-outline-success" type="submit" name="sa">Search</button>
72      </form>
73    </div>
74  </div>
75  </nav>
76
77  <div class="container">
78    <script async="async" src="https://localhost/pagead/js/adsbygoogle.js"></script>
79    <ins class="adsbygoogle"
80      style="display:block"
81      data-ad-client="ca-pub-3129977114552745"
82      data-ad-slot="6345125851"
83      data-full-width-responsive="true"
84      data-ad-format="horizontal"></ins>
85    <script>
86      (adsbygoogle = window.adsbygoogle || []).push({});
87    </script>
88
89  </div>
90
91  <main class="container">
92  <div class="magick-template">
93<div class="magick-header">
94<p class="text-center"><a href="magick-wand.html#ClearMagickWand">ClearMagickWand</a> &#8226; <a href="magick-wand.html#CloneMagickWand">CloneMagickWand</a> &#8226; <a href="magick-wand.html#DestroyMagickWand">DestroyMagickWand</a> &#8226; <a href="magick-wand.html#IsMagickWand">IsMagickWand</a> &#8226; <a href="magick-wand.html#MagickClearException">MagickClearException</a> &#8226; <a href="magick-wand.html#MagickGetException">MagickGetException</a> &#8226; <a href="magick-wand.html#MagickGetExceptionType">MagickGetExceptionType</a> &#8226; <a href="magick-wand.html#MagickGetIteratorIndex">MagickGetIteratorIndex</a> &#8226; <a href="magick-wand.html#MagickQueryConfigureOption">MagickQueryConfigureOption</a> &#8226; <a href="magick-wand.html#MagickQueryConfigureOptions">MagickQueryConfigureOptions</a> &#8226; <a href="magick-wand.html#MagickQueryFontMetrics">MagickQueryFontMetrics</a> &#8226; <a href="magick-wand.html#MagickQueryMultilineFontMetrics">MagickQueryMultilineFontMetrics</a> &#8226; <a href="magick-wand.html#MagickQueryFonts">MagickQueryFonts</a> &#8226; <a href="magick-wand.html#MagickQueryFormats">MagickQueryFormats</a> &#8226; <a href="magick-wand.html#MagickRelinquishMemory">MagickRelinquishMemory</a> &#8226; <a href="magick-wand.html#MagickResetIterator">MagickResetIterator</a> &#8226; <a href="magick-wand.html#MagickSetFirstIterator">MagickSetFirstIterator</a> &#8226; <a href="magick-wand.html#MagickSetIteratorIndex">MagickSetIteratorIndex</a> &#8226; <a href="magick-wand.html#MagickSetLastIterator">MagickSetLastIterator</a> &#8226; <a href="magick-wand.html#MagickWandGenesis">MagickWandGenesis</a> &#8226; <a href="magick-wand.html#MagickWandTerminus">MagickWandTerminus</a> &#8226; <a href="magick-wand.html#NewMagickWand">NewMagickWand</a> &#8226; <a href="magick-wand.html#NewMagickWandFromImage">NewMagickWandFromImage</a> &#8226; <a href="magick-wand.html#IsMagickWandInstantiated">IsMagickWandInstantiated</a></p>
95
96<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="ClearMagickWand">ClearMagickWand</a></h2>
97
98<p>ClearMagickWand() clears resources associated with the wand, leaving the wand blank, and ready to be used for a new set of images.</p>
99
100<p>The format of the ClearMagickWand method is:</p>
101
102<pre class="text">
103void ClearMagickWand(MagickWand *wand)
104</pre>
105
106<p>A description of each parameter follows:</p>
107
108<dd>
109</dd>
110
111<dd> </dd>
112<dl class="dl-horizontal">
113<dt>wand</dt>
114<dd>the magick wand. </dd>
115
116<dd>  </dd>
117</dl>
118<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="CloneMagickWand">CloneMagickWand</a></h2>
119
120<p>CloneMagickWand() makes an exact copy of the specified wand.</p>
121
122<p>The format of the CloneMagickWand method is:</p>
123
124<pre class="text">
125MagickWand *CloneMagickWand(const MagickWand *wand)
126</pre>
127
128<p>A description of each parameter follows:</p>
129
130<dd>
131</dd>
132
133<dd> </dd>
134<dl class="dl-horizontal">
135<dt>wand</dt>
136<dd>the magick wand. </dd>
137
138<dd>  </dd>
139</dl>
140<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="DestroyMagickWand">DestroyMagickWand</a></h2>
141
142<p>DestroyMagickWand() deallocates memory associated with an MagickWand.</p>
143
144<p>The format of the DestroyMagickWand method is:</p>
145
146<pre class="text">
147MagickWand *DestroyMagickWand(MagickWand *wand)
148</pre>
149
150<p>A description of each parameter follows:</p>
151
152<dd>
153</dd>
154
155<dd> </dd>
156<dl class="dl-horizontal">
157<dt>wand</dt>
158<dd>the magick wand. </dd>
159
160<dd>  </dd>
161</dl>
162<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="IsMagickWand">IsMagickWand</a></h2>
163
164<p>IsMagickWand() returns MagickTrue if the wand is verified as a magick wand.</p>
165
166<p>The format of the IsMagickWand method is:</p>
167
168<pre class="text">
169MagickBooleanType IsMagickWand(const MagickWand *wand)
170</pre>
171
172<p>A description of each parameter follows:</p>
173
174<dd>
175</dd>
176
177<dd> </dd>
178<dl class="dl-horizontal">
179<dt>wand</dt>
180<dd>the magick wand. </dd>
181
182<dd>  </dd>
183</dl>
184<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="MagickClearException">MagickClearException</a></h2>
185
186<p>MagickClearException() clears any exceptions associated with the wand.</p>
187
188<p>The format of the MagickClearException method is:</p>
189
190<pre class="text">
191MagickBooleanType MagickClearException(MagickWand *wand)
192</pre>
193
194<p>A description of each parameter follows:</p>
195
196<dd>
197</dd>
198
199<dd> </dd>
200<dl class="dl-horizontal">
201<dt>wand</dt>
202<dd>the magick wand. </dd>
203
204<dd>  </dd>
205</dl>
206<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="MagickGetException">MagickGetException</a></h2>
207
208<p>MagickGetException() returns the severity, reason, and description of any error that occurs when using other methods in this API.</p>
209
210<p>The format of the MagickGetException method is:</p>
211
212<pre class="text">
213char *MagickGetException(const MagickWand *wand,ExceptionType *severity)
214</pre>
215
216<p>A description of each parameter follows:</p>
217
218<dd>
219</dd>
220
221<dd> </dd>
222<dl class="dl-horizontal">
223<dt>wand</dt>
224<dd>the magick wand. </dd>
225
226<dd> </dd>
227<dt>severity</dt>
228<dd>the severity of the error is returned here. </dd>
229
230<dd>  </dd>
231</dl>
232<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="MagickGetExceptionType">MagickGetExceptionType</a></h2>
233
234<p>MagickGetExceptionType() returns the exception type associated with the wand.  If no exception has occurred, UndefinedExceptionType is returned.</p>
235
236<p>The format of the MagickGetExceptionType method is:</p>
237
238<pre class="text">
239ExceptionType MagickGetExceptionType(const MagickWand *wand)
240</pre>
241
242<p>A description of each parameter follows:</p>
243
244<dd>
245</dd>
246
247<dd> </dd>
248<dl class="dl-horizontal">
249<dt>wand</dt>
250<dd>the magick wand. </dd>
251
252<dd>  </dd>
253</dl>
254<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="MagickGetIteratorIndex">MagickGetIteratorIndex</a></h2>
255
256<p>MagickGetIteratorIndex() returns the position of the iterator in the image list.</p>
257
258<p>The format of the MagickGetIteratorIndex method is:</p>
259
260<pre class="text">
261ssize_t MagickGetIteratorIndex(MagickWand *wand)
262</pre>
263
264<p>A description of each parameter follows:</p>
265
266<dd>
267</dd>
268
269<dd> </dd>
270<dl class="dl-horizontal">
271<dt>wand</dt>
272<dd>the magick wand. </dd>
273
274<dd>  </dd>
275</dl>
276<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="MagickQueryConfigureOption">MagickQueryConfigureOption</a></h2>
277
278<p>MagickQueryConfigureOption() returns the value associated with the specified configure option.</p>
279
280<p>The format of the MagickQueryConfigureOption function is:</p>
281
282<pre class="text">
283char *MagickQueryConfigureOption(const char *option)
284</pre>
285
286<p>A description of each parameter follows:</p>
287
288<dd>
289</dd>
290
291<dd> </dd>
292<dl class="dl-horizontal">
293<dt>option</dt>
294<dd>the option name. </dd>
295
296<dd>  </dd>
297</dl>
298<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="MagickQueryConfigureOptions">MagickQueryConfigureOptions</a></h2>
299
300<p>MagickQueryConfigureOptions() returns any configure options that match the specified pattern (e.g.  "*" for all).  Options include NAME, VERSION, LIB_VERSION, etc.</p>
301
302<p>The format of the MagickQueryConfigureOptions function is:</p>
303
304<pre class="text">
305char **MagickQueryConfigureOptions(const char *pattern,
306  size_t *number_options)
307</pre>
308
309<p>A description of each parameter follows:</p>
310
311<dd>
312</dd>
313
314<dd> </dd>
315<dl class="dl-horizontal">
316<dt>pattern</dt>
317<dd>Specifies a pointer to a text string containing a pattern. </dd>
318
319<dd> </dd>
320<dt>number_options</dt>
321<dd> Returns the number of configure options in the list. </dd>
322
323<dd> </dd>
324
325<dd>  </dd>
326</dl>
327<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="MagickQueryFontMetrics">MagickQueryFontMetrics</a></h2>
328
329<p>MagickQueryFontMetrics() returns a 13 element array representing the following font metrics:</p>
330
331<pre class="text">
332    Element Description
333    -------------------------------------------------
334    0 character width
335    1 character height
336    2 ascender
337    3 descender
338    4 text width
339    5 text height
340    6 maximum horizontal advance
341    7 bounding box: x1
342    8 bounding box: y1
343    9 bounding box: x2
344   10 bounding box: y2
345   11 origin: x
346   12 origin: y
347</pre>
348
349<p>The format of the MagickQueryFontMetrics method is:</p>
350
351<pre class="text">
352double *MagickQueryFontMetrics(MagickWand *wand,
353  const DrawingWand *drawing_wand,const char *text)
354</pre>
355
356<p>A description of each parameter follows:</p>
357
358<dd>
359</dd>
360
361<dd> </dd>
362<dl class="dl-horizontal">
363<dt>wand</dt>
364<dd>the Magick wand. </dd>
365
366<dd> </dd>
367<dt>drawing_wand</dt>
368<dd>the drawing wand. </dd>
369
370<dd> </dd>
371<dt>text</dt>
372<dd>the text. </dd>
373
374<dd>  </dd>
375</dl>
376<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="MagickQueryMultilineFontMetrics">MagickQueryMultilineFontMetrics</a></h2>
377
378<p>MagickQueryMultilineFontMetrics() returns a 13 element array representing the following font metrics:</p>
379
380<pre class="text">
381    Element Description
382    -------------------------------------------------
383    0 character width
384    1 character height
385    2 ascender
386    3 descender
387    4 text width
388    5 text height
389    6 maximum horizontal advance
390    7 bounding box: x1
391    8 bounding box: y1
392    9 bounding box: x2
393   10 bounding box: y2
394   11 origin: x
395   12 origin: y
396</pre>
397
398<p>This method is like MagickQueryFontMetrics() but it returns the maximum text width and height for multiple lines of text.</p>
399
400<p>The format of the MagickQueryFontMetrics method is:</p>
401
402<pre class="text">
403double *MagickQueryMultilineFontMetrics(MagickWand *wand,
404  const DrawingWand *drawing_wand,const char *text)
405</pre>
406
407<p>A description of each parameter follows:</p>
408
409<dd>
410</dd>
411
412<dd> </dd>
413<dl class="dl-horizontal">
414<dt>wand</dt>
415<dd>the Magick wand. </dd>
416
417<dd> </dd>
418<dt>drawing_wand</dt>
419<dd>the drawing wand. </dd>
420
421<dd> </dd>
422<dt>text</dt>
423<dd>the text. </dd>
424
425<dd>  </dd>
426</dl>
427<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="MagickQueryFonts">MagickQueryFonts</a></h2>
428
429<p>MagickQueryFonts() returns any font that match the specified pattern (e.g. "*" for all).</p>
430
431<p>The format of the MagickQueryFonts function is:</p>
432
433<pre class="text">
434char **MagickQueryFonts(const char *pattern,size_t *number_fonts)
435</pre>
436
437<p>A description of each parameter follows:</p>
438
439<dd>
440</dd>
441
442<dd> </dd>
443<dl class="dl-horizontal">
444<dt>pattern</dt>
445<dd>Specifies a pointer to a text string containing a pattern. </dd>
446
447<dd> </dd>
448<dt>number_fonts</dt>
449<dd> Returns the number of fonts in the list. </dd>
450
451<dd> </dd>
452
453<dd>  </dd>
454</dl>
455<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="MagickQueryFormats">MagickQueryFormats</a></h2>
456
457<p>MagickQueryFormats() returns any image formats that match the specified pattern (e.g.  "*" for all).</p>
458
459<p>The format of the MagickQueryFormats function is:</p>
460
461<pre class="text">
462char **MagickQueryFormats(const char *pattern,size_t *number_formats)
463</pre>
464
465<p>A description of each parameter follows:</p>
466
467<dd>
468</dd>
469
470<dd> </dd>
471<dl class="dl-horizontal">
472<dt>pattern</dt>
473<dd>Specifies a pointer to a text string containing a pattern. </dd>
474
475<dd> </dd>
476<dt>number_formats</dt>
477<dd> This integer returns the number of image formats in the list. </dd>
478
479<dd>  </dd>
480</dl>
481<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="MagickRelinquishMemory">MagickRelinquishMemory</a></h2>
482
483<p>MagickRelinquishMemory() relinquishes memory resources returned by such methods as MagickIdentifyImage(), MagickGetException(), etc.</p>
484
485<p>The format of the MagickRelinquishMemory method is:</p>
486
487<pre class="text">
488void *MagickRelinquishMemory(void *resource)
489</pre>
490
491<p>A description of each parameter follows:</p>
492
493<dd>
494</dd>
495
496<dd> </dd>
497<dl class="dl-horizontal">
498<dt>resource</dt>
499<dd>Relinquish the memory associated with this resource. </dd>
500
501<dd>  </dd>
502</dl>
503<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="MagickResetIterator">MagickResetIterator</a></h2>
504
505<p>MagickResetIterator() resets the wand iterator.</p>
506
507<p>It is typically used either before iterating though images, or before calling specific functions such as  MagickAppendImages() to append all images together.</p>
508
509<p>Afterward you can use MagickNextImage() to iterate over all the images in a wand container, starting with the first image.</p>
510
511<p>Using this before MagickAddImages() or MagickReadImages() will cause new images to be inserted between the first and second image.</p>
512
513<p>The format of the MagickResetIterator method is:</p>
514
515<pre class="text">
516void MagickResetIterator(MagickWand *wand)
517</pre>
518
519<p>A description of each parameter follows:</p>
520
521<dd>
522</dd>
523
524<dd> </dd>
525<dl class="dl-horizontal">
526<dt>wand</dt>
527<dd>the magick wand. </dd>
528
529<dd>  </dd>
530</dl>
531<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="MagickSetFirstIterator">MagickSetFirstIterator</a></h2>
532
533<p>MagickSetFirstIterator() sets the wand iterator to the first image.</p>
534
535<p>After using any images added to the wand using MagickAddImage() or MagickReadImage() will be prepended before any image in the wand.</p>
536
537<p>Also the current image has been set to the first image (if any) in the Magick Wand.  Using MagickNextImage() will then set the current image to the second image in the list (if present).</p>
538
539<p>This operation is similar to MagickResetIterator() but differs in how MagickAddImage(), MagickReadImage(), and MagickNextImage() behaves afterward.</p>
540
541<p>The format of the MagickSetFirstIterator method is:</p>
542
543<pre class="text">
544void MagickSetFirstIterator(MagickWand *wand)
545</pre>
546
547<p>A description of each parameter follows:</p>
548
549<dd>
550</dd>
551
552<dd> </dd>
553<dl class="dl-horizontal">
554<dt>wand</dt>
555<dd>the magick wand. </dd>
556
557<dd>  </dd>
558</dl>
559<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="MagickSetIteratorIndex">MagickSetIteratorIndex</a></h2>
560
561<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>
562
563<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>
564
565<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>
566
567<p>Jumping to index 0 is similar to MagickResetIterator() but differs in how MagickNextImage() behaves afterward.</p>
568
569<p>The format of the MagickSetIteratorIndex method is:</p>
570
571<pre class="text">
572MagickBooleanType MagickSetIteratorIndex(MagickWand *wand,
573  const ssize_t index)
574</pre>
575
576<p>A description of each parameter follows:</p>
577
578<dd>
579</dd>
580
581<dd> </dd>
582<dl class="dl-horizontal">
583<dt>wand</dt>
584<dd>the magick wand. </dd>
585
586<dd> </dd>
587<dt>index</dt>
588<dd>the scene number. </dd>
589
590<dd>  </dd>
591</dl>
592<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="MagickSetLastIterator">MagickSetLastIterator</a></h2>
593
594<p>MagickSetLastIterator() sets the wand iterator to the last image.</p>
595
596<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>
597
598<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>
599
600<p>The format of the MagickSetLastIterator method is:</p>
601
602<pre class="text">
603void MagickSetLastIterator(MagickWand *wand)
604</pre>
605
606<p>A description of each parameter follows:</p>
607
608<dd>
609</dd>
610
611<dd> </dd>
612<dl class="dl-horizontal">
613<dt>wand</dt>
614<dd>the magick wand. </dd>
615
616<dd>  </dd>
617</dl>
618<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="MagickWandGenesis">MagickWandGenesis</a></h2>
619
620<p>MagickWandGenesis() initializes the MagickWand environment.</p>
621
622<p>The format of the MagickWandGenesis method is:</p>
623
624<pre class="text">
625void MagickWandGenesis(void)
626</pre>
627
628<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="MagickWandTerminus">MagickWandTerminus</a></h2>
629
630<p>MagickWandTerminus() terminates the MagickWand environment.</p>
631
632<p>The format of the MagickWandTerminus method is:</p>
633
634<pre class="text">
635void MagickWandTerminus(void)
636</pre>
637
638<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="NewMagickWand">NewMagickWand</a></h2>
639
640<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>
641
642<p>The format of the NewMagickWand method is:</p>
643
644<pre class="text">
645MagickWand *NewMagickWand(void)
646</pre>
647
648<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="NewMagickWandFromImage">NewMagickWandFromImage</a></h2>
649
650<p>NewMagickWandFromImage() returns a wand with an image.</p>
651
652<p>The format of the NewMagickWandFromImage method is:</p>
653
654<pre class="text">
655MagickWand *NewMagickWandFromImage(const Image *image)
656</pre>
657
658<p>A description of each parameter follows:</p>
659
660<dd>
661</dd>
662
663<dd> </dd>
664<dl class="dl-horizontal">
665<dt>image</dt>
666<dd>the image. </dd>
667
668<dd>  </dd>
669</dl>
670<h2><a href="../../api/MagickWand/magick-wand_8c.html" id="IsMagickWandInstantiated">IsMagickWandInstantiated</a></h2>
671
672<p>IsMagickWandInstantiated() returns MagickTrue if the ImageMagick environment is currently instantiated--  that is, MagickWandGenesis() has been called but MagickWandTerminus() has not.</p>
673
674<p>The format of the IsMagickWandInstantiated method is:</p>
675
676<pre class="text">
677MagickBooleanType IsMagickWandInstantiated(void)
678</pre>
679
680</div>
681  </div>
682  </main><!-- /.container -->
683  <footer class="magick-footer">
684    <div class="container-fluid">
685      <a href="../../www/security-policy.html">Security</a> •
686      <a href="../../www/news.html">News</a>
687
688      <a href="magick-wand.html#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../../../images/wand.ico"/></a>
689
690      <a href="../../www/links.html">Related</a> •
691      <a href="../../www/sitemap.html">Sitemap</a>
692   <br/>
693     <a href="../../www/support.html">Sponsor</a> •
694     <a href="../../www/cite.html">Cite</a> •
695     <a href="http://pgp.mit.edu/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
696     <a href="../../www/contact.html">Contact Us</a>
697   <br/>
698     <a href="https://github.com/imagemagick/imagemagick" target="_blank" rel="noopener" aria-label="GitHub"><svg xmlns="http://www.w3.org/2000/svg" class="navbar-nav-svg" viewBox="0 0 512 499.36" width="2%" height="2%" role="img" focusable="false"><title>GitHub</title><path fill="currentColor" fill-rule="evenodd" d="M256 0C114.64 0 0 114.61 0 256c0 113.09 73.34 209 175.08 242.9 12.8 2.35 17.47-5.56 17.47-12.34 0-6.08-.22-22.18-.35-43.54-71.2 15.49-86.2-34.34-86.2-34.34-11.64-29.57-28.42-37.45-28.42-37.45-23.27-15.84 1.73-15.55 1.73-15.55 25.69 1.81 39.21 26.38 39.21 26.38 22.84 39.12 59.92 27.82 74.5 21.27 2.33-16.54 8.94-27.82 16.25-34.22-56.84-6.43-116.6-28.43-116.6-126.49 0-27.95 10-50.8 26.35-68.69-2.63-6.48-11.42-32.5 2.51-67.75 0 0 21.49-6.88 70.4 26.24a242.65 242.65 0 0 1 128.18 0c48.87-33.13 70.33-26.24 70.33-26.24 14 35.25 5.18 61.27 2.55 67.75 16.41 17.9 26.31 40.75 26.31 68.69 0 98.35-59.85 120-116.88 126.32 9.19 7.9 17.38 23.53 17.38 47.41 0 34.22-.31 61.83-.31 70.23 0 6.85 4.61 14.81 17.6 12.31C438.72 464.97 512 369.08 512 256.02 512 114.62 397.37 0 256 0z"/></svg></a> •
699     <a href="https://twitter.com/imagemagick" target="_blank" rel="noopener" aria-label="Twitter"><svg xmlns="http://www.w3.org/2000/svg" class="navbar-nav-svg" viewBox="0 0 512 416.32" width="2%" height="2%" role="img" focusable="false"><title>Twitter</title><path fill="currentColor" d="M160.83 416.32c193.2 0 298.92-160.22 298.92-298.92 0-4.51 0-9-.2-13.52A214 214 0 0 0 512 49.38a212.93 212.93 0 0 1-60.44 16.6 105.7 105.7 0 0 0 46.3-58.19 209 209 0 0 1-66.79 25.37 105.09 105.09 0 0 0-181.73 71.91 116.12 116.12 0 0 0 2.66 24c-87.28-4.3-164.73-46.3-216.56-109.82A105.48 105.48 0 0 0 68 159.6a106.27 106.27 0 0 1-47.53-13.11v1.43a105.28 105.28 0 0 0 84.21 103.06 105.67 105.67 0 0 1-47.33 1.84 105.06 105.06 0 0 0 98.14 72.94A210.72 210.72 0 0 1 25 370.84a202.17 202.17 0 0 1-25-1.43 298.85 298.85 0 0 0 160.83 46.92"/></svg></a>
700    <br/>
701    <small>© 1999-2021 ImageMagick Studio LLC</small>
702    </div>
703  </footer>
704
705  <!-- Javascript assets -->
706  <script src="../../assets/magick.js" ></script>
707  </body>
708</html>
709