blob: 5de5ecebeb1eedfefad1cbf757bc5e52fcb872d2 [file] [log] [blame]
cristy10c87152010-06-26 16:12:21 +00001<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
4<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"/>
cristyffb69ed2010-12-25 00:06:48 +000012 <meta name="Description" content="ImageMagick is a software suite to create, edit, or compose 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"/>
cristy3c98a4f2010-08-13 20:09:41 +000024 <link rel="icon" href="../../images/wand.png" sizes="32x32"/>
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"/>
27 <style type="text/css" media="all">
28 @import url("../../www/magick.css");
29 </style>
cristy10c87152010-06-26 16:12:21 +000030</head>
31
32<body id="www-imagemagick-org">
33<div class="titlebar">
34<a href="../../index.html">
35 <img src="../../images/script.png" alt="[ImageMagick]"
36 style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>
37<a href="http://www.networkredux.com">
38 <img src="../../images/networkredux.png" alt="[sponsor]"
39 style="margin: 45px auto; border: 0px; float: left;" /></a>
40<a href="http://www.imagemagick.org/discourse-server/">
41 <img src="../../images/logo.jpg" alt=""
42 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
43<a href="../../index.html">
44 <img src="../../images/sprite.jpg" alt=""
45 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
46</div>
47
cristyce69bb02010-07-27 19:49:46 +000048<div class="westbar">
cristy10c87152010-06-26 16:12:21 +000049
50<div class="menu">
51 <a title="About ImageMagick" href="../../index.html">About ImageMagick</a>
52</div>
53<div class="sep"></div>
54<div class="menu">
55 <a title="Binary Releases" href="../../www/binary-releases.html">Binary Releases</a>
56</div>
57<div class="sub">
58 <a title="Binary Release: Unix" href="../../www/binary-releases.html#unix">Unix</a>
59</div>
60<div class="sub">
61 <a title="Binary Release: MacOS X" href="../../www/binary-releases.html#macosx">Mac OS X</a>
62</div>
63<div class="sub">
64 <a title="Binary Release: Windows" href="../../www/binary-releases.html#windows">Windows</a>
65</div>
66<div class="sep"></div>
67<div class="menu">
68 <a title="Command-line Tools" href="../../www/command-line-tools.html">Command-line Tools</a>
69</div>
70<div class="sub">
71 <a title="Command-line Tools: Processing" href="../../www/command-line-processing.html">Processing</a>
72</div>
73<div class="sub">
74 <a title="Command-line Tools: Options" href="../../www/command-line-options.html">Options</a>
75</div>
76<div class="sub">
77 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
78</div>
79<div class="menu">
80 <a title="Program Interfaces" href="../../www/api.html">Program Interfaces</a>
81</div>
82<div class="sub">
83 <a title="Program Interface: MagickWand" href="../../www/magick-wand.html">MagickWand</a>
84</div>
85<div class="sub">
86 <a title="Program Interface: MagickCore" href="../../www/magick-core.html">MagickCore</a>
87</div>
88<div class="sub">
89 <a title="Program Interface: PerlMagick" href="../../www/perl-magick.html">PerlMagick</a>
90</div>
91<div class="sub">
92 <a title="Program Interface: Magick++" href="../../Magick++/">Magick++</a>
93</div>
94<div class="sep"></div>
95<div class="menu">
96 <a title="Install from Source" href="../../www/install-source.html">Install from Source</a>
97</div>
98<div class="sub">
99 <a title="Install from Source: Unix" href="../../www/install-source.html#unix">Unix</a>
100</div>
101<div class="sub">
102 <a title="Install from Source: Windows" href="../../www/install-source.html#windows">Windows</a>
103 </div>
104<div class="menu">
105 <a title="Resources" href="../../www/resources.html">Resources</a>
106</div>
107<div class="menu">
108 <a title="Architecture" href="../../www/architecture.html">Architecture</a>
109</div>
110<div class="menu">
111 <a title="Download" href="../../www/download.html">Download</a>
112</div>
113<div class="sep"></div>
114<div class="menu">
115 <a title="Search" href="../http://www.imagemagick.org/script/search.php">Search</a>
116</div>
117<div class="sep"></div>
118<div class="menu">
cristyffb69ed2010-12-25 00:06:48 +0000119 <a title="Site Map" href="../../www/sitemap.html">Site Map</a>
cristy10c87152010-06-26 16:12:21 +0000120</div>
121<div class="sub">
cristyffb69ed2010-12-25 00:06:48 +0000122 <a title="Site Map: Links" href="../../www/links.html">Links</a>
cristy10c87152010-06-26 16:12:21 +0000123</div>
124<div class="sep"></div>
125<div class="menu">
126 <a title="Sponsors" href="../../www/sponsors.html">Sponsors:</a>
127
128<div class="sponsbox">
129<div class="sponsor">
cristy307ba182010-12-25 01:00:34 +0000130 <a title="Sponsor: Notebook Reparatur Berlin" href="http://www.notebook-reparaturen-berlin.de">Notebook Reparatur Berlin</a><!-- 2011040100025 gabi.schulze-->
cristy73fd1cd2010-09-12 19:14:25 +0000131</div>
132<div class="sponsor">
cristy7d52cd62010-10-01 17:26:59 +0000133 <a title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
134</div>
135<div class="sponsor">
cristyc5baf4f2010-08-31 15:05:33 +0000136 <a title="Sponsor: Image Converter" href="http://www.batchphoto.com">Image Converter</a><!-- 201103010900 Bits Coffee-->
137</div>
138<div class="sponsor">
cristy851dbce2010-08-06 21:40:00 +0000139 <a title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
140</div>
141<div class="sponsor">
cristy10c87152010-06-26 16:12:21 +0000142 <a title="Sponsor: Webdesign Agentur" href="http://www.ventzke-partner.de">Webdesign Agentur</a><!-- 201101010480 invendio.de-->
143</div>
144<div class="sponsor">
145 <a title="Sponsor: LVM Versicherung" href="http://www.neu-reich.de">LVM Versicherung</a><!-- 201101010480 -->
146</div>
147<div class="sponsor">
cristyc5baf4f2010-08-31 15:05:33 +0000148 <a title="Sponsor: Diamonds are a Girls Best Friend" href="http://www.schmuck.org">Diamonds are a Girls Best Friend</a><!-- 201101010600 Peterssen-->
cristy10c87152010-06-26 16:12:21 +0000149</div>
cristy10c87152010-06-26 16:12:21 +0000150</div>
cristyce69bb02010-07-27 19:49:46 +0000151</div>
152</div>
cristy10c87152010-06-26 16:12:21 +0000153
cristyce69bb02010-07-27 19:49:46 +0000154<div class="eastbar">
155 <script type="text/javascript">
156 <!--
157 google_ad_client = "pub-3129977114552745";
cristyce69bb02010-07-27 19:49:46 +0000158 google_ad_slot = "0574824969";
159 google_ad_width = 160;
160 google_ad_height = 600;
161 //-->
162 </script>
163 <script type="text/javascript"
164 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
165 </script>
cristy10c87152010-06-26 16:12:21 +0000166</div>
167
168<div class="main">
169
cristy307ba182010-12-25 01:00:34 +0000170<h1>Module image-view
171 Methods</h1>
cristyce66ab12010-10-21 23:36:32 +0000172<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 +0000173
174<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
175_8c.html" target="source" name="CloneImageView">CloneImageView</a></h2>
176<div class="doc-section">
177
cristy73b7d4c2010-06-27 00:31:00 +0000178<p>CloneImageView() makes a copy of the specified image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000179
180<p>The format of the CloneImageView method is:</p>
181
182<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000183 ImageView *CloneImageView(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000184</pre>
185
186<p>A description of each parameter follows:</p></ol>
187
cristy73b7d4c2010-06-27 00:31:00 +0000188<h5>image_view</h5>
189<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000190
191 </div>
192<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
193_8c.html" target="source" name="DestroyImageView">DestroyImageView</a></h2>
194<div class="doc-section">
195
cristy73b7d4c2010-06-27 00:31:00 +0000196<p>DestroyImageView() deallocates memory associated with a image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000197
198<p>The format of the DestroyImageView method is:</p>
199
200<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000201 ImageView *DestroyImageView(ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000202</pre>
203
204<p>A description of each parameter follows:</p></ol>
205
cristy73b7d4c2010-06-27 00:31:00 +0000206<h5>image_view</h5>
207<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000208
209 </div>
210<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
211_8c.html" target="source" name="DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a></h2>
212<div class="doc-section">
213
cristyc3ebda22010-06-27 17:11:57 +0000214<p>DuplexTransferImageViewIterator() iterates over three image views in parallel and calls your transfer method for each scanline of the view. The source and duplex pixel extent is not confined to the image canvas-- that is you can include negative offsets or widths or heights that exceed the image dimension. However, the destination image view is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension are permitted.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000215
cristyd6dfc0d2010-06-27 19:30:49 +0000216<p>The callback signature is:</p>
217
218<pre class="text">
219 MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source,
220 const ImageView *duplex,ImageView *destination,const ssize_t y,
221 const int thread_id,void *context)
222</pre>
223
cristy73b7d4c2010-06-27 00:31:00 +0000224<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000225
226<pre class="text">
227 #pragma omp critical
228</pre>
229
230<p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p></ol>
231
232<p>The format of the DuplexTransferImageViewIterator method is:</p>
233
234<pre class="code">
235 MagickBooleanType DuplexTransferImageViewIterator(ImageView *source,
236 ImageView *duplex,ImageView *destination,
237 DuplexTransferImageViewMethod transfer,void *context)
238</pre>
239
240<p>A description of each parameter follows:</p></ol>
241
242<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000243<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000244
245<h5>duplex</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000246<ol><p>the duplex image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000247
248<h5>destination</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000249<ol><p>the destination image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000250
251<h5>transfer</h5>
252<ol><p>the transfer callback method.</p></ol>
253
254<h5>context</h5>
255<ol><p>the user defined context.</p></ol>
256
257 </div>
258<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy73b7d4c2010-06-27 00:31:00 +0000259_8c.html" target="source" name="GetImageViewAuthenticIndexes">GetImageViewAuthenticIndexes</a></h2>
260<div class="doc-section">
261
262<p>GetImageViewAuthenticIndexes() returns the image view authentic indexes.</p></ol>
263
264<p>The format of the GetImageViewAuthenticPixels method is:</p>
265
266<pre class="code">
267 IndexPacket *GetImageViewAuthenticIndexes(const ImageView *image_view)
268</pre>
269
270<p>A description of each parameter follows:</p></ol>
271
272<h5>image_view</h5>
273<ol><p>the image view.</p></ol>
274
275 </div>
276<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
277_8c.html" target="source" name="GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a></h2>
278<div class="doc-section">
279
280<p>GetImageViewAuthenticPixels() returns the image view authentic pixels.</p></ol>
281
282<p>The format of the GetImageViewAuthenticPixels method is:</p>
283
284<pre class="code">
285 PixelPacket *GetImageViewAuthenticPixels(const ImageView *image_view)
286</pre>
287
288<p>A description of each parameter follows:</p></ol>
289
290<h5>image_view</h5>
291<ol><p>the image view.</p></ol>
292
293 </div>
294<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000295_8c.html" target="source" name="GetImageViewException">GetImageViewException</a></h2>
296<div class="doc-section">
297
cristy73b7d4c2010-06-27 00:31:00 +0000298<p>GetImageViewException() returns the severity, reason, and description of any error that occurs when utilizing a image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000299
300<p>The format of the GetImageViewException method is:</p>
301
302<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000303 char *GetImageViewException(const PixelImage *image_view,
cristy10c87152010-06-26 16:12:21 +0000304 ExceptionType *severity)
305</pre>
306
307<p>A description of each parameter follows:</p></ol>
308
cristy73b7d4c2010-06-27 00:31:00 +0000309<h5>image_view</h5>
310<ol><p>the pixel image_view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000311
312<h5>severity</h5>
313<ol><p>the severity of the error is returned here.</p></ol>
314
315 </div>
316<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristyc3ebda22010-06-27 17:11:57 +0000317_8c.html" target="source" name="GetImageViewExtent">GetImageViewExtent</a></h2>
cristy10c87152010-06-26 16:12:21 +0000318<div class="doc-section">
319
cristyc3ebda22010-06-27 17:11:57 +0000320<p>GetImageViewExtent() returns the image view extent.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000321
cristyc3ebda22010-06-27 17:11:57 +0000322<p>The format of the GetImageViewExtent method is:</p>
cristy10c87152010-06-26 16:12:21 +0000323
324<pre class="code">
cristyc3ebda22010-06-27 17:11:57 +0000325 RectangleInfo GetImageViewExtent(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000326</pre>
327
328<p>A description of each parameter follows:</p></ol>
329
cristy73b7d4c2010-06-27 00:31:00 +0000330<h5>image_view</h5>
331<ol><p>the image view.</p></ol>
332
333 </div>
334<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
335_8c.html" target="source" name="GetImageViewImage">GetImageViewImage</a></h2>
336<div class="doc-section">
337
338<p>GetImageViewImage() returns the image associated with the image view.</p></ol>
339
340<p>The format of the GetImageViewImage method is:</p>
341
342<pre class="code">
343 MagickCore *GetImageViewImage(const ImageView *image_view)
344</pre>
345
346<p>A description of each parameter follows:</p></ol>
347
348<h5>image_view</h5>
349<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000350
351 </div>
352<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
353_8c.html" target="source" name="GetImageViewIterator">GetImageViewIterator</a></h2>
354<div class="doc-section">
355
cristyc3ebda22010-06-27 17:11:57 +0000356<p>GetImageViewIterator() iterates over the image view in parallel and calls your get method for each scanline of the view. The pixel extent is not confined to the image canvas-- that is you can include negative offsets or widths or heights that exceed the image dimension. Any updates to the pixels in your callback are ignored.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000357
cristyd6dfc0d2010-06-27 19:30:49 +0000358<p>The callback signature is:</p>
359
360<pre class="text">
361 MagickBooleanType GetImageViewMethod(const ImageView *source,
362 const ssize_t y,const int thread_id,void *context)
363</pre>
364
cristy73b7d4c2010-06-27 00:31:00 +0000365<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000366
367<pre class="text">
368 #pragma omp critical
369</pre>
370
371<p>to define a section of code in your callback get method that must be executed by a single thread at a time.</p></ol>
372
373<p>The format of the GetImageViewIterator method is:</p>
374
375<pre class="code">
376 MagickBooleanType GetImageViewIterator(ImageView *source,
377 GetImageViewMethod get,void *context)
378</pre>
379
380<p>A description of each parameter follows:</p></ol>
381
382<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000383<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000384
385<h5>get</h5>
386<ol><p>the get callback method.</p></ol>
387
388<h5>context</h5>
389<ol><p>the user defined context.</p></ol>
390
391 </div>
392<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy73b7d4c2010-06-27 00:31:00 +0000393_8c.html" target="source" name="GetImageViewVirtualIndexes">GetImageViewVirtualIndexes</a></h2>
cristy10c87152010-06-26 16:12:21 +0000394<div class="doc-section">
395
cristy73b7d4c2010-06-27 00:31:00 +0000396<p>GetImageViewVirtualIndexes() returns the image view virtual indexes.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000397
cristy73b7d4c2010-06-27 00:31:00 +0000398<p>The format of the GetImageViewVirtualIndexes method is:</p>
cristy10c87152010-06-26 16:12:21 +0000399
400<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000401 const IndexPacket *GetImageViewVirtualIndexes(
402 const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000403</pre>
404
405<p>A description of each parameter follows:</p></ol>
406
cristy73b7d4c2010-06-27 00:31:00 +0000407<h5>image_view</h5>
408<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000409
410 </div>
411<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy73b7d4c2010-06-27 00:31:00 +0000412_8c.html" target="source" name="GetImageViewVirtualPixels">GetImageViewVirtualPixels</a></h2>
cristy10c87152010-06-26 16:12:21 +0000413<div class="doc-section">
414
cristy73b7d4c2010-06-27 00:31:00 +0000415<p>GetImageViewVirtualPixels() returns the image view virtual pixels.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000416
cristy73b7d4c2010-06-27 00:31:00 +0000417<p>The format of the GetImageViewVirtualPixels method is:</p>
cristy10c87152010-06-26 16:12:21 +0000418
419<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000420 const PixelPacket *GetImageViewVirtualPixels(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000421</pre>
422
423<p>A description of each parameter follows:</p></ol>
424
cristy73b7d4c2010-06-27 00:31:00 +0000425<h5>image_view</h5>
426<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000427
428 </div>
429<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000430_8c.html" target="source" name="IsImageView">IsImageView</a></h2>
431<div class="doc-section">
432
cristy73b7d4c2010-06-27 00:31:00 +0000433<p>IsImageView() returns MagickTrue if the the parameter is verified as a image view object.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000434
435<p>The format of the IsImageView method is:</p>
436
437<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000438 MagickBooleanType IsImageView(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000439</pre>
440
441<p>A description of each parameter follows:</p></ol>
442
cristy73b7d4c2010-06-27 00:31:00 +0000443<h5>image_view</h5>
444<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000445
446 </div>
447<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
448_8c.html" target="source" name="NewImageView">NewImageView</a></h2>
449<div class="doc-section">
450
cristyc3ebda22010-06-27 17:11:57 +0000451<p>NewImageView() returns a image view required for all other methods in the Image View API.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000452
453<p>The format of the NewImageView method is:</p>
454
455<pre class="code">
456 ImageView *NewImageView(MagickCore *wand)
457</pre>
458
459<p>A description of each parameter follows:</p></ol>
460
461<h5>wand</h5>
462<ol><p>the wand.</p></ol>
463
464 </div>
465<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
466_8c.html" target="source" name="NewImageViewRegion">NewImageViewRegion</a></h2>
467<div class="doc-section">
468
cristyc3ebda22010-06-27 17:11:57 +0000469<p>NewImageViewRegion() returns a image view required for all other methods in the Image View API.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000470
471<p>The format of the NewImageViewRegion method is:</p>
472
473<pre class="code">
474 ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
475 const ssize_t y,const size_t width,const size_t height)
476</pre>
477
478<p>A description of each parameter follows:</p></ol>
479
480<h5>wand</h5>
481<ol><p>the magick wand.</p></ol>
482
483<h5>x,y,columns,rows</h5>
cristyc3ebda22010-06-27 17:11:57 +0000484<ol><p>These values define the perimeter of a extent of pixel_wands view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000485
486 </div>
487<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristyd6dfc0d2010-06-27 19:30:49 +0000488_8c.html" target="source" name="SetImageViewDescription">SetImageViewDescription</a></h2>
489<div class="doc-section">
490
491<p>SetImageViewDescription() associates a description with an image view.</p></ol>
492
493<p>The format of the SetImageViewDescription method is:</p>
494
495<pre class="code">
496 void SetImageViewDescription(ImageView *image_view,
497 const char *description)
498</pre>
499
500<p>A description of each parameter follows:</p></ol>
501
502<h5>image_view</h5>
503<ol><p>the image view.</p></ol>
504
505<h5>description</h5>
506<ol><p>the image view description.</p></ol>
507
508 </div>
509<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000510_8c.html" target="source" name="SetImageViewIterator">SetImageViewIterator</a></h2>
511<div class="doc-section">
512
cristyc3ebda22010-06-27 17:11:57 +0000513<p>SetImageViewIterator() iterates over the image view in parallel and calls your set method for each scanline of the view. The pixel extent is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension. The pixels are initiallly undefined and any settings you make in the callback method are automagically synced back to your image.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000514
cristyd6dfc0d2010-06-27 19:30:49 +0000515<p>The callback signature is:</p>
516
517<pre class="text">
518 MagickBooleanType SetImageViewMethod(ImageView *destination,
519 const ssize_t y,const int thread_id,void *context)
520</pre>
521
cristy73b7d4c2010-06-27 00:31:00 +0000522<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000523
524<pre class="text">
525 #pragma omp critical
526</pre>
527
528<p>to define a section of code in your callback set method that must be executed by a single thread at a time.</p></ol>
529
530<p>The format of the SetImageViewIterator method is:</p>
531
532<pre class="code">
533 MagickBooleanType SetImageViewIterator(ImageView *destination,
534 SetImageViewMethod set,void *context)
535</pre>
536
537<p>A description of each parameter follows:</p></ol>
538
539<h5>destination</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000540<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000541
542<h5>set</h5>
543<ol><p>the set callback method.</p></ol>
544
545<h5>context</h5>
546<ol><p>the user defined context.</p></ol>
547
548 </div>
549<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristyce66ab12010-10-21 23:36:32 +0000550_8c.html" target="source" name="SetImageViewThreads">SetImageViewThreads</a></h2>
551<div class="doc-section">
552
553<p>SetImageViewThreads() sets the number of threads in a thread team.</p></ol>
554
555<p>The format of the SetImageViewDescription method is:</p>
556
557<pre class="code">
558 void SetImageViewThreads(ImageView *image_view,
559 const size_t number_threads)
560</pre>
561
562<p>A description of each parameter follows:</p></ol>
563
564<h5>image_view</h5>
565<ol><p>the image view.</p></ol>
566
567<h5>number_threads</h5>
568<ol><p>the number of threads in a thread team.</p></ol>
569
570 </div>
571<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000572_8c.html" target="source" name="TransferImageViewIterator">TransferImageViewIterator</a></h2>
573<div class="doc-section">
574
cristyc3ebda22010-06-27 17:11:57 +0000575<p>TransferImageViewIterator() iterates over two image views in parallel and calls your transfer method for each scanline of the view. The source pixel extent is not confined to the image canvas-- that is you can include negative offsets or widths or heights that exceed the image dimension. However, the destination image view is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension are permitted.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000576
cristyd6dfc0d2010-06-27 19:30:49 +0000577<p>The callback signature is:</p>
578
579<pre class="text">
580 MagickBooleanType TransferImageViewMethod(const ImageView *source,
581 ImageView *destination,const ssize_t y,const int thread_id,
582 void *context)
583</pre>
584
cristy73b7d4c2010-06-27 00:31:00 +0000585<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000586
587<pre class="text">
588 #pragma omp critical
589</pre>
590
591<p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p></ol>
592
593<p>The format of the TransferImageViewIterator method is:</p>
594
595<pre class="code">
596 MagickBooleanType TransferImageViewIterator(ImageView *source,
597 ImageView *destination,TransferImageViewMethod transfer,void *context)
598</pre>
599
600<p>A description of each parameter follows:</p></ol>
601
602<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000603<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000604
605<h5>destination</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000606<ol><p>the destination image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000607
608<h5>transfer</h5>
609<ol><p>the transfer callback method.</p></ol>
610
611<h5>context</h5>
612<ol><p>the user defined context.</p></ol>
613
614 </div>
615<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
616_8c.html" target="source" name="UpdateImageViewIterator">UpdateImageViewIterator</a></h2>
617<div class="doc-section">
618
cristyc3ebda22010-06-27 17:11:57 +0000619<p>UpdateImageViewIterator() iterates over the image view in parallel and calls your update method for each scanline of the view. The pixel extent is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension are permitted. Updates to pixels in your callback are automagically synced back to the image.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000620
cristyd6dfc0d2010-06-27 19:30:49 +0000621<p>The callback signature is:</p>
622
623<pre class="text">
624 MagickBooleanType UpdateImageViewMethod(ImageView *source,
625 const ssize_t y,const int thread_id,void *context)
626</pre>
627
cristy73b7d4c2010-06-27 00:31:00 +0000628<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000629
630<pre class="text">
631 #pragma omp critical
632</pre>
633
634<p>to define a section of code in your callback update method that must be executed by a single thread at a time.</p></ol>
635
636<p>The format of the UpdateImageViewIterator method is:</p>
637
638<pre class="code">
639 MagickBooleanType UpdateImageViewIterator(ImageView *source,
640 UpdateImageViewMethod update,void *context)
641</pre>
642
643<p>A description of each parameter follows:</p></ol>
644
645<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000646<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000647
648<h5>update</h5>
649<ol><p>the update callback method.</p></ol>
650
651<h5>context</h5>
652<ol><p>the user defined context.</p></ol>
653
654 </div>
655
656</div>
657
658<div id="linkbar">
cristyce69bb02010-07-27 19:49:46 +0000659 <span id="linkbar-west">&nbsp;</span>
cristy10c87152010-06-26 16:12:21 +0000660 <span id="linkbar-center">
661 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> &bull;
cristya8902942010-07-30 00:49:52 +0000662 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
cristy10c87152010-06-26 16:12:21 +0000663 </span>
664 <span id="linkbar-east">&nbsp;</span>
665 </div>
666 <div class="footer">
cristy4103d562010-12-10 01:38:54 +0000667 <span id="footer-west">&copy; 1999-2011 ImageMagick Studio LLC</span>
cristy10c87152010-06-26 16:12:21 +0000668 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
669 </div>
670 <div style="clear: both; margin: 0; width: 100%; "></div>
cristya8902942010-07-30 00:49:52 +0000671 <script type="text/javascript">
672 var _gaq = _gaq || [];
673 _gaq.push(['_setAccount', 'UA-17690367-1']);
674 _gaq.push(['_trackPageview']);
675
676 (function() {
677 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
678 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
679 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
680 })();
681 </script>
cristy10c87152010-06-26 16:12:21 +0000682</body>
683</html>