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" dir="ltr">
\r
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
\r
6 <meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U="/>
\r
7 <title>ImageMagick: MagickCore, C API for ImageMagick: Image View Methods</title>
8 <meta http-equiv="Content-Language" content="en-US"/>
9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
10 <meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/>
11 <meta name="Application-name" content="ImageMagick"/>
12 <meta name="Description" content="ImageMagick is a software suite to create, edit, or compose bitmap images in a variety of formats. Use ImageMagick to scale, rotate, shear, distort and transform images."/>
13 <meta name="Application-url" content="http://www.imagemagick.org"/>
14 <meta name="Generator" content="PHP"/>
15 <meta name="Keywords" content="magickcore, c, api, for, imagemagick:, image, view, methods, ImageMagick, ImageMagic, MagickCore, MagickWand, PerlMagick, Magick++, RMagick, PythonMagick, JMagick, TclMagick, Image, Magick, Magic, Wand, ImageMagickObject, Swiss, Army, Knife, Image, Processing"/>
16 <meta name="Rating" content="GENERAL"/>
17 <meta name="Robots" content="INDEX, FOLLOW"/>
18 <meta name="Generator" content="ImageMagick Studio LLC"/>
19 <meta name="Author" content="ImageMagick Studio LLC"/>
20 <meta name="Revisit-after" content="2 DAYS"/>
21 <meta name="Resource-type" content="document"/>
22 <meta name="Copyright" content="Copyright (c) 1999-2011 ImageMagick Studio LLC"/>
23 <meta name="Distribution" content="Global"/>
24 <link rel="icon" href="../../images/wand.png" sizes="32x32"/>
25 <link rel="shortcut icon" href="../../images/wand.ico" type="images/x-icon"/>
26 <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"/>
\r
27 <style type="text/css" media="all">
\r
28 @import url("../../www/magick.css");
\r
32 <body id="www-imagemagick-org">
\r
33 <div class="titlebar">
\r
34 <a href="../../index.html">
\r
35 <img src="../../images/script.png" alt="[ImageMagick]"
\r
36 style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>
\r
37 <a href="http://www.networkredux.com">
\r
38 <img src="../../images/networkredux.png" alt="[sponsor]"
\r
39 style="margin: 45px auto; border: 0px; float: left;" /></a>
\r
40 <a href="http://www.imagemagick.org/discourse-server/">
\r
41 <img src="../../images/logo.jpg" alt=""
\r
42 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
\r
43 <a href="../../index.html">
\r
44 <img src="../../images/sprite.jpg" alt=""
\r
45 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
\r
48 <div class="westbar">
\r
51 <a title="About ImageMagick" href="../../index.html">About ImageMagick</a>
53 <div class="sep"></div>
\r
55 <a title="Binary Releases" href="../../www/binary-releases.html">Binary Releases</a>
58 <a title="Binary Release: Unix" href="../../www/binary-releases.html#unix">Unix</a>
61 <a title="Binary Release: MacOS X" href="../../www/binary-releases.html#macosx">Mac OS X</a>
64 <a title="Binary Release: Windows" href="../../www/binary-releases.html#windows">Windows</a>
66 <div class="sep"></div>
\r
68 <a title="Command-line Tools" href="../../www/command-line-tools.html">Command-line Tools</a>
71 <a title="Command-line Tools: Processing" href="../../www/command-line-processing.html">Processing</a>
74 <a title="Command-line Tools: Options" href="../../www/command-line-options.html">Options</a>
77 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
80 <a title="Program Interfaces" href="../../www/api.html">Program Interfaces</a>
83 <a title="Program Interface: MagickWand" href="../../www/magick-wand.html">MagickWand</a>
86 <a title="Program Interface: MagickCore" href="../../www/magick-core.html">MagickCore</a>
89 <a title="Program Interface: PerlMagick" href="../../www/perl-magick.html">PerlMagick</a>
92 <a title="Program Interface: Magick++" href="../../Magick++/">Magick++</a>
94 <div class="sep"></div>
\r
96 <a title="Install from Source" href="../../www/install-source.html">Install from Source</a>
99 <a title="Install from Source: Unix" href="../../www/install-source.html#unix">Unix</a>
102 <a title="Install from Source: Windows" href="../../www/install-source.html#windows">Windows</a>
105 <a title="Resources" href="../../www/resources.html">Resources</a>
108 <a title="Architecture" href="../../www/architecture.html">Architecture</a>
111 <a title="Download" href="../../www/download.html">Download</a>
113 <div class="sep"></div>
\r
115 <a title="Search" href="../http://www.imagemagick.org/script/search.php">Search</a>
117 <div class="sep"></div>
\r
119 <a title="Site Map" href="../../www/sitemap.html">Site Map</a>
122 <a title="Site Map: Links" href="../../www/links.html">Links</a>
124 <div class="sep"></div>
\r
126 <a title="Sponsors" href="../../www/sponsors.html">Sponsors:</a>
128 <div class="sponsbox">
129 <div class="sponsor">
130 <a title="Sponsor: Notebook Reparatur Berlin" href="http://www.notebook-reparaturen-berlin.de">Notebook Reparatur Berlin</a><!-- 2011040100025 gabi.schulze-->
132 <div class="sponsor">
133 <a title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
135 <div class="sponsor">
136 <a title="Sponsor: Image Converter" href="http://www.batchphoto.com">Image Converter</a><!-- 201103010900 Bits Coffee-->
138 <div class="sponsor">
139 <a title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
141 <div class="sponsor">
142 <a title="Sponsor: Webdesign Agentur" href="http://www.ventzke-partner.de">Webdesign Agentur</a><!-- 201101010480 invendio.de-->
144 <div class="sponsor">
145 <a title="Sponsor: LVM Versicherung" href="http://www.neu-reich.de">LVM Versicherung</a><!-- 201101010480 -->
147 <div class="sponsor">
148 <a title="Sponsor: Diamonds are a Girls Best Friend" href="http://www.schmuck.org">Diamonds are a Girls Best Friend</a><!-- 201101010600 Peterssen-->
154 <div class="eastbar">
\r
155 <script type="text/javascript">
\r
157 google_ad_client = "pub-3129977114552745";
\r
158 google_ad_slot = "0574824969";
\r
159 google_ad_width = 160;
\r
160 google_ad_height = 600;
\r
163 <script type="text/javascript"
\r
164 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
\r
170 <h1>Module image-view
172 <p class="navigation-index">[<a href="#CloneImageView">CloneImageView</a> • <a href="#DestroyImageView">DestroyImageView</a> • <a href="#DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a> • <a href="#GetImageViewAuthenticIndexes">GetImageViewAuthenticIndexes</a> • <a href="#GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a> • <a href="#GetImageViewException">GetImageViewException</a> • <a href="#GetImageViewExtent">GetImageViewExtent</a> • <a href="#GetImageViewImage">GetImageViewImage</a> • <a href="#GetImageViewIterator">GetImageViewIterator</a> • <a href="#GetImageViewVirtualIndexes">GetImageViewVirtualIndexes</a> • <a href="#GetImageViewVirtualPixels">GetImageViewVirtualPixels</a> • <a href="#IsImageView">IsImageView</a> • <a href="#NewImageView">NewImageView</a> • <a href="#NewImageViewRegion">NewImageViewRegion</a> • <a href="#SetImageViewDescription">SetImageViewDescription</a> • <a href="#SetImageViewIterator">SetImageViewIterator</a> • <a href="#SetImageViewThreads">SetImageViewThreads</a> • <a href="#TransferImageViewIterator">TransferImageViewIterator</a> • <a href="#UpdateImageViewIterator">UpdateImageViewIterator</a>]</p>
174 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
175 _8c.html" target="source" name="CloneImageView">CloneImageView</a></h2>
176 <div class="doc-section">
178 <p>CloneImageView() makes a copy of the specified image view.</p></ol>
180 <p>The format of the CloneImageView method is:</p>
183 ImageView *CloneImageView(const ImageView *image_view)
186 <p>A description of each parameter follows:</p></ol>
189 <ol><p>the image view.</p></ol>
192 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
193 _8c.html" target="source" name="DestroyImageView">DestroyImageView</a></h2>
194 <div class="doc-section">
196 <p>DestroyImageView() deallocates memory associated with a image view.</p></ol>
198 <p>The format of the DestroyImageView method is:</p>
201 ImageView *DestroyImageView(ImageView *image_view)
204 <p>A description of each parameter follows:</p></ol>
207 <ol><p>the image view.</p></ol>
210 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
211 _8c.html" target="source" name="DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a></h2>
212 <div class="doc-section">
214 <p>DuplexTransferImageViewIterator() iterates over three image views in parallel and calls your transfer method for each scanline of the view. The source and duplex pixel extent 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 image 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>
216 <p>The callback signature is:</p>
219 MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source,
220 const ImageView *duplex,ImageView *destination,const ssize_t y,
221 const int thread_id,void *context)
224 <p>Use this pragma if the view is not single threaded:</p>
230 <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>
232 <p>The format of the DuplexTransferImageViewIterator method is:</p>
235 MagickBooleanType DuplexTransferImageViewIterator(ImageView *source,
236 ImageView *duplex,ImageView *destination,
237 DuplexTransferImageViewMethod transfer,void *context)
240 <p>A description of each parameter follows:</p></ol>
243 <ol><p>the source image view.</p></ol>
246 <ol><p>the duplex image view.</p></ol>
249 <ol><p>the destination image view.</p></ol>
252 <ol><p>the transfer callback method.</p></ol>
255 <ol><p>the user defined context.</p></ol>
258 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
259 _8c.html" target="source" name="GetImageViewAuthenticIndexes">GetImageViewAuthenticIndexes</a></h2>
260 <div class="doc-section">
262 <p>GetImageViewAuthenticIndexes() returns the image view authentic indexes.</p></ol>
264 <p>The format of the GetImageViewAuthenticPixels method is:</p>
267 IndexPacket *GetImageViewAuthenticIndexes(const ImageView *image_view)
270 <p>A description of each parameter follows:</p></ol>
273 <ol><p>the image view.</p></ol>
276 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
277 _8c.html" target="source" name="GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a></h2>
278 <div class="doc-section">
280 <p>GetImageViewAuthenticPixels() returns the image view authentic pixels.</p></ol>
282 <p>The format of the GetImageViewAuthenticPixels method is:</p>
285 PixelPacket *GetImageViewAuthenticPixels(const ImageView *image_view)
288 <p>A description of each parameter follows:</p></ol>
291 <ol><p>the image view.</p></ol>
294 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
295 _8c.html" target="source" name="GetImageViewException">GetImageViewException</a></h2>
296 <div class="doc-section">
298 <p>GetImageViewException() returns the severity, reason, and description of any error that occurs when utilizing a image view.</p></ol>
300 <p>The format of the GetImageViewException method is:</p>
303 char *GetImageViewException(const PixelImage *image_view,
304 ExceptionType *severity)
307 <p>A description of each parameter follows:</p></ol>
310 <ol><p>the pixel image_view.</p></ol>
313 <ol><p>the severity of the error is returned here.</p></ol>
316 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
317 _8c.html" target="source" name="GetImageViewExtent">GetImageViewExtent</a></h2>
318 <div class="doc-section">
320 <p>GetImageViewExtent() returns the image view extent.</p></ol>
322 <p>The format of the GetImageViewExtent method is:</p>
325 RectangleInfo GetImageViewExtent(const ImageView *image_view)
328 <p>A description of each parameter follows:</p></ol>
331 <ol><p>the image view.</p></ol>
334 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
335 _8c.html" target="source" name="GetImageViewImage">GetImageViewImage</a></h2>
336 <div class="doc-section">
338 <p>GetImageViewImage() returns the image associated with the image view.</p></ol>
340 <p>The format of the GetImageViewImage method is:</p>
343 MagickCore *GetImageViewImage(const ImageView *image_view)
346 <p>A description of each parameter follows:</p></ol>
349 <ol><p>the image view.</p></ol>
352 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
353 _8c.html" target="source" name="GetImageViewIterator">GetImageViewIterator</a></h2>
354 <div class="doc-section">
356 <p>GetImageViewIterator() iterates over the image view in parallel and calls your get method for each scanline of the view. The pixel extent 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>
358 <p>The callback signature is:</p>
361 MagickBooleanType GetImageViewMethod(const ImageView *source,
362 const ssize_t y,const int thread_id,void *context)
365 <p>Use this pragma if the view is not single threaded:</p>
371 <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>
373 <p>The format of the GetImageViewIterator method is:</p>
376 MagickBooleanType GetImageViewIterator(ImageView *source,
377 GetImageViewMethod get,void *context)
380 <p>A description of each parameter follows:</p></ol>
383 <ol><p>the source image view.</p></ol>
386 <ol><p>the get callback method.</p></ol>
389 <ol><p>the user defined context.</p></ol>
392 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
393 _8c.html" target="source" name="GetImageViewVirtualIndexes">GetImageViewVirtualIndexes</a></h2>
394 <div class="doc-section">
396 <p>GetImageViewVirtualIndexes() returns the image view virtual indexes.</p></ol>
398 <p>The format of the GetImageViewVirtualIndexes method is:</p>
401 const IndexPacket *GetImageViewVirtualIndexes(
402 const ImageView *image_view)
405 <p>A description of each parameter follows:</p></ol>
408 <ol><p>the image view.</p></ol>
411 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
412 _8c.html" target="source" name="GetImageViewVirtualPixels">GetImageViewVirtualPixels</a></h2>
413 <div class="doc-section">
415 <p>GetImageViewVirtualPixels() returns the image view virtual pixels.</p></ol>
417 <p>The format of the GetImageViewVirtualPixels method is:</p>
420 const PixelPacket *GetImageViewVirtualPixels(const ImageView *image_view)
423 <p>A description of each parameter follows:</p></ol>
426 <ol><p>the image view.</p></ol>
429 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
430 _8c.html" target="source" name="IsImageView">IsImageView</a></h2>
431 <div class="doc-section">
433 <p>IsImageView() returns MagickTrue if the the parameter is verified as a image view object.</p></ol>
435 <p>The format of the IsImageView method is:</p>
438 MagickBooleanType IsImageView(const ImageView *image_view)
441 <p>A description of each parameter follows:</p></ol>
444 <ol><p>the image view.</p></ol>
447 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
448 _8c.html" target="source" name="NewImageView">NewImageView</a></h2>
449 <div class="doc-section">
451 <p>NewImageView() returns a image view required for all other methods in the Image View API.</p></ol>
453 <p>The format of the NewImageView method is:</p>
456 ImageView *NewImageView(MagickCore *wand)
459 <p>A description of each parameter follows:</p></ol>
462 <ol><p>the wand.</p></ol>
465 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
466 _8c.html" target="source" name="NewImageViewRegion">NewImageViewRegion</a></h2>
467 <div class="doc-section">
469 <p>NewImageViewRegion() returns a image view required for all other methods in the Image View API.</p></ol>
471 <p>The format of the NewImageViewRegion method is:</p>
474 ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
475 const ssize_t y,const size_t width,const size_t height)
478 <p>A description of each parameter follows:</p></ol>
481 <ol><p>the magick wand.</p></ol>
483 <h5>x,y,columns,rows</h5>
484 <ol><p>These values define the perimeter of a extent of pixel_wands view.</p></ol>
487 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
488 _8c.html" target="source" name="SetImageViewDescription">SetImageViewDescription</a></h2>
489 <div class="doc-section">
491 <p>SetImageViewDescription() associates a description with an image view.</p></ol>
493 <p>The format of the SetImageViewDescription method is:</p>
496 void SetImageViewDescription(ImageView *image_view,
497 const char *description)
500 <p>A description of each parameter follows:</p></ol>
503 <ol><p>the image view.</p></ol>
506 <ol><p>the image view description.</p></ol>
509 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
510 _8c.html" target="source" name="SetImageViewIterator">SetImageViewIterator</a></h2>
511 <div class="doc-section">
513 <p>SetImageViewIterator() iterates over the image view in parallel and calls your set method for each scanline of the view. The pixel extent 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>
515 <p>The callback signature is:</p>
518 MagickBooleanType SetImageViewMethod(ImageView *destination,
519 const ssize_t y,const int thread_id,void *context)
522 <p>Use this pragma if the view is not single threaded:</p>
528 <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>
530 <p>The format of the SetImageViewIterator method is:</p>
533 MagickBooleanType SetImageViewIterator(ImageView *destination,
534 SetImageViewMethod set,void *context)
537 <p>A description of each parameter follows:</p></ol>
540 <ol><p>the image view.</p></ol>
543 <ol><p>the set callback method.</p></ol>
546 <ol><p>the user defined context.</p></ol>
549 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
550 _8c.html" target="source" name="SetImageViewThreads">SetImageViewThreads</a></h2>
551 <div class="doc-section">
553 <p>SetImageViewThreads() sets the number of threads in a thread team.</p></ol>
555 <p>The format of the SetImageViewDescription method is:</p>
558 void SetImageViewThreads(ImageView *image_view,
559 const size_t number_threads)
562 <p>A description of each parameter follows:</p></ol>
565 <ol><p>the image view.</p></ol>
567 <h5>number_threads</h5>
568 <ol><p>the number of threads in a thread team.</p></ol>
571 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
572 _8c.html" target="source" name="TransferImageViewIterator">TransferImageViewIterator</a></h2>
573 <div class="doc-section">
575 <p>TransferImageViewIterator() iterates over two image views in parallel and calls your transfer method for each scanline of the view. The source pixel extent 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 image 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>
577 <p>The callback signature is:</p>
580 MagickBooleanType TransferImageViewMethod(const ImageView *source,
581 ImageView *destination,const ssize_t y,const int thread_id,
585 <p>Use this pragma if the view is not single threaded:</p>
591 <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>
593 <p>The format of the TransferImageViewIterator method is:</p>
596 MagickBooleanType TransferImageViewIterator(ImageView *source,
597 ImageView *destination,TransferImageViewMethod transfer,void *context)
600 <p>A description of each parameter follows:</p></ol>
603 <ol><p>the source image view.</p></ol>
606 <ol><p>the destination image view.</p></ol>
609 <ol><p>the transfer callback method.</p></ol>
612 <ol><p>the user defined context.</p></ol>
615 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
616 _8c.html" target="source" name="UpdateImageViewIterator">UpdateImageViewIterator</a></h2>
617 <div class="doc-section">
619 <p>UpdateImageViewIterator() iterates over the image view in parallel and calls your update method for each scanline of the view. The pixel extent 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>
621 <p>The callback signature is:</p>
624 MagickBooleanType UpdateImageViewMethod(ImageView *source,
625 const ssize_t y,const int thread_id,void *context)
628 <p>Use this pragma if the view is not single threaded:</p>
634 <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>
636 <p>The format of the UpdateImageViewIterator method is:</p>
639 MagickBooleanType UpdateImageViewIterator(ImageView *source,
640 UpdateImageViewMethod update,void *context)
643 <p>A description of each parameter follows:</p></ol>
646 <ol><p>the source image view.</p></ol>
649 <ol><p>the update callback method.</p></ol>
652 <ol><p>the user defined context.</p></ol>
659 <span id="linkbar-west"> </span>
\r
660 <span id="linkbar-center">
\r
661 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> •
\r
662 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
\r
664 <span id="linkbar-east"> </span>
\r
666 <div class="footer">
\r
667 <span id="footer-west">© 1999-2011 ImageMagick Studio LLC</span>
\r
668 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
\r
670 <div style="clear: both; margin: 0; width: 100%; "></div>
\r
671 <script type="text/javascript">
\r
672 var _gaq = _gaq || [];
\r
673 _gaq.push(['_setAccount', 'UA-17690367-1']);
\r
674 _gaq.push(['_trackPageview']);
\r
677 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
\r
678 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
\r
679 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
\r