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 http-equiv="Content-Type" value="application/xhtml+xml" />
\r
6 <meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U=" />
\r
7 <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf" />
\r
8 <style type="text/css" media="screen,projection"><!--
\r
9 @import url("../../www/magick.css");
\r
11 <link rel="shortcut icon" href="../../images/wand.ico" type="images/vnd.microsoft.icon"/>
12 <title>ImageMagick: MagickWand, C API for ImageMagick: Wand Methods</title>
13 <meta http-equiv="Content-Language" content="en-US"/>
14 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
15 <meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/>
16 <meta name="Generator" content="PHP"/>
17 <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"/>
18 <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."/>
19 <meta name="Rating" content="GENERAL"/>
20 <meta name="Robots" content="INDEX, FOLLOW"/>
21 <meta name="Generator" content="ImageMagick Studio LLC"/>
22 <meta name="Author" content="ImageMagick Studio LLC"/>
23 <meta name="Revisit-after" content="2 DAYS"/>
24 <meta name="Resource-type" content="document"/>
25 <meta name="Copyright" content="Copyright (c) 1999-2010 ImageMagick Studio LLC"/>
26 <meta name="Distribution" content="Global"/>
29 <body id="www-imagemagick-org">
\r
30 <div class="titlebar">
\r
31 <a href="../../index.html">
\r
32 <img src="../../images/script.png" alt="[ImageMagick]"
\r
33 style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>
\r
34 <a href="http://www.networkredux.com">
\r
35 <img src="../../images/networkredux.png" alt="[sponsor]"
\r
36 style="margin: 45px auto; border: 0px; float: left;" /></a>
\r
37 <a href="http://www.imagemagick.org/discourse-server/">
\r
38 <img src="../../images/logo.jpg" alt=""
\r
39 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
\r
40 <a href="../../index.html">
\r
41 <img src="../../images/sprite.jpg" alt=""
\r
42 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
\r
45 <div class="eastbar">
\r
48 <a href="../../index.html">About ImageMagick</a>
50 <div class="sep"></div>
\r
52 <a href="../../www/command-line-tools.html">Command-line Tools</a>
55 <a href="../../www/command-line-processing.html">Processing</a>
58 <a href="../../www/command-line-options.html">Options</a>
61 <a href="http://www.imagemagick.org/Usage/">Usage</a>
64 <a href="../../www/api.html">Program Interfaces</a>
67 <a href="../../www/magick-wand.html">MagickWand</a>
70 <a href="../../www/magick-core.html">MagickCore</a>
73 <a href="../../www/perl-magick.html">PerlMagick</a>
76 <a href="../../Magick++/">Magick++</a>
79 <a href="../../www/architecture.html">Architecture</a>
81 <div class="sep"></div>
\r
83 <a href="../../www/install-source.html">Install from Source</a>
86 <a href="../../www/install-source.html#unix">Unix</a>
89 <a href="../../www/install-source.html#windows">Windows</a>
92 <a href="../../www/binary-releases.html">Binary Releases</a>
95 <a href="../../www/binary-releases.html#unix">Unix</a>
98 <a href="../../www/binary-releases.html#macosx">Mac OS X</a>
101 <a href="../../www/binary-releases.html#windows">Windows</a>
104 <a href="../../www/resources.html">Resources</a>
106 <div class="sep"></div>
\r
108 <a href="../../www/download.html">Download</a>
110 <div class="sep"></div>
\r
112 <a href="../http://www.imagemagick.org/script/search.php">Search</a>
114 <div class="sep"></div>
\r
116 <a href="../../www/sitemap.html">Site Map</a>
119 <a href="../../www/links.html">Links</a>
121 <div class="sep"></div>
\r
123 <a href="../../www/sponsors.html">Sponsors:</a>
125 <div class="sponsbox">
126 <div class="sponsor">
127 <a href="http://www.abi-stoff.de/abizeitung/" title="Abibuch">Abizeitung</a><!-- 20101101000200 -->
129 <div class="sponsor">
130 <a href="http://www.tomsgutscheine.de">Tom's Gutscheine</a><!-- 201005010360 invendio.de-->
132 <div class="sponsor">
133 <a href="http://www.online-kredit-index.de">Kredit</a><!-- 201007010120 Buchhorn -->
135 <div class="sponsor">
136 <a href="http://www.blumenversender.com">Blumenversand</a><!-- 201005010120 -->
138 <div class="sponsor">
139 <a href="http://www.print24.de/">Druckerei</a><!-- 201009010720 -->
141 <div class="sponsor">
142 <a href="http://www.goyax.de">Börse</a><!-- 201004010240 Gewiese digital-finance.de -->
144 <div class="sponsor">
145 <a href="http://www.allesdruck.de">Druckerei Online</a><!-- 201012011200 allesdruck.de-->
147 <div class="sponsor">
148 <a href="http://www.who-sells-it.com/">Free Catalogs</a><!-- 201002010000 -->
158 <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>
160 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
161 _8c.html" target="source" name="ClearMagickWand">ClearMagickWand</a></h2>
162 <div class="doc-section">
164 <p>ClearMagickWand() clears resources associated with the wand.</p></ol>
166 <p>The format of the ClearMagickWand method is:</p>
169 void ClearMagickWand(MagickWand *wand)
172 <p>A description of each parameter follows:</p></ol>
175 <ol><p>the magick wand.</p></ol>
178 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
179 _8c.html" target="source" name="CloneMagickWand">CloneMagickWand</a></h2>
180 <div class="doc-section">
182 <p>CloneMagickWand() makes an exact copy of the specified wand.</p></ol>
184 <p>The format of the CloneMagickWand method is:</p>
187 MagickWand *CloneMagickWand(const MagickWand *wand)
190 <p>A description of each parameter follows:</p></ol>
193 <ol><p>the magick wand.</p></ol>
196 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
197 _8c.html" target="source" name="DestroyMagickWand">DestroyMagickWand</a></h2>
198 <div class="doc-section">
200 <p>DestroyMagickWand() deallocates memory associated with an MagickWand.</p></ol>
202 <p>The format of the DestroyMagickWand method is:</p>
205 MagickWand *DestroyMagickWand(MagickWand *wand)
208 <p>A description of each parameter follows:</p></ol>
211 <ol><p>the magick wand.</p></ol>
214 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
215 _8c.html" target="source" name="IsMagickWand">IsMagickWand</a></h2>
216 <div class="doc-section">
218 <p>IsMagickWand() returns MagickTrue if the wand is verified as a magick wand.</p></ol>
220 <p>The format of the IsMagickWand method is:</p>
223 MagickBooleanType IsMagickWand(const MagickWand *wand)
226 <p>A description of each parameter follows:</p></ol>
229 <ol><p>the magick wand.</p></ol>
232 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
233 _8c.html" target="source" name="MagickClearException">MagickClearException</a></h2>
234 <div class="doc-section">
236 <p>MagickClearException() clears any exceptions associated with the wand.</p></ol>
238 <p>The format of the MagickClearException method is:</p>
241 MagickBooleanType MagickClearException(MagickWand *wand)
244 <p>A description of each parameter follows:</p></ol>
247 <ol><p>the magick wand.</p></ol>
250 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
251 _8c.html" target="source" name="MagickGetException">MagickGetException</a></h2>
252 <div class="doc-section">
254 <p>MagickGetException() returns the severity, reason, and description of any error that occurs when using other methods in this API.</p></ol>
256 <p>The format of the MagickGetException method is:</p>
259 char *MagickGetException(const MagickWand *wand,ExceptionType *severity)
262 <p>A description of each parameter follows:</p></ol>
265 <ol><p>the magick wand.</p></ol>
268 <ol><p>the severity of the error is returned here.</p></ol>
271 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
272 _8c.html" target="source" name="MagickGetExceptionType">MagickGetExceptionType</a></h2>
273 <div class="doc-section">
275 <p>MagickGetExceptionType() returns the exception type associated with the wand. If no exception has occurred, UndefinedExceptionType is returned.</p></ol>
277 <p>The format of the MagickGetExceptionType method is:</p>
280 ExceptionType MagickGetExceptionType(const MagickWand *wand)
283 <p>A description of each parameter follows:</p></ol>
286 <ol><p>the magick wand.</p></ol>
289 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
290 _8c.html" target="source" name="MagickGetIteratorIndex">MagickGetIteratorIndex</a></h2>
291 <div class="doc-section">
293 <p>MagickGetIteratorIndex() returns the position of the iterator in the image list.</p></ol>
295 <p>The format of the MagickGetIteratorIndex method is:</p>
298 long MagickGetIteratorIndex(MagickWand *wand)
301 <p>A description of each parameter follows:</p></ol>
304 <ol><p>the magick wand.</p></ol>
307 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
308 _8c.html" target="source" name="MagickQueryConfigureOption">MagickQueryConfigureOption</a></h2>
309 <div class="doc-section">
311 <p>MagickQueryConfigureOption() returns the value associated with the specified configure option.</p></ol>
313 <p>The format of the MagickQueryConfigureOption function is:</p>
316 char *MagickQueryConfigureOption(const char *option)
319 <p>A description of each parameter follows:</p></ol>
322 <ol><p>the option name.</p></ol>
325 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
326 _8c.html" target="source" name="MagickQueryConfigureOptions">MagickQueryConfigureOptions</a></h2>
327 <div class="doc-section">
329 <p>MagickQueryConfigureOptions() returns any configure options that match the specified pattern (e.g. "*" for all). Options include NAME, VERSION, LIB_VERSION, etc.</p></ol>
331 <p>The format of the MagickQueryConfigureOptions function is:</p>
334 char **MagickQueryConfigureOptions(const char *pattern,
335 unsigned long *number_options)
338 <p>A description of each parameter follows:</p></ol>
341 <ol><p>Specifies a pointer to a text string containing a pattern.</p></ol>
343 <h5>number_options</h5>
344 <ol><p>Returns the number of configure options in the list.</p></ol>
348 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
349 _8c.html" target="source" name="MagickQueryFontMetrics">MagickQueryFontMetrics</a></h2>
350 <div class="doc-section">
352 <p>MagickQueryFontMetrics() returns a 13 element array representing the following font metrics:</p>
356 -------------------------------------------------
363 6 maximum horizontal advance
372 <p>The format of the MagickQueryFontMetrics method is:</p>
375 double *MagickQueryFontMetrics(MagickWand *wand,
376 const DrawingWand *drawing_wand,const char *text)
379 <p>A description of each parameter follows:</p></ol>
382 <ol><p>the Magick wand.</p></ol>
384 <h5>drawing_wand</h5>
385 <ol><p>the drawing wand.</p></ol>
388 <ol><p>the text.</p></ol>
391 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
392 _8c.html" target="source" name="MagickQueryMultilineFontMetrics">MagickQueryMultilineFontMetrics</a></h2>
393 <div class="doc-section">
395 <p>MagickQueryMultilineFontMetrics() returns a 13 element array representing the following font metrics:</p>
399 -------------------------------------------------
406 6 maximum horizontal advance
415 <p>This method is like MagickQueryFontMetrics() but it returns the maximum text width and height for multiple lines of text.</p></ol>
417 <p>The format of the MagickQueryFontMetrics method is:</p>
420 double *MagickQueryMultilineFontMetrics(MagickWand *wand,
421 const DrawingWand *drawing_wand,const char *text)
424 <p>A description of each parameter follows:</p></ol>
427 <ol><p>the Magick wand.</p></ol>
429 <h5>drawing_wand</h5>
430 <ol><p>the drawing wand.</p></ol>
433 <ol><p>the text.</p></ol>
436 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
437 _8c.html" target="source" name="MagickQueryFonts">MagickQueryFonts</a></h2>
438 <div class="doc-section">
440 <p>MagickQueryFonts() returns any font that match the specified pattern (e.g. "*" for all).</p></ol>
442 <p>The format of the MagickQueryFonts function is:</p>
445 char **MagickQueryFonts(const char *pattern,unsigned long *number_fonts)
448 <p>A description of each parameter follows:</p></ol>
451 <ol><p>Specifies a pointer to a text string containing a pattern.</p></ol>
453 <h5>number_fonts</h5>
454 <ol><p>Returns the number of fonts in the list.</p></ol>
458 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
459 _8c.html" target="source" name="MagickQueryFonts">MagickQueryFonts</a></h2>
460 <div class="doc-section">
462 <p>MagickQueryFonts() returns any image formats that match the specified pattern (e.g. "*" for all).</p></ol>
464 <p>The format of the MagickQueryFonts function is:</p>
467 char **MagickQueryFonts(const char *pattern,
468 unsigned long *number_formats)
471 <p>A description of each parameter follows:</p></ol>
474 <ol><p>Specifies a pointer to a text string containing a pattern.</p></ol>
476 <h5>number_formats</h5>
477 <ol><p>This integer returns the number of image formats in the list.</p></ol>
480 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
481 _8c.html" target="source" name="MagickRelinquishMemory">MagickRelinquishMemory</a></h2>
482 <div class="doc-section">
484 <p>MagickRelinquishMemory() relinquishes memory resources returned by such methods as MagickIdentifyImage(), MagickGetException(), etc.</p></ol>
486 <p>The format of the MagickRelinquishMemory method is:</p>
489 void *MagickRelinquishMemory(void *resource)
492 <p>A description of each parameter follows:</p></ol>
495 <ol><p>Relinquish the memory associated with this resource.</p></ol>
498 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
499 _8c.html" target="source" name="MagickResetIterator">MagickResetIterator</a></h2>
500 <div class="doc-section">
502 <p>MagickResetIterator() resets the wand iterator. Use it in conjunction with MagickNextImage() to iterate over all the images in a wand container.</p></ol>
504 <p>The format of the MagickResetIterator method is:</p>
507 void MagickResetIterator(MagickWand *wand)
510 <p>A description of each parameter follows:</p></ol>
513 <ol><p>the magick wand.</p></ol>
516 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
517 _8c.html" target="source" name="MagickSetFirstIterator">MagickSetFirstIterator</a></h2>
518 <div class="doc-section">
520 <p>MagickSetFirstIterator() sets the wand iterator to the first image.</p></ol>
522 <p>The format of the MagickSetFirstIterator method is:</p>
525 void MagickSetFirstIterator(MagickWand *wand)
528 <p>A description of each parameter follows:</p></ol>
531 <ol><p>the magick wand.</p></ol>
534 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
535 _8c.html" target="source" name="MagickSetIteratorIndex">MagickSetIteratorIndex</a></h2>
536 <div class="doc-section">
538 <p>MagickSetIteratorIndex() set the iterator to the position in the image list specified with the index parameter.</p></ol>
540 <p>The format of the MagickSetIteratorIndex method is:</p>
543 MagickBooleanType MagickSetIteratorIndex(MagickWand *wand,
547 <p>A description of each parameter follows:</p></ol>
550 <ol><p>the magick wand.</p></ol>
553 <ol><p>the scene number.</p></ol>
556 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
557 _8c.html" target="source" name="MagickSetLastIterator">MagickSetLastIterator</a></h2>
558 <div class="doc-section">
560 <p>MagickSetLastIterator() sets the wand iterator to the last image.</p></ol>
562 <p>The format of the MagickSetLastIterator method is:</p>
565 void MagickSetLastIterator(MagickWand *wand)
568 <p>A description of each parameter follows:</p></ol>
571 <ol><p>the magick wand.</p></ol>
574 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
575 _8c.html" target="source" name="MagickWandGenesis">MagickWandGenesis</a></h2>
576 <div class="doc-section">
578 <p>MagickWandGenesis() initializes the MagickWand environment.</p></ol>
580 <p>The format of the MagickWandGenesis method is:</p>
583 void MagickWandGenesis(void)
587 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
588 _8c.html" target="source" name="MagickWandTerminus">MagickWandTerminus</a></h2>
589 <div class="doc-section">
591 <p>MagickWandTerminus() terminates the MagickWand environment.</p></ol>
593 <p>The format of the MaickWandTerminus method is:</p>
596 void MagickWandTerminus(void)
600 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
601 _8c.html" target="source" name="NewMagickWand">NewMagickWand</a></h2>
602 <div class="doc-section">
604 <p>NewMagickWand() returns a wand required for all other methods in the API.</p></ol>
606 <p>The format of the NewMagickWand method is:</p>
609 MagickWand *NewMagickWand(void)
613 <h2><a href="http://www.imagemagick.org/api/MagickWand/magick-wand
614 _8c.html" target="source" name="NewMagickWandFromImage">NewMagickWandFromImage</a></h2>
615 <div class="doc-section">
617 <p>NewMagickWandFromImage() returns a wand with an image.</p></ol>
619 <p>The format of the NewMagickWandFromImage method is:</p>
622 MagickWand *NewMagickWandFromImage(const Image *image)
625 <p>A description of each parameter follows:</p></ol>
628 <ol><p>the image.</p></ol>
635 <!-- <span id="linkbar-west"> </span> -->
\r
636 <span id="linkbar-center">
\r
637 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> •
\r
638 <a href="http://studio.webbyland.com/ImageMagick/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
\r
640 <span id="linkbar-east"> </span>
\r
642 <div class="footer">
\r
643 <span id="footer-west">© 1999-2010 ImageMagick Studio LLC</span>
\r
644 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
\r
646 <div style="clear: both; margin: 0; width: 100%; "></div>
\r