blob: 6584c9fcae7cdb35ff35e42efe27ae77d98f83f7 [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"/>
27 <style type="text/css" media="all">
28 @import url("../../www/magick.css");
29 </style>
cristydcca3fa2010-12-29 21:50:07 +000030 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
cristy361f4662010-12-31 23:02:52 +000031 <script type="text/javascript" src="../fancybox/jquery.fancybox-1.3.4.pack.js"></script>
32 <link rel="stylesheet" type="text/css" href="../fancybox/jquery.fancybox-1.3.4.css" media="screen" />
33 <script type="text/javascript">
34 $(document).ready(function() {
35 $("a[href$=.jpg],a[href$=.png],a[href$=.gif]").fancybox({
36 'transitionIn' : 'elastic',
37 'transitionOut' : 'elastic',
38 'overlayShow' : false,
39 'opacity' : true
40 });
41 });
42 </script>
cristy10c87152010-06-26 16:12:21 +000043</head>
44
45<body id="www-imagemagick-org">
46<div class="titlebar">
47<a href="../../index.html">
48 <img src="../../images/script.png" alt="[ImageMagick]"
49 style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>
50<a href="http://www.networkredux.com">
51 <img src="../../images/networkredux.png" alt="[sponsor]"
52 style="margin: 45px auto; border: 0px; float: left;" /></a>
53<a href="http://www.imagemagick.org/discourse-server/">
54 <img src="../../images/logo.jpg" alt=""
55 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
56<a href="../../index.html">
57 <img src="../../images/sprite.jpg" alt=""
58 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
59</div>
60
cristyce69bb02010-07-27 19:49:46 +000061<div class="westbar">
cristy10c87152010-06-26 16:12:21 +000062
63<div class="menu">
64 <a title="About ImageMagick" href="../../index.html">About ImageMagick</a>
65</div>
66<div class="sep"></div>
67<div class="menu">
68 <a title="Binary Releases" href="../../www/binary-releases.html">Binary Releases</a>
69</div>
70<div class="sub">
71 <a title="Binary Release: Unix" href="../../www/binary-releases.html#unix">Unix</a>
72</div>
73<div class="sub">
74 <a title="Binary Release: MacOS X" href="../../www/binary-releases.html#macosx">Mac OS X</a>
75</div>
76<div class="sub">
77 <a title="Binary Release: Windows" href="../../www/binary-releases.html#windows">Windows</a>
78</div>
79<div class="sep"></div>
80<div class="menu">
81 <a title="Command-line Tools" href="../../www/command-line-tools.html">Command-line Tools</a>
82</div>
83<div class="sub">
84 <a title="Command-line Tools: Processing" href="../../www/command-line-processing.html">Processing</a>
85</div>
86<div class="sub">
87 <a title="Command-line Tools: Options" href="../../www/command-line-options.html">Options</a>
88</div>
89<div class="sub">
90 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
91</div>
92<div class="menu">
93 <a title="Program Interfaces" href="../../www/api.html">Program Interfaces</a>
94</div>
95<div class="sub">
96 <a title="Program Interface: MagickWand" href="../../www/magick-wand.html">MagickWand</a>
97</div>
98<div class="sub">
99 <a title="Program Interface: MagickCore" href="../../www/magick-core.html">MagickCore</a>
100</div>
101<div class="sub">
102 <a title="Program Interface: PerlMagick" href="../../www/perl-magick.html">PerlMagick</a>
103</div>
104<div class="sub">
cristydcca3fa2010-12-29 21:50:07 +0000105 <a title="Program Interface: Magick++" href="../../www/magick++.html">Magick++</a>
cristy10c87152010-06-26 16:12:21 +0000106</div>
107<div class="sep"></div>
108<div class="menu">
109 <a title="Install from Source" href="../../www/install-source.html">Install from Source</a>
110</div>
111<div class="sub">
112 <a title="Install from Source: Unix" href="../../www/install-source.html#unix">Unix</a>
113</div>
114<div class="sub">
115 <a title="Install from Source: Windows" href="../../www/install-source.html#windows">Windows</a>
116 </div>
117<div class="menu">
118 <a title="Resources" href="../../www/resources.html">Resources</a>
119</div>
120<div class="menu">
121 <a title="Architecture" href="../../www/architecture.html">Architecture</a>
122</div>
123<div class="menu">
124 <a title="Download" href="../../www/download.html">Download</a>
125</div>
126<div class="sep"></div>
127<div class="menu">
128 <a title="Search" href="../http://www.imagemagick.org/script/search.php">Search</a>
129</div>
130<div class="sep"></div>
131<div class="menu">
cristyffb69ed2010-12-25 00:06:48 +0000132 <a title="Site Map" href="../../www/sitemap.html">Site Map</a>
cristy10c87152010-06-26 16:12:21 +0000133</div>
134<div class="sub">
cristyffb69ed2010-12-25 00:06:48 +0000135 <a title="Site Map: Links" href="../../www/links.html">Links</a>
cristy10c87152010-06-26 16:12:21 +0000136</div>
137<div class="sep"></div>
138<div class="menu">
139 <a title="Sponsors" href="../../www/sponsors.html">Sponsors:</a>
140
141<div class="sponsbox">
cristyec6b4752011-01-08 03:16:23 +0000142<div class="sponsor">
143 <a title="Sponsor: Web Hosting" href="http://www.bodhost.com/hosting.html">Web Hosting</a><!-- 201104010090 -->
cristy73fd1cd2010-09-12 19:14:25 +0000144</div>
145<div class="sponsor">
cristy7d52cd62010-10-01 17:26:59 +0000146 <a title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
147</div>
148<div class="sponsor">
cristyc5baf4f2010-08-31 15:05:33 +0000149 <a title="Sponsor: Image Converter" href="http://www.batchphoto.com">Image Converter</a><!-- 201103010900 Bits Coffee-->
150</div>
151<div class="sponsor">
cristy851dbce2010-08-06 21:40:00 +0000152 <a title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
153</div>
cristyec6b4752011-01-08 03:16:23 +0000154<div class="sponsor">
155 <a title="Sponsor: Free Catalogs" href="http://www.who-sells-it.com/">Free Catalogs</a><!-- 20120801000600 -->
156</div>
cristy10c87152010-06-26 16:12:21 +0000157</div>
cristyce69bb02010-07-27 19:49:46 +0000158</div>
159</div>
cristy10c87152010-06-26 16:12:21 +0000160
cristyce69bb02010-07-27 19:49:46 +0000161<div class="eastbar">
162 <script type="text/javascript">
163 <!--
164 google_ad_client = "pub-3129977114552745";
cristyce69bb02010-07-27 19:49:46 +0000165 google_ad_slot = "0574824969";
166 google_ad_width = 160;
167 google_ad_height = 600;
168 //-->
169 </script>
170 <script type="text/javascript"
171 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
172 </script>
cristy10c87152010-06-26 16:12:21 +0000173</div>
174
175<div class="main">
176
cristy307ba182010-12-25 01:00:34 +0000177<h1>Module image-view
178 Methods</h1>
cristyce66ab12010-10-21 23:36:32 +0000179<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 +0000180
181<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
182_8c.html" target="source" name="CloneImageView">CloneImageView</a></h2>
183<div class="doc-section">
184
cristy73b7d4c2010-06-27 00:31:00 +0000185<p>CloneImageView() makes a copy of the specified image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000186
187<p>The format of the CloneImageView method is:</p>
188
189<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000190 ImageView *CloneImageView(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000191</pre>
192
193<p>A description of each parameter follows:</p></ol>
194
cristy73b7d4c2010-06-27 00:31:00 +0000195<h5>image_view</h5>
196<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000197
198 </div>
199<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
200_8c.html" target="source" name="DestroyImageView">DestroyImageView</a></h2>
201<div class="doc-section">
202
cristy73b7d4c2010-06-27 00:31:00 +0000203<p>DestroyImageView() deallocates memory associated with a image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000204
205<p>The format of the DestroyImageView method is:</p>
206
207<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000208 ImageView *DestroyImageView(ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000209</pre>
210
211<p>A description of each parameter follows:</p></ol>
212
cristy73b7d4c2010-06-27 00:31:00 +0000213<h5>image_view</h5>
214<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000215
216 </div>
217<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
218_8c.html" target="source" name="DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a></h2>
219<div class="doc-section">
220
cristyc3ebda22010-06-27 17:11:57 +0000221<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 +0000222
cristyd6dfc0d2010-06-27 19:30:49 +0000223<p>The callback signature is:</p>
224
225<pre class="text">
226 MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source,
227 const ImageView *duplex,ImageView *destination,const ssize_t y,
228 const int thread_id,void *context)
229</pre>
230
cristy73b7d4c2010-06-27 00:31:00 +0000231<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000232
233<pre class="text">
234 #pragma omp critical
235</pre>
236
237<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>
238
239<p>The format of the DuplexTransferImageViewIterator method is:</p>
240
241<pre class="code">
242 MagickBooleanType DuplexTransferImageViewIterator(ImageView *source,
243 ImageView *duplex,ImageView *destination,
244 DuplexTransferImageViewMethod transfer,void *context)
245</pre>
246
247<p>A description of each parameter follows:</p></ol>
248
249<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000250<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000251
252<h5>duplex</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000253<ol><p>the duplex image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000254
255<h5>destination</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000256<ol><p>the destination image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000257
258<h5>transfer</h5>
259<ol><p>the transfer callback method.</p></ol>
260
261<h5>context</h5>
262<ol><p>the user defined context.</p></ol>
263
264 </div>
265<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy73b7d4c2010-06-27 00:31:00 +0000266_8c.html" target="source" name="GetImageViewAuthenticIndexes">GetImageViewAuthenticIndexes</a></h2>
267<div class="doc-section">
268
269<p>GetImageViewAuthenticIndexes() returns the image view authentic indexes.</p></ol>
270
271<p>The format of the GetImageViewAuthenticPixels method is:</p>
272
273<pre class="code">
274 IndexPacket *GetImageViewAuthenticIndexes(const ImageView *image_view)
275</pre>
276
277<p>A description of each parameter follows:</p></ol>
278
279<h5>image_view</h5>
280<ol><p>the image view.</p></ol>
281
282 </div>
283<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
284_8c.html" target="source" name="GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a></h2>
285<div class="doc-section">
286
287<p>GetImageViewAuthenticPixels() returns the image view authentic pixels.</p></ol>
288
289<p>The format of the GetImageViewAuthenticPixels method is:</p>
290
291<pre class="code">
292 PixelPacket *GetImageViewAuthenticPixels(const ImageView *image_view)
293</pre>
294
295<p>A description of each parameter follows:</p></ol>
296
297<h5>image_view</h5>
298<ol><p>the image view.</p></ol>
299
300 </div>
301<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000302_8c.html" target="source" name="GetImageViewException">GetImageViewException</a></h2>
303<div class="doc-section">
304
cristy73b7d4c2010-06-27 00:31:00 +0000305<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 +0000306
307<p>The format of the GetImageViewException method is:</p>
308
309<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000310 char *GetImageViewException(const PixelImage *image_view,
cristy10c87152010-06-26 16:12:21 +0000311 ExceptionType *severity)
312</pre>
313
314<p>A description of each parameter follows:</p></ol>
315
cristy73b7d4c2010-06-27 00:31:00 +0000316<h5>image_view</h5>
317<ol><p>the pixel image_view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000318
319<h5>severity</h5>
320<ol><p>the severity of the error is returned here.</p></ol>
321
322 </div>
323<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristyc3ebda22010-06-27 17:11:57 +0000324_8c.html" target="source" name="GetImageViewExtent">GetImageViewExtent</a></h2>
cristy10c87152010-06-26 16:12:21 +0000325<div class="doc-section">
326
cristyc3ebda22010-06-27 17:11:57 +0000327<p>GetImageViewExtent() returns the image view extent.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000328
cristyc3ebda22010-06-27 17:11:57 +0000329<p>The format of the GetImageViewExtent method is:</p>
cristy10c87152010-06-26 16:12:21 +0000330
331<pre class="code">
cristyc3ebda22010-06-27 17:11:57 +0000332 RectangleInfo GetImageViewExtent(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000333</pre>
334
335<p>A description of each parameter follows:</p></ol>
336
cristy73b7d4c2010-06-27 00:31:00 +0000337<h5>image_view</h5>
338<ol><p>the image view.</p></ol>
339
340 </div>
341<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
342_8c.html" target="source" name="GetImageViewImage">GetImageViewImage</a></h2>
343<div class="doc-section">
344
345<p>GetImageViewImage() returns the image associated with the image view.</p></ol>
346
347<p>The format of the GetImageViewImage method is:</p>
348
349<pre class="code">
350 MagickCore *GetImageViewImage(const ImageView *image_view)
351</pre>
352
353<p>A description of each parameter follows:</p></ol>
354
355<h5>image_view</h5>
356<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000357
358 </div>
359<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
360_8c.html" target="source" name="GetImageViewIterator">GetImageViewIterator</a></h2>
361<div class="doc-section">
362
cristyc3ebda22010-06-27 17:11:57 +0000363<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 +0000364
cristyd6dfc0d2010-06-27 19:30:49 +0000365<p>The callback signature is:</p>
366
367<pre class="text">
368 MagickBooleanType GetImageViewMethod(const ImageView *source,
369 const ssize_t y,const int thread_id,void *context)
370</pre>
371
cristy73b7d4c2010-06-27 00:31:00 +0000372<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000373
374<pre class="text">
375 #pragma omp critical
376</pre>
377
378<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>
379
380<p>The format of the GetImageViewIterator method is:</p>
381
382<pre class="code">
383 MagickBooleanType GetImageViewIterator(ImageView *source,
384 GetImageViewMethod get,void *context)
385</pre>
386
387<p>A description of each parameter follows:</p></ol>
388
389<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000390<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000391
392<h5>get</h5>
393<ol><p>the get callback method.</p></ol>
394
395<h5>context</h5>
396<ol><p>the user defined context.</p></ol>
397
398 </div>
399<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy73b7d4c2010-06-27 00:31:00 +0000400_8c.html" target="source" name="GetImageViewVirtualIndexes">GetImageViewVirtualIndexes</a></h2>
cristy10c87152010-06-26 16:12:21 +0000401<div class="doc-section">
402
cristy73b7d4c2010-06-27 00:31:00 +0000403<p>GetImageViewVirtualIndexes() returns the image view virtual indexes.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000404
cristy73b7d4c2010-06-27 00:31:00 +0000405<p>The format of the GetImageViewVirtualIndexes method is:</p>
cristy10c87152010-06-26 16:12:21 +0000406
407<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000408 const IndexPacket *GetImageViewVirtualIndexes(
409 const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000410</pre>
411
412<p>A description of each parameter follows:</p></ol>
413
cristy73b7d4c2010-06-27 00:31:00 +0000414<h5>image_view</h5>
415<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000416
417 </div>
418<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy73b7d4c2010-06-27 00:31:00 +0000419_8c.html" target="source" name="GetImageViewVirtualPixels">GetImageViewVirtualPixels</a></h2>
cristy10c87152010-06-26 16:12:21 +0000420<div class="doc-section">
421
cristy73b7d4c2010-06-27 00:31:00 +0000422<p>GetImageViewVirtualPixels() returns the image view virtual pixels.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000423
cristy73b7d4c2010-06-27 00:31:00 +0000424<p>The format of the GetImageViewVirtualPixels method is:</p>
cristy10c87152010-06-26 16:12:21 +0000425
426<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000427 const PixelPacket *GetImageViewVirtualPixels(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000428</pre>
429
430<p>A description of each parameter follows:</p></ol>
431
cristy73b7d4c2010-06-27 00:31:00 +0000432<h5>image_view</h5>
433<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000434
435 </div>
436<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000437_8c.html" target="source" name="IsImageView">IsImageView</a></h2>
438<div class="doc-section">
439
cristy73b7d4c2010-06-27 00:31:00 +0000440<p>IsImageView() returns MagickTrue if the the parameter is verified as a image view object.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000441
442<p>The format of the IsImageView method is:</p>
443
444<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000445 MagickBooleanType IsImageView(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000446</pre>
447
448<p>A description of each parameter follows:</p></ol>
449
cristy73b7d4c2010-06-27 00:31:00 +0000450<h5>image_view</h5>
451<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000452
453 </div>
454<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
455_8c.html" target="source" name="NewImageView">NewImageView</a></h2>
456<div class="doc-section">
457
cristyc3ebda22010-06-27 17:11:57 +0000458<p>NewImageView() returns a image view required for all other methods in the Image View API.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000459
460<p>The format of the NewImageView method is:</p>
461
462<pre class="code">
463 ImageView *NewImageView(MagickCore *wand)
464</pre>
465
466<p>A description of each parameter follows:</p></ol>
467
468<h5>wand</h5>
469<ol><p>the wand.</p></ol>
470
471 </div>
472<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
473_8c.html" target="source" name="NewImageViewRegion">NewImageViewRegion</a></h2>
474<div class="doc-section">
475
cristyc3ebda22010-06-27 17:11:57 +0000476<p>NewImageViewRegion() returns a image view required for all other methods in the Image View API.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000477
478<p>The format of the NewImageViewRegion method is:</p>
479
480<pre class="code">
481 ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
482 const ssize_t y,const size_t width,const size_t height)
483</pre>
484
485<p>A description of each parameter follows:</p></ol>
486
487<h5>wand</h5>
488<ol><p>the magick wand.</p></ol>
489
490<h5>x,y,columns,rows</h5>
cristyc3ebda22010-06-27 17:11:57 +0000491<ol><p>These values define the perimeter of a extent of pixel_wands view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000492
493 </div>
494<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristyd6dfc0d2010-06-27 19:30:49 +0000495_8c.html" target="source" name="SetImageViewDescription">SetImageViewDescription</a></h2>
496<div class="doc-section">
497
498<p>SetImageViewDescription() associates a description with an image view.</p></ol>
499
500<p>The format of the SetImageViewDescription method is:</p>
501
502<pre class="code">
503 void SetImageViewDescription(ImageView *image_view,
504 const char *description)
505</pre>
506
507<p>A description of each parameter follows:</p></ol>
508
509<h5>image_view</h5>
510<ol><p>the image view.</p></ol>
511
512<h5>description</h5>
513<ol><p>the image view description.</p></ol>
514
515 </div>
516<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000517_8c.html" target="source" name="SetImageViewIterator">SetImageViewIterator</a></h2>
518<div class="doc-section">
519
cristyc3ebda22010-06-27 17:11:57 +0000520<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 +0000521
cristyd6dfc0d2010-06-27 19:30:49 +0000522<p>The callback signature is:</p>
523
524<pre class="text">
525 MagickBooleanType SetImageViewMethod(ImageView *destination,
526 const ssize_t y,const int thread_id,void *context)
527</pre>
528
cristy73b7d4c2010-06-27 00:31:00 +0000529<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000530
531<pre class="text">
532 #pragma omp critical
533</pre>
534
535<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>
536
537<p>The format of the SetImageViewIterator method is:</p>
538
539<pre class="code">
540 MagickBooleanType SetImageViewIterator(ImageView *destination,
541 SetImageViewMethod set,void *context)
542</pre>
543
544<p>A description of each parameter follows:</p></ol>
545
546<h5>destination</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000547<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000548
549<h5>set</h5>
550<ol><p>the set callback method.</p></ol>
551
552<h5>context</h5>
553<ol><p>the user defined context.</p></ol>
554
555 </div>
556<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristyce66ab12010-10-21 23:36:32 +0000557_8c.html" target="source" name="SetImageViewThreads">SetImageViewThreads</a></h2>
558<div class="doc-section">
559
560<p>SetImageViewThreads() sets the number of threads in a thread team.</p></ol>
561
562<p>The format of the SetImageViewDescription method is:</p>
563
564<pre class="code">
565 void SetImageViewThreads(ImageView *image_view,
566 const size_t number_threads)
567</pre>
568
569<p>A description of each parameter follows:</p></ol>
570
571<h5>image_view</h5>
572<ol><p>the image view.</p></ol>
573
574<h5>number_threads</h5>
575<ol><p>the number of threads in a thread team.</p></ol>
576
577 </div>
578<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000579_8c.html" target="source" name="TransferImageViewIterator">TransferImageViewIterator</a></h2>
580<div class="doc-section">
581
cristyc3ebda22010-06-27 17:11:57 +0000582<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 +0000583
cristyd6dfc0d2010-06-27 19:30:49 +0000584<p>The callback signature is:</p>
585
586<pre class="text">
587 MagickBooleanType TransferImageViewMethod(const ImageView *source,
588 ImageView *destination,const ssize_t y,const int thread_id,
589 void *context)
590</pre>
591
cristy73b7d4c2010-06-27 00:31:00 +0000592<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000593
594<pre class="text">
595 #pragma omp critical
596</pre>
597
598<p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p></ol>
599
600<p>The format of the TransferImageViewIterator method is:</p>
601
602<pre class="code">
603 MagickBooleanType TransferImageViewIterator(ImageView *source,
604 ImageView *destination,TransferImageViewMethod transfer,void *context)
605</pre>
606
607<p>A description of each parameter follows:</p></ol>
608
609<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000610<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000611
612<h5>destination</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000613<ol><p>the destination image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000614
615<h5>transfer</h5>
616<ol><p>the transfer callback method.</p></ol>
617
618<h5>context</h5>
619<ol><p>the user defined context.</p></ol>
620
621 </div>
622<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
623_8c.html" target="source" name="UpdateImageViewIterator">UpdateImageViewIterator</a></h2>
624<div class="doc-section">
625
cristyc3ebda22010-06-27 17:11:57 +0000626<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 +0000627
cristyd6dfc0d2010-06-27 19:30:49 +0000628<p>The callback signature is:</p>
629
630<pre class="text">
631 MagickBooleanType UpdateImageViewMethod(ImageView *source,
632 const ssize_t y,const int thread_id,void *context)
633</pre>
634
cristy73b7d4c2010-06-27 00:31:00 +0000635<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000636
637<pre class="text">
638 #pragma omp critical
639</pre>
640
641<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>
642
643<p>The format of the UpdateImageViewIterator method is:</p>
644
645<pre class="code">
646 MagickBooleanType UpdateImageViewIterator(ImageView *source,
647 UpdateImageViewMethod update,void *context)
648</pre>
649
650<p>A description of each parameter follows:</p></ol>
651
652<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000653<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000654
655<h5>update</h5>
656<ol><p>the update callback method.</p></ol>
657
658<h5>context</h5>
659<ol><p>the user defined context.</p></ol>
660
661 </div>
662
663</div>
664
665<div id="linkbar">
cristyce69bb02010-07-27 19:49:46 +0000666 <span id="linkbar-west">&nbsp;</span>
cristy10c87152010-06-26 16:12:21 +0000667 <span id="linkbar-center">
668 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> &bull;
cristya8902942010-07-30 00:49:52 +0000669 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
cristy10c87152010-06-26 16:12:21 +0000670 </span>
671 <span id="linkbar-east">&nbsp;</span>
672 </div>
673 <div class="footer">
cristy4103d562010-12-10 01:38:54 +0000674 <span id="footer-west">&copy; 1999-2011 ImageMagick Studio LLC</span>
cristy10c87152010-06-26 16:12:21 +0000675 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
676 </div>
677 <div style="clear: both; margin: 0; width: 100%; "></div>
cristya8902942010-07-30 00:49:52 +0000678 <script type="text/javascript">
679 var _gaq = _gaq || [];
680 _gaq.push(['_setAccount', 'UA-17690367-1']);
681 _gaq.push(['_trackPageview']);
682
683 (function() {
684 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
685 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
686 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
687 })();
688 </script>
cristy10c87152010-06-26 16:12:21 +0000689</body>
690</html>