blob: 8266ea43e48ff3d0f2cf17dc38c18d4e0ad80c66 [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
45<div class="eastbar">
46
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">
136 <a title="Sponsor: Kredit" href="http://www.online-kredit-index.de">Kredit</a><!-- 201007010120 Buchhorn -->
137</div>
138<div class="sponsor">
139 <a title="Sponsor: Druckerei" href="http://www.print24.de/">Druckerei</a><!-- 201009010720 -->
140</div>
141<div class="sponsor">
142 <a title="Sponsor: Druckerei Online" href="http://www.allesdruck.de">Druckerei Online</a><!-- 201012011200 allesdruck.de-->
143</div>
cristy10c87152010-06-26 16:12:21 +0000144</div>
145</div>
146
147
148</div>
149
150<div class="main">
151
cristyd6dfc0d2010-06-27 19:30:49 +0000152<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 +0000153
154<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
155_8c.html" target="source" name="CloneImageView">CloneImageView</a></h2>
156<div class="doc-section">
157
cristy73b7d4c2010-06-27 00:31:00 +0000158<p>CloneImageView() makes a copy of the specified image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000159
160<p>The format of the CloneImageView method is:</p>
161
162<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000163 ImageView *CloneImageView(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000164</pre>
165
166<p>A description of each parameter follows:</p></ol>
167
cristy73b7d4c2010-06-27 00:31:00 +0000168<h5>image_view</h5>
169<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000170
171 </div>
172<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
173_8c.html" target="source" name="DestroyImageView">DestroyImageView</a></h2>
174<div class="doc-section">
175
cristy73b7d4c2010-06-27 00:31:00 +0000176<p>DestroyImageView() deallocates memory associated with a image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000177
178<p>The format of the DestroyImageView method is:</p>
179
180<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000181 ImageView *DestroyImageView(ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000182</pre>
183
184<p>A description of each parameter follows:</p></ol>
185
cristy73b7d4c2010-06-27 00:31:00 +0000186<h5>image_view</h5>
187<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000188
189 </div>
190<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
191_8c.html" target="source" name="DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a></h2>
192<div class="doc-section">
193
cristyc3ebda22010-06-27 17:11:57 +0000194<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 +0000195
cristyd6dfc0d2010-06-27 19:30:49 +0000196<p>The callback signature is:</p>
197
198<pre class="text">
199 MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source,
200 const ImageView *duplex,ImageView *destination,const ssize_t y,
201 const int thread_id,void *context)
202</pre>
203
cristy73b7d4c2010-06-27 00:31:00 +0000204<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000205
206<pre class="text">
207 #pragma omp critical
208</pre>
209
210<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>
211
212<p>The format of the DuplexTransferImageViewIterator method is:</p>
213
214<pre class="code">
215 MagickBooleanType DuplexTransferImageViewIterator(ImageView *source,
216 ImageView *duplex,ImageView *destination,
217 DuplexTransferImageViewMethod transfer,void *context)
218</pre>
219
220<p>A description of each parameter follows:</p></ol>
221
222<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000223<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000224
225<h5>duplex</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000226<ol><p>the duplex image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000227
228<h5>destination</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000229<ol><p>the destination image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000230
231<h5>transfer</h5>
232<ol><p>the transfer callback method.</p></ol>
233
234<h5>context</h5>
235<ol><p>the user defined context.</p></ol>
236
237 </div>
238<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy73b7d4c2010-06-27 00:31:00 +0000239_8c.html" target="source" name="GetImageViewAuthenticIndexes">GetImageViewAuthenticIndexes</a></h2>
240<div class="doc-section">
241
242<p>GetImageViewAuthenticIndexes() returns the image view authentic indexes.</p></ol>
243
244<p>The format of the GetImageViewAuthenticPixels method is:</p>
245
246<pre class="code">
247 IndexPacket *GetImageViewAuthenticIndexes(const ImageView *image_view)
248</pre>
249
250<p>A description of each parameter follows:</p></ol>
251
252<h5>image_view</h5>
253<ol><p>the image view.</p></ol>
254
255 </div>
256<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
257_8c.html" target="source" name="GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a></h2>
258<div class="doc-section">
259
260<p>GetImageViewAuthenticPixels() returns the image view authentic pixels.</p></ol>
261
262<p>The format of the GetImageViewAuthenticPixels method is:</p>
263
264<pre class="code">
265 PixelPacket *GetImageViewAuthenticPixels(const ImageView *image_view)
266</pre>
267
268<p>A description of each parameter follows:</p></ol>
269
270<h5>image_view</h5>
271<ol><p>the image view.</p></ol>
272
273 </div>
274<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000275_8c.html" target="source" name="GetImageViewException">GetImageViewException</a></h2>
276<div class="doc-section">
277
cristy73b7d4c2010-06-27 00:31:00 +0000278<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 +0000279
280<p>The format of the GetImageViewException method is:</p>
281
282<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000283 char *GetImageViewException(const PixelImage *image_view,
cristy10c87152010-06-26 16:12:21 +0000284 ExceptionType *severity)
285</pre>
286
287<p>A description of each parameter follows:</p></ol>
288
cristy73b7d4c2010-06-27 00:31:00 +0000289<h5>image_view</h5>
290<ol><p>the pixel image_view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000291
292<h5>severity</h5>
293<ol><p>the severity of the error is returned here.</p></ol>
294
295 </div>
296<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristyc3ebda22010-06-27 17:11:57 +0000297_8c.html" target="source" name="GetImageViewExtent">GetImageViewExtent</a></h2>
cristy10c87152010-06-26 16:12:21 +0000298<div class="doc-section">
299
cristyc3ebda22010-06-27 17:11:57 +0000300<p>GetImageViewExtent() returns the image view extent.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000301
cristyc3ebda22010-06-27 17:11:57 +0000302<p>The format of the GetImageViewExtent method is:</p>
cristy10c87152010-06-26 16:12:21 +0000303
304<pre class="code">
cristyc3ebda22010-06-27 17:11:57 +0000305 RectangleInfo GetImageViewExtent(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000306</pre>
307
308<p>A description of each parameter follows:</p></ol>
309
cristy73b7d4c2010-06-27 00:31:00 +0000310<h5>image_view</h5>
311<ol><p>the image view.</p></ol>
312
313 </div>
314<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
315_8c.html" target="source" name="GetImageViewImage">GetImageViewImage</a></h2>
316<div class="doc-section">
317
318<p>GetImageViewImage() returns the image associated with the image view.</p></ol>
319
320<p>The format of the GetImageViewImage method is:</p>
321
322<pre class="code">
323 MagickCore *GetImageViewImage(const ImageView *image_view)
324</pre>
325
326<p>A description of each parameter follows:</p></ol>
327
328<h5>image_view</h5>
329<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000330
331 </div>
332<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
333_8c.html" target="source" name="GetImageViewIterator">GetImageViewIterator</a></h2>
334<div class="doc-section">
335
cristyc3ebda22010-06-27 17:11:57 +0000336<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 +0000337
cristyd6dfc0d2010-06-27 19:30:49 +0000338<p>The callback signature is:</p>
339
340<pre class="text">
341 MagickBooleanType GetImageViewMethod(const ImageView *source,
342 const ssize_t y,const int thread_id,void *context)
343</pre>
344
cristy73b7d4c2010-06-27 00:31:00 +0000345<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000346
347<pre class="text">
348 #pragma omp critical
349</pre>
350
351<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>
352
353<p>The format of the GetImageViewIterator method is:</p>
354
355<pre class="code">
356 MagickBooleanType GetImageViewIterator(ImageView *source,
357 GetImageViewMethod get,void *context)
358</pre>
359
360<p>A description of each parameter follows:</p></ol>
361
362<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000363<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000364
365<h5>get</h5>
366<ol><p>the get callback method.</p></ol>
367
368<h5>context</h5>
369<ol><p>the user defined context.</p></ol>
370
371 </div>
372<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy73b7d4c2010-06-27 00:31:00 +0000373_8c.html" target="source" name="GetImageViewVirtualIndexes">GetImageViewVirtualIndexes</a></h2>
cristy10c87152010-06-26 16:12:21 +0000374<div class="doc-section">
375
cristy73b7d4c2010-06-27 00:31:00 +0000376<p>GetImageViewVirtualIndexes() returns the image view virtual indexes.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000377
cristy73b7d4c2010-06-27 00:31:00 +0000378<p>The format of the GetImageViewVirtualIndexes method is:</p>
cristy10c87152010-06-26 16:12:21 +0000379
380<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000381 const IndexPacket *GetImageViewVirtualIndexes(
382 const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000383</pre>
384
385<p>A description of each parameter follows:</p></ol>
386
cristy73b7d4c2010-06-27 00:31:00 +0000387<h5>image_view</h5>
388<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000389
390 </div>
391<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy73b7d4c2010-06-27 00:31:00 +0000392_8c.html" target="source" name="GetImageViewVirtualPixels">GetImageViewVirtualPixels</a></h2>
cristy10c87152010-06-26 16:12:21 +0000393<div class="doc-section">
394
cristy73b7d4c2010-06-27 00:31:00 +0000395<p>GetImageViewVirtualPixels() returns the image view virtual pixels.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000396
cristy73b7d4c2010-06-27 00:31:00 +0000397<p>The format of the GetImageViewVirtualPixels method is:</p>
cristy10c87152010-06-26 16:12:21 +0000398
399<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000400 const PixelPacket *GetImageViewVirtualPixels(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000401</pre>
402
403<p>A description of each parameter follows:</p></ol>
404
cristy73b7d4c2010-06-27 00:31:00 +0000405<h5>image_view</h5>
406<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000407
408 </div>
409<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000410_8c.html" target="source" name="IsImageView">IsImageView</a></h2>
411<div class="doc-section">
412
cristy73b7d4c2010-06-27 00:31:00 +0000413<p>IsImageView() returns MagickTrue if the the parameter is verified as a image view object.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000414
415<p>The format of the IsImageView method is:</p>
416
417<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000418 MagickBooleanType IsImageView(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000419</pre>
420
421<p>A description of each parameter follows:</p></ol>
422
cristy73b7d4c2010-06-27 00:31:00 +0000423<h5>image_view</h5>
424<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000425
426 </div>
427<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
428_8c.html" target="source" name="NewImageView">NewImageView</a></h2>
429<div class="doc-section">
430
cristyc3ebda22010-06-27 17:11:57 +0000431<p>NewImageView() returns a image view required for all other methods in the Image View API.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000432
433<p>The format of the NewImageView method is:</p>
434
435<pre class="code">
436 ImageView *NewImageView(MagickCore *wand)
437</pre>
438
439<p>A description of each parameter follows:</p></ol>
440
441<h5>wand</h5>
442<ol><p>the wand.</p></ol>
443
444 </div>
445<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
446_8c.html" target="source" name="NewImageViewRegion">NewImageViewRegion</a></h2>
447<div class="doc-section">
448
cristyc3ebda22010-06-27 17:11:57 +0000449<p>NewImageViewRegion() returns a image view required for all other methods in the Image View API.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000450
451<p>The format of the NewImageViewRegion method is:</p>
452
453<pre class="code">
454 ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
455 const ssize_t y,const size_t width,const size_t height)
456</pre>
457
458<p>A description of each parameter follows:</p></ol>
459
460<h5>wand</h5>
461<ol><p>the magick wand.</p></ol>
462
463<h5>x,y,columns,rows</h5>
cristyc3ebda22010-06-27 17:11:57 +0000464<ol><p>These values define the perimeter of a extent of pixel_wands view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000465
466 </div>
467<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristyd6dfc0d2010-06-27 19:30:49 +0000468_8c.html" target="source" name="SetImageViewDescription">SetImageViewDescription</a></h2>
469<div class="doc-section">
470
471<p>SetImageViewDescription() associates a description with an image view.</p></ol>
472
473<p>The format of the SetImageViewDescription method is:</p>
474
475<pre class="code">
476 void SetImageViewDescription(ImageView *image_view,
477 const char *description)
478</pre>
479
480<p>A description of each parameter follows:</p></ol>
481
482<h5>image_view</h5>
483<ol><p>the image view.</p></ol>
484
485<h5>description</h5>
486<ol><p>the image view description.</p></ol>
487
488 </div>
489<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000490_8c.html" target="source" name="SetImageViewIterator">SetImageViewIterator</a></h2>
491<div class="doc-section">
492
cristyc3ebda22010-06-27 17:11:57 +0000493<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 +0000494
cristyd6dfc0d2010-06-27 19:30:49 +0000495<p>The callback signature is:</p>
496
497<pre class="text">
498 MagickBooleanType SetImageViewMethod(ImageView *destination,
499 const ssize_t y,const int thread_id,void *context)
500</pre>
501
cristy73b7d4c2010-06-27 00:31:00 +0000502<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000503
504<pre class="text">
505 #pragma omp critical
506</pre>
507
508<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>
509
510<p>The format of the SetImageViewIterator method is:</p>
511
512<pre class="code">
513 MagickBooleanType SetImageViewIterator(ImageView *destination,
514 SetImageViewMethod set,void *context)
515</pre>
516
517<p>A description of each parameter follows:</p></ol>
518
519<h5>destination</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000520<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000521
522<h5>set</h5>
523<ol><p>the set callback method.</p></ol>
524
525<h5>context</h5>
526<ol><p>the user defined context.</p></ol>
527
528 </div>
529<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
530_8c.html" target="source" name="TransferImageViewIterator">TransferImageViewIterator</a></h2>
531<div class="doc-section">
532
cristyc3ebda22010-06-27 17:11:57 +0000533<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 +0000534
cristyd6dfc0d2010-06-27 19:30:49 +0000535<p>The callback signature is:</p>
536
537<pre class="text">
538 MagickBooleanType TransferImageViewMethod(const ImageView *source,
539 ImageView *destination,const ssize_t y,const int thread_id,
540 void *context)
541</pre>
542
cristy73b7d4c2010-06-27 00:31:00 +0000543<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000544
545<pre class="text">
546 #pragma omp critical
547</pre>
548
549<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>
550
551<p>The format of the TransferImageViewIterator method is:</p>
552
553<pre class="code">
554 MagickBooleanType TransferImageViewIterator(ImageView *source,
555 ImageView *destination,TransferImageViewMethod transfer,void *context)
556</pre>
557
558<p>A description of each parameter follows:</p></ol>
559
560<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000561<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000562
563<h5>destination</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000564<ol><p>the destination image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000565
566<h5>transfer</h5>
567<ol><p>the transfer callback method.</p></ol>
568
569<h5>context</h5>
570<ol><p>the user defined context.</p></ol>
571
572 </div>
573<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
574_8c.html" target="source" name="UpdateImageViewIterator">UpdateImageViewIterator</a></h2>
575<div class="doc-section">
576
cristyc3ebda22010-06-27 17:11:57 +0000577<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 +0000578
cristyd6dfc0d2010-06-27 19:30:49 +0000579<p>The callback signature is:</p>
580
581<pre class="text">
582 MagickBooleanType UpdateImageViewMethod(ImageView *source,
583 const ssize_t y,const int thread_id,void *context)
584</pre>
585
cristy73b7d4c2010-06-27 00:31:00 +0000586<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000587
588<pre class="text">
589 #pragma omp critical
590</pre>
591
592<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>
593
594<p>The format of the UpdateImageViewIterator method is:</p>
595
596<pre class="code">
597 MagickBooleanType UpdateImageViewIterator(ImageView *source,
598 UpdateImageViewMethod update,void *context)
599</pre>
600
601<p>A description of each parameter follows:</p></ol>
602
603<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000604<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000605
606<h5>update</h5>
607<ol><p>the update callback method.</p></ol>
608
609<h5>context</h5>
610<ol><p>the user defined context.</p></ol>
611
612 </div>
613
614</div>
615
616<div id="linkbar">
617 <!-- <span id="linkbar-west">&nbsp;</span> -->
618 <span id="linkbar-center">
619 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> &bull;
cristyb15553d2010-07-03 22:53:14 +0000620 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
cristy10c87152010-06-26 16:12:21 +0000621 </span>
622 <span id="linkbar-east">&nbsp;</span>
623 </div>
624 <div class="footer">
625 <span id="footer-west">&copy; 1999-2010 ImageMagick Studio LLC</span>
626 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
627 </div>
628 <div style="clear: both; margin: 0; width: 100%; "></div>
629</body>
630</html>