blob: b652e4261d09c13c3c7fe07cb0bcb934d94499e0 [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>
5 <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
6 <meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U=" />
7 <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf" />
8 <style type="text/css" media="all">
9 @import url("../../www/magick.css");
10 </style>
11 <link rel="shortcut icon" href="../../images/wand.ico" type="images/vnd.microsoft.icon"/>
12 <title>ImageMagick: MagickCore, C API for ImageMagick: Image View Methods</title>
13 <meta http-equiv="Content-Language" content="en-US"/>
14 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
15 <meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/>
16 <meta name="Generator" content="PHP"/>
17 <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"/>
18 <meta name="Description" content="ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (about 100) including GIF, JPEG, JPEG-2000, PNG, PDF, PhotoCD, TIFF, and DPX. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you can freely use, copy, modify, and distribute. Its license is compatible with the GPL. It runs on all major operating systems. The functionality of ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite programming language. Choose from these interfaces: MagickCore (C), MagickWand (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images automagically and dynamically."/>
19 <meta name="Rating" content="GENERAL"/>
20 <meta name="Robots" content="INDEX, FOLLOW"/>
21 <meta name="Generator" content="ImageMagick Studio LLC"/>
22 <meta name="Author" content="ImageMagick Studio LLC"/>
23 <meta name="Revisit-after" content="2 DAYS"/>
24 <meta name="Resource-type" content="document"/>
25 <meta name="Copyright" content="Copyright (c) 1999-2010 ImageMagick Studio LLC"/>
26 <meta name="Distribution" content="Global"/>
27</head>
28
29<body id="www-imagemagick-org">
30<div class="titlebar">
31<a href="../../index.html">
32 <img src="../../images/script.png" alt="[ImageMagick]"
33 style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>
34<a href="http://www.networkredux.com">
35 <img src="../../images/networkredux.png" alt="[sponsor]"
36 style="margin: 45px auto; border: 0px; float: left;" /></a>
37<a href="http://www.imagemagick.org/discourse-server/">
38 <img src="../../images/logo.jpg" alt=""
39 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
40<a href="../../index.html">
41 <img src="../../images/sprite.jpg" alt=""
42 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
43</div>
44
cristyce69bb02010-07-27 19:49:46 +000045<div class="westbar">
cristy10c87152010-06-26 16:12:21 +000046
47<div class="menu">
48 <a title="About ImageMagick" href="../../index.html">About ImageMagick</a>
49</div>
50<div class="sep"></div>
51<div class="menu">
52 <a title="Binary Releases" href="../../www/binary-releases.html">Binary Releases</a>
53</div>
54<div class="sub">
55 <a title="Binary Release: Unix" href="../../www/binary-releases.html#unix">Unix</a>
56</div>
57<div class="sub">
58 <a title="Binary Release: MacOS X" href="../../www/binary-releases.html#macosx">Mac OS X</a>
59</div>
60<div class="sub">
61 <a title="Binary Release: Windows" href="../../www/binary-releases.html#windows">Windows</a>
62</div>
63<div class="sep"></div>
64<div class="menu">
65 <a title="Command-line Tools" href="../../www/command-line-tools.html">Command-line Tools</a>
66</div>
67<div class="sub">
68 <a title="Command-line Tools: Processing" href="../../www/command-line-processing.html">Processing</a>
69</div>
70<div class="sub">
71 <a title="Command-line Tools: Options" href="../../www/command-line-options.html">Options</a>
72</div>
73<div class="sub">
74 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
75</div>
76<div class="menu">
77 <a title="Program Interfaces" href="../../www/api.html">Program Interfaces</a>
78</div>
79<div class="sub">
80 <a title="Program Interface: MagickWand" href="../../www/magick-wand.html">MagickWand</a>
81</div>
82<div class="sub">
83 <a title="Program Interface: MagickCore" href="../../www/magick-core.html">MagickCore</a>
84</div>
85<div class="sub">
86 <a title="Program Interface: PerlMagick" href="../../www/perl-magick.html">PerlMagick</a>
87</div>
88<div class="sub">
89 <a title="Program Interface: Magick++" href="../../Magick++/">Magick++</a>
90</div>
91<div class="sep"></div>
92<div class="menu">
93 <a title="Install from Source" href="../../www/install-source.html">Install from Source</a>
94</div>
95<div class="sub">
96 <a title="Install from Source: Unix" href="../../www/install-source.html#unix">Unix</a>
97</div>
98<div class="sub">
99 <a title="Install from Source: Windows" href="../../www/install-source.html#windows">Windows</a>
100 </div>
101<div class="menu">
102 <a title="Resources" href="../../www/resources.html">Resources</a>
103</div>
104<div class="menu">
105 <a title="Architecture" href="../../www/architecture.html">Architecture</a>
106</div>
107<div class="menu">
108 <a title="Download" href="../../www/download.html">Download</a>
109</div>
110<div class="sep"></div>
111<div class="menu">
112 <a title="Search" href="../http://www.imagemagick.org/script/search.php">Search</a>
113</div>
114<div class="sep"></div>
115<div class="menu">
116 <a title="Site Map"href="../../www/sitemap.html">Site Map</a>
117</div>
118<div class="sub">
119 <a title="Site Map: Links"href="../../www/links.html">Links</a>
120</div>
121<div class="sep"></div>
122<div class="menu">
123 <a title="Sponsors" href="../../www/sponsors.html">Sponsors:</a>
124
125<div class="sponsbox">
126<div class="sponsor">
127 <a title="Sponsor: Webdesign Agentur" href="http://www.ventzke-partner.de">Webdesign Agentur</a><!-- 201101010480 invendio.de-->
128</div>
129<div class="sponsor">
130 <a title="Sponsor: LVM Versicherung" href="http://www.neu-reich.de">LVM Versicherung</a><!-- 201101010480 -->
131</div>
132<div class="sponsor">
133 <a title="Sponsor: Deko.net" href="http://www.deko.net">Deko.net</a><!-- 201101010600 Peterssen-->
134</div>
135<div class="sponsor">
cristy10c87152010-06-26 16:12:21 +0000136 <a title="Sponsor: Druckerei" href="http://www.print24.de/">Druckerei</a><!-- 201009010720 -->
137</div>
138<div class="sponsor">
139 <a title="Sponsor: Druckerei Online" href="http://www.allesdruck.de">Druckerei Online</a><!-- 201012011200 allesdruck.de-->
140</div>
cristyce69bb02010-07-27 19:49:46 +0000141<div class="sponsor">
142 <a title="Sponsor: Webdesign" href="http://www.renehornig.com/">Webdesign</a><!-- 20111001000240 -->
cristy10c87152010-06-26 16:12:21 +0000143</div>
144</div>
cristyce69bb02010-07-27 19:49:46 +0000145</div>
146</div>
cristy10c87152010-06-26 16:12:21 +0000147
cristyce69bb02010-07-27 19:49:46 +0000148<div class="eastbar">
149 <script type="text/javascript">
150 <!--
151 google_ad_client = "pub-3129977114552745";
152 /* 160x600, created 7/27/10 */
153 google_ad_slot = "0574824969";
154 google_ad_width = 160;
155 google_ad_height = 600;
156 //-->
157 </script>
158 <script type="text/javascript"
159 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
160 </script>
cristy10c87152010-06-26 16:12:21 +0000161</div>
162
163<div class="main">
164
cristyd6dfc0d2010-06-27 19:30:49 +0000165<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="#TransferImageViewIterator">TransferImageViewIterator</a> &bull; <a href="#UpdateImageViewIterator">UpdateImageViewIterator</a>]</p>
cristy10c87152010-06-26 16:12:21 +0000166
167<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
168_8c.html" target="source" name="CloneImageView">CloneImageView</a></h2>
169<div class="doc-section">
170
cristy73b7d4c2010-06-27 00:31:00 +0000171<p>CloneImageView() makes a copy of the specified image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000172
173<p>The format of the CloneImageView method is:</p>
174
175<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000176 ImageView *CloneImageView(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000177</pre>
178
179<p>A description of each parameter follows:</p></ol>
180
cristy73b7d4c2010-06-27 00:31:00 +0000181<h5>image_view</h5>
182<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000183
184 </div>
185<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
186_8c.html" target="source" name="DestroyImageView">DestroyImageView</a></h2>
187<div class="doc-section">
188
cristy73b7d4c2010-06-27 00:31:00 +0000189<p>DestroyImageView() deallocates memory associated with a image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000190
191<p>The format of the DestroyImageView method is:</p>
192
193<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000194 ImageView *DestroyImageView(ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000195</pre>
196
197<p>A description of each parameter follows:</p></ol>
198
cristy73b7d4c2010-06-27 00:31:00 +0000199<h5>image_view</h5>
200<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000201
202 </div>
203<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
204_8c.html" target="source" name="DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a></h2>
205<div class="doc-section">
206
cristyc3ebda22010-06-27 17:11:57 +0000207<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 +0000208
cristyd6dfc0d2010-06-27 19:30:49 +0000209<p>The callback signature is:</p>
210
211<pre class="text">
212 MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source,
213 const ImageView *duplex,ImageView *destination,const ssize_t y,
214 const int thread_id,void *context)
215</pre>
216
cristy73b7d4c2010-06-27 00:31:00 +0000217<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000218
219<pre class="text">
220 #pragma omp critical
221</pre>
222
223<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>
224
225<p>The format of the DuplexTransferImageViewIterator method is:</p>
226
227<pre class="code">
228 MagickBooleanType DuplexTransferImageViewIterator(ImageView *source,
229 ImageView *duplex,ImageView *destination,
230 DuplexTransferImageViewMethod transfer,void *context)
231</pre>
232
233<p>A description of each parameter follows:</p></ol>
234
235<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000236<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000237
238<h5>duplex</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000239<ol><p>the duplex image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000240
241<h5>destination</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000242<ol><p>the destination image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000243
244<h5>transfer</h5>
245<ol><p>the transfer callback method.</p></ol>
246
247<h5>context</h5>
248<ol><p>the user defined context.</p></ol>
249
250 </div>
251<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy73b7d4c2010-06-27 00:31:00 +0000252_8c.html" target="source" name="GetImageViewAuthenticIndexes">GetImageViewAuthenticIndexes</a></h2>
253<div class="doc-section">
254
255<p>GetImageViewAuthenticIndexes() returns the image view authentic indexes.</p></ol>
256
257<p>The format of the GetImageViewAuthenticPixels method is:</p>
258
259<pre class="code">
260 IndexPacket *GetImageViewAuthenticIndexes(const ImageView *image_view)
261</pre>
262
263<p>A description of each parameter follows:</p></ol>
264
265<h5>image_view</h5>
266<ol><p>the image view.</p></ol>
267
268 </div>
269<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
270_8c.html" target="source" name="GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a></h2>
271<div class="doc-section">
272
273<p>GetImageViewAuthenticPixels() returns the image view authentic pixels.</p></ol>
274
275<p>The format of the GetImageViewAuthenticPixels method is:</p>
276
277<pre class="code">
278 PixelPacket *GetImageViewAuthenticPixels(const ImageView *image_view)
279</pre>
280
281<p>A description of each parameter follows:</p></ol>
282
283<h5>image_view</h5>
284<ol><p>the image view.</p></ol>
285
286 </div>
287<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000288_8c.html" target="source" name="GetImageViewException">GetImageViewException</a></h2>
289<div class="doc-section">
290
cristy73b7d4c2010-06-27 00:31:00 +0000291<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 +0000292
293<p>The format of the GetImageViewException method is:</p>
294
295<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000296 char *GetImageViewException(const PixelImage *image_view,
cristy10c87152010-06-26 16:12:21 +0000297 ExceptionType *severity)
298</pre>
299
300<p>A description of each parameter follows:</p></ol>
301
cristy73b7d4c2010-06-27 00:31:00 +0000302<h5>image_view</h5>
303<ol><p>the pixel image_view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000304
305<h5>severity</h5>
306<ol><p>the severity of the error is returned here.</p></ol>
307
308 </div>
309<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristyc3ebda22010-06-27 17:11:57 +0000310_8c.html" target="source" name="GetImageViewExtent">GetImageViewExtent</a></h2>
cristy10c87152010-06-26 16:12:21 +0000311<div class="doc-section">
312
cristyc3ebda22010-06-27 17:11:57 +0000313<p>GetImageViewExtent() returns the image view extent.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000314
cristyc3ebda22010-06-27 17:11:57 +0000315<p>The format of the GetImageViewExtent method is:</p>
cristy10c87152010-06-26 16:12:21 +0000316
317<pre class="code">
cristyc3ebda22010-06-27 17:11:57 +0000318 RectangleInfo GetImageViewExtent(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000319</pre>
320
321<p>A description of each parameter follows:</p></ol>
322
cristy73b7d4c2010-06-27 00:31:00 +0000323<h5>image_view</h5>
324<ol><p>the image view.</p></ol>
325
326 </div>
327<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
328_8c.html" target="source" name="GetImageViewImage">GetImageViewImage</a></h2>
329<div class="doc-section">
330
331<p>GetImageViewImage() returns the image associated with the image view.</p></ol>
332
333<p>The format of the GetImageViewImage method is:</p>
334
335<pre class="code">
336 MagickCore *GetImageViewImage(const ImageView *image_view)
337</pre>
338
339<p>A description of each parameter follows:</p></ol>
340
341<h5>image_view</h5>
342<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000343
344 </div>
345<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
346_8c.html" target="source" name="GetImageViewIterator">GetImageViewIterator</a></h2>
347<div class="doc-section">
348
cristyc3ebda22010-06-27 17:11:57 +0000349<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 +0000350
cristyd6dfc0d2010-06-27 19:30:49 +0000351<p>The callback signature is:</p>
352
353<pre class="text">
354 MagickBooleanType GetImageViewMethod(const ImageView *source,
355 const ssize_t y,const int thread_id,void *context)
356</pre>
357
cristy73b7d4c2010-06-27 00:31:00 +0000358<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000359
360<pre class="text">
361 #pragma omp critical
362</pre>
363
364<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>
365
366<p>The format of the GetImageViewIterator method is:</p>
367
368<pre class="code">
369 MagickBooleanType GetImageViewIterator(ImageView *source,
370 GetImageViewMethod get,void *context)
371</pre>
372
373<p>A description of each parameter follows:</p></ol>
374
375<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000376<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000377
378<h5>get</h5>
379<ol><p>the get callback method.</p></ol>
380
381<h5>context</h5>
382<ol><p>the user defined context.</p></ol>
383
384 </div>
385<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy73b7d4c2010-06-27 00:31:00 +0000386_8c.html" target="source" name="GetImageViewVirtualIndexes">GetImageViewVirtualIndexes</a></h2>
cristy10c87152010-06-26 16:12:21 +0000387<div class="doc-section">
388
cristy73b7d4c2010-06-27 00:31:00 +0000389<p>GetImageViewVirtualIndexes() returns the image view virtual indexes.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000390
cristy73b7d4c2010-06-27 00:31:00 +0000391<p>The format of the GetImageViewVirtualIndexes method is:</p>
cristy10c87152010-06-26 16:12:21 +0000392
393<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000394 const IndexPacket *GetImageViewVirtualIndexes(
395 const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000396</pre>
397
398<p>A description of each parameter follows:</p></ol>
399
cristy73b7d4c2010-06-27 00:31:00 +0000400<h5>image_view</h5>
401<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000402
403 </div>
404<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy73b7d4c2010-06-27 00:31:00 +0000405_8c.html" target="source" name="GetImageViewVirtualPixels">GetImageViewVirtualPixels</a></h2>
cristy10c87152010-06-26 16:12:21 +0000406<div class="doc-section">
407
cristy73b7d4c2010-06-27 00:31:00 +0000408<p>GetImageViewVirtualPixels() returns the image view virtual pixels.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000409
cristy73b7d4c2010-06-27 00:31:00 +0000410<p>The format of the GetImageViewVirtualPixels method is:</p>
cristy10c87152010-06-26 16:12:21 +0000411
412<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000413 const PixelPacket *GetImageViewVirtualPixels(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000414</pre>
415
416<p>A description of each parameter follows:</p></ol>
417
cristy73b7d4c2010-06-27 00:31:00 +0000418<h5>image_view</h5>
419<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000420
421 </div>
422<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000423_8c.html" target="source" name="IsImageView">IsImageView</a></h2>
424<div class="doc-section">
425
cristy73b7d4c2010-06-27 00:31:00 +0000426<p>IsImageView() returns MagickTrue if the the parameter is verified as a image view object.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000427
428<p>The format of the IsImageView method is:</p>
429
430<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000431 MagickBooleanType IsImageView(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000432</pre>
433
434<p>A description of each parameter follows:</p></ol>
435
cristy73b7d4c2010-06-27 00:31:00 +0000436<h5>image_view</h5>
437<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000438
439 </div>
440<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
441_8c.html" target="source" name="NewImageView">NewImageView</a></h2>
442<div class="doc-section">
443
cristyc3ebda22010-06-27 17:11:57 +0000444<p>NewImageView() returns a image view required for all other methods in the Image View API.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000445
446<p>The format of the NewImageView method is:</p>
447
448<pre class="code">
449 ImageView *NewImageView(MagickCore *wand)
450</pre>
451
452<p>A description of each parameter follows:</p></ol>
453
454<h5>wand</h5>
455<ol><p>the wand.</p></ol>
456
457 </div>
458<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
459_8c.html" target="source" name="NewImageViewRegion">NewImageViewRegion</a></h2>
460<div class="doc-section">
461
cristyc3ebda22010-06-27 17:11:57 +0000462<p>NewImageViewRegion() returns a image view required for all other methods in the Image View API.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000463
464<p>The format of the NewImageViewRegion method is:</p>
465
466<pre class="code">
467 ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
468 const ssize_t y,const size_t width,const size_t height)
469</pre>
470
471<p>A description of each parameter follows:</p></ol>
472
473<h5>wand</h5>
474<ol><p>the magick wand.</p></ol>
475
476<h5>x,y,columns,rows</h5>
cristyc3ebda22010-06-27 17:11:57 +0000477<ol><p>These values define the perimeter of a extent of pixel_wands view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000478
479 </div>
480<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristyd6dfc0d2010-06-27 19:30:49 +0000481_8c.html" target="source" name="SetImageViewDescription">SetImageViewDescription</a></h2>
482<div class="doc-section">
483
484<p>SetImageViewDescription() associates a description with an image view.</p></ol>
485
486<p>The format of the SetImageViewDescription method is:</p>
487
488<pre class="code">
489 void SetImageViewDescription(ImageView *image_view,
490 const char *description)
491</pre>
492
493<p>A description of each parameter follows:</p></ol>
494
495<h5>image_view</h5>
496<ol><p>the image view.</p></ol>
497
498<h5>description</h5>
499<ol><p>the image view description.</p></ol>
500
501 </div>
502<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000503_8c.html" target="source" name="SetImageViewIterator">SetImageViewIterator</a></h2>
504<div class="doc-section">
505
cristyc3ebda22010-06-27 17:11:57 +0000506<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 +0000507
cristyd6dfc0d2010-06-27 19:30:49 +0000508<p>The callback signature is:</p>
509
510<pre class="text">
511 MagickBooleanType SetImageViewMethod(ImageView *destination,
512 const ssize_t y,const int thread_id,void *context)
513</pre>
514
cristy73b7d4c2010-06-27 00:31:00 +0000515<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000516
517<pre class="text">
518 #pragma omp critical
519</pre>
520
521<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>
522
523<p>The format of the SetImageViewIterator method is:</p>
524
525<pre class="code">
526 MagickBooleanType SetImageViewIterator(ImageView *destination,
527 SetImageViewMethod set,void *context)
528</pre>
529
530<p>A description of each parameter follows:</p></ol>
531
532<h5>destination</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000533<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000534
535<h5>set</h5>
536<ol><p>the set callback method.</p></ol>
537
538<h5>context</h5>
539<ol><p>the user defined context.</p></ol>
540
541 </div>
542<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
543_8c.html" target="source" name="TransferImageViewIterator">TransferImageViewIterator</a></h2>
544<div class="doc-section">
545
cristyc3ebda22010-06-27 17:11:57 +0000546<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 +0000547
cristyd6dfc0d2010-06-27 19:30:49 +0000548<p>The callback signature is:</p>
549
550<pre class="text">
551 MagickBooleanType TransferImageViewMethod(const ImageView *source,
552 ImageView *destination,const ssize_t y,const int thread_id,
553 void *context)
554</pre>
555
cristy73b7d4c2010-06-27 00:31:00 +0000556<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000557
558<pre class="text">
559 #pragma omp critical
560</pre>
561
562<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>
563
564<p>The format of the TransferImageViewIterator method is:</p>
565
566<pre class="code">
567 MagickBooleanType TransferImageViewIterator(ImageView *source,
568 ImageView *destination,TransferImageViewMethod transfer,void *context)
569</pre>
570
571<p>A description of each parameter follows:</p></ol>
572
573<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000574<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000575
576<h5>destination</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000577<ol><p>the destination image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000578
579<h5>transfer</h5>
580<ol><p>the transfer callback method.</p></ol>
581
582<h5>context</h5>
583<ol><p>the user defined context.</p></ol>
584
585 </div>
586<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
587_8c.html" target="source" name="UpdateImageViewIterator">UpdateImageViewIterator</a></h2>
588<div class="doc-section">
589
cristyc3ebda22010-06-27 17:11:57 +0000590<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 +0000591
cristyd6dfc0d2010-06-27 19:30:49 +0000592<p>The callback signature is:</p>
593
594<pre class="text">
595 MagickBooleanType UpdateImageViewMethod(ImageView *source,
596 const ssize_t y,const int thread_id,void *context)
597</pre>
598
cristy73b7d4c2010-06-27 00:31:00 +0000599<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000600
601<pre class="text">
602 #pragma omp critical
603</pre>
604
605<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>
606
607<p>The format of the UpdateImageViewIterator method is:</p>
608
609<pre class="code">
610 MagickBooleanType UpdateImageViewIterator(ImageView *source,
611 UpdateImageViewMethod update,void *context)
612</pre>
613
614<p>A description of each parameter follows:</p></ol>
615
616<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000617<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000618
619<h5>update</h5>
620<ol><p>the update callback method.</p></ol>
621
622<h5>context</h5>
623<ol><p>the user defined context.</p></ol>
624
625 </div>
626
627</div>
628
629<div id="linkbar">
cristyce69bb02010-07-27 19:49:46 +0000630 <span id="linkbar-west">&nbsp;</span>
cristy10c87152010-06-26 16:12:21 +0000631 <span id="linkbar-center">
632 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> &bull;
cristyce69bb02010-07-27 19:49:46 +0000633 <a href="http://studio.webbyland.com/ImageMagick/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
cristy10c87152010-06-26 16:12:21 +0000634 </span>
635 <span id="linkbar-east">&nbsp;</span>
636 </div>
637 <div class="footer">
638 <span id="footer-west">&copy; 1999-2010 ImageMagick Studio LLC</span>
639 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
640 </div>
641 <div style="clear: both; margin: 0; width: 100%; "></div>
642</body>
643</html>