1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
\r
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
\r
3 <html version="-//W3C//DTD XHTML 1.1//EN"
\r
4 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
\r
5 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
\r
6 xsi:schemaLocation="http://www.w3.org/1999/xhtml
\r
7 http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">
\r
9 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
\r
10 <meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U="/>
\r
11 <title>ImageMagick: MagickCore, C API for ImageMagick: Image View Methods</title>
12 <meta http-equiv="Content-Language" content="en-US"/>
13 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
14 <meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/>
15 <meta name="Application-name" content="ImageMagick"/>
16 <meta name="Description" content="Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats. In addition resize, rotate, shear, distort and transform images."/>
17 <meta name="Application-url" content="http://www.imagemagick.org"/>
18 <meta name="Generator" content="PHP"/>
19 <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"/>
20 <meta name="Rating" content="GENERAL"/>
21 <meta name="Robots" content="INDEX, FOLLOW"/>
22 <meta name="Generator" content="ImageMagick Studio LLC"/>
23 <meta name="Author" content="ImageMagick Studio LLC"/>
24 <meta name="Revisit-after" content="2 DAYS"/>
25 <meta name="Resource-type" content="document"/>
26 <meta name="Copyright" content="Copyright (c) 1999-2011 ImageMagick Studio LLC"/>
27 <meta name="Distribution" content="Global"/>
28 <link rel="icon" href="../../images/wand.png"/>
29 <link rel="shortcut icon" href="../../images/wand.ico" type="images/x-icon"/>
30 <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"/>
\r
31 <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
\r
32 <style type="text/css" media="all">
\r
33 @import url("../../www/magick.css");
\r
35 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
\r
36 <script type="text/javascript" src="../fancybox/jquery.fancybox-1.3.4.pack.js"></script>
\r
37 <link rel="stylesheet" type="text/css" href="../fancybox/jquery.fancybox-1.3.4.css" media="screen" />
\r
38 <script type="text/javascript">
\r
39 $(document).ready(function() {
\r
40 $("a[href$=.jpg],a[href$=.png],a[href$=.gif]").fancybox({
\r
41 'transitionIn' : 'elastic',
\r
42 'transitionOut' : 'elastic',
\r
43 'overlayShow' : false,
\r
50 <body id="www-imagemagick-org">
\r
51 <div class="titlebar">
\r
52 <a href="../../index.html">
\r
53 <img src="../../images/script.png" alt="[ImageMagick]"
\r
54 style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>
\r
55 <a href="http://www.networkredux.com">
\r
56 <img src="../../images/networkredux.png" alt="[sponsor]"
\r
57 style="margin-top: 42px; border: 0px; float: left;" /></a>
\r
58 <a href="http://www.imagemagick.org/discourse-server/">
\r
59 <img src="../../images/logo.jpg"
\r
60 alt="ImageMagick Logo"
\r
61 style="width: 123px; height: 118px; border: 0px; float: right;" /></a>
\r
62 <a href="../../index.html">
\r
63 <img src="../../images/sprite.jpg"
\r
64 alt="ImageMagick Sprite"
\r
65 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
\r
68 <div class="westbar">
\r
71 <a title="About ImageMagick" href="../../index.html">About ImageMagick</a>
73 <div class="sep"></div>
\r
75 <a title="Binary Releases" href="../../www/binary-releases.html">Binary Releases</a>
78 <a title="Binary Release: Unix" href="../../www/binary-releases.html#unix">Unix</a>
81 <a title="Binary Release: MacOS X" href="../../www/binary-releases.html#macosx">Mac OS X</a>
84 <a title="Binary Release: iPhone" href="../../www/binary-releases.html#iPhone">iPhone</a>
87 <a title="Binary Release: Windows" href="../../www/binary-releases.html#windows">Windows</a>
89 <div class="sep"></div>
\r
91 <a title="Command-line Tools" href="../../www/command-line-tools.html">Command-line Tools</a>
94 <a title="Command-line Tools: Processing" href="../../www/command-line-processing.html">Processing</a>
97 <a title="Command-line Tools: Options" href="../../www/command-line-options.html">Options</a>
100 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
103 <a title="Program Interfaces" href="../../www/api.html">Program Interfaces</a>
106 <a title="Program Interface: MagickWand" href="../../www/magick-wand.html">MagickWand</a>
109 <a title="Program Interface: MagickCore" href="../../www/magick-core.html">MagickCore</a>
112 <a title="Program Interface: PerlMagick" href="../../www/perl-magick.html">PerlMagick</a>
115 <a title="Program Interface: Magick++" href="../../www/magick++.html">Magick++</a>
117 <div class="sep"></div>
\r
119 <a title="Install from Source" href="../../www/install-source.html">Install from Source</a>
122 <a title="Install from Source: Unix" href="../../www/install-source.html#unix">Unix</a>
125 <a title="Install from Source: Windows" href="../../www/install-source.html#windows">Windows</a>
128 <a title="Resources" href="../../www/resources.html">Resources</a>
131 <a title="Architecture" href="../../www/architecture.html">Architecture</a>
134 <a title="Download" href="../../www/download.html">Download</a>
136 <div class="sep"></div>
\r
138 <a title="Search" href="../../www/search.html">Search</a>
140 <div class="sep"></div>
\r
142 <a title="Site Map" href="../../www/sitemap.html">Site Map</a>
145 <a title="Site Map: Links" href="../../www/links.html">Links</a>
147 <div class="sep"></div>
\r
149 <a title="Sponsors" href="../../www/sponsors.html">Sponsors:</a>
151 <div class="sponsbox">
152 <div class="sponsor">
153 <a title="Sponsor: Best Web Hosting" href="http://webhostinggeeks.com">Best Web Hosting</a><!-- 201110010720 -->
155 <div class="sponsor">
156 <a title="Sponsor: Web Hosting Ratings" href="http://webhostingrating.com">Web Hosting Ratings</a><!-- 201110010720 -->
158 <div class="sponsor">
159 <a title="Sponsor: Druckerei" href="http://www.allesdruck.de">Druckerei</a><!-- 201107010240 r.leo -->
161 <div class="sponsor">
162 <a title="Sponsor: Web Hosting" href="http://www.bodhost.com/hosting.shtml">Web Hosting</a><!-- 201104010090 -->
164 <div class="sponsor">
165 <a title="Sponsor: Image Converter" href="http://www.batchphoto.com">Image Converter</a><!-- 201103010900 Bits Coffee-->
167 <div class="sponsor">
168 <a title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
170 <div class="sponsor">
171 <a title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
173 <div class="sponsor">
174 <a title="Sponsor: alaTest.com" href="http://alatest.com">alaTest.com</a><!-- 20110801000300 -->
180 <div class="eastbar">
\r
181 <script type="text/javascript">
\r
183 google_ad_client = "pub-3129977114552745";
\r
184 google_ad_slot = "0574824969";
\r
185 google_ad_width = 160;
\r
186 google_ad_height = 600;
\r
189 <script type="text/javascript"
\r
190 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
\r
196 <h1>Module image-view Methods</h1>
197 <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>
199 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="CloneImageView">CloneImageView</a></h2>
200 <div class="doc-section">
202 <p>CloneImageView() makes a copy of the specified image view.</p>
204 <p>The format of the CloneImageView method is:</p>
207 ImageView *CloneImageView(const ImageView *image_view)
210 <p>A description of each parameter follows:</p>
213 <p>the image view.</p>
216 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="DestroyImageView">DestroyImageView</a></h2>
217 <div class="doc-section">
219 <p>DestroyImageView() deallocates memory associated with a image view.</p>
221 <p>The format of the DestroyImageView method is:</p>
224 ImageView *DestroyImageView(ImageView *image_view)
227 <p>A description of each parameter follows:</p>
230 <p>the image view.</p>
233 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a></h2>
234 <div class="doc-section">
236 <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>
238 <p>The callback signature is:</p>
241 MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source,
242 const ImageView *duplex,ImageView *destination,const ssize_t y,
243 const int thread_id,void *context)
246 <p>Use this pragma if the view is not single threaded:</p>
252 <p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p>
254 <p>The format of the DuplexTransferImageViewIterator method is:</p>
257 MagickBooleanType DuplexTransferImageViewIterator(ImageView *source,
258 ImageView *duplex,ImageView *destination,
259 DuplexTransferImageViewMethod transfer,void *context)
262 <p>A description of each parameter follows:</p>
265 <p>the source image view.</p>
268 <p>the duplex image view.</p>
271 <p>the destination image view.</p>
274 <p>the transfer callback method.</p>
277 <p>the user defined context.</p>
280 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewAuthenticIndexes">GetImageViewAuthenticIndexes</a></h2>
281 <div class="doc-section">
283 <p>GetImageViewAuthenticIndexes() returns the image view authentic indexes.</p>
285 <p>The format of the GetImageViewAuthenticPixels method is:</p>
288 IndexPacket *GetImageViewAuthenticIndexes(const ImageView *image_view)
291 <p>A description of each parameter follows:</p>
294 <p>the image view.</p>
297 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a></h2>
298 <div class="doc-section">
300 <p>GetImageViewAuthenticPixels() returns the image view authentic pixels.</p>
302 <p>The format of the GetImageViewAuthenticPixels method is:</p>
305 PixelPacket *GetImageViewAuthenticPixels(const ImageView *image_view)
308 <p>A description of each parameter follows:</p>
311 <p>the image view.</p>
314 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewException">GetImageViewException</a></h2>
315 <div class="doc-section">
317 <p>GetImageViewException() returns the severity, reason, and description of any error that occurs when utilizing a image view.</p>
319 <p>The format of the GetImageViewException method is:</p>
322 char *GetImageViewException(const PixelImage *image_view,
323 ExceptionType *severity)
326 <p>A description of each parameter follows:</p>
329 <p>the pixel image_view.</p>
332 <p>the severity of the error is returned here.</p>
335 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewExtent">GetImageViewExtent</a></h2>
336 <div class="doc-section">
338 <p>GetImageViewExtent() returns the image view extent.</p>
340 <p>The format of the GetImageViewExtent method is:</p>
343 RectangleInfo GetImageViewExtent(const ImageView *image_view)
346 <p>A description of each parameter follows:</p>
349 <p>the image view.</p>
352 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewImage">GetImageViewImage</a></h2>
353 <div class="doc-section">
355 <p>GetImageViewImage() returns the image associated with the image view.</p>
357 <p>The format of the GetImageViewImage method is:</p>
360 MagickCore *GetImageViewImage(const ImageView *image_view)
363 <p>A description of each parameter follows:</p>
366 <p>the image view.</p>
369 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewIterator">GetImageViewIterator</a></h2>
370 <div class="doc-section">
372 <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>
374 <p>The callback signature is:</p>
377 MagickBooleanType GetImageViewMethod(const ImageView *source,
378 const ssize_t y,const int thread_id,void *context)
381 <p>Use this pragma if the view is not single threaded:</p>
387 <p>to define a section of code in your callback get method that must be executed by a single thread at a time.</p>
389 <p>The format of the GetImageViewIterator method is:</p>
392 MagickBooleanType GetImageViewIterator(ImageView *source,
393 GetImageViewMethod get,void *context)
396 <p>A description of each parameter follows:</p>
399 <p>the source image view.</p>
402 <p>the get callback method.</p>
405 <p>the user defined context.</p>
408 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewVirtualIndexes">GetImageViewVirtualIndexes</a></h2>
409 <div class="doc-section">
411 <p>GetImageViewVirtualIndexes() returns the image view virtual indexes.</p>
413 <p>The format of the GetImageViewVirtualIndexes method is:</p>
416 const IndexPacket *GetImageViewVirtualIndexes(
417 const ImageView *image_view)
420 <p>A description of each parameter follows:</p>
423 <p>the image view.</p>
426 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewVirtualPixels">GetImageViewVirtualPixels</a></h2>
427 <div class="doc-section">
429 <p>GetImageViewVirtualPixels() returns the image view virtual pixels.</p>
431 <p>The format of the GetImageViewVirtualPixels method is:</p>
434 const PixelPacket *GetImageViewVirtualPixels(const ImageView *image_view)
437 <p>A description of each parameter follows:</p>
440 <p>the image view.</p>
443 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="IsImageView">IsImageView</a></h2>
444 <div class="doc-section">
446 <p>IsImageView() returns MagickTrue if the the parameter is verified as a image view object.</p>
448 <p>The format of the IsImageView method is:</p>
451 MagickBooleanType IsImageView(const ImageView *image_view)
454 <p>A description of each parameter follows:</p>
457 <p>the image view.</p>
460 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="NewImageView">NewImageView</a></h2>
461 <div class="doc-section">
463 <p>NewImageView() returns a image view required for all other methods in the Image View API.</p>
465 <p>The format of the NewImageView method is:</p>
468 ImageView *NewImageView(MagickCore *wand)
471 <p>A description of each parameter follows:</p>
477 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="NewImageViewRegion">NewImageViewRegion</a></h2>
478 <div class="doc-section">
480 <p>NewImageViewRegion() returns a image view required for all other methods in the Image View API.</p>
482 <p>The format of the NewImageViewRegion method is:</p>
485 ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
486 const ssize_t y,const size_t width,const size_t height)
489 <p>A description of each parameter follows:</p>
492 <p>the magick wand.</p>
494 <h5>x,y,columns,rows</h5>
495 <p>These values define the perimeter of a extent of pixel_wands view.</p>
498 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="SetImageViewDescription">SetImageViewDescription</a></h2>
499 <div class="doc-section">
501 <p>SetImageViewDescription() associates a description with an image view.</p>
503 <p>The format of the SetImageViewDescription method is:</p>
506 void SetImageViewDescription(ImageView *image_view,
507 const char *description)
510 <p>A description of each parameter follows:</p>
513 <p>the image view.</p>
516 <p>the image view description.</p>
519 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="SetImageViewIterator">SetImageViewIterator</a></h2>
520 <div class="doc-section">
522 <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>
524 <p>The callback signature is:</p>
527 MagickBooleanType SetImageViewMethod(ImageView *destination,
528 const ssize_t y,const int thread_id,void *context)
531 <p>Use this pragma if the view is not single threaded:</p>
537 <p>to define a section of code in your callback set method that must be executed by a single thread at a time.</p>
539 <p>The format of the SetImageViewIterator method is:</p>
542 MagickBooleanType SetImageViewIterator(ImageView *destination,
543 SetImageViewMethod set,void *context)
546 <p>A description of each parameter follows:</p>
549 <p>the image view.</p>
552 <p>the set callback method.</p>
555 <p>the user defined context.</p>
558 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_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.imagemagick.org/api/MagickCore/image-view_8c.html" id="TransferImageViewIterator">TransferImageViewIterator</a></h2>
580 <div class="doc-section">
582 <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>
584 <p>The callback signature is:</p>
587 MagickBooleanType TransferImageViewMethod(const ImageView *source,
588 ImageView *destination,const ssize_t y,const int thread_id,
592 <p>Use this pragma if the view is not single threaded:</p>
598 <p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p>
600 <p>The format of the TransferImageViewIterator method is:</p>
603 MagickBooleanType TransferImageViewIterator(ImageView *source,
604 ImageView *destination,TransferImageViewMethod transfer,void *context)
607 <p>A description of each parameter follows:</p>
610 <p>the source image view.</p>
613 <p>the destination image view.</p>
616 <p>the transfer callback method.</p>
619 <p>the user defined context.</p>
622 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="UpdateImageViewIterator">UpdateImageViewIterator</a></h2>
623 <div class="doc-section">
625 <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>
627 <p>The callback signature is:</p>
630 MagickBooleanType UpdateImageViewMethod(ImageView *source,
631 const ssize_t y,const int thread_id,void *context)
634 <p>Use this pragma if the view is not single threaded:</p>
640 <p>to define a section of code in your callback update method that must be executed by a single thread at a time.</p>
642 <p>The format of the UpdateImageViewIterator method is:</p>
645 MagickBooleanType UpdateImageViewIterator(ImageView *source,
646 UpdateImageViewMethod update,void *context)
649 <p>A description of each parameter follows:</p>
652 <p>the source image view.</p>
655 <p>the update callback method.</p>
658 <p>the user defined context.</p>
665 <span id="linkbar-west"> </span>
\r
666 <span id="linkbar-center">
\r
667 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> •
\r
668 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
\r
670 <span id="linkbar-east"> </span>
\r
672 <div class="footer">
\r
673 <span id="footer-west">© 1999-2011 ImageMagick Studio LLC</span>
\r
674 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
\r
676 <div style="clear: both; margin: 0; width: 100%; "></div>
\r
677 <script type="text/javascript">
\r
678 var _gaq = _gaq || [];
\r
679 _gaq.push(['_setAccount', 'UA-17690367-1']);
\r
680 _gaq.push(['_trackPageview']);
\r
683 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
\r
684 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
\r
685 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
\r