blob: abbbed0c08adc5b30d9f114a043cb411137312d2 [file] [log] [blame]
cristydcca3fa2010-12-29 21:50:07 +00001<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr">
cristy10c87152010-06-26 16:12:21 +00004<head>
cristy3c98a4f2010-08-13 20:09:41 +00005 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
6 <meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U="/>
cristyffb69ed2010-12-25 00:06:48 +00007 <title>ImageMagick: MagickCore, C API for ImageMagick: Image View Methods</title>
cristy10c87152010-06-26 16:12:21 +00008 <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"/>
cristy3c98a4f2010-08-13 20:09:41 +000011 <meta name="Application-name" content="ImageMagick"/>
cristydcca3fa2010-12-29 21:50:07 +000012 <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."/>
cristy3c98a4f2010-08-13 20:09:41 +000013 <meta name="Application-url" content="http://www.imagemagick.org"/>
cristy10c87152010-06-26 16:12:21 +000014 <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"/>
cristy10c87152010-06-26 16:12:21 +000016 <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"/>
cristy4103d562010-12-10 01:38:54 +000022 <meta name="Copyright" content="Copyright (c) 1999-2011 ImageMagick Studio LLC"/>
cristy10c87152010-06-26 16:12:21 +000023 <meta name="Distribution" content="Global"/>
cristydcca3fa2010-12-29 21:50:07 +000024 <link rel="icon" href="../../images/wand.png"/>
cristy3c98a4f2010-08-13 20:09:41 +000025 <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"/>
cristy7a40ba82011-01-08 20:31:18 +000027 <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
cristy3c98a4f2010-08-13 20:09:41 +000028 <style type="text/css" media="all">
29 @import url("../../www/magick.css");
30 </style>
cristydcca3fa2010-12-29 21:50:07 +000031 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
cristy361f4662010-12-31 23:02:52 +000032 <script type="text/javascript" src="../fancybox/jquery.fancybox-1.3.4.pack.js"></script>
33 <link rel="stylesheet" type="text/css" href="../fancybox/jquery.fancybox-1.3.4.css" media="screen" />
34 <script type="text/javascript">
35 $(document).ready(function() {
36 $("a[href$=.jpg],a[href$=.png],a[href$=.gif]").fancybox({
37 'transitionIn' : 'elastic',
38 'transitionOut' : 'elastic',
39 'overlayShow' : false,
40 'opacity' : true
41 });
42 });
43 </script>
cristy10c87152010-06-26 16:12:21 +000044</head>
45
46<body id="www-imagemagick-org">
47<div class="titlebar">
48<a href="../../index.html">
49 <img src="../../images/script.png" alt="[ImageMagick]"
50 style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>
51<a href="http://www.networkredux.com">
52 <img src="../../images/networkredux.png" alt="[sponsor]"
cristy52923442011-01-15 22:54:31 +000053 style="margin-top: 42px; border: 0px; float: left;" /></a>
cristy10c87152010-06-26 16:12:21 +000054<a href="http://www.imagemagick.org/discourse-server/">
55 <img src="../../images/logo.jpg" alt=""
cristy178edaf2011-01-23 03:42:39 +000056 style="width: 123px; height: 118px; border: 0px; float: right;" /></a>
cristy10c87152010-06-26 16:12:21 +000057<a href="../../index.html">
58 <img src="../../images/sprite.jpg" alt=""
59 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
60</div>
61
cristyce69bb02010-07-27 19:49:46 +000062<div class="westbar">
cristy10c87152010-06-26 16:12:21 +000063
64<div class="menu">
65 <a title="About ImageMagick" href="../../index.html">About ImageMagick</a>
66</div>
67<div class="sep"></div>
68<div class="menu">
69 <a title="Binary Releases" href="../../www/binary-releases.html">Binary Releases</a>
70</div>
71<div class="sub">
72 <a title="Binary Release: Unix" href="../../www/binary-releases.html#unix">Unix</a>
73</div>
74<div class="sub">
75 <a title="Binary Release: MacOS X" href="../../www/binary-releases.html#macosx">Mac OS X</a>
76</div>
77<div class="sub">
78 <a title="Binary Release: Windows" href="../../www/binary-releases.html#windows">Windows</a>
79</div>
80<div class="sep"></div>
81<div class="menu">
82 <a title="Command-line Tools" href="../../www/command-line-tools.html">Command-line Tools</a>
83</div>
84<div class="sub">
85 <a title="Command-line Tools: Processing" href="../../www/command-line-processing.html">Processing</a>
86</div>
87<div class="sub">
88 <a title="Command-line Tools: Options" href="../../www/command-line-options.html">Options</a>
89</div>
90<div class="sub">
91 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
92</div>
93<div class="menu">
94 <a title="Program Interfaces" href="../../www/api.html">Program Interfaces</a>
95</div>
96<div class="sub">
97 <a title="Program Interface: MagickWand" href="../../www/magick-wand.html">MagickWand</a>
98</div>
99<div class="sub">
100 <a title="Program Interface: MagickCore" href="../../www/magick-core.html">MagickCore</a>
101</div>
102<div class="sub">
103 <a title="Program Interface: PerlMagick" href="../../www/perl-magick.html">PerlMagick</a>
104</div>
105<div class="sub">
cristydcca3fa2010-12-29 21:50:07 +0000106 <a title="Program Interface: Magick++" href="../../www/magick++.html">Magick++</a>
cristy10c87152010-06-26 16:12:21 +0000107</div>
108<div class="sep"></div>
109<div class="menu">
110 <a title="Install from Source" href="../../www/install-source.html">Install from Source</a>
111</div>
112<div class="sub">
113 <a title="Install from Source: Unix" href="../../www/install-source.html#unix">Unix</a>
114</div>
115<div class="sub">
116 <a title="Install from Source: Windows" href="../../www/install-source.html#windows">Windows</a>
117 </div>
118<div class="menu">
119 <a title="Resources" href="../../www/resources.html">Resources</a>
120</div>
121<div class="menu">
122 <a title="Architecture" href="../../www/architecture.html">Architecture</a>
123</div>
124<div class="menu">
125 <a title="Download" href="../../www/download.html">Download</a>
126</div>
127<div class="sep"></div>
128<div class="menu">
cristy52923442011-01-15 22:54:31 +0000129 <a title="Search" href="../../www/search.html">Search</a>
cristy10c87152010-06-26 16:12:21 +0000130</div>
131<div class="sep"></div>
132<div class="menu">
cristyffb69ed2010-12-25 00:06:48 +0000133 <a title="Site Map" href="../../www/sitemap.html">Site Map</a>
cristy10c87152010-06-26 16:12:21 +0000134</div>
135<div class="sub">
cristyffb69ed2010-12-25 00:06:48 +0000136 <a title="Site Map: Links" href="../../www/links.html">Links</a>
cristy10c87152010-06-26 16:12:21 +0000137</div>
138<div class="sep"></div>
139<div class="menu">
140 <a title="Sponsors" href="../../www/sponsors.html">Sponsors:</a>
141
142<div class="sponsbox">
cristy178edaf2011-01-23 03:42:39 +0000143<div class="sponsor">
144 <a title="Sponsor: Druckerei" href="http://www.allesdruck.de">Druckerei</a><!-- 201106010240 -->
145</div>
cristyec6b4752011-01-08 03:16:23 +0000146<div class="sponsor">
cristy52923442011-01-15 22:54:31 +0000147 <a title="Sponsor: Web Hosting" href="http://www.bodhost.com/hosting.shtml">Web Hosting</a><!-- 201104010090 -->
cristy73fd1cd2010-09-12 19:14:25 +0000148</div>
149<div class="sponsor">
cristyc5baf4f2010-08-31 15:05:33 +0000150 <a title="Sponsor: Image Converter" href="http://www.batchphoto.com">Image Converter</a><!-- 201103010900 Bits Coffee-->
151</div>
152<div class="sponsor">
cristy851dbce2010-08-06 21:40:00 +0000153 <a title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
154</div>
cristyec6b4752011-01-08 03:16:23 +0000155<div class="sponsor">
cristy178edaf2011-01-23 03:42:39 +0000156 <a title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
157</div>
158<div class="sponsor">
cristyf7964272011-01-30 03:49:12 +0000159 <a title="Sponsor: Custom T-Shirts" href="http://www.ooshirts.com">Custom T-Shirts</a><!-- 2011050100030 ooshirts.com-->
cristyec6b4752011-01-08 03:16:23 +0000160</div>
cristy10c87152010-06-26 16:12:21 +0000161</div>
cristyce69bb02010-07-27 19:49:46 +0000162</div>
163</div>
cristy10c87152010-06-26 16:12:21 +0000164
cristyce69bb02010-07-27 19:49:46 +0000165<div class="eastbar">
166 <script type="text/javascript">
167 <!--
168 google_ad_client = "pub-3129977114552745";
cristyce69bb02010-07-27 19:49:46 +0000169 google_ad_slot = "0574824969";
170 google_ad_width = 160;
171 google_ad_height = 600;
172 //-->
173 </script>
174 <script type="text/javascript"
175 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
176 </script>
cristy10c87152010-06-26 16:12:21 +0000177</div>
178
179<div class="main">
180
cristy307ba182010-12-25 01:00:34 +0000181<h1>Module image-view
182 Methods</h1>
cristyce66ab12010-10-21 23:36:32 +0000183<p class="navigation-index">[<a href="#CloneImageView">CloneImageView</a> &bull; <a href="#DestroyImageView">DestroyImageView</a> &bull; <a href="#DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a> &bull; <a href="#GetImageViewAuthenticIndexes">GetImageViewAuthenticIndexes</a> &bull; <a href="#GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a> &bull; <a href="#GetImageViewException">GetImageViewException</a> &bull; <a href="#GetImageViewExtent">GetImageViewExtent</a> &bull; <a href="#GetImageViewImage">GetImageViewImage</a> &bull; <a href="#GetImageViewIterator">GetImageViewIterator</a> &bull; <a href="#GetImageViewVirtualIndexes">GetImageViewVirtualIndexes</a> &bull; <a href="#GetImageViewVirtualPixels">GetImageViewVirtualPixels</a> &bull; <a href="#IsImageView">IsImageView</a> &bull; <a href="#NewImageView">NewImageView</a> &bull; <a href="#NewImageViewRegion">NewImageViewRegion</a> &bull; <a href="#SetImageViewDescription">SetImageViewDescription</a> &bull; <a href="#SetImageViewIterator">SetImageViewIterator</a> &bull; <a href="#SetImageViewThreads">SetImageViewThreads</a> &bull; <a href="#TransferImageViewIterator">TransferImageViewIterator</a> &bull; <a href="#UpdateImageViewIterator">UpdateImageViewIterator</a>]</p>
cristy10c87152010-06-26 16:12:21 +0000184
cristy7a40ba82011-01-08 20:31:18 +0000185<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
186_8c.html" id="CloneImageView">CloneImageView</a></h2>
cristy10c87152010-06-26 16:12:21 +0000187<div class="doc-section">
188
cristy7a40ba82011-01-08 20:31:18 +0000189<p>CloneImageView() makes a copy of the specified image view.</p>
cristy10c87152010-06-26 16:12:21 +0000190
191<p>The format of the CloneImageView method is:</p>
192
193<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000194 ImageView *CloneImageView(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000195</pre>
196
cristy7a40ba82011-01-08 20:31:18 +0000197<p>A description of each parameter follows:</p>
cristy10c87152010-06-26 16:12:21 +0000198
cristy73b7d4c2010-06-27 00:31:00 +0000199<h5>image_view</h5>
cristy7a40ba82011-01-08 20:31:18 +0000200<p>the image view.</p>
cristy10c87152010-06-26 16:12:21 +0000201
202 </div>
cristy7a40ba82011-01-08 20:31:18 +0000203<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
204_8c.html" id="DestroyImageView">DestroyImageView</a></h2>
cristy10c87152010-06-26 16:12:21 +0000205<div class="doc-section">
206
cristy7a40ba82011-01-08 20:31:18 +0000207<p>DestroyImageView() deallocates memory associated with a image view.</p>
cristy10c87152010-06-26 16:12:21 +0000208
209<p>The format of the DestroyImageView method is:</p>
210
211<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000212 ImageView *DestroyImageView(ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000213</pre>
214
cristy7a40ba82011-01-08 20:31:18 +0000215<p>A description of each parameter follows:</p>
cristy10c87152010-06-26 16:12:21 +0000216
cristy73b7d4c2010-06-27 00:31:00 +0000217<h5>image_view</h5>
cristy7a40ba82011-01-08 20:31:18 +0000218<p>the image view.</p>
cristy10c87152010-06-26 16:12:21 +0000219
220 </div>
cristy7a40ba82011-01-08 20:31:18 +0000221<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
222_8c.html" id="DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a></h2>
cristy10c87152010-06-26 16:12:21 +0000223<div class="doc-section">
224
cristy7a40ba82011-01-08 20:31:18 +0000225<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>
cristy10c87152010-06-26 16:12:21 +0000226
cristyd6dfc0d2010-06-27 19:30:49 +0000227<p>The callback signature is:</p>
228
229<pre class="text">
230 MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source,
231 const ImageView *duplex,ImageView *destination,const ssize_t y,
232 const int thread_id,void *context)
233</pre>
234
cristy73b7d4c2010-06-27 00:31:00 +0000235<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000236
237<pre class="text">
238 #pragma omp critical
239</pre>
240
cristy7a40ba82011-01-08 20:31:18 +0000241<p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p>
cristy10c87152010-06-26 16:12:21 +0000242
243<p>The format of the DuplexTransferImageViewIterator method is:</p>
244
245<pre class="code">
246 MagickBooleanType DuplexTransferImageViewIterator(ImageView *source,
247 ImageView *duplex,ImageView *destination,
248 DuplexTransferImageViewMethod transfer,void *context)
249</pre>
250
cristy7a40ba82011-01-08 20:31:18 +0000251<p>A description of each parameter follows:</p>
cristy10c87152010-06-26 16:12:21 +0000252
253<h5>source</h5>
cristy7a40ba82011-01-08 20:31:18 +0000254<p>the source image view.</p>
cristy10c87152010-06-26 16:12:21 +0000255
256<h5>duplex</h5>
cristy7a40ba82011-01-08 20:31:18 +0000257<p>the duplex image view.</p>
cristy10c87152010-06-26 16:12:21 +0000258
259<h5>destination</h5>
cristy7a40ba82011-01-08 20:31:18 +0000260<p>the destination image view.</p>
cristy10c87152010-06-26 16:12:21 +0000261
262<h5>transfer</h5>
cristy7a40ba82011-01-08 20:31:18 +0000263<p>the transfer callback method.</p>
cristy10c87152010-06-26 16:12:21 +0000264
265<h5>context</h5>
cristy7a40ba82011-01-08 20:31:18 +0000266<p>the user defined context.</p>
cristy10c87152010-06-26 16:12:21 +0000267
268 </div>
cristy7a40ba82011-01-08 20:31:18 +0000269<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
270_8c.html" id="GetImageViewAuthenticIndexes">GetImageViewAuthenticIndexes</a></h2>
cristy73b7d4c2010-06-27 00:31:00 +0000271<div class="doc-section">
272
cristy7a40ba82011-01-08 20:31:18 +0000273<p>GetImageViewAuthenticIndexes() returns the image view authentic indexes.</p>
cristy73b7d4c2010-06-27 00:31:00 +0000274
275<p>The format of the GetImageViewAuthenticPixels method is:</p>
276
277<pre class="code">
278 IndexPacket *GetImageViewAuthenticIndexes(const ImageView *image_view)
279</pre>
280
cristy7a40ba82011-01-08 20:31:18 +0000281<p>A description of each parameter follows:</p>
cristy73b7d4c2010-06-27 00:31:00 +0000282
283<h5>image_view</h5>
cristy7a40ba82011-01-08 20:31:18 +0000284<p>the image view.</p>
cristy73b7d4c2010-06-27 00:31:00 +0000285
286 </div>
cristy7a40ba82011-01-08 20:31:18 +0000287<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
288_8c.html" id="GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a></h2>
cristy73b7d4c2010-06-27 00:31:00 +0000289<div class="doc-section">
290
cristy7a40ba82011-01-08 20:31:18 +0000291<p>GetImageViewAuthenticPixels() returns the image view authentic pixels.</p>
cristy73b7d4c2010-06-27 00:31:00 +0000292
293<p>The format of the GetImageViewAuthenticPixels method is:</p>
294
295<pre class="code">
296 PixelPacket *GetImageViewAuthenticPixels(const ImageView *image_view)
297</pre>
298
cristy7a40ba82011-01-08 20:31:18 +0000299<p>A description of each parameter follows:</p>
cristy73b7d4c2010-06-27 00:31:00 +0000300
301<h5>image_view</h5>
cristy7a40ba82011-01-08 20:31:18 +0000302<p>the image view.</p>
cristy73b7d4c2010-06-27 00:31:00 +0000303
304 </div>
cristy7a40ba82011-01-08 20:31:18 +0000305<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
306_8c.html" id="GetImageViewException">GetImageViewException</a></h2>
cristy10c87152010-06-26 16:12:21 +0000307<div class="doc-section">
308
cristy7a40ba82011-01-08 20:31:18 +0000309<p>GetImageViewException() returns the severity, reason, and description of any error that occurs when utilizing a image view.</p>
cristy10c87152010-06-26 16:12:21 +0000310
311<p>The format of the GetImageViewException method is:</p>
312
313<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000314 char *GetImageViewException(const PixelImage *image_view,
cristy10c87152010-06-26 16:12:21 +0000315 ExceptionType *severity)
316</pre>
317
cristy7a40ba82011-01-08 20:31:18 +0000318<p>A description of each parameter follows:</p>
cristy10c87152010-06-26 16:12:21 +0000319
cristy73b7d4c2010-06-27 00:31:00 +0000320<h5>image_view</h5>
cristy7a40ba82011-01-08 20:31:18 +0000321<p>the pixel image_view.</p>
cristy10c87152010-06-26 16:12:21 +0000322
323<h5>severity</h5>
cristy7a40ba82011-01-08 20:31:18 +0000324<p>the severity of the error is returned here.</p>
cristy10c87152010-06-26 16:12:21 +0000325
326 </div>
cristy7a40ba82011-01-08 20:31:18 +0000327<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
328_8c.html" id="GetImageViewExtent">GetImageViewExtent</a></h2>
cristy10c87152010-06-26 16:12:21 +0000329<div class="doc-section">
330
cristy7a40ba82011-01-08 20:31:18 +0000331<p>GetImageViewExtent() returns the image view extent.</p>
cristy10c87152010-06-26 16:12:21 +0000332
cristyc3ebda22010-06-27 17:11:57 +0000333<p>The format of the GetImageViewExtent method is:</p>
cristy10c87152010-06-26 16:12:21 +0000334
335<pre class="code">
cristyc3ebda22010-06-27 17:11:57 +0000336 RectangleInfo GetImageViewExtent(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000337</pre>
338
cristy7a40ba82011-01-08 20:31:18 +0000339<p>A description of each parameter follows:</p>
cristy10c87152010-06-26 16:12:21 +0000340
cristy73b7d4c2010-06-27 00:31:00 +0000341<h5>image_view</h5>
cristy7a40ba82011-01-08 20:31:18 +0000342<p>the image view.</p>
cristy73b7d4c2010-06-27 00:31:00 +0000343
344 </div>
cristy7a40ba82011-01-08 20:31:18 +0000345<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
346_8c.html" id="GetImageViewImage">GetImageViewImage</a></h2>
cristy73b7d4c2010-06-27 00:31:00 +0000347<div class="doc-section">
348
cristy7a40ba82011-01-08 20:31:18 +0000349<p>GetImageViewImage() returns the image associated with the image view.</p>
cristy73b7d4c2010-06-27 00:31:00 +0000350
351<p>The format of the GetImageViewImage method is:</p>
352
353<pre class="code">
354 MagickCore *GetImageViewImage(const ImageView *image_view)
355</pre>
356
cristy7a40ba82011-01-08 20:31:18 +0000357<p>A description of each parameter follows:</p>
cristy73b7d4c2010-06-27 00:31:00 +0000358
359<h5>image_view</h5>
cristy7a40ba82011-01-08 20:31:18 +0000360<p>the image view.</p>
cristy10c87152010-06-26 16:12:21 +0000361
362 </div>
cristy7a40ba82011-01-08 20:31:18 +0000363<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
364_8c.html" id="GetImageViewIterator">GetImageViewIterator</a></h2>
cristy10c87152010-06-26 16:12:21 +0000365<div class="doc-section">
366
cristy7a40ba82011-01-08 20:31:18 +0000367<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>
cristy10c87152010-06-26 16:12:21 +0000368
cristyd6dfc0d2010-06-27 19:30:49 +0000369<p>The callback signature is:</p>
370
371<pre class="text">
372 MagickBooleanType GetImageViewMethod(const ImageView *source,
373 const ssize_t y,const int thread_id,void *context)
374</pre>
375
cristy73b7d4c2010-06-27 00:31:00 +0000376<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000377
378<pre class="text">
379 #pragma omp critical
380</pre>
381
cristy7a40ba82011-01-08 20:31:18 +0000382<p>to define a section of code in your callback get method that must be executed by a single thread at a time.</p>
cristy10c87152010-06-26 16:12:21 +0000383
384<p>The format of the GetImageViewIterator method is:</p>
385
386<pre class="code">
387 MagickBooleanType GetImageViewIterator(ImageView *source,
388 GetImageViewMethod get,void *context)
389</pre>
390
cristy7a40ba82011-01-08 20:31:18 +0000391<p>A description of each parameter follows:</p>
cristy10c87152010-06-26 16:12:21 +0000392
393<h5>source</h5>
cristy7a40ba82011-01-08 20:31:18 +0000394<p>the source image view.</p>
cristy10c87152010-06-26 16:12:21 +0000395
396<h5>get</h5>
cristy7a40ba82011-01-08 20:31:18 +0000397<p>the get callback method.</p>
cristy10c87152010-06-26 16:12:21 +0000398
399<h5>context</h5>
cristy7a40ba82011-01-08 20:31:18 +0000400<p>the user defined context.</p>
cristy10c87152010-06-26 16:12:21 +0000401
402 </div>
cristy7a40ba82011-01-08 20:31:18 +0000403<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
404_8c.html" id="GetImageViewVirtualIndexes">GetImageViewVirtualIndexes</a></h2>
cristy10c87152010-06-26 16:12:21 +0000405<div class="doc-section">
406
cristy7a40ba82011-01-08 20:31:18 +0000407<p>GetImageViewVirtualIndexes() returns the image view virtual indexes.</p>
cristy10c87152010-06-26 16:12:21 +0000408
cristy73b7d4c2010-06-27 00:31:00 +0000409<p>The format of the GetImageViewVirtualIndexes method is:</p>
cristy10c87152010-06-26 16:12:21 +0000410
411<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000412 const IndexPacket *GetImageViewVirtualIndexes(
413 const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000414</pre>
415
cristy7a40ba82011-01-08 20:31:18 +0000416<p>A description of each parameter follows:</p>
cristy10c87152010-06-26 16:12:21 +0000417
cristy73b7d4c2010-06-27 00:31:00 +0000418<h5>image_view</h5>
cristy7a40ba82011-01-08 20:31:18 +0000419<p>the image view.</p>
cristy10c87152010-06-26 16:12:21 +0000420
421 </div>
cristy7a40ba82011-01-08 20:31:18 +0000422<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
423_8c.html" id="GetImageViewVirtualPixels">GetImageViewVirtualPixels</a></h2>
cristy10c87152010-06-26 16:12:21 +0000424<div class="doc-section">
425
cristy7a40ba82011-01-08 20:31:18 +0000426<p>GetImageViewVirtualPixels() returns the image view virtual pixels.</p>
cristy10c87152010-06-26 16:12:21 +0000427
cristy73b7d4c2010-06-27 00:31:00 +0000428<p>The format of the GetImageViewVirtualPixels method is:</p>
cristy10c87152010-06-26 16:12:21 +0000429
430<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000431 const PixelPacket *GetImageViewVirtualPixels(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000432</pre>
433
cristy7a40ba82011-01-08 20:31:18 +0000434<p>A description of each parameter follows:</p>
cristy10c87152010-06-26 16:12:21 +0000435
cristy73b7d4c2010-06-27 00:31:00 +0000436<h5>image_view</h5>
cristy7a40ba82011-01-08 20:31:18 +0000437<p>the image view.</p>
cristy10c87152010-06-26 16:12:21 +0000438
439 </div>
cristy7a40ba82011-01-08 20:31:18 +0000440<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
441_8c.html" id="IsImageView">IsImageView</a></h2>
cristy10c87152010-06-26 16:12:21 +0000442<div class="doc-section">
443
cristy7a40ba82011-01-08 20:31:18 +0000444<p>IsImageView() returns MagickTrue if the the parameter is verified as a image view object.</p>
cristy10c87152010-06-26 16:12:21 +0000445
446<p>The format of the IsImageView method is:</p>
447
448<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000449 MagickBooleanType IsImageView(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000450</pre>
451
cristy7a40ba82011-01-08 20:31:18 +0000452<p>A description of each parameter follows:</p>
cristy10c87152010-06-26 16:12:21 +0000453
cristy73b7d4c2010-06-27 00:31:00 +0000454<h5>image_view</h5>
cristy7a40ba82011-01-08 20:31:18 +0000455<p>the image view.</p>
cristy10c87152010-06-26 16:12:21 +0000456
457 </div>
cristy7a40ba82011-01-08 20:31:18 +0000458<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
459_8c.html" id="NewImageView">NewImageView</a></h2>
cristy10c87152010-06-26 16:12:21 +0000460<div class="doc-section">
461
cristy7a40ba82011-01-08 20:31:18 +0000462<p>NewImageView() returns a image view required for all other methods in the Image View API.</p>
cristy10c87152010-06-26 16:12:21 +0000463
464<p>The format of the NewImageView method is:</p>
465
466<pre class="code">
467 ImageView *NewImageView(MagickCore *wand)
468</pre>
469
cristy7a40ba82011-01-08 20:31:18 +0000470<p>A description of each parameter follows:</p>
cristy10c87152010-06-26 16:12:21 +0000471
472<h5>wand</h5>
cristy7a40ba82011-01-08 20:31:18 +0000473<p>the wand.</p>
cristy10c87152010-06-26 16:12:21 +0000474
475 </div>
cristy7a40ba82011-01-08 20:31:18 +0000476<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
477_8c.html" id="NewImageViewRegion">NewImageViewRegion</a></h2>
cristy10c87152010-06-26 16:12:21 +0000478<div class="doc-section">
479
cristy7a40ba82011-01-08 20:31:18 +0000480<p>NewImageViewRegion() returns a image view required for all other methods in the Image View API.</p>
cristy10c87152010-06-26 16:12:21 +0000481
482<p>The format of the NewImageViewRegion method is:</p>
483
484<pre class="code">
485 ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
486 const ssize_t y,const size_t width,const size_t height)
487</pre>
488
cristy7a40ba82011-01-08 20:31:18 +0000489<p>A description of each parameter follows:</p>
cristy10c87152010-06-26 16:12:21 +0000490
491<h5>wand</h5>
cristy7a40ba82011-01-08 20:31:18 +0000492<p>the magick wand.</p>
cristy10c87152010-06-26 16:12:21 +0000493
494<h5>x,y,columns,rows</h5>
cristy7a40ba82011-01-08 20:31:18 +0000495<p>These values define the perimeter of a extent of pixel_wands view.</p>
cristy10c87152010-06-26 16:12:21 +0000496
497 </div>
cristy7a40ba82011-01-08 20:31:18 +0000498<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
499_8c.html" id="SetImageViewDescription">SetImageViewDescription</a></h2>
cristyd6dfc0d2010-06-27 19:30:49 +0000500<div class="doc-section">
501
cristy7a40ba82011-01-08 20:31:18 +0000502<p>SetImageViewDescription() associates a description with an image view.</p>
cristyd6dfc0d2010-06-27 19:30:49 +0000503
504<p>The format of the SetImageViewDescription method is:</p>
505
506<pre class="code">
507 void SetImageViewDescription(ImageView *image_view,
508 const char *description)
509</pre>
510
cristy7a40ba82011-01-08 20:31:18 +0000511<p>A description of each parameter follows:</p>
cristyd6dfc0d2010-06-27 19:30:49 +0000512
513<h5>image_view</h5>
cristy7a40ba82011-01-08 20:31:18 +0000514<p>the image view.</p>
cristyd6dfc0d2010-06-27 19:30:49 +0000515
516<h5>description</h5>
cristy7a40ba82011-01-08 20:31:18 +0000517<p>the image view description.</p>
cristyd6dfc0d2010-06-27 19:30:49 +0000518
519 </div>
cristy7a40ba82011-01-08 20:31:18 +0000520<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
521_8c.html" id="SetImageViewIterator">SetImageViewIterator</a></h2>
cristy10c87152010-06-26 16:12:21 +0000522<div class="doc-section">
523
cristy7a40ba82011-01-08 20:31:18 +0000524<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>
cristy10c87152010-06-26 16:12:21 +0000525
cristyd6dfc0d2010-06-27 19:30:49 +0000526<p>The callback signature is:</p>
527
528<pre class="text">
529 MagickBooleanType SetImageViewMethod(ImageView *destination,
530 const ssize_t y,const int thread_id,void *context)
531</pre>
532
cristy73b7d4c2010-06-27 00:31:00 +0000533<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000534
535<pre class="text">
536 #pragma omp critical
537</pre>
538
cristy7a40ba82011-01-08 20:31:18 +0000539<p>to define a section of code in your callback set method that must be executed by a single thread at a time.</p>
cristy10c87152010-06-26 16:12:21 +0000540
541<p>The format of the SetImageViewIterator method is:</p>
542
543<pre class="code">
544 MagickBooleanType SetImageViewIterator(ImageView *destination,
545 SetImageViewMethod set,void *context)
546</pre>
547
cristy7a40ba82011-01-08 20:31:18 +0000548<p>A description of each parameter follows:</p>
cristy10c87152010-06-26 16:12:21 +0000549
550<h5>destination</h5>
cristy7a40ba82011-01-08 20:31:18 +0000551<p>the image view.</p>
cristy10c87152010-06-26 16:12:21 +0000552
553<h5>set</h5>
cristy7a40ba82011-01-08 20:31:18 +0000554<p>the set callback method.</p>
cristy10c87152010-06-26 16:12:21 +0000555
556<h5>context</h5>
cristy7a40ba82011-01-08 20:31:18 +0000557<p>the user defined context.</p>
cristy10c87152010-06-26 16:12:21 +0000558
559 </div>
cristy7a40ba82011-01-08 20:31:18 +0000560<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
561_8c.html" id="SetImageViewThreads">SetImageViewThreads</a></h2>
cristyce66ab12010-10-21 23:36:32 +0000562<div class="doc-section">
563
cristy7a40ba82011-01-08 20:31:18 +0000564<p>SetImageViewThreads() sets the number of threads in a thread team.</p>
cristyce66ab12010-10-21 23:36:32 +0000565
566<p>The format of the SetImageViewDescription method is:</p>
567
568<pre class="code">
569 void SetImageViewThreads(ImageView *image_view,
570 const size_t number_threads)
571</pre>
572
cristy7a40ba82011-01-08 20:31:18 +0000573<p>A description of each parameter follows:</p>
cristyce66ab12010-10-21 23:36:32 +0000574
575<h5>image_view</h5>
cristy7a40ba82011-01-08 20:31:18 +0000576<p>the image view.</p>
cristyce66ab12010-10-21 23:36:32 +0000577
578<h5>number_threads</h5>
cristy7a40ba82011-01-08 20:31:18 +0000579<p>the number of threads in a thread team.</p>
cristyce66ab12010-10-21 23:36:32 +0000580
581 </div>
cristy7a40ba82011-01-08 20:31:18 +0000582<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
583_8c.html" id="TransferImageViewIterator">TransferImageViewIterator</a></h2>
cristy10c87152010-06-26 16:12:21 +0000584<div class="doc-section">
585
cristy7a40ba82011-01-08 20:31:18 +0000586<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>
cristy10c87152010-06-26 16:12:21 +0000587
cristyd6dfc0d2010-06-27 19:30:49 +0000588<p>The callback signature is:</p>
589
590<pre class="text">
591 MagickBooleanType TransferImageViewMethod(const ImageView *source,
592 ImageView *destination,const ssize_t y,const int thread_id,
593 void *context)
594</pre>
595
cristy73b7d4c2010-06-27 00:31:00 +0000596<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000597
598<pre class="text">
599 #pragma omp critical
600</pre>
601
cristy7a40ba82011-01-08 20:31:18 +0000602<p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p>
cristy10c87152010-06-26 16:12:21 +0000603
604<p>The format of the TransferImageViewIterator method is:</p>
605
606<pre class="code">
607 MagickBooleanType TransferImageViewIterator(ImageView *source,
608 ImageView *destination,TransferImageViewMethod transfer,void *context)
609</pre>
610
cristy7a40ba82011-01-08 20:31:18 +0000611<p>A description of each parameter follows:</p>
cristy10c87152010-06-26 16:12:21 +0000612
613<h5>source</h5>
cristy7a40ba82011-01-08 20:31:18 +0000614<p>the source image view.</p>
cristy10c87152010-06-26 16:12:21 +0000615
616<h5>destination</h5>
cristy7a40ba82011-01-08 20:31:18 +0000617<p>the destination image view.</p>
cristy10c87152010-06-26 16:12:21 +0000618
619<h5>transfer</h5>
cristy7a40ba82011-01-08 20:31:18 +0000620<p>the transfer callback method.</p>
cristy10c87152010-06-26 16:12:21 +0000621
622<h5>context</h5>
cristy7a40ba82011-01-08 20:31:18 +0000623<p>the user defined context.</p>
cristy10c87152010-06-26 16:12:21 +0000624
625 </div>
cristy7a40ba82011-01-08 20:31:18 +0000626<h2><a href="http://www.wizards-toolkit.org/api/MagickCore/image-view
627_8c.html" id="UpdateImageViewIterator">UpdateImageViewIterator</a></h2>
cristy10c87152010-06-26 16:12:21 +0000628<div class="doc-section">
629
cristy7a40ba82011-01-08 20:31:18 +0000630<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>
cristy10c87152010-06-26 16:12:21 +0000631
cristyd6dfc0d2010-06-27 19:30:49 +0000632<p>The callback signature is:</p>
633
634<pre class="text">
635 MagickBooleanType UpdateImageViewMethod(ImageView *source,
636 const ssize_t y,const int thread_id,void *context)
637</pre>
638
cristy73b7d4c2010-06-27 00:31:00 +0000639<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000640
641<pre class="text">
642 #pragma omp critical
643</pre>
644
cristy7a40ba82011-01-08 20:31:18 +0000645<p>to define a section of code in your callback update method that must be executed by a single thread at a time.</p>
cristy10c87152010-06-26 16:12:21 +0000646
647<p>The format of the UpdateImageViewIterator method is:</p>
648
649<pre class="code">
650 MagickBooleanType UpdateImageViewIterator(ImageView *source,
651 UpdateImageViewMethod update,void *context)
652</pre>
653
cristy7a40ba82011-01-08 20:31:18 +0000654<p>A description of each parameter follows:</p>
cristy10c87152010-06-26 16:12:21 +0000655
656<h5>source</h5>
cristy7a40ba82011-01-08 20:31:18 +0000657<p>the source image view.</p>
cristy10c87152010-06-26 16:12:21 +0000658
659<h5>update</h5>
cristy7a40ba82011-01-08 20:31:18 +0000660<p>the update callback method.</p>
cristy10c87152010-06-26 16:12:21 +0000661
662<h5>context</h5>
cristy7a40ba82011-01-08 20:31:18 +0000663<p>the user defined context.</p>
cristy10c87152010-06-26 16:12:21 +0000664
665 </div>
666
667</div>
668
669<div id="linkbar">
cristyce69bb02010-07-27 19:49:46 +0000670 <span id="linkbar-west">&nbsp;</span>
cristy10c87152010-06-26 16:12:21 +0000671 <span id="linkbar-center">
672 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> &bull;
cristya8902942010-07-30 00:49:52 +0000673 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
cristy10c87152010-06-26 16:12:21 +0000674 </span>
675 <span id="linkbar-east">&nbsp;</span>
676 </div>
677 <div class="footer">
cristy4103d562010-12-10 01:38:54 +0000678 <span id="footer-west">&copy; 1999-2011 ImageMagick Studio LLC</span>
cristy10c87152010-06-26 16:12:21 +0000679 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
680 </div>
681 <div style="clear: both; margin: 0; width: 100%; "></div>
cristya8902942010-07-30 00:49:52 +0000682 <script type="text/javascript">
683 var _gaq = _gaq || [];
684 _gaq.push(['_setAccount', 'UA-17690367-1']);
685 _gaq.push(['_trackPageview']);
686
687 (function() {
688 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
689 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
690 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
691 })();
692 </script>
cristy10c87152010-06-26 16:12:21 +0000693</body>
694</html>