1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
\r
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
\r
3 <html xmlns="http://www.w3.org/1999/xhtml" xml: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, compose, or convert 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"/>
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
30 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
\r
31 <script type="text/javascript" src="../fancybox/jquery.fancybox-1.3.4.pack.js"></script>
\r
32 <link rel="stylesheet" type="text/css" href="../fancybox/jquery.fancybox-1.3.4.css" media="screen" />
\r
33 <script type="text/javascript">
\r
34 $(document).ready(function() {
\r
35 $("a[href$=.jpg],a[href$=.png],a[href$=.gif]").fancybox({
\r
36 'transitionIn' : 'elastic',
\r
37 'transitionOut' : 'elastic',
\r
38 'overlayShow' : false,
\r
45 <body id="www-imagemagick-org">
\r
46 <div class="titlebar">
\r
47 <a href="../../index.html">
\r
48 <img src="../../images/script.png" alt="[ImageMagick]"
\r
49 style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>
\r
50 <a href="http://www.networkredux.com">
\r
51 <img src="../../images/networkredux.png" alt="[sponsor]"
\r
52 style="margin: 45px auto; border: 0px; float: left;" /></a>
\r
53 <a href="http://www.imagemagick.org/discourse-server/">
\r
54 <img src="../../images/logo.jpg" alt=""
\r
55 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
\r
56 <a href="../../index.html">
\r
57 <img src="../../images/sprite.jpg" alt=""
\r
58 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
\r
61 <div class="westbar">
\r
64 <a title="About ImageMagick" href="../../index.html">About ImageMagick</a>
66 <div class="sep"></div>
\r
68 <a title="Binary Releases" href="../../www/binary-releases.html">Binary Releases</a>
71 <a title="Binary Release: Unix" href="../../www/binary-releases.html#unix">Unix</a>
74 <a title="Binary Release: MacOS X" href="../../www/binary-releases.html#macosx">Mac OS X</a>
77 <a title="Binary Release: Windows" href="../../www/binary-releases.html#windows">Windows</a>
79 <div class="sep"></div>
\r
81 <a title="Command-line Tools" href="../../www/command-line-tools.html">Command-line Tools</a>
84 <a title="Command-line Tools: Processing" href="../../www/command-line-processing.html">Processing</a>
87 <a title="Command-line Tools: Options" href="../../www/command-line-options.html">Options</a>
90 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
93 <a title="Program Interfaces" href="../../www/api.html">Program Interfaces</a>
96 <a title="Program Interface: MagickWand" href="../../www/magick-wand.html">MagickWand</a>
99 <a title="Program Interface: MagickCore" href="../../www/magick-core.html">MagickCore</a>
102 <a title="Program Interface: PerlMagick" href="../../www/perl-magick.html">PerlMagick</a>
105 <a title="Program Interface: Magick++" href="../../www/magick++.html">Magick++</a>
107 <div class="sep"></div>
\r
109 <a title="Install from Source" href="../../www/install-source.html">Install from Source</a>
112 <a title="Install from Source: Unix" href="../../www/install-source.html#unix">Unix</a>
115 <a title="Install from Source: Windows" href="../../www/install-source.html#windows">Windows</a>
118 <a title="Resources" href="../../www/resources.html">Resources</a>
121 <a title="Architecture" href="../../www/architecture.html">Architecture</a>
124 <a title="Download" href="../../www/download.html">Download</a>
126 <div class="sep"></div>
\r
128 <a title="Search" href="../http://www.imagemagick.org/script/search.php">Search</a>
130 <div class="sep"></div>
\r
132 <a title="Site Map" href="../../www/sitemap.html">Site Map</a>
135 <a title="Site Map: Links" href="../../www/links.html">Links</a>
137 <div class="sep"></div>
\r
139 <a title="Sponsors" href="../../www/sponsors.html">Sponsors:</a>
141 <div class="sponsbox">
142 <div class="sponsor">
143 <a title="Sponsor: alaTest.com" href="http://alatest.com">alaTest.com</a><!-- 20110801000300 -->
145 <div class="sponsor">
146 <a title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
148 <div class="sponsor">
149 <a title="Sponsor: Image Converter" href="http://www.batchphoto.com">Image Converter</a><!-- 201103010900 Bits Coffee-->
151 <div class="sponsor">
152 <a title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
158 <div class="eastbar">
\r
159 <script type="text/javascript">
\r
161 google_ad_client = "pub-3129977114552745";
\r
162 google_ad_slot = "0574824969";
\r
163 google_ad_width = 160;
\r
164 google_ad_height = 600;
\r
167 <script type="text/javascript"
\r
168 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
\r
174 <h1>Module image-view
176 <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>
178 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
179 _8c.html" target="source" name="CloneImageView">CloneImageView</a></h2>
180 <div class="doc-section">
182 <p>CloneImageView() makes a copy of the specified image view.</p></ol>
184 <p>The format of the CloneImageView method is:</p>
187 ImageView *CloneImageView(const ImageView *image_view)
190 <p>A description of each parameter follows:</p></ol>
193 <ol><p>the image view.</p></ol>
196 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
197 _8c.html" target="source" name="DestroyImageView">DestroyImageView</a></h2>
198 <div class="doc-section">
200 <p>DestroyImageView() deallocates memory associated with a image view.</p></ol>
202 <p>The format of the DestroyImageView method is:</p>
205 ImageView *DestroyImageView(ImageView *image_view)
208 <p>A description of each parameter follows:</p></ol>
211 <ol><p>the image view.</p></ol>
214 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
215 _8c.html" target="source" name="DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a></h2>
216 <div class="doc-section">
218 <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>
220 <p>The callback signature is:</p>
223 MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source,
224 const ImageView *duplex,ImageView *destination,const ssize_t y,
225 const int thread_id,void *context)
228 <p>Use this pragma if the view is not single threaded:</p>
234 <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>
236 <p>The format of the DuplexTransferImageViewIterator method is:</p>
239 MagickBooleanType DuplexTransferImageViewIterator(ImageView *source,
240 ImageView *duplex,ImageView *destination,
241 DuplexTransferImageViewMethod transfer,void *context)
244 <p>A description of each parameter follows:</p></ol>
247 <ol><p>the source image view.</p></ol>
250 <ol><p>the duplex image view.</p></ol>
253 <ol><p>the destination image view.</p></ol>
256 <ol><p>the transfer callback method.</p></ol>
259 <ol><p>the user defined context.</p></ol>
262 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
263 _8c.html" target="source" name="GetImageViewAuthenticIndexes">GetImageViewAuthenticIndexes</a></h2>
264 <div class="doc-section">
266 <p>GetImageViewAuthenticIndexes() returns the image view authentic indexes.</p></ol>
268 <p>The format of the GetImageViewAuthenticPixels method is:</p>
271 IndexPacket *GetImageViewAuthenticIndexes(const ImageView *image_view)
274 <p>A description of each parameter follows:</p></ol>
277 <ol><p>the image view.</p></ol>
280 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
281 _8c.html" target="source" name="GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a></h2>
282 <div class="doc-section">
284 <p>GetImageViewAuthenticPixels() returns the image view authentic pixels.</p></ol>
286 <p>The format of the GetImageViewAuthenticPixels method is:</p>
289 PixelPacket *GetImageViewAuthenticPixels(const ImageView *image_view)
292 <p>A description of each parameter follows:</p></ol>
295 <ol><p>the image view.</p></ol>
298 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
299 _8c.html" target="source" name="GetImageViewException">GetImageViewException</a></h2>
300 <div class="doc-section">
302 <p>GetImageViewException() returns the severity, reason, and description of any error that occurs when utilizing a image view.</p></ol>
304 <p>The format of the GetImageViewException method is:</p>
307 char *GetImageViewException(const PixelImage *image_view,
308 ExceptionType *severity)
311 <p>A description of each parameter follows:</p></ol>
314 <ol><p>the pixel image_view.</p></ol>
317 <ol><p>the severity of the error is returned here.</p></ol>
320 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
321 _8c.html" target="source" name="GetImageViewExtent">GetImageViewExtent</a></h2>
322 <div class="doc-section">
324 <p>GetImageViewExtent() returns the image view extent.</p></ol>
326 <p>The format of the GetImageViewExtent method is:</p>
329 RectangleInfo GetImageViewExtent(const ImageView *image_view)
332 <p>A description of each parameter follows:</p></ol>
335 <ol><p>the image view.</p></ol>
338 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
339 _8c.html" target="source" name="GetImageViewImage">GetImageViewImage</a></h2>
340 <div class="doc-section">
342 <p>GetImageViewImage() returns the image associated with the image view.</p></ol>
344 <p>The format of the GetImageViewImage method is:</p>
347 MagickCore *GetImageViewImage(const ImageView *image_view)
350 <p>A description of each parameter follows:</p></ol>
353 <ol><p>the image view.</p></ol>
356 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
357 _8c.html" target="source" name="GetImageViewIterator">GetImageViewIterator</a></h2>
358 <div class="doc-section">
360 <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>
362 <p>The callback signature is:</p>
365 MagickBooleanType GetImageViewMethod(const ImageView *source,
366 const ssize_t y,const int thread_id,void *context)
369 <p>Use this pragma if the view is not single threaded:</p>
375 <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>
377 <p>The format of the GetImageViewIterator method is:</p>
380 MagickBooleanType GetImageViewIterator(ImageView *source,
381 GetImageViewMethod get,void *context)
384 <p>A description of each parameter follows:</p></ol>
387 <ol><p>the source image view.</p></ol>
390 <ol><p>the get callback method.</p></ol>
393 <ol><p>the user defined context.</p></ol>
396 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
397 _8c.html" target="source" name="GetImageViewVirtualIndexes">GetImageViewVirtualIndexes</a></h2>
398 <div class="doc-section">
400 <p>GetImageViewVirtualIndexes() returns the image view virtual indexes.</p></ol>
402 <p>The format of the GetImageViewVirtualIndexes method is:</p>
405 const IndexPacket *GetImageViewVirtualIndexes(
406 const ImageView *image_view)
409 <p>A description of each parameter follows:</p></ol>
412 <ol><p>the image view.</p></ol>
415 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
416 _8c.html" target="source" name="GetImageViewVirtualPixels">GetImageViewVirtualPixels</a></h2>
417 <div class="doc-section">
419 <p>GetImageViewVirtualPixels() returns the image view virtual pixels.</p></ol>
421 <p>The format of the GetImageViewVirtualPixels method is:</p>
424 const PixelPacket *GetImageViewVirtualPixels(const ImageView *image_view)
427 <p>A description of each parameter follows:</p></ol>
430 <ol><p>the image view.</p></ol>
433 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
434 _8c.html" target="source" name="IsImageView">IsImageView</a></h2>
435 <div class="doc-section">
437 <p>IsImageView() returns MagickTrue if the the parameter is verified as a image view object.</p></ol>
439 <p>The format of the IsImageView method is:</p>
442 MagickBooleanType IsImageView(const ImageView *image_view)
445 <p>A description of each parameter follows:</p></ol>
448 <ol><p>the image view.</p></ol>
451 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
452 _8c.html" target="source" name="NewImageView">NewImageView</a></h2>
453 <div class="doc-section">
455 <p>NewImageView() returns a image view required for all other methods in the Image View API.</p></ol>
457 <p>The format of the NewImageView method is:</p>
460 ImageView *NewImageView(MagickCore *wand)
463 <p>A description of each parameter follows:</p></ol>
466 <ol><p>the wand.</p></ol>
469 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
470 _8c.html" target="source" name="NewImageViewRegion">NewImageViewRegion</a></h2>
471 <div class="doc-section">
473 <p>NewImageViewRegion() returns a image view required for all other methods in the Image View API.</p></ol>
475 <p>The format of the NewImageViewRegion method is:</p>
478 ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
479 const ssize_t y,const size_t width,const size_t height)
482 <p>A description of each parameter follows:</p></ol>
485 <ol><p>the magick wand.</p></ol>
487 <h5>x,y,columns,rows</h5>
488 <ol><p>These values define the perimeter of a extent of pixel_wands view.</p></ol>
491 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
492 _8c.html" target="source" name="SetImageViewDescription">SetImageViewDescription</a></h2>
493 <div class="doc-section">
495 <p>SetImageViewDescription() associates a description with an image view.</p></ol>
497 <p>The format of the SetImageViewDescription method is:</p>
500 void SetImageViewDescription(ImageView *image_view,
501 const char *description)
504 <p>A description of each parameter follows:</p></ol>
507 <ol><p>the image view.</p></ol>
510 <ol><p>the image view description.</p></ol>
513 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
514 _8c.html" target="source" name="SetImageViewIterator">SetImageViewIterator</a></h2>
515 <div class="doc-section">
517 <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>
519 <p>The callback signature is:</p>
522 MagickBooleanType SetImageViewMethod(ImageView *destination,
523 const ssize_t y,const int thread_id,void *context)
526 <p>Use this pragma if the view is not single threaded:</p>
532 <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>
534 <p>The format of the SetImageViewIterator method is:</p>
537 MagickBooleanType SetImageViewIterator(ImageView *destination,
538 SetImageViewMethod set,void *context)
541 <p>A description of each parameter follows:</p></ol>
544 <ol><p>the image view.</p></ol>
547 <ol><p>the set callback method.</p></ol>
550 <ol><p>the user defined context.</p></ol>
553 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
554 _8c.html" target="source" name="SetImageViewThreads">SetImageViewThreads</a></h2>
555 <div class="doc-section">
557 <p>SetImageViewThreads() sets the number of threads in a thread team.</p></ol>
559 <p>The format of the SetImageViewDescription method is:</p>
562 void SetImageViewThreads(ImageView *image_view,
563 const size_t number_threads)
566 <p>A description of each parameter follows:</p></ol>
569 <ol><p>the image view.</p></ol>
571 <h5>number_threads</h5>
572 <ol><p>the number of threads in a thread team.</p></ol>
575 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
576 _8c.html" target="source" name="TransferImageViewIterator">TransferImageViewIterator</a></h2>
577 <div class="doc-section">
579 <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>
581 <p>The callback signature is:</p>
584 MagickBooleanType TransferImageViewMethod(const ImageView *source,
585 ImageView *destination,const ssize_t y,const int thread_id,
589 <p>Use this pragma if the view is not single threaded:</p>
595 <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>
597 <p>The format of the TransferImageViewIterator method is:</p>
600 MagickBooleanType TransferImageViewIterator(ImageView *source,
601 ImageView *destination,TransferImageViewMethod transfer,void *context)
604 <p>A description of each parameter follows:</p></ol>
607 <ol><p>the source image view.</p></ol>
610 <ol><p>the destination image view.</p></ol>
613 <ol><p>the transfer callback method.</p></ol>
616 <ol><p>the user defined context.</p></ol>
619 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
620 _8c.html" target="source" name="UpdateImageViewIterator">UpdateImageViewIterator</a></h2>
621 <div class="doc-section">
623 <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>
625 <p>The callback signature is:</p>
628 MagickBooleanType UpdateImageViewMethod(ImageView *source,
629 const ssize_t y,const int thread_id,void *context)
632 <p>Use this pragma if the view is not single threaded:</p>
638 <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>
640 <p>The format of the UpdateImageViewIterator method is:</p>
643 MagickBooleanType UpdateImageViewIterator(ImageView *source,
644 UpdateImageViewMethod update,void *context)
647 <p>A description of each parameter follows:</p></ol>
650 <ol><p>the source image view.</p></ol>
653 <ol><p>the update callback method.</p></ol>
656 <ol><p>the user defined context.</p></ol>
663 <span id="linkbar-west"> </span>
\r
664 <span id="linkbar-center">
\r
665 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> •
\r
666 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
\r
668 <span id="linkbar-east"> </span>
\r
670 <div class="footer">
\r
671 <span id="footer-west">© 1999-2011 ImageMagick Studio LLC</span>
\r
672 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
\r
674 <div style="clear: both; margin: 0; width: 100%; "></div>
\r
675 <script type="text/javascript">
\r
676 var _gaq = _gaq || [];
\r
677 _gaq.push(['_setAccount', 'UA-17690367-1']);
\r
678 _gaq.push(['_trackPageview']);
\r
681 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
\r
682 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
\r
683 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
\r