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.goyax.de">Börse</a><!-- 201001000240 Gewiese digital-finance.de -->
128 <div class="sponsor">
129 <a href="http://www.allesdruck.de">Druckerei Online</a><!-- 201012001200 allesdruck.de-->
131 <div class="sponsor">
132 <a href="http://www.blumenversender.com">Blumenversand</a><!-- 200911010120 -->
134 <div class="sponsor">
135 <a href="http://www.print24.de/">Druckerei</a><!-- 200911010480 -->
137 <div class="sponsor">
138 <a href="http://www.who-sells-it.com/">Free Catalogs</a><!-- 201002010000 -->
140 <div class="sponsor">
141 <a href="http://www.online-kredit-index.de">Kredit</a><!-- 201002010120 Buchhorn -->
151 <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>
153 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
154 _8c.html" target="source" name="ClearMagickWand">ClearMagickWand</a></h2>
155 <div class="doc-section">
157 <p>ClearMagickWand() clears resources associated with the wand.</p></ol>
159 <p>The format of the ClearMagickWand method is:</p>
162 void ClearMagickWand(MagickWand *wand)
165 <p>A description of each parameter follows:</p></ol>
168 <ol><p>the magick wand.</p></ol>
171 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
172 _8c.html" target="source" name="CloneMagickWand">CloneMagickWand</a></h2>
173 <div class="doc-section">
175 <p>CloneMagickWand() makes an exact copy of the specified wand.</p></ol>
177 <p>The format of the CloneMagickWand method is:</p>
180 MagickWand *CloneMagickWand(const MagickWand *wand)
183 <p>A description of each parameter follows:</p></ol>
186 <ol><p>the magick wand.</p></ol>
189 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
190 _8c.html" target="source" name="DestroyMagickWand">DestroyMagickWand</a></h2>
191 <div class="doc-section">
193 <p>DestroyMagickWand() deallocates memory associated with an MagickWand.</p></ol>
195 <p>The format of the DestroyMagickWand method is:</p>
198 MagickWand *DestroyMagickWand(MagickWand *wand)
201 <p>A description of each parameter follows:</p></ol>
204 <ol><p>the magick wand.</p></ol>
207 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
208 _8c.html" target="source" name="IsMagickWand">IsMagickWand</a></h2>
209 <div class="doc-section">
211 <p>IsMagickWand() returns MagickTrue if the wand is verified as a magick wand.</p></ol>
213 <p>The format of the IsMagickWand method is:</p>
216 MagickBooleanType IsMagickWand(const MagickWand *wand)
219 <p>A description of each parameter follows:</p></ol>
222 <ol><p>the magick wand.</p></ol>
225 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
226 _8c.html" target="source" name="MagickClearException">MagickClearException</a></h2>
227 <div class="doc-section">
229 <p>MagickClearException() clears any exceptions associated with the wand.</p></ol>
231 <p>The format of the MagickClearException method is:</p>
234 MagickBooleanType MagickClearException(MagickWand *wand)
237 <p>A description of each parameter follows:</p></ol>
240 <ol><p>the magick wand.</p></ol>
243 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
244 _8c.html" target="source" name="MagickGetException">MagickGetException</a></h2>
245 <div class="doc-section">
247 <p>MagickGetException() returns the severity, reason, and description of any error that occurs when using other methods in this API.</p></ol>
249 <p>The format of the MagickGetException method is:</p>
252 char *MagickGetException(const MagickWand *wand,ExceptionType *severity)
255 <p>A description of each parameter follows:</p></ol>
258 <ol><p>the magick wand.</p></ol>
261 <ol><p>the severity of the error is returned here.</p></ol>
264 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
265 _8c.html" target="source" name="MagickGetExceptionType">MagickGetExceptionType</a></h2>
266 <div class="doc-section">
268 <p>MagickGetExceptionType() returns the exception type associated with the wand. If no exception has occurred, UndefinedExceptionType is returned.</p></ol>
270 <p>The format of the MagickGetExceptionType method is:</p>
273 ExceptionType MagickGetExceptionType(const MagickWand *wand)
276 <p>A description of each parameter follows:</p></ol>
279 <ol><p>the magick wand.</p></ol>
282 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
283 _8c.html" target="source" name="MagickGetIteratorIndex">MagickGetIteratorIndex</a></h2>
284 <div class="doc-section">
286 <p>MagickGetIteratorIndex() returns the position of the iterator in the image list.</p></ol>
288 <p>The format of the MagickGetIteratorIndex method is:</p>
291 long MagickGetIteratorIndex(MagickWand *wand)
294 <p>A description of each parameter follows:</p></ol>
297 <ol><p>the magick wand.</p></ol>
300 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
301 _8c.html" target="source" name="MagickQueryConfigureOption">MagickQueryConfigureOption</a></h2>
302 <div class="doc-section">
304 <p>MagickQueryConfigureOption() returns the value associated with the specified configure option.</p></ol>
306 <p>The format of the MagickQueryConfigureOption function is:</p>
309 char *MagickQueryConfigureOption(const char *option)
312 <p>A description of each parameter follows:</p></ol>
315 <ol><p>the option name.</p></ol>
318 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
319 _8c.html" target="source" name="MagickQueryConfigureOptions">MagickQueryConfigureOptions</a></h2>
320 <div class="doc-section">
322 <p>MagickQueryConfigureOptions() returns any configure options that match the specified pattern (e.g. "*" for all). Options include NAME, VERSION, LIB_VERSION, etc.</p></ol>
324 <p>The format of the MagickQueryConfigureOptions function is:</p>
327 char **MagickQueryConfigureOptions(const char *pattern,
328 unsigned long *number_options)
331 <p>A description of each parameter follows:</p></ol>
334 <ol><p>Specifies a pointer to a text string containing a pattern.</p></ol>
336 <h5>number_options</h5>
337 <ol><p>Returns the number of configure options in the list.</p></ol>
341 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
342 _8c.html" target="source" name="MagickQueryFontMetrics">MagickQueryFontMetrics</a></h2>
343 <div class="doc-section">
345 <p>MagickQueryFontMetrics() returns a 13 element array representing the following font metrics:</p>
349 -------------------------------------------------
356 6 maximum horizontal advance
365 <p>The format of the MagickQueryFontMetrics method is:</p>
368 double *MagickQueryFontMetrics(MagickWand *wand,
369 const DrawingWand *drawing_wand,const char *text)
372 <p>A description of each parameter follows:</p></ol>
375 <ol><p>the Magick wand.</p></ol>
377 <h5>drawing_wand</h5>
378 <ol><p>the drawing wand.</p></ol>
381 <ol><p>the text.</p></ol>
384 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
385 _8c.html" target="source" name="MagickQueryMultilineFontMetrics">MagickQueryMultilineFontMetrics</a></h2>
386 <div class="doc-section">
388 <p>MagickQueryMultilineFontMetrics() returns a 13 element array representing the following font metrics:</p>
392 -------------------------------------------------
399 6 maximum horizontal advance
408 <p>This method is like MagickQueryFontMetrics() but it returns the maximum text width and height for multiple lines of text.</p></ol>
410 <p>The format of the MagickQueryFontMetrics method is:</p>
413 double *MagickQueryMultilineFontMetrics(MagickWand *wand,
414 const DrawingWand *drawing_wand,const char *text)
417 <p>A description of each parameter follows:</p></ol>
420 <ol><p>the Magick wand.</p></ol>
422 <h5>drawing_wand</h5>
423 <ol><p>the drawing wand.</p></ol>
426 <ol><p>the text.</p></ol>
429 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
430 _8c.html" target="source" name="MagickQueryFonts">MagickQueryFonts</a></h2>
431 <div class="doc-section">
433 <p>MagickQueryFonts() returns any font that match the specified pattern (e.g. "*" for all).</p></ol>
435 <p>The format of the MagickQueryFonts function is:</p>
438 char **MagickQueryFonts(const char *pattern,unsigned long *number_fonts)
441 <p>A description of each parameter follows:</p></ol>
444 <ol><p>Specifies a pointer to a text string containing a pattern.</p></ol>
446 <h5>number_fonts</h5>
447 <ol><p>Returns the number of fonts in the list.</p></ol>
451 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
452 _8c.html" target="source" name="MagickQueryFonts">MagickQueryFonts</a></h2>
453 <div class="doc-section">
455 <p>MagickQueryFonts() returns any image formats that match the specified pattern (e.g. "*" for all).</p></ol>
457 <p>The format of the MagickQueryFonts function is:</p>
460 char **MagickQueryFonts(const char *pattern,
461 unsigned long *number_formats)
464 <p>A description of each parameter follows:</p></ol>
467 <ol><p>Specifies a pointer to a text string containing a pattern.</p></ol>
469 <h5>number_formats</h5>
470 <ol><p>This integer returns the number of image formats in the list.</p></ol>
473 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
474 _8c.html" target="source" name="MagickRelinquishMemory">MagickRelinquishMemory</a></h2>
475 <div class="doc-section">
477 <p>MagickRelinquishMemory() relinquishes memory resources returned by such methods as MagickIdentifyImage(), MagickGetException(), etc.</p></ol>
479 <p>The format of the MagickRelinquishMemory method is:</p>
482 void *MagickRelinquishMemory(void *resource)
485 <p>A description of each parameter follows:</p></ol>
488 <ol><p>Relinquish the memory associated with this resource.</p></ol>
491 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
492 _8c.html" target="source" name="MagickResetIterator">MagickResetIterator</a></h2>
493 <div class="doc-section">
495 <p>MagickResetIterator() resets the wand iterator. Use it in conjunction with MagickNextImage() to iterate over all the images in a wand container.</p></ol>
497 <p>The format of the MagickResetIterator method is:</p>
500 void MagickResetIterator(MagickWand *wand)
503 <p>A description of each parameter follows:</p></ol>
506 <ol><p>the magick wand.</p></ol>
509 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
510 _8c.html" target="source" name="MagickSetFirstIterator">MagickSetFirstIterator</a></h2>
511 <div class="doc-section">
513 <p>MagickSetFirstIterator() sets the wand iterator to the first image.</p></ol>
515 <p>The format of the MagickSetFirstIterator method is:</p>
518 void MagickSetFirstIterator(MagickWand *wand)
521 <p>A description of each parameter follows:</p></ol>
524 <ol><p>the magick wand.</p></ol>
527 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
528 _8c.html" target="source" name="MagickSetIteratorIndex">MagickSetIteratorIndex</a></h2>
529 <div class="doc-section">
531 <p>MagickSetIteratorIndex() set the iterator to the position in the image list specified with the index parameter.</p></ol>
533 <p>The format of the MagickSetIteratorIndex method is:</p>
536 MagickBooleanType MagickSetIteratorIndex(MagickWand *wand,
540 <p>A description of each parameter follows:</p></ol>
543 <ol><p>the magick wand.</p></ol>
546 <ol><p>the scene number.</p></ol>
549 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
550 _8c.html" target="source" name="MagickSetLastIterator">MagickSetLastIterator</a></h2>
551 <div class="doc-section">
553 <p>MagickSetLastIterator() sets the wand iterator to the last image.</p></ol>
555 <p>The format of the MagickSetLastIterator method is:</p>
558 void MagickSetLastIterator(MagickWand *wand)
561 <p>A description of each parameter follows:</p></ol>
564 <ol><p>the magick wand.</p></ol>
567 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
568 _8c.html" target="source" name="MagickWandGenesis">MagickWandGenesis</a></h2>
569 <div class="doc-section">
571 <p>MagickWandGenesis() initializes the MagickWand environment.</p></ol>
573 <p>The format of the MagickWandGenesis method is:</p>
576 void MagickWandGenesis(void)
580 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
581 _8c.html" target="source" name="MagickWandTerminus">MagickWandTerminus</a></h2>
582 <div class="doc-section">
584 <p>MagickWandTerminus() terminates the MagickWand environment.</p></ol>
586 <p>The format of the MaickWandTerminus method is:</p>
589 void MagickWandTerminus(void)
593 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
594 _8c.html" target="source" name="NewMagickWand">NewMagickWand</a></h2>
595 <div class="doc-section">
597 <p>NewMagickWand() returns a wand required for all other methods in the API.</p></ol>
599 <p>The format of the NewMagickWand method is:</p>
602 MagickWand *NewMagickWand(void)
606 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
607 _8c.html" target="source" name="NewMagickWandFromImage">NewMagickWandFromImage</a></h2>
608 <div class="doc-section">
610 <p>NewMagickWandFromImage() returns a wand with an image.</p></ol>
612 <p>The format of the NewMagickWandFromImage method is:</p>
615 MagickWand *NewMagickWandFromImage(const Image *image)
618 <p>A description of each parameter follows:</p></ol>
621 <ol><p>the image.</p></ol>
628 <!-- <span id="linkbar-west"> </span> -->
\r
629 <span id="linkbar-center">
\r
630 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> •
\r
631 <a href="../../www/mailing-list.html">Mailing Lists</a> •
\r
632 <a href="http://studio.webbyland.com/ImageMagick/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
\r
634 <span id="linkbar-east"> </span>
\r
636 <div class="footer">
\r
637 <span id="footer-west">© 1999-2009 ImageMagick Studio LLC</span>
\r
638 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
\r
640 <div style="clear: both; margin: 0; width: 100%; "></div>
\r