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: Pixel View 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:, pixel, view, methods, 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="#ClonePixelView">ClonePixelView</a> • <a href="#DestroyPixelView">DestroyPixelView</a> • <a href="#DuplexTransferPixelViewIterator">DuplexTransferPixelViewIterator</a> • <a href="#GetPixelViewException">GetPixelViewException</a> • <a href="#GetPixelViewHeight">GetPixelViewHeight</a> • <a href="#GetPixelViewIterator">GetPixelViewIterator</a> • <a href="#GetPixelViewPixels">GetPixelViewPixels</a> • <a href="#GetPixelViewWand">GetPixelViewWand</a> • <a href="#GetPixelViewWidth">GetPixelViewWidth</a> • <a href="#GetPixelViewX">GetPixelViewX</a> • <a href="#GetPixelViewY">GetPixelViewY</a> • <a href="#IsPixelView">IsPixelView</a> • <a href="#NewPixelView">NewPixelView</a> • <a href="#NewPixelViewRegion">NewPixelViewRegion</a> • <a href="#SetPixelViewIterator">SetPixelViewIterator</a> • <a href="#TransferPixelViewIterator">TransferPixelViewIterator</a> • <a href="#UpdatePixelViewIterator">UpdatePixelViewIterator</a>]</p>
160 <h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
161 _8c.html" target="source" name="ClonePixelView">ClonePixelView</a></h2>
162 <div class="doc-section">
164 <p>ClonePixelView() makes a copy of the specified pixel view.</p></ol>
166 <p>The format of the ClonePixelView method is:</p>
169 PixelView *ClonePixelView(const PixelView *pixel_view)
172 <p>A description of each parameter follows:</p></ol>
175 <ol><p>the pixel view.</p></ol>
178 <h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
179 _8c.html" target="source" name="DestroyPixelView">DestroyPixelView</a></h2>
180 <div class="doc-section">
182 <p>DestroyPixelView() deallocates memory associated with a pixel view.</p></ol>
184 <p>The format of the DestroyPixelView method is:</p>
187 PixelView *DestroyPixelView(PixelView *pixel_view,
188 const unsigned long number_wands,const unsigned long number_threads)
191 <p>A description of each parameter follows:</p></ol>
194 <ol><p>the pixel view.</p></ol>
197 <ol><p>the number of pixel wands.</p></ol>
199 <h5>number_threads</h5>
200 <ol><p>number of threads.</p></ol>
203 <h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
204 _8c.html" target="source" name="DuplexTransferPixelViewIterator">DuplexTransferPixelViewIterator</a></h2>
205 <div class="doc-section">
207 <p>DuplexTransferPixelViewIterator() iterates over three pixel views in parallel and calls your transfer method for each scanline of the view. The source and duplex pixel region is not confined to the image canvas-- that is you can include negative offsets or widths or heights that exceed the image dimension. However, the destination pixel view is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension are permitted.</p></ol>
209 <p>Use this pragma:</p>
215 <p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p></ol>
217 <p>The format of the DuplexTransferPixelViewIterator method is:</p>
220 MagickBooleanType DuplexTransferPixelViewIterator(PixelView *source,
221 PixelView *duplex,PixelView *destination,
222 DuplexTransferPixelViewMethod transfer,void *context)
225 <p>A description of each parameter follows:</p></ol>
228 <ol><p>the source pixel view.</p></ol>
231 <ol><p>the duplex pixel view.</p></ol>
234 <ol><p>the destination pixel view.</p></ol>
237 <ol><p>the transfer callback method.</p></ol>
240 <ol><p>the user defined context.</p></ol>
243 <h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
244 _8c.html" target="source" name="GetPixelViewException">GetPixelViewException</a></h2>
245 <div class="doc-section">
247 <p>GetPixelViewException() returns the severity, reason, and description of any error that occurs when utilizing a pixel view.</p></ol>
249 <p>The format of the GetPixelViewException method is:</p>
252 char *GetPixelViewException(const PixelWand *pixel_view,
253 ExceptionType *severity)
256 <p>A description of each parameter follows:</p></ol>
259 <ol><p>the pixel pixel_view.</p></ol>
262 <ol><p>the severity of the error is returned here.</p></ol>
265 <h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
266 _8c.html" target="source" name="GetPixelViewHeight">GetPixelViewHeight</a></h2>
267 <div class="doc-section">
269 <p>GetPixelViewHeight() returns the pixel view height.</p></ol>
271 <p>The format of the GetPixelViewHeight method is:</p>
274 unsigned long GetPixelViewHeight(const PixelView *pixel_view)
277 <p>A description of each parameter follows:</p></ol>
280 <ol><p>the pixel view.</p></ol>
283 <h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
284 _8c.html" target="source" name="GetPixelViewIterator">GetPixelViewIterator</a></h2>
285 <div class="doc-section">
287 <p>GetPixelViewIterator() iterates over the pixel view in parallel and calls your get method for each scanline of the view. The pixel region is not confined to the image canvas-- that is you can include negative offsets or widths or heights that exceed the image dimension. Any updates to the pixels in your callback are ignored.</p></ol>
289 <p>Use this pragma:</p>
295 <p>to define a section of code in your callback get method that must be executed by a single thread at a time.</p></ol>
297 <p>The format of the GetPixelViewIterator method is:</p>
300 MagickBooleanType GetPixelViewIterator(PixelView *source,
301 GetPixelViewMethod get,void *context)
304 <p>A description of each parameter follows:</p></ol>
307 <ol><p>the source pixel view.</p></ol>
310 <ol><p>the get callback method.</p></ol>
313 <ol><p>the user defined context.</p></ol>
316 <h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
317 _8c.html" target="source" name="GetPixelViewPixels">GetPixelViewPixels</a></h2>
318 <div class="doc-section">
320 <p>GetPixelViewPixels() returns the pixel view pixel_wands.</p></ol>
322 <p>The format of the GetPixelViewPixels method is:</p>
325 PixelWand *GetPixelViewPixels(const PixelView *pixel_view)
328 <p>A description of each parameter follows:</p></ol>
331 <ol><p>the pixel view.</p></ol>
334 <h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
335 _8c.html" target="source" name="GetPixelViewWand">GetPixelViewWand</a></h2>
336 <div class="doc-section">
338 <p>GetPixelViewWand() returns the magick wand associated with the pixel view.</p></ol>
340 <p>The format of the GetPixelViewWand method is:</p>
343 MagickWand *GetPixelViewWand(const PixelView *pixel_view)
346 <p>A description of each parameter follows:</p></ol>
349 <ol><p>the pixel view.</p></ol>
352 <h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
353 _8c.html" target="source" name="GetPixelViewWidth">GetPixelViewWidth</a></h2>
354 <div class="doc-section">
356 <p>GetPixelViewWidth() returns the pixel view width.</p></ol>
358 <p>The format of the GetPixelViewWidth method is:</p>
361 unsigned long GetPixelViewWidth(const PixelView *pixel_view)
364 <p>A description of each parameter follows:</p></ol>
367 <ol><p>the pixel view.</p></ol>
370 <h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
371 _8c.html" target="source" name="GetPixelViewX">GetPixelViewX</a></h2>
372 <div class="doc-section">
374 <p>GetPixelViewX() returns the pixel view x offset.</p></ol>
376 <p>The format of the GetPixelViewX method is:</p>
379 long GetPixelViewX(const PixelView *pixel_view)
382 <p>A description of each parameter follows:</p></ol>
385 <ol><p>the pixel view.</p></ol>
388 <h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
389 _8c.html" target="source" name="GetPixelViewY">GetPixelViewY</a></h2>
390 <div class="doc-section">
392 <p>GetPixelViewY() returns the pixel view y offset.</p></ol>
394 <p>The format of the GetPixelViewY method is:</p>
397 long GetPixelViewY(const PixelView *pixel_view)
400 <p>A description of each parameter follows:</p></ol>
403 <ol><p>the pixel view.</p></ol>
406 <h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
407 _8c.html" target="source" name="IsPixelView">IsPixelView</a></h2>
408 <div class="doc-section">
410 <p>IsPixelView() returns MagickTrue if the the parameter is verified as a pixel view container.</p></ol>
412 <p>The format of the IsPixelView method is:</p>
415 MagickBooleanType IsPixelView(const PixelView *pixel_view)
418 <p>A description of each parameter follows:</p></ol>
421 <ol><p>the pixel view.</p></ol>
424 <h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
425 _8c.html" target="source" name="NewPixelView">NewPixelView</a></h2>
426 <div class="doc-section">
428 <p>NewPixelView() returns a pixel view required for all other methods in the Pixel View API.</p></ol>
430 <p>The format of the NewPixelView method is:</p>
433 PixelView *NewPixelView(MagickWand *wand)
436 <p>A description of each parameter follows:</p></ol>
439 <ol><p>the wand.</p></ol>
442 <h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
443 _8c.html" target="source" name="NewPixelViewRegion">NewPixelViewRegion</a></h2>
444 <div class="doc-section">
446 <p>NewPixelViewRegion() returns a pixel view required for all other methods in the Pixel View API.</p></ol>
448 <p>The format of the NewPixelViewRegion method is:</p>
451 PixelView *NewPixelViewRegion(MagickWand *wand,const long x,
452 const long y,const unsigned long width,const unsigned long height)
455 <p>A description of each parameter follows:</p></ol>
458 <ol><p>the magick wand.</p></ol>
460 <h5>x,y,columns,rows</h5>
461 <ol><p>These values define the perimeter of a region of pixel_wands view.</p></ol>
464 <h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
465 _8c.html" target="source" name="SetPixelViewIterator">SetPixelViewIterator</a></h2>
466 <div class="doc-section">
468 <p>SetPixelViewIterator() iterates over the pixel view in parallel and calls your set method for each scanline of the view. The pixel region is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension. The pixels are initiallly undefined and any settings you make in the callback method are automagically synced back to your image.</p></ol>
470 <p>Use this pragma:</p>
476 <p>to define a section of code in your callback set method that must be executed by a single thread at a time.</p></ol>
478 <p>The format of the SetPixelViewIterator method is:</p>
481 MagickBooleanType SetPixelViewIterator(PixelView *destination,
482 SetPixelViewMethod set,void *context)
485 <p>A description of each parameter follows:</p></ol>
488 <ol><p>the pixel view.</p></ol>
491 <ol><p>the set callback method.</p></ol>
494 <ol><p>the user defined context.</p></ol>
497 <h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
498 _8c.html" target="source" name="TransferPixelViewIterator">TransferPixelViewIterator</a></h2>
499 <div class="doc-section">
501 <p>TransferPixelViewIterator() iterates over two pixel views in parallel and calls your transfer method for each scanline of the view. The source pixel region is not confined to the image canvas-- that is you can include negative offsets or widths or heights that exceed the image dimension. However, the destination pixel view is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension are permitted.</p></ol>
503 <p>Use this pragma:</p>
509 <p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p></ol>
511 <p>The format of the TransferPixelViewIterator method is:</p>
514 MagickBooleanType TransferPixelViewIterator(PixelView *source,
515 PixelView *destination,TransferPixelViewMethod transfer,void *context)
518 <p>A description of each parameter follows:</p></ol>
521 <ol><p>the source pixel view.</p></ol>
524 <ol><p>the destination pixel view.</p></ol>
527 <ol><p>the transfer callback method.</p></ol>
530 <ol><p>the user defined context.</p></ol>
533 <h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
534 _8c.html" target="source" name="UpdatePixelViewIterator">UpdatePixelViewIterator</a></h2>
535 <div class="doc-section">
537 <p>UpdatePixelViewIterator() iterates over the pixel view in parallel and calls your update method for each scanline of the view. The pixel region is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension are permitted. Updates to pixels in your callback are automagically synced back to the image.</p></ol>
539 <p>Use this pragma:</p>
545 <p>to define a section of code in your callback update method that must be executed by a single thread at a time.</p></ol>
547 <p>The format of the UpdatePixelViewIterator method is:</p>
550 MagickBooleanType UpdatePixelViewIterator(PixelView *source,
551 UpdatePixelViewMethod update,void *context)
554 <p>A description of each parameter follows:</p></ol>
557 <ol><p>the source pixel view.</p></ol>
560 <ol><p>the update callback method.</p></ol>
563 <ol><p>the user defined context.</p></ol>
570 <!-- <span id="linkbar-west"> </span> -->
\r
571 <span id="linkbar-center">
\r
572 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> •
\r
573 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
\r
575 <span id="linkbar-east"> </span>
\r
577 <div class="footer">
\r
578 <span id="footer-west">© 1999-2010 ImageMagick Studio LLC</span>
\r
579 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
\r
581 <div style="clear: both; margin: 0; width: 100%; "></div>
\r