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.allesdruck.de">Druckerei Online</a><!-- 201012001200 allesdruck.de-->
128 <div class="sponsor">
129 <a href="http://www.blumenversender.com">Blumenversand</a><!-- 200911010120 -->
131 <div class="sponsor">
132 <a href="http://www.print24.de/">Druckerei</a><!-- 200911010480 -->
134 <div class="sponsor">
135 <a href="http://www.who-sells-it.com/">Free Catalogs</a><!-- 201002010000 -->
137 <div class="sponsor">
138 <a href="http://www.online-kredit-index.de">Kredit</a><!-- 201001010120 Buchhorn -->
148 <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>
150 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
151 _8c.html" target="source" name="ClearMagickWand">ClearMagickWand</a></h2>
152 <div class="doc-section">
154 <p>ClearMagickWand() clears resources associated with the wand.</p></ol>
156 <p>The format of the ClearMagickWand method is:</p>
159 void ClearMagickWand(MagickWand *wand)
162 <p>A description of each parameter follows:</p></ol>
165 <ol><p>the magick wand.</p></ol>
168 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
169 _8c.html" target="source" name="CloneMagickWand">CloneMagickWand</a></h2>
170 <div class="doc-section">
172 <p>CloneMagickWand() makes an exact copy of the specified wand.</p></ol>
174 <p>The format of the CloneMagickWand method is:</p>
177 MagickWand *CloneMagickWand(const MagickWand *wand)
180 <p>A description of each parameter follows:</p></ol>
183 <ol><p>the magick wand.</p></ol>
186 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
187 _8c.html" target="source" name="DestroyMagickWand">DestroyMagickWand</a></h2>
188 <div class="doc-section">
190 <p>DestroyMagickWand() deallocates memory associated with an MagickWand.</p></ol>
192 <p>The format of the DestroyMagickWand method is:</p>
195 MagickWand *DestroyMagickWand(MagickWand *wand)
198 <p>A description of each parameter follows:</p></ol>
201 <ol><p>the magick wand.</p></ol>
204 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
205 _8c.html" target="source" name="IsMagickWand">IsMagickWand</a></h2>
206 <div class="doc-section">
208 <p>IsMagickWand() returns MagickTrue if the wand is verified as a magick wand.</p></ol>
210 <p>The format of the IsMagickWand method is:</p>
213 MagickBooleanType IsMagickWand(const MagickWand *wand)
216 <p>A description of each parameter follows:</p></ol>
219 <ol><p>the magick wand.</p></ol>
222 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
223 _8c.html" target="source" name="MagickClearException">MagickClearException</a></h2>
224 <div class="doc-section">
226 <p>MagickClearException() clears any exceptions associated with the wand.</p></ol>
228 <p>The format of the MagickClearException method is:</p>
231 MagickBooleanType MagickClearException(MagickWand *wand)
234 <p>A description of each parameter follows:</p></ol>
237 <ol><p>the magick wand.</p></ol>
240 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
241 _8c.html" target="source" name="MagickGetException">MagickGetException</a></h2>
242 <div class="doc-section">
244 <p>MagickGetException() returns the severity, reason, and description of any error that occurs when using other methods in this API.</p></ol>
246 <p>The format of the MagickGetException method is:</p>
249 char *MagickGetException(const MagickWand *wand,ExceptionType *severity)
252 <p>A description of each parameter follows:</p></ol>
255 <ol><p>the magick wand.</p></ol>
258 <ol><p>the severity of the error is returned here.</p></ol>
261 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
262 _8c.html" target="source" name="MagickGetExceptionType">MagickGetExceptionType</a></h2>
263 <div class="doc-section">
265 <p>MagickGetExceptionType() returns the exception type associated with the wand. If no exception has occurred, UndefinedExceptionType is returned.</p></ol>
267 <p>The format of the MagickGetExceptionType method is:</p>
270 ExceptionType MagickGetExceptionType(const MagickWand *wand)
273 <p>A description of each parameter follows:</p></ol>
276 <ol><p>the magick wand.</p></ol>
279 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
280 _8c.html" target="source" name="MagickGetIteratorIndex">MagickGetIteratorIndex</a></h2>
281 <div class="doc-section">
283 <p>MagickGetIteratorIndex() returns the position of the iterator in the image list.</p></ol>
285 <p>The format of the MagickGetIteratorIndex method is:</p>
288 long MagickGetIteratorIndex(MagickWand *wand)
291 <p>A description of each parameter follows:</p></ol>
294 <ol><p>the magick wand.</p></ol>
297 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
298 _8c.html" target="source" name="MagickQueryConfigureOption">MagickQueryConfigureOption</a></h2>
299 <div class="doc-section">
301 <p>MagickQueryConfigureOption() returns the value associated with the specified configure option.</p></ol>
303 <p>The format of the MagickQueryConfigureOption function is:</p>
306 char *MagickQueryConfigureOption(const char *option)
309 <p>A description of each parameter follows:</p></ol>
312 <ol><p>the option name.</p></ol>
315 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
316 _8c.html" target="source" name="MagickQueryConfigureOptions">MagickQueryConfigureOptions</a></h2>
317 <div class="doc-section">
319 <p>MagickQueryConfigureOptions() returns any configure options that match the specified pattern (e.g. "*" for all). Options include NAME, VERSION, LIB_VERSION, etc.</p></ol>
321 <p>The format of the MagickQueryConfigureOptions function is:</p>
324 char **MagickQueryConfigureOptions(const char *pattern,
325 unsigned long *number_options)
328 <p>A description of each parameter follows:</p></ol>
331 <ol><p>Specifies a pointer to a text string containing a pattern.</p></ol>
333 <h5>number_options</h5>
334 <ol><p>Returns the number of configure options in the list.</p></ol>
338 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
339 _8c.html" target="source" name="MagickQueryFontMetrics">MagickQueryFontMetrics</a></h2>
340 <div class="doc-section">
342 <p>MagickQueryFontMetrics() returns a 13 element array representing the following font metrics:</p>
346 -------------------------------------------------
353 6 maximum horizontal advance
362 <p>The format of the MagickQueryFontMetrics method is:</p>
365 double *MagickQueryFontMetrics(MagickWand *wand,
366 const DrawingWand *drawing_wand,const char *text)
369 <p>A description of each parameter follows:</p></ol>
372 <ol><p>the Magick wand.</p></ol>
374 <h5>drawing_wand</h5>
375 <ol><p>the drawing wand.</p></ol>
378 <ol><p>the text.</p></ol>
381 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
382 _8c.html" target="source" name="MagickQueryMultilineFontMetrics">MagickQueryMultilineFontMetrics</a></h2>
383 <div class="doc-section">
385 <p>MagickQueryMultilineFontMetrics() returns a 13 element array representing the following font metrics:</p>
389 -------------------------------------------------
396 6 maximum horizontal advance
405 <p>This method is like MagickQueryFontMetrics() but it returns the maximum text width and height for multiple lines of text.</p></ol>
407 <p>The format of the MagickQueryFontMetrics method is:</p>
410 double *MagickQueryMultilineFontMetrics(MagickWand *wand,
411 const DrawingWand *drawing_wand,const char *text)
414 <p>A description of each parameter follows:</p></ol>
417 <ol><p>the Magick wand.</p></ol>
419 <h5>drawing_wand</h5>
420 <ol><p>the drawing wand.</p></ol>
423 <ol><p>the text.</p></ol>
426 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
427 _8c.html" target="source" name="MagickQueryFonts">MagickQueryFonts</a></h2>
428 <div class="doc-section">
430 <p>MagickQueryFonts() returns any font that match the specified pattern (e.g. "*" for all).</p></ol>
432 <p>The format of the MagickQueryFonts function is:</p>
435 char **MagickQueryFonts(const char *pattern,unsigned long *number_fonts)
438 <p>A description of each parameter follows:</p></ol>
441 <ol><p>Specifies a pointer to a text string containing a pattern.</p></ol>
443 <h5>number_fonts</h5>
444 <ol><p>Returns the number of fonts in the list.</p></ol>
448 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
449 _8c.html" target="source" name="MagickQueryFonts">MagickQueryFonts</a></h2>
450 <div class="doc-section">
452 <p>MagickQueryFonts() returns any image formats that match the specified pattern (e.g. "*" for all).</p></ol>
454 <p>The format of the MagickQueryFonts function is:</p>
457 char **MagickQueryFonts(const char *pattern,
458 unsigned long *number_formats)
461 <p>A description of each parameter follows:</p></ol>
464 <ol><p>Specifies a pointer to a text string containing a pattern.</p></ol>
466 <h5>number_formats</h5>
467 <ol><p>This integer returns the number of image formats in the list.</p></ol>
470 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
471 _8c.html" target="source" name="MagickRelinquishMemory">MagickRelinquishMemory</a></h2>
472 <div class="doc-section">
474 <p>MagickRelinquishMemory() relinquishes memory resources returned by such methods as MagickIdentifyImage(), MagickGetException(), etc.</p></ol>
476 <p>The format of the MagickRelinquishMemory method is:</p>
479 void *MagickRelinquishMemory(void *resource)
482 <p>A description of each parameter follows:</p></ol>
485 <ol><p>Relinquish the memory associated with this resource.</p></ol>
488 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
489 _8c.html" target="source" name="MagickResetIterator">MagickResetIterator</a></h2>
490 <div class="doc-section">
492 <p>MagickResetIterator() resets the wand iterator. Use it in conjunction with MagickNextImage() to iterate over all the images in a wand container.</p></ol>
494 <p>The format of the MagickResetIterator method is:</p>
497 void MagickResetIterator(MagickWand *wand)
500 <p>A description of each parameter follows:</p></ol>
503 <ol><p>the magick wand.</p></ol>
506 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
507 _8c.html" target="source" name="MagickSetFirstIterator">MagickSetFirstIterator</a></h2>
508 <div class="doc-section">
510 <p>MagickSetFirstIterator() sets the wand iterator to the first image.</p></ol>
512 <p>The format of the MagickSetFirstIterator method is:</p>
515 void MagickSetFirstIterator(MagickWand *wand)
518 <p>A description of each parameter follows:</p></ol>
521 <ol><p>the magick wand.</p></ol>
524 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
525 _8c.html" target="source" name="MagickSetIteratorIndex">MagickSetIteratorIndex</a></h2>
526 <div class="doc-section">
528 <p>MagickSetIteratorIndex() set the iterator to the position in the image list specified with the index parameter.</p></ol>
530 <p>The format of the MagickSetIteratorIndex method is:</p>
533 MagickBooleanType MagickSetIteratorIndex(MagickWand *wand,
537 <p>A description of each parameter follows:</p></ol>
540 <ol><p>the magick wand.</p></ol>
543 <ol><p>the scene number.</p></ol>
546 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
547 _8c.html" target="source" name="MagickSetLastIterator">MagickSetLastIterator</a></h2>
548 <div class="doc-section">
550 <p>MagickSetLastIterator() sets the wand iterator to the last image.</p></ol>
552 <p>The format of the MagickSetLastIterator method is:</p>
555 void MagickSetLastIterator(MagickWand *wand)
558 <p>A description of each parameter follows:</p></ol>
561 <ol><p>the magick wand.</p></ol>
564 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
565 _8c.html" target="source" name="MagickWandGenesis">MagickWandGenesis</a></h2>
566 <div class="doc-section">
568 <p>MagickWandGenesis() initializes the MagickWand environment.</p></ol>
570 <p>The format of the MagickWandGenesis method is:</p>
573 void MagickWandGenesis(void)
577 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
578 _8c.html" target="source" name="MagickWandTerminus">MagickWandTerminus</a></h2>
579 <div class="doc-section">
581 <p>MagickWandTerminus() terminates the MagickWand environment.</p></ol>
583 <p>The format of the MaickWandTerminus method is:</p>
586 void MagickWandTerminus(void)
590 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
591 _8c.html" target="source" name="NewMagickWand">NewMagickWand</a></h2>
592 <div class="doc-section">
594 <p>NewMagickWand() returns a wand required for all other methods in the API.</p></ol>
596 <p>The format of the NewMagickWand method is:</p>
599 MagickWand *NewMagickWand(void)
603 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
604 _8c.html" target="source" name="NewMagickWandFromImage">NewMagickWandFromImage</a></h2>
605 <div class="doc-section">
607 <p>NewMagickWandFromImage() returns a wand with an image.</p></ol>
609 <p>The format of the NewMagickWandFromImage method is:</p>
612 MagickWand *NewMagickWandFromImage(const Image *image)
615 <p>A description of each parameter follows:</p></ol>
618 <ol><p>the image.</p></ol>
625 <!-- <span id="linkbar-west"> </span> -->
\r
626 <span id="linkbar-center">
\r
627 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> •
\r
628 <a href="../../www/mailing-list.html">Mailing Lists</a> •
\r
629 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
\r
631 <span id="linkbar-east"> </span>
\r
633 <div class="footer">
\r
634 <span id="footer-west">© 1999-2009 ImageMagick Studio LLC</span>
\r
635 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
\r
637 <div style="clear: both; margin: 0; width: 100%; "></div>
\r