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 <div style="margin: 17px auto; float: left;">
\r
53 <script type="text/javascript">
\r
55 google_ad_client = "pub-3129977114552745";
\r
56 google_ad_slot = "5439289906";
\r
57 google_ad_width = 728;
\r
58 google_ad_height = 90;
\r
61 <script type="text/javascript"
\r
62 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
\r
65 <a href="http://www.imagemagick.org/discourse-server/">
\r
66 <img src="../../images/logo.jpg"
\r
67 alt="ImageMagick Logo"
\r
68 style="width: 123px; height: 118px; border: 0px; float: right;" /></a>
\r
69 <a href="../../index.html">
\r
70 <img src="../../images/sprite.jpg"
\r
71 alt="ImageMagick Sprite"
\r
72 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
\r
75 <div class="westbar">
\r
78 <a title="About ImageMagick" href="../../index.html">About ImageMagick</a>
80 <div class="sep"></div>
\r
82 <a title="Binary Releases" href="../../www/binary-releases.html">Binary Releases</a>
85 <a title="Binary Release: Unix" href="../../www/binary-releases.html#unix">Unix</a>
88 <a title="Binary Release: MacOS X" href="../../www/binary-releases.html#macosx">Mac OS X</a>
91 <a title="Binary Release: iPhone" href="../../www/binary-releases.html#iPhone">iPhone</a>
94 <a title="Binary Release: Windows" href="../../www/binary-releases.html#windows">Windows</a>
96 <div class="sep"></div>
\r
98 <a title="Command-line Tools" href="../../www/command-line-tools.html">Command-line Tools</a>
101 <a title="Command-line Tools: Processing" href="../../www/command-line-processing.html">Processing</a>
104 <a title="Command-line Tools: Options" href="../../www/command-line-options.html">Options</a>
107 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
110 <a title="Program Interfaces" href="../../www/api.html">Program Interfaces</a>
113 <a title="Program Interface: MagickWand" href="../../www/magick-wand.html">MagickWand</a>
116 <a title="Program Interface: MagickCore" href="../../www/magick-core.html">MagickCore</a>
119 <a title="Program Interface: PerlMagick" href="../../www/perl-magick.html">PerlMagick</a>
122 <a title="Program Interface: Magick++" href="../../www/magick++.html">Magick++</a>
124 <div class="sep"></div>
\r
126 <a title="Install from Source" href="../../www/install-source.html">Install from Source</a>
129 <a title="Install from Source: Unix" href="../../www/install-source.html#unix">Unix</a>
132 <a title="Install from Source: Windows" href="../../www/install-source.html#windows">Windows</a>
135 <a title="Resources" href="../../www/resources.html">Resources</a>
138 <a title="Architecture" href="../../www/architecture.html">Architecture</a>
141 <a title="Download" href="../../www/download.html">Download</a>
143 <div class="sep"></div>
\r
145 <a title="Search" href="../../www/search.html">Search</a>
147 <div class="sep"></div>
\r
149 <a title="Site Map" href="../../www/sitemap.html">Site Map</a>
152 <a title="Site Map: Links" href="../../www/links.html">Links</a>
154 <div class="sep"></div>
\r
156 <a title="Sponsors" href="../../www/sponsors.html">Sponsors:</a>
158 <a href="http://www.networkredux.com">
159 <img src="../../images/networkredux.png" alt="[sponsor]"
160 style="margin-top: 4px; margin-left: 4px; border: 0px; float: left;" /></a>
161 <div class="sponsbox">
162 <div class="sponsor">
163 <a title="Sponsor: Website Hosting" href="http://www.hostreviewgeeks.com">Website Hosting</a><!-- 201108010090 alexanian media -->
165 <div class="sponsor">
166 <a title="Sponsor: Druckerei" href="http://www.allesdruck.de">Druckerei</a><!-- 201303011500 r.leo -->
168 <div class="sponsor">
169 <a title="Sponsor: Web Hosting Reviews" href="http://www.webhostingmasters.com">Web Hosting Reviews</a><!-- 201107011500 affliatelabel -->
171 <div class="sponsor">
172 <a title="Sponsor: Hotel München" href="http://www.messehotel-erb-muenchen.de">Hotel München</a><!-- 201111010450 cerb -->
174 <div class="sponsor">
175 <a title="Sponsor: Best Web Hosting" href="http://webhostinggeeks.com">Best Web Hosting</a><!-- 201110010720 -->
177 <div class="sponsor">
178 <a title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
180 <div class="sponsor">
181 <a title="Sponsor: Web Hosting Ratings" href="http://webhostingrating.com">Web Hosting Ratings</a><!-- 201110010720 -->
183 <div class="sponsor">
184 <a title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
186 <div class="sponsor">
187 <a title="Sponsor: Autoteile Online Shop" href="http://www.autoteile-carparts.de">Autoteile Online Shop</a><!-- 2011070100030 autoteile-Carparts-->
193 <div class="eastbar">
\r
199 <h1>Module image-view Methods</h1>
200 <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>
202 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="CloneImageView">CloneImageView</a></h2>
203 <div class="doc-section">
205 <p>CloneImageView() makes a copy of the specified image view.</p>
207 <p>The format of the CloneImageView method is:</p>
210 ImageView *CloneImageView(const ImageView *image_view)
213 <p>A description of each parameter follows:</p>
216 <p>the image view.</p>
219 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="DestroyImageView">DestroyImageView</a></h2>
220 <div class="doc-section">
222 <p>DestroyImageView() deallocates memory associated with a image view.</p>
224 <p>The format of the DestroyImageView method is:</p>
227 ImageView *DestroyImageView(ImageView *image_view)
230 <p>A description of each parameter follows:</p>
233 <p>the image view.</p>
236 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a></h2>
237 <div class="doc-section">
239 <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>
241 <p>The callback signature is:</p>
244 MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source,
245 const ImageView *duplex,ImageView *destination,const ssize_t y,
246 const int thread_id,void *context)
249 <p>Use this pragma if the view is not single threaded:</p>
255 <p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p>
257 <p>The format of the DuplexTransferImageViewIterator method is:</p>
260 MagickBooleanType DuplexTransferImageViewIterator(ImageView *source,
261 ImageView *duplex,ImageView *destination,
262 DuplexTransferImageViewMethod transfer,void *context)
265 <p>A description of each parameter follows:</p>
268 <p>the source image view.</p>
271 <p>the duplex image view.</p>
274 <p>the destination image view.</p>
277 <p>the transfer callback method.</p>
280 <p>the user defined context.</p>
283 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewAuthenticIndexes">GetImageViewAuthenticIndexes</a></h2>
284 <div class="doc-section">
286 <p>GetImageViewAuthenticIndexes() returns the image view authentic indexes.</p>
288 <p>The format of the GetImageViewAuthenticPixels method is:</p>
291 IndexPacket *GetImageViewAuthenticIndexes(const ImageView *image_view)
294 <p>A description of each parameter follows:</p>
297 <p>the image view.</p>
300 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a></h2>
301 <div class="doc-section">
303 <p>GetImageViewAuthenticPixels() returns the image view authentic pixels.</p>
305 <p>The format of the GetImageViewAuthenticPixels method is:</p>
308 PixelPacket *GetImageViewAuthenticPixels(const ImageView *image_view)
311 <p>A description of each parameter follows:</p>
314 <p>the image view.</p>
317 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewException">GetImageViewException</a></h2>
318 <div class="doc-section">
320 <p>GetImageViewException() returns the severity, reason, and description of any error that occurs when utilizing a image view.</p>
322 <p>The format of the GetImageViewException method is:</p>
325 char *GetImageViewException(const PixelImage *image_view,
326 ExceptionType *severity)
329 <p>A description of each parameter follows:</p>
332 <p>the pixel image_view.</p>
335 <p>the severity of the error is returned here.</p>
338 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewExtent">GetImageViewExtent</a></h2>
339 <div class="doc-section">
341 <p>GetImageViewExtent() returns the image view extent.</p>
343 <p>The format of the GetImageViewExtent method is:</p>
346 RectangleInfo GetImageViewExtent(const ImageView *image_view)
349 <p>A description of each parameter follows:</p>
352 <p>the image view.</p>
355 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewImage">GetImageViewImage</a></h2>
356 <div class="doc-section">
358 <p>GetImageViewImage() returns the image associated with the image view.</p>
360 <p>The format of the GetImageViewImage method is:</p>
363 MagickCore *GetImageViewImage(const ImageView *image_view)
366 <p>A description of each parameter follows:</p>
369 <p>the image view.</p>
372 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewIterator">GetImageViewIterator</a></h2>
373 <div class="doc-section">
375 <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>
377 <p>The callback signature is:</p>
380 MagickBooleanType GetImageViewMethod(const ImageView *source,
381 const ssize_t y,const int thread_id,void *context)
384 <p>Use this pragma if the view is not single threaded:</p>
390 <p>to define a section of code in your callback get method that must be executed by a single thread at a time.</p>
392 <p>The format of the GetImageViewIterator method is:</p>
395 MagickBooleanType GetImageViewIterator(ImageView *source,
396 GetImageViewMethod get,void *context)
399 <p>A description of each parameter follows:</p>
402 <p>the source image view.</p>
405 <p>the get callback method.</p>
408 <p>the user defined context.</p>
411 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewVirtualIndexes">GetImageViewVirtualIndexes</a></h2>
412 <div class="doc-section">
414 <p>GetImageViewVirtualIndexes() returns the image view virtual indexes.</p>
416 <p>The format of the GetImageViewVirtualIndexes method is:</p>
419 const IndexPacket *GetImageViewVirtualIndexes(
420 const ImageView *image_view)
423 <p>A description of each parameter follows:</p>
426 <p>the image view.</p>
429 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewVirtualPixels">GetImageViewVirtualPixels</a></h2>
430 <div class="doc-section">
432 <p>GetImageViewVirtualPixels() returns the image view virtual pixels.</p>
434 <p>The format of the GetImageViewVirtualPixels method is:</p>
437 const PixelPacket *GetImageViewVirtualPixels(const ImageView *image_view)
440 <p>A description of each parameter follows:</p>
443 <p>the image view.</p>
446 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="IsImageView">IsImageView</a></h2>
447 <div class="doc-section">
449 <p>IsImageView() returns MagickTrue if the the parameter is verified as a image view object.</p>
451 <p>The format of the IsImageView method is:</p>
454 MagickBooleanType IsImageView(const ImageView *image_view)
457 <p>A description of each parameter follows:</p>
460 <p>the image view.</p>
463 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="NewImageView">NewImageView</a></h2>
464 <div class="doc-section">
466 <p>NewImageView() returns a image view required for all other methods in the Image View API.</p>
468 <p>The format of the NewImageView method is:</p>
471 ImageView *NewImageView(MagickCore *wand)
474 <p>A description of each parameter follows:</p>
480 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="NewImageViewRegion">NewImageViewRegion</a></h2>
481 <div class="doc-section">
483 <p>NewImageViewRegion() returns a image view required for all other methods in the Image View API.</p>
485 <p>The format of the NewImageViewRegion method is:</p>
488 ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
489 const ssize_t y,const size_t width,const size_t height)
492 <p>A description of each parameter follows:</p>
495 <p>the magick wand.</p>
497 <h5>x,y,columns,rows</h5>
498 <p>These values define the perimeter of a extent of pixel_wands view.</p>
501 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="SetImageViewDescription">SetImageViewDescription</a></h2>
502 <div class="doc-section">
504 <p>SetImageViewDescription() associates a description with an image view.</p>
506 <p>The format of the SetImageViewDescription method is:</p>
509 void SetImageViewDescription(ImageView *image_view,
510 const char *description)
513 <p>A description of each parameter follows:</p>
516 <p>the image view.</p>
519 <p>the image view description.</p>
522 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="SetImageViewIterator">SetImageViewIterator</a></h2>
523 <div class="doc-section">
525 <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>
527 <p>The callback signature is:</p>
530 MagickBooleanType SetImageViewMethod(ImageView *destination,
531 const ssize_t y,const int thread_id,void *context)
534 <p>Use this pragma if the view is not single threaded:</p>
540 <p>to define a section of code in your callback set method that must be executed by a single thread at a time.</p>
542 <p>The format of the SetImageViewIterator method is:</p>
545 MagickBooleanType SetImageViewIterator(ImageView *destination,
546 SetImageViewMethod set,void *context)
549 <p>A description of each parameter follows:</p>
552 <p>the image view.</p>
555 <p>the set callback method.</p>
558 <p>the user defined context.</p>
561 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="SetImageViewThreads">SetImageViewThreads</a></h2>
562 <div class="doc-section">
564 <p>SetImageViewThreads() sets the number of threads in a thread team.</p>
566 <p>The format of the SetImageViewDescription method is:</p>
569 void SetImageViewThreads(ImageView *image_view,
570 const size_t number_threads)
573 <p>A description of each parameter follows:</p>
576 <p>the image view.</p>
578 <h5>number_threads</h5>
579 <p>the number of threads in a thread team.</p>
582 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="TransferImageViewIterator">TransferImageViewIterator</a></h2>
583 <div class="doc-section">
585 <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>
587 <p>The callback signature is:</p>
590 MagickBooleanType TransferImageViewMethod(const ImageView *source,
591 ImageView *destination,const ssize_t y,const int thread_id,
595 <p>Use this pragma if the view is not single threaded:</p>
601 <p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p>
603 <p>The format of the TransferImageViewIterator method is:</p>
606 MagickBooleanType TransferImageViewIterator(ImageView *source,
607 ImageView *destination,TransferImageViewMethod transfer,void *context)
610 <p>A description of each parameter follows:</p>
613 <p>the source image view.</p>
616 <p>the destination image view.</p>
619 <p>the transfer callback method.</p>
622 <p>the user defined context.</p>
625 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="UpdateImageViewIterator">UpdateImageViewIterator</a></h2>
626 <div class="doc-section">
628 <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>
630 <p>The callback signature is:</p>
633 MagickBooleanType UpdateImageViewMethod(ImageView *source,
634 const ssize_t y,const int thread_id,void *context)
637 <p>Use this pragma if the view is not single threaded:</p>
643 <p>to define a section of code in your callback update method that must be executed by a single thread at a time.</p>
645 <p>The format of the UpdateImageViewIterator method is:</p>
648 MagickBooleanType UpdateImageViewIterator(ImageView *source,
649 UpdateImageViewMethod update,void *context)
652 <p>A description of each parameter follows:</p>
655 <p>the source image view.</p>
658 <p>the update callback method.</p>
661 <p>the user defined context.</p>
668 <span id="linkbar-west"> </span>
\r
669 <span id="linkbar-center">
\r
670 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> •
\r
671 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
\r
673 <span id="linkbar-east"> </span>
\r
675 <div class="footer">
\r
676 <span id="footer-west">© 1999-2011 ImageMagick Studio LLC</span>
\r
677 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
\r
679 <div style="clear: both; margin: 0; width: 100%; "></div>
\r
680 <script type="text/javascript">
\r
681 var _gaq = _gaq || [];
\r
682 _gaq.push(['_setAccount', 'UA-17690367-1']);
\r
683 _gaq.push(['_trackPageview']);
\r
686 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
\r
687 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
\r
688 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
\r