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 <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
\r
28 <style type="text/css" media="all">
\r
29 @import url("../../www/magick.css");
\r
31 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
\r
32 <script type="text/javascript" src="../fancybox/jquery.fancybox-1.3.4.pack.js"></script>
\r
33 <link rel="stylesheet" type="text/css" href="../fancybox/jquery.fancybox-1.3.4.css" media="screen" />
\r
34 <script type="text/javascript">
\r
35 $(document).ready(function() {
\r
36 $("a[href$=.jpg],a[href$=.png],a[href$=.gif]").fancybox({
\r
37 'transitionIn' : 'elastic',
\r
38 'transitionOut' : 'elastic',
\r
39 'overlayShow' : false,
\r
46 <body id="www-imagemagick-org">
\r
47 <div class="titlebar">
\r
48 <a href="../../index.html">
\r
49 <img src="../../images/script.png" alt="[ImageMagick]"
\r
50 style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>
\r
51 <a href="http://www.networkredux.com">
\r
52 <img src="../../images/networkredux.png" alt="[sponsor]"
\r
53 style="margin: 45px auto; border: 0px; float: left;" /></a>
\r
54 <a href="http://www.imagemagick.org/discourse-server/">
\r
55 <img src="../../images/logo.jpg" alt=""
\r
56 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
\r
57 <a href="../../index.html">
\r
58 <img src="../../images/sprite.jpg" alt=""
\r
59 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
\r
62 <div class="westbar">
\r
65 <a title="About ImageMagick" href="../../index.html">About ImageMagick</a>
67 <div class="sep"></div>
\r
69 <a title="Binary Releases" href="../../www/binary-releases.html">Binary Releases</a>
72 <a title="Binary Release: Unix" href="../../www/binary-releases.html#unix">Unix</a>
75 <a title="Binary Release: MacOS X" href="../../www/binary-releases.html#macosx">Mac OS X</a>
78 <a title="Binary Release: Windows" href="../../www/binary-releases.html#windows">Windows</a>
80 <div class="sep"></div>
\r
82 <a title="Command-line Tools" href="../../www/command-line-tools.html">Command-line Tools</a>
85 <a title="Command-line Tools: Processing" href="../../www/command-line-processing.html">Processing</a>
88 <a title="Command-line Tools: Options" href="../../www/command-line-options.html">Options</a>
91 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
94 <a title="Program Interfaces" href="../../www/api.html">Program Interfaces</a>
97 <a title="Program Interface: MagickWand" href="../../www/magick-wand.html">MagickWand</a>
100 <a title="Program Interface: MagickCore" href="../../www/magick-core.html">MagickCore</a>
103 <a title="Program Interface: PerlMagick" href="../../www/perl-magick.html">PerlMagick</a>
106 <a title="Program Interface: Magick++" href="../../www/magick++.html">Magick++</a>
108 <div class="sep"></div>
\r
110 <a title="Install from Source" href="../../www/install-source.html">Install from Source</a>
113 <a title="Install from Source: Unix" href="../../www/install-source.html#unix">Unix</a>
116 <a title="Install from Source: Windows" href="../../www/install-source.html#windows">Windows</a>
119 <a title="Resources" href="../../www/resources.html">Resources</a>
122 <a title="Architecture" href="../../www/architecture.html">Architecture</a>
125 <a title="Download" href="../../www/download.html">Download</a>
127 <div class="sep"></div>
\r
129 <a title="Search" href="../http://www.imagemagick.org/script/search.php">Search</a>
131 <div class="sep"></div>
\r
133 <a title="Site Map" href="../../www/sitemap.html">Site Map</a>
136 <a title="Site Map: Links" href="../../www/links.html">Links</a>
138 <div class="sep"></div>
\r
140 <a title="Sponsors" href="../../www/sponsors.html">Sponsors:</a>
142 <div class="sponsbox">
143 <div class="sponsor">
144 <a title="Sponsor: Web Hosting" href="http://www.bodhost.com/hosting.html">Web Hosting</a><!-- 201104010090 -->
146 <div class="sponsor">
147 <a title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
149 <div class="sponsor">
150 <a title="Sponsor: Image Converter" href="http://www.batchphoto.com">Image Converter</a><!-- 201103010900 Bits Coffee-->
152 <div class="sponsor">
153 <a title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
155 <div class="sponsor">
156 <a title="Sponsor: alaTest.com" href="http://alatest.com">alaTest.com</a><!-- 20110801000300 -->
162 <div class="eastbar">
\r
163 <script type="text/javascript">
\r
165 google_ad_client = "pub-3129977114552745";
\r
166 google_ad_slot = "0574824969";
\r
167 google_ad_width = 160;
\r
168 google_ad_height = 600;
\r
171 <script type="text/javascript"
\r
172 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
\r
178 <h1>Module image-view
180 <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>
182 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
183 _8c.html" id="CloneImageView">CloneImageView</a></h2>
184 <div class="doc-section">
186 <p>CloneImageView() makes a copy of the specified image view.</p>
188 <p>The format of the CloneImageView method is:</p>
191 ImageView *CloneImageView(const ImageView *image_view)
194 <p>A description of each parameter follows:</p>
197 <p>the image view.</p>
200 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
201 _8c.html" id="DestroyImageView">DestroyImageView</a></h2>
202 <div class="doc-section">
204 <p>DestroyImageView() deallocates memory associated with a image view.</p>
206 <p>The format of the DestroyImageView method is:</p>
209 ImageView *DestroyImageView(ImageView *image_view)
212 <p>A description of each parameter follows:</p>
215 <p>the image view.</p>
218 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
219 _8c.html" id="DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a></h2>
220 <div class="doc-section">
222 <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>
224 <p>The callback signature is:</p>
227 MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source,
228 const ImageView *duplex,ImageView *destination,const ssize_t y,
229 const int thread_id,void *context)
232 <p>Use this pragma if the view is not single threaded:</p>
238 <p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p>
240 <p>The format of the DuplexTransferImageViewIterator method is:</p>
243 MagickBooleanType DuplexTransferImageViewIterator(ImageView *source,
244 ImageView *duplex,ImageView *destination,
245 DuplexTransferImageViewMethod transfer,void *context)
248 <p>A description of each parameter follows:</p>
251 <p>the source image view.</p>
254 <p>the duplex image view.</p>
257 <p>the destination image view.</p>
260 <p>the transfer callback method.</p>
263 <p>the user defined context.</p>
266 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
267 _8c.html" id="GetImageViewAuthenticIndexes">GetImageViewAuthenticIndexes</a></h2>
268 <div class="doc-section">
270 <p>GetImageViewAuthenticIndexes() returns the image view authentic indexes.</p>
272 <p>The format of the GetImageViewAuthenticPixels method is:</p>
275 IndexPacket *GetImageViewAuthenticIndexes(const ImageView *image_view)
278 <p>A description of each parameter follows:</p>
281 <p>the image view.</p>
284 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
285 _8c.html" id="GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a></h2>
286 <div class="doc-section">
288 <p>GetImageViewAuthenticPixels() returns the image view authentic pixels.</p>
290 <p>The format of the GetImageViewAuthenticPixels method is:</p>
293 PixelPacket *GetImageViewAuthenticPixels(const ImageView *image_view)
296 <p>A description of each parameter follows:</p>
299 <p>the image view.</p>
302 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
303 _8c.html" id="GetImageViewException">GetImageViewException</a></h2>
304 <div class="doc-section">
306 <p>GetImageViewException() returns the severity, reason, and description of any error that occurs when utilizing a image view.</p>
308 <p>The format of the GetImageViewException method is:</p>
311 char *GetImageViewException(const PixelImage *image_view,
312 ExceptionType *severity)
315 <p>A description of each parameter follows:</p>
318 <p>the pixel image_view.</p>
321 <p>the severity of the error is returned here.</p>
324 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
325 _8c.html" id="GetImageViewExtent">GetImageViewExtent</a></h2>
326 <div class="doc-section">
328 <p>GetImageViewExtent() returns the image view extent.</p>
330 <p>The format of the GetImageViewExtent method is:</p>
333 RectangleInfo GetImageViewExtent(const ImageView *image_view)
336 <p>A description of each parameter follows:</p>
339 <p>the image view.</p>
342 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
343 _8c.html" id="GetImageViewImage">GetImageViewImage</a></h2>
344 <div class="doc-section">
346 <p>GetImageViewImage() returns the image associated with the image view.</p>
348 <p>The format of the GetImageViewImage method is:</p>
351 MagickCore *GetImageViewImage(const ImageView *image_view)
354 <p>A description of each parameter follows:</p>
357 <p>the image view.</p>
360 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
361 _8c.html" id="GetImageViewIterator">GetImageViewIterator</a></h2>
362 <div class="doc-section">
364 <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>
366 <p>The callback signature is:</p>
369 MagickBooleanType GetImageViewMethod(const ImageView *source,
370 const ssize_t y,const int thread_id,void *context)
373 <p>Use this pragma if the view is not single threaded:</p>
379 <p>to define a section of code in your callback get method that must be executed by a single thread at a time.</p>
381 <p>The format of the GetImageViewIterator method is:</p>
384 MagickBooleanType GetImageViewIterator(ImageView *source,
385 GetImageViewMethod get,void *context)
388 <p>A description of each parameter follows:</p>
391 <p>the source image view.</p>
394 <p>the get callback method.</p>
397 <p>the user defined context.</p>
400 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
401 _8c.html" id="GetImageViewVirtualIndexes">GetImageViewVirtualIndexes</a></h2>
402 <div class="doc-section">
404 <p>GetImageViewVirtualIndexes() returns the image view virtual indexes.</p>
406 <p>The format of the GetImageViewVirtualIndexes method is:</p>
409 const IndexPacket *GetImageViewVirtualIndexes(
410 const ImageView *image_view)
413 <p>A description of each parameter follows:</p>
416 <p>the image view.</p>
419 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
420 _8c.html" id="GetImageViewVirtualPixels">GetImageViewVirtualPixels</a></h2>
421 <div class="doc-section">
423 <p>GetImageViewVirtualPixels() returns the image view virtual pixels.</p>
425 <p>The format of the GetImageViewVirtualPixels method is:</p>
428 const PixelPacket *GetImageViewVirtualPixels(const ImageView *image_view)
431 <p>A description of each parameter follows:</p>
434 <p>the image view.</p>
437 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
438 _8c.html" id="IsImageView">IsImageView</a></h2>
439 <div class="doc-section">
441 <p>IsImageView() returns MagickTrue if the the parameter is verified as a image view object.</p>
443 <p>The format of the IsImageView method is:</p>
446 MagickBooleanType IsImageView(const ImageView *image_view)
449 <p>A description of each parameter follows:</p>
452 <p>the image view.</p>
455 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
456 _8c.html" id="NewImageView">NewImageView</a></h2>
457 <div class="doc-section">
459 <p>NewImageView() returns a image view required for all other methods in the Image View API.</p>
461 <p>The format of the NewImageView method is:</p>
464 ImageView *NewImageView(MagickCore *wand)
467 <p>A description of each parameter follows:</p>
473 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
474 _8c.html" id="NewImageViewRegion">NewImageViewRegion</a></h2>
475 <div class="doc-section">
477 <p>NewImageViewRegion() returns a image view required for all other methods in the Image View API.</p>
479 <p>The format of the NewImageViewRegion method is:</p>
482 ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
483 const ssize_t y,const size_t width,const size_t height)
486 <p>A description of each parameter follows:</p>
489 <p>the magick wand.</p>
491 <h5>x,y,columns,rows</h5>
492 <p>These values define the perimeter of a extent of pixel_wands view.</p>
495 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
496 _8c.html" id="SetImageViewDescription">SetImageViewDescription</a></h2>
497 <div class="doc-section">
499 <p>SetImageViewDescription() associates a description with an image view.</p>
501 <p>The format of the SetImageViewDescription method is:</p>
504 void SetImageViewDescription(ImageView *image_view,
505 const char *description)
508 <p>A description of each parameter follows:</p>
511 <p>the image view.</p>
514 <p>the image view description.</p>
517 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
518 _8c.html" id="SetImageViewIterator">SetImageViewIterator</a></h2>
519 <div class="doc-section">
521 <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>
523 <p>The callback signature is:</p>
526 MagickBooleanType SetImageViewMethod(ImageView *destination,
527 const ssize_t y,const int thread_id,void *context)
530 <p>Use this pragma if the view is not single threaded:</p>
536 <p>to define a section of code in your callback set method that must be executed by a single thread at a time.</p>
538 <p>The format of the SetImageViewIterator method is:</p>
541 MagickBooleanType SetImageViewIterator(ImageView *destination,
542 SetImageViewMethod set,void *context)
545 <p>A description of each parameter follows:</p>
548 <p>the image view.</p>
551 <p>the set callback method.</p>
554 <p>the user defined context.</p>
557 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
558 _8c.html" id="SetImageViewThreads">SetImageViewThreads</a></h2>
559 <div class="doc-section">
561 <p>SetImageViewThreads() sets the number of threads in a thread team.</p>
563 <p>The format of the SetImageViewDescription method is:</p>
566 void SetImageViewThreads(ImageView *image_view,
567 const size_t number_threads)
570 <p>A description of each parameter follows:</p>
573 <p>the image view.</p>
575 <h5>number_threads</h5>
576 <p>the number of threads in a thread team.</p>
579 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
580 _8c.html" id="TransferImageViewIterator">TransferImageViewIterator</a></h2>
581 <div class="doc-section">
583 <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>
585 <p>The callback signature is:</p>
588 MagickBooleanType TransferImageViewMethod(const ImageView *source,
589 ImageView *destination,const ssize_t y,const int thread_id,
593 <p>Use this pragma if the view is not single threaded:</p>
599 <p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p>
601 <p>The format of the TransferImageViewIterator method is:</p>
604 MagickBooleanType TransferImageViewIterator(ImageView *source,
605 ImageView *destination,TransferImageViewMethod transfer,void *context)
608 <p>A description of each parameter follows:</p>
611 <p>the source image view.</p>
614 <p>the destination image view.</p>
617 <p>the transfer callback method.</p>
620 <p>the user defined context.</p>
623 <h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
624 _8c.html" id="UpdateImageViewIterator">UpdateImageViewIterator</a></h2>
625 <div class="doc-section">
627 <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>
629 <p>The callback signature is:</p>
632 MagickBooleanType UpdateImageViewMethod(ImageView *source,
633 const ssize_t y,const int thread_id,void *context)
636 <p>Use this pragma if the view is not single threaded:</p>
642 <p>to define a section of code in your callback update method that must be executed by a single thread at a time.</p>
644 <p>The format of the UpdateImageViewIterator method is:</p>
647 MagickBooleanType UpdateImageViewIterator(ImageView *source,
648 UpdateImageViewMethod update,void *context)
651 <p>A description of each parameter follows:</p>
654 <p>the source image view.</p>
657 <p>the update callback method.</p>
660 <p>the user defined context.</p>
667 <span id="linkbar-west"> </span>
\r
668 <span id="linkbar-center">
\r
669 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> •
\r
670 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
\r
672 <span id="linkbar-east"> </span>
\r
674 <div class="footer">
\r
675 <span id="footer-west">© 1999-2011 ImageMagick Studio LLC</span>
\r
676 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
\r
678 <div style="clear: both; margin: 0; width: 100%; "></div>
\r
679 <script type="text/javascript">
\r
680 var _gaq = _gaq || [];
\r
681 _gaq.push(['_setAccount', 'UA-17690367-1']);
\r
682 _gaq.push(['_trackPageview']);
\r
685 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
\r
686 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
\r
687 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
\r