1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
\r
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
\r
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
\r
5 <meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U=" />
\r
6 <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf" />
\r
7 <style type="text/css" media="screen,projection"><!--
\r
8 @import url("../../www/magick.css");
\r
10 <link rel="shortcut icon" href="../../images/wand.ico" type="images/vnd.microsoft.icon"/>
11 <title>ImageMagick: MagickWand, C API for ImageMagick: Wand Methods</title>
12 <meta http-equiv="Content-Language" content="en-US"/>
13 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
14 <meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/>
15 <meta name="Generator" content="PHP"/>
16 <meta name="Keywords" content="magickwc, api, for, imagemagick:, wmethods, ImageMagick, ImageMagic, MagickCore, MagickWand, PerlMagick, Magick++, RMagick, PythonMagick, JMagick, TclMagick, Image, Magick, Magic, Wand, ImageMagickObject, Swiss, Army, Knife, Image, Processing"/>
17 <meta name="Description" content="ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (about 100) including GIF, JPEG, JPEG-2000, PNG, PDF, PhotoCD, TIFF, and DPX. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you can freely use, copy, modify, and distribute. Its license is compatible with the GPL. It runs on all major operating systems. The functionality of ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite programming language. Choose from these interfaces: MagickCore (C), MagickWand (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images automagically and dynamically."/>
18 <meta name="Rating" content="GENERAL"/>
19 <meta name="Robots" content="INDEX, FOLLOW"/>
20 <meta name="Generator" content="ImageMagick Studio LLC"/>
21 <meta name="Author" content="ImageMagick Studio LLC"/>
22 <meta name="Revisit-after" content="2 DAYS"/>
23 <meta name="Resource-type" content="document"/>
24 <meta name="Copyright" content="Copyright (c) 1999-2009 ImageMagick Studio LLC"/>
25 <meta name="Distribution" content="Global"/>
28 <body id="www-imagemagick-org">
\r
29 <div class="titlebar">
\r
30 <a href="../../index.html">
\r
31 <img src="../../images/script.png" alt="[ImageMagick]"
\r
32 style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>
\r
33 <a href="http://www.networkredux.com">
\r
34 <img src="../../images/networkredux.png" alt="[sponsor]"
\r
35 style="margin: 45px auto; border: 0px; float: left;" /></a>
\r
36 <a href="http://www.imagemagick.org/discourse-server/">
\r
37 <img src="../../images/logo.jpg" alt=""
\r
38 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
\r
39 <a href="../../index.html">
\r
40 <img src="../../images/sprite.jpg" alt=""
\r
41 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
\r
44 <div class="eastbar">
\r
47 <a href="../../index.html">About ImageMagick</a>
49 <div class="sep"></div>
\r
51 <a href="../../www/command-line-tools.html">Command-line Tools</a>
54 <a href="../../www/command-line-processing.html">Processing</a>
57 <a href="../../www/command-line-options.html">Options</a>
60 <a href="http://www.imagemagick.org/Usage/">Usage</a>
63 <a href="../../www/api.html">Program Interfaces</a>
66 <a href="../../www/magick-wand.html">MagickWand</a>
69 <a href="../../www/magick-core.html">MagickCore</a>
72 <a href="../../www/perl-magick.html">PerlMagick</a>
75 <a href="../../Magick++/">Magick++</a>
78 <a href="../../www/architecture.html">Architecture</a>
80 <div class="sep"></div>
\r
82 <a href="../../www/install-source.html">Install from Source</a>
85 <a href="../../www/install-source.html#unix">Unix</a>
88 <a href="../../www/install-source.html#windows">Windows</a>
91 <a href="../../www/binary-releases.html">Binary Releases</a>
94 <a href="../../www/binary-releases.html#unix">Unix</a>
97 <a href="../../www/binary-releases.html#macosx">Mac OS X</a>
100 <a href="../../www/binary-releases.html#windows">Windows</a>
103 <a href="../../www/resources.html">Resources</a>
105 <div class="sep"></div>
\r
107 <a href="../../www/download.html">Download</a>
109 <div class="sep"></div>
\r
111 <a href="../http://www.imagemagick.org/script/search.php">Search</a>
113 <div class="sep"></div>
\r
115 <a href="../../www/sitemap.html">Site Map</a>
118 <a href="../../www/links.html">Links</a>
120 <div class="sep"></div>
\r
122 <a href="../../www/sponsors.html">Sponsors:</a>
124 <div class="sponsbox">
125 <div class="sponsor">
126 <a href="http://www.abi-stoff.de/abizeitung/" title="Abibuch">Abizeitung</a><!-- 20090501000200 -->
128 <div class="sponsor">
129 <a href="http://www.online-kredit-index.de">Kredit</a><!-- 201003010120 Buchhorn -->
131 <div class="sponsor">
132 <a href="http://www.print24.de/">Druckerei</a><!-- 201009010720 -->
134 <div class="sponsor">
135 <a href="http://www.goyax.de">Börse</a><!-- 201001000240 Gewiese digital-finance.de -->
137 <div class="sponsor">
138 <a href="http://www.allesdruck.de">Druckerei Online</a><!-- 201012001200 allesdruck.de-->
140 <div class="sponsor">
141 <a href="http://www.blumenversender.com">Blumenversand</a><!-- 200911010120 -->
143 <div class="sponsor">
144 <a href="http://www.who-sells-it.com/">Free Catalogs</a><!-- 201002010000 -->
154 <p class="navigation-index">[<a href="#ClearMagickWand">ClearMagickWand</a> • <a href="#CloneMagickWand">CloneMagickWand</a> • <a href="#DestroyMagickWand">DestroyMagickWand</a> • <a href="#IsMagickWand">IsMagickWand</a> • <a href="#MagickClearException">MagickClearException</a> • <a href="#MagickGetException">MagickGetException</a> • <a href="#MagickGetExceptionType">MagickGetExceptionType</a> • <a href="#MagickGetIteratorIndex">MagickGetIteratorIndex</a> • <a href="#MagickQueryConfigureOption">MagickQueryConfigureOption</a> • <a href="#MagickQueryConfigureOptions">MagickQueryConfigureOptions</a> • <a href="#MagickQueryFontMetrics">MagickQueryFontMetrics</a> • <a href="#MagickQueryMultilineFontMetrics">MagickQueryMultilineFontMetrics</a> • <a href="#MagickQueryFonts">MagickQueryFonts</a> • <a href="#MagickQueryFonts">MagickQueryFonts</a> • <a href="#MagickRelinquishMemory">MagickRelinquishMemory</a> • <a href="#MagickResetIterator">MagickResetIterator</a> • <a href="#MagickSetFirstIterator">MagickSetFirstIterator</a> • <a href="#MagickSetIteratorIndex">MagickSetIteratorIndex</a> • <a href="#MagickSetLastIterator">MagickSetLastIterator</a> • <a href="#MagickWandGenesis">MagickWandGenesis</a> • <a href="#MagickWandTerminus">MagickWandTerminus</a> • <a href="#NewMagickWand">NewMagickWand</a> • <a href="#NewMagickWandFromImage">NewMagickWandFromImage</a>]</p>
156 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
157 _8c.html" target="source" name="ClearMagickWand">ClearMagickWand</a></h2>
158 <div class="doc-section">
160 <p>ClearMagickWand() clears resources associated with the wand.</p></ol>
162 <p>The format of the ClearMagickWand method is:</p>
165 void ClearMagickWand(MagickWand *wand)
168 <p>A description of each parameter follows:</p></ol>
171 <ol><p>the magick wand.</p></ol>
174 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
175 _8c.html" target="source" name="CloneMagickWand">CloneMagickWand</a></h2>
176 <div class="doc-section">
178 <p>CloneMagickWand() makes an exact copy of the specified wand.</p></ol>
180 <p>The format of the CloneMagickWand method is:</p>
183 MagickWand *CloneMagickWand(const MagickWand *wand)
186 <p>A description of each parameter follows:</p></ol>
189 <ol><p>the magick wand.</p></ol>
192 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
193 _8c.html" target="source" name="DestroyMagickWand">DestroyMagickWand</a></h2>
194 <div class="doc-section">
196 <p>DestroyMagickWand() deallocates memory associated with an MagickWand.</p></ol>
198 <p>The format of the DestroyMagickWand method is:</p>
201 MagickWand *DestroyMagickWand(MagickWand *wand)
204 <p>A description of each parameter follows:</p></ol>
207 <ol><p>the magick wand.</p></ol>
210 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
211 _8c.html" target="source" name="IsMagickWand">IsMagickWand</a></h2>
212 <div class="doc-section">
214 <p>IsMagickWand() returns MagickTrue if the wand is verified as a magick wand.</p></ol>
216 <p>The format of the IsMagickWand method is:</p>
219 MagickBooleanType IsMagickWand(const MagickWand *wand)
222 <p>A description of each parameter follows:</p></ol>
225 <ol><p>the magick wand.</p></ol>
228 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
229 _8c.html" target="source" name="MagickClearException">MagickClearException</a></h2>
230 <div class="doc-section">
232 <p>MagickClearException() clears any exceptions associated with the wand.</p></ol>
234 <p>The format of the MagickClearException method is:</p>
237 MagickBooleanType MagickClearException(MagickWand *wand)
240 <p>A description of each parameter follows:</p></ol>
243 <ol><p>the magick wand.</p></ol>
246 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
247 _8c.html" target="source" name="MagickGetException">MagickGetException</a></h2>
248 <div class="doc-section">
250 <p>MagickGetException() returns the severity, reason, and description of any error that occurs when using other methods in this API.</p></ol>
252 <p>The format of the MagickGetException method is:</p>
255 char *MagickGetException(const MagickWand *wand,ExceptionType *severity)
258 <p>A description of each parameter follows:</p></ol>
261 <ol><p>the magick wand.</p></ol>
264 <ol><p>the severity of the error is returned here.</p></ol>
267 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
268 _8c.html" target="source" name="MagickGetExceptionType">MagickGetExceptionType</a></h2>
269 <div class="doc-section">
271 <p>MagickGetExceptionType() returns the exception type associated with the wand. If no exception has occurred, UndefinedExceptionType is returned.</p></ol>
273 <p>The format of the MagickGetExceptionType method is:</p>
276 ExceptionType MagickGetExceptionType(const MagickWand *wand)
279 <p>A description of each parameter follows:</p></ol>
282 <ol><p>the magick wand.</p></ol>
285 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
286 _8c.html" target="source" name="MagickGetIteratorIndex">MagickGetIteratorIndex</a></h2>
287 <div class="doc-section">
289 <p>MagickGetIteratorIndex() returns the position of the iterator in the image list.</p></ol>
291 <p>The format of the MagickGetIteratorIndex method is:</p>
294 long MagickGetIteratorIndex(MagickWand *wand)
297 <p>A description of each parameter follows:</p></ol>
300 <ol><p>the magick wand.</p></ol>
303 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
304 _8c.html" target="source" name="MagickQueryConfigureOption">MagickQueryConfigureOption</a></h2>
305 <div class="doc-section">
307 <p>MagickQueryConfigureOption() returns the value associated with the specified configure option.</p></ol>
309 <p>The format of the MagickQueryConfigureOption function is:</p>
312 char *MagickQueryConfigureOption(const char *option)
315 <p>A description of each parameter follows:</p></ol>
318 <ol><p>the option name.</p></ol>
321 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
322 _8c.html" target="source" name="MagickQueryConfigureOptions">MagickQueryConfigureOptions</a></h2>
323 <div class="doc-section">
325 <p>MagickQueryConfigureOptions() returns any configure options that match the specified pattern (e.g. "*" for all). Options include NAME, VERSION, LIB_VERSION, etc.</p></ol>
327 <p>The format of the MagickQueryConfigureOptions function is:</p>
330 char **MagickQueryConfigureOptions(const char *pattern,
331 unsigned long *number_options)
334 <p>A description of each parameter follows:</p></ol>
337 <ol><p>Specifies a pointer to a text string containing a pattern.</p></ol>
339 <h5>number_options</h5>
340 <ol><p>Returns the number of configure options in the list.</p></ol>
344 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
345 _8c.html" target="source" name="MagickQueryFontMetrics">MagickQueryFontMetrics</a></h2>
346 <div class="doc-section">
348 <p>MagickQueryFontMetrics() returns a 13 element array representing the following font metrics:</p>
352 -------------------------------------------------
359 6 maximum horizontal advance
368 <p>The format of the MagickQueryFontMetrics method is:</p>
371 double *MagickQueryFontMetrics(MagickWand *wand,
372 const DrawingWand *drawing_wand,const char *text)
375 <p>A description of each parameter follows:</p></ol>
378 <ol><p>the Magick wand.</p></ol>
380 <h5>drawing_wand</h5>
381 <ol><p>the drawing wand.</p></ol>
384 <ol><p>the text.</p></ol>
387 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
388 _8c.html" target="source" name="MagickQueryMultilineFontMetrics">MagickQueryMultilineFontMetrics</a></h2>
389 <div class="doc-section">
391 <p>MagickQueryMultilineFontMetrics() returns a 13 element array representing the following font metrics:</p>
395 -------------------------------------------------
402 6 maximum horizontal advance
411 <p>This method is like MagickQueryFontMetrics() but it returns the maximum text width and height for multiple lines of text.</p></ol>
413 <p>The format of the MagickQueryFontMetrics method is:</p>
416 double *MagickQueryMultilineFontMetrics(MagickWand *wand,
417 const DrawingWand *drawing_wand,const char *text)
420 <p>A description of each parameter follows:</p></ol>
423 <ol><p>the Magick wand.</p></ol>
425 <h5>drawing_wand</h5>
426 <ol><p>the drawing wand.</p></ol>
429 <ol><p>the text.</p></ol>
432 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
433 _8c.html" target="source" name="MagickQueryFonts">MagickQueryFonts</a></h2>
434 <div class="doc-section">
436 <p>MagickQueryFonts() returns any font that match the specified pattern (e.g. "*" for all).</p></ol>
438 <p>The format of the MagickQueryFonts function is:</p>
441 char **MagickQueryFonts(const char *pattern,unsigned long *number_fonts)
444 <p>A description of each parameter follows:</p></ol>
447 <ol><p>Specifies a pointer to a text string containing a pattern.</p></ol>
449 <h5>number_fonts</h5>
450 <ol><p>Returns the number of fonts in the list.</p></ol>
454 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
455 _8c.html" target="source" name="MagickQueryFonts">MagickQueryFonts</a></h2>
456 <div class="doc-section">
458 <p>MagickQueryFonts() returns any image formats that match the specified pattern (e.g. "*" for all).</p></ol>
460 <p>The format of the MagickQueryFonts function is:</p>
463 char **MagickQueryFonts(const char *pattern,
464 unsigned long *number_formats)
467 <p>A description of each parameter follows:</p></ol>
470 <ol><p>Specifies a pointer to a text string containing a pattern.</p></ol>
472 <h5>number_formats</h5>
473 <ol><p>This integer returns the number of image formats in the list.</p></ol>
476 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
477 _8c.html" target="source" name="MagickRelinquishMemory">MagickRelinquishMemory</a></h2>
478 <div class="doc-section">
480 <p>MagickRelinquishMemory() relinquishes memory resources returned by such methods as MagickIdentifyImage(), MagickGetException(), etc.</p></ol>
482 <p>The format of the MagickRelinquishMemory method is:</p>
485 void *MagickRelinquishMemory(void *resource)
488 <p>A description of each parameter follows:</p></ol>
491 <ol><p>Relinquish the memory associated with this resource.</p></ol>
494 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
495 _8c.html" target="source" name="MagickResetIterator">MagickResetIterator</a></h2>
496 <div class="doc-section">
498 <p>MagickResetIterator() resets the wand iterator. Use it in conjunction with MagickNextImage() to iterate over all the images in a wand container.</p></ol>
500 <p>The format of the MagickResetIterator method is:</p>
503 void MagickResetIterator(MagickWand *wand)
506 <p>A description of each parameter follows:</p></ol>
509 <ol><p>the magick wand.</p></ol>
512 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
513 _8c.html" target="source" name="MagickSetFirstIterator">MagickSetFirstIterator</a></h2>
514 <div class="doc-section">
516 <p>MagickSetFirstIterator() sets the wand iterator to the first image.</p></ol>
518 <p>The format of the MagickSetFirstIterator method is:</p>
521 void MagickSetFirstIterator(MagickWand *wand)
524 <p>A description of each parameter follows:</p></ol>
527 <ol><p>the magick wand.</p></ol>
530 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
531 _8c.html" target="source" name="MagickSetIteratorIndex">MagickSetIteratorIndex</a></h2>
532 <div class="doc-section">
534 <p>MagickSetIteratorIndex() set the iterator to the position in the image list specified with the index parameter.</p></ol>
536 <p>The format of the MagickSetIteratorIndex method is:</p>
539 MagickBooleanType MagickSetIteratorIndex(MagickWand *wand,
543 <p>A description of each parameter follows:</p></ol>
546 <ol><p>the magick wand.</p></ol>
549 <ol><p>the scene number.</p></ol>
552 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
553 _8c.html" target="source" name="MagickSetLastIterator">MagickSetLastIterator</a></h2>
554 <div class="doc-section">
556 <p>MagickSetLastIterator() sets the wand iterator to the last image.</p></ol>
558 <p>The format of the MagickSetLastIterator method is:</p>
561 void MagickSetLastIterator(MagickWand *wand)
564 <p>A description of each parameter follows:</p></ol>
567 <ol><p>the magick wand.</p></ol>
570 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
571 _8c.html" target="source" name="MagickWandGenesis">MagickWandGenesis</a></h2>
572 <div class="doc-section">
574 <p>MagickWandGenesis() initializes the MagickWand environment.</p></ol>
576 <p>The format of the MagickWandGenesis method is:</p>
579 void MagickWandGenesis(void)
583 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
584 _8c.html" target="source" name="MagickWandTerminus">MagickWandTerminus</a></h2>
585 <div class="doc-section">
587 <p>MagickWandTerminus() terminates the MagickWand environment.</p></ol>
589 <p>The format of the MaickWandTerminus method is:</p>
592 void MagickWandTerminus(void)
596 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
597 _8c.html" target="source" name="NewMagickWand">NewMagickWand</a></h2>
598 <div class="doc-section">
600 <p>NewMagickWand() returns a wand required for all other methods in the API.</p></ol>
602 <p>The format of the NewMagickWand method is:</p>
605 MagickWand *NewMagickWand(void)
609 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
610 _8c.html" target="source" name="NewMagickWandFromImage">NewMagickWandFromImage</a></h2>
611 <div class="doc-section">
613 <p>NewMagickWandFromImage() returns a wand with an image.</p></ol>
615 <p>The format of the NewMagickWandFromImage method is:</p>
618 MagickWand *NewMagickWandFromImage(const Image *image)
621 <p>A description of each parameter follows:</p></ol>
624 <ol><p>the image.</p></ol>
631 <!-- <span id="linkbar-west"> </span> -->
\r
632 <span id="linkbar-center">
\r
633 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> •
\r
634 <a href="../../www/mailing-list.html">Mailing Lists</a> •
\r
635 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
\r
637 <span id="linkbar-east"> </span>
\r
639 <div class="footer">
\r
640 <span id="footer-west">© 1999-2009 ImageMagick Studio LLC</span>
\r
641 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
\r
643 <div style="clear: both; margin: 0; width: 100%; "></div>
\r