blob: 5cffaa5ae090cdd436f8705184b609d79c453d93 [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>
cristyd6dfc0d2010-06-27 19:30:49 +0000144<div class="sponsor">
cristyfbb4a972010-06-30 17:42:22 +0000145 <a title="Sponsor: Online-Magazin" href="http://www.unkostenbeitrag.de/" title="Online-Magazin">Online-Magazin</a><!-- 20101101000200 -->
cristyd6dfc0d2010-06-27 19:30:49 +0000146</div>
cristy10c87152010-06-26 16:12:21 +0000147</div>
148</div>
149
150
151</div>
152
153<div class="main">
154
cristyd6dfc0d2010-06-27 19:30:49 +0000155<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 +0000156
157<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
158_8c.html" target="source" name="CloneImageView">CloneImageView</a></h2>
159<div class="doc-section">
160
cristy73b7d4c2010-06-27 00:31:00 +0000161<p>CloneImageView() makes a copy of the specified image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000162
163<p>The format of the CloneImageView method is:</p>
164
165<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000166 ImageView *CloneImageView(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000167</pre>
168
169<p>A description of each parameter follows:</p></ol>
170
cristy73b7d4c2010-06-27 00:31:00 +0000171<h5>image_view</h5>
172<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000173
174 </div>
175<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
176_8c.html" target="source" name="DestroyImageView">DestroyImageView</a></h2>
177<div class="doc-section">
178
cristy73b7d4c2010-06-27 00:31:00 +0000179<p>DestroyImageView() deallocates memory associated with a image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000180
181<p>The format of the DestroyImageView method is:</p>
182
183<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000184 ImageView *DestroyImageView(ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000185</pre>
186
187<p>A description of each parameter follows:</p></ol>
188
cristy73b7d4c2010-06-27 00:31:00 +0000189<h5>image_view</h5>
190<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000191
192 </div>
193<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
194_8c.html" target="source" name="DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a></h2>
195<div class="doc-section">
196
cristyc3ebda22010-06-27 17:11:57 +0000197<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 +0000198
cristyd6dfc0d2010-06-27 19:30:49 +0000199<p>The callback signature is:</p>
200
201<pre class="text">
202 MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source,
203 const ImageView *duplex,ImageView *destination,const ssize_t y,
204 const int thread_id,void *context)
205</pre>
206
cristy73b7d4c2010-06-27 00:31:00 +0000207<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000208
209<pre class="text">
210 #pragma omp critical
211</pre>
212
213<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>
214
215<p>The format of the DuplexTransferImageViewIterator method is:</p>
216
217<pre class="code">
218 MagickBooleanType DuplexTransferImageViewIterator(ImageView *source,
219 ImageView *duplex,ImageView *destination,
220 DuplexTransferImageViewMethod transfer,void *context)
221</pre>
222
223<p>A description of each parameter follows:</p></ol>
224
225<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000226<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000227
228<h5>duplex</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000229<ol><p>the duplex image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000230
231<h5>destination</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000232<ol><p>the destination image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000233
234<h5>transfer</h5>
235<ol><p>the transfer callback method.</p></ol>
236
237<h5>context</h5>
238<ol><p>the user defined context.</p></ol>
239
240 </div>
241<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy73b7d4c2010-06-27 00:31:00 +0000242_8c.html" target="source" name="GetImageViewAuthenticIndexes">GetImageViewAuthenticIndexes</a></h2>
243<div class="doc-section">
244
245<p>GetImageViewAuthenticIndexes() returns the image view authentic indexes.</p></ol>
246
247<p>The format of the GetImageViewAuthenticPixels method is:</p>
248
249<pre class="code">
250 IndexPacket *GetImageViewAuthenticIndexes(const ImageView *image_view)
251</pre>
252
253<p>A description of each parameter follows:</p></ol>
254
255<h5>image_view</h5>
256<ol><p>the image view.</p></ol>
257
258 </div>
259<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
260_8c.html" target="source" name="GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a></h2>
261<div class="doc-section">
262
263<p>GetImageViewAuthenticPixels() returns the image view authentic pixels.</p></ol>
264
265<p>The format of the GetImageViewAuthenticPixels method is:</p>
266
267<pre class="code">
268 PixelPacket *GetImageViewAuthenticPixels(const ImageView *image_view)
269</pre>
270
271<p>A description of each parameter follows:</p></ol>
272
273<h5>image_view</h5>
274<ol><p>the image view.</p></ol>
275
276 </div>
277<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000278_8c.html" target="source" name="GetImageViewException">GetImageViewException</a></h2>
279<div class="doc-section">
280
cristy73b7d4c2010-06-27 00:31:00 +0000281<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 +0000282
283<p>The format of the GetImageViewException method is:</p>
284
285<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000286 char *GetImageViewException(const PixelImage *image_view,
cristy10c87152010-06-26 16:12:21 +0000287 ExceptionType *severity)
288</pre>
289
290<p>A description of each parameter follows:</p></ol>
291
cristy73b7d4c2010-06-27 00:31:00 +0000292<h5>image_view</h5>
293<ol><p>the pixel image_view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000294
295<h5>severity</h5>
296<ol><p>the severity of the error is returned here.</p></ol>
297
298 </div>
299<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristyc3ebda22010-06-27 17:11:57 +0000300_8c.html" target="source" name="GetImageViewExtent">GetImageViewExtent</a></h2>
cristy10c87152010-06-26 16:12:21 +0000301<div class="doc-section">
302
cristyc3ebda22010-06-27 17:11:57 +0000303<p>GetImageViewExtent() returns the image view extent.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000304
cristyc3ebda22010-06-27 17:11:57 +0000305<p>The format of the GetImageViewExtent method is:</p>
cristy10c87152010-06-26 16:12:21 +0000306
307<pre class="code">
cristyc3ebda22010-06-27 17:11:57 +0000308 RectangleInfo GetImageViewExtent(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000309</pre>
310
311<p>A description of each parameter follows:</p></ol>
312
cristy73b7d4c2010-06-27 00:31:00 +0000313<h5>image_view</h5>
314<ol><p>the image view.</p></ol>
315
316 </div>
317<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
318_8c.html" target="source" name="GetImageViewImage">GetImageViewImage</a></h2>
319<div class="doc-section">
320
321<p>GetImageViewImage() returns the image associated with the image view.</p></ol>
322
323<p>The format of the GetImageViewImage method is:</p>
324
325<pre class="code">
326 MagickCore *GetImageViewImage(const ImageView *image_view)
327</pre>
328
329<p>A description of each parameter follows:</p></ol>
330
331<h5>image_view</h5>
332<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000333
334 </div>
335<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
336_8c.html" target="source" name="GetImageViewIterator">GetImageViewIterator</a></h2>
337<div class="doc-section">
338
cristyc3ebda22010-06-27 17:11:57 +0000339<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 +0000340
cristyd6dfc0d2010-06-27 19:30:49 +0000341<p>The callback signature is:</p>
342
343<pre class="text">
344 MagickBooleanType GetImageViewMethod(const ImageView *source,
345 const ssize_t y,const int thread_id,void *context)
346</pre>
347
cristy73b7d4c2010-06-27 00:31:00 +0000348<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000349
350<pre class="text">
351 #pragma omp critical
352</pre>
353
354<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>
355
356<p>The format of the GetImageViewIterator method is:</p>
357
358<pre class="code">
359 MagickBooleanType GetImageViewIterator(ImageView *source,
360 GetImageViewMethod get,void *context)
361</pre>
362
363<p>A description of each parameter follows:</p></ol>
364
365<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000366<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000367
368<h5>get</h5>
369<ol><p>the get callback method.</p></ol>
370
371<h5>context</h5>
372<ol><p>the user defined context.</p></ol>
373
374 </div>
375<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy73b7d4c2010-06-27 00:31:00 +0000376_8c.html" target="source" name="GetImageViewVirtualIndexes">GetImageViewVirtualIndexes</a></h2>
cristy10c87152010-06-26 16:12:21 +0000377<div class="doc-section">
378
cristy73b7d4c2010-06-27 00:31:00 +0000379<p>GetImageViewVirtualIndexes() returns the image view virtual indexes.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000380
cristy73b7d4c2010-06-27 00:31:00 +0000381<p>The format of the GetImageViewVirtualIndexes method is:</p>
cristy10c87152010-06-26 16:12:21 +0000382
383<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000384 const IndexPacket *GetImageViewVirtualIndexes(
385 const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000386</pre>
387
388<p>A description of each parameter follows:</p></ol>
389
cristy73b7d4c2010-06-27 00:31:00 +0000390<h5>image_view</h5>
391<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000392
393 </div>
394<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy73b7d4c2010-06-27 00:31:00 +0000395_8c.html" target="source" name="GetImageViewVirtualPixels">GetImageViewVirtualPixels</a></h2>
cristy10c87152010-06-26 16:12:21 +0000396<div class="doc-section">
397
cristy73b7d4c2010-06-27 00:31:00 +0000398<p>GetImageViewVirtualPixels() returns the image view virtual pixels.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000399
cristy73b7d4c2010-06-27 00:31:00 +0000400<p>The format of the GetImageViewVirtualPixels method is:</p>
cristy10c87152010-06-26 16:12:21 +0000401
402<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000403 const PixelPacket *GetImageViewVirtualPixels(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000404</pre>
405
406<p>A description of each parameter follows:</p></ol>
407
cristy73b7d4c2010-06-27 00:31:00 +0000408<h5>image_view</h5>
409<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000410
411 </div>
412<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000413_8c.html" target="source" name="IsImageView">IsImageView</a></h2>
414<div class="doc-section">
415
cristy73b7d4c2010-06-27 00:31:00 +0000416<p>IsImageView() returns MagickTrue if the the parameter is verified as a image view object.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000417
418<p>The format of the IsImageView method is:</p>
419
420<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000421 MagickBooleanType IsImageView(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000422</pre>
423
424<p>A description of each parameter follows:</p></ol>
425
cristy73b7d4c2010-06-27 00:31:00 +0000426<h5>image_view</h5>
427<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000428
429 </div>
430<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
431_8c.html" target="source" name="NewImageView">NewImageView</a></h2>
432<div class="doc-section">
433
cristyc3ebda22010-06-27 17:11:57 +0000434<p>NewImageView() returns a image view required for all other methods in the Image View API.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000435
436<p>The format of the NewImageView method is:</p>
437
438<pre class="code">
439 ImageView *NewImageView(MagickCore *wand)
440</pre>
441
442<p>A description of each parameter follows:</p></ol>
443
444<h5>wand</h5>
445<ol><p>the wand.</p></ol>
446
447 </div>
448<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
449_8c.html" target="source" name="NewImageViewRegion">NewImageViewRegion</a></h2>
450<div class="doc-section">
451
cristyc3ebda22010-06-27 17:11:57 +0000452<p>NewImageViewRegion() returns a image view required for all other methods in the Image View API.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000453
454<p>The format of the NewImageViewRegion method is:</p>
455
456<pre class="code">
457 ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
458 const ssize_t y,const size_t width,const size_t height)
459</pre>
460
461<p>A description of each parameter follows:</p></ol>
462
463<h5>wand</h5>
464<ol><p>the magick wand.</p></ol>
465
466<h5>x,y,columns,rows</h5>
cristyc3ebda22010-06-27 17:11:57 +0000467<ol><p>These values define the perimeter of a extent of pixel_wands view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000468
469 </div>
470<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristyd6dfc0d2010-06-27 19:30:49 +0000471_8c.html" target="source" name="SetImageViewDescription">SetImageViewDescription</a></h2>
472<div class="doc-section">
473
474<p>SetImageViewDescription() associates a description with an image view.</p></ol>
475
476<p>The format of the SetImageViewDescription method is:</p>
477
478<pre class="code">
479 void SetImageViewDescription(ImageView *image_view,
480 const char *description)
481</pre>
482
483<p>A description of each parameter follows:</p></ol>
484
485<h5>image_view</h5>
486<ol><p>the image view.</p></ol>
487
488<h5>description</h5>
489<ol><p>the image view description.</p></ol>
490
491 </div>
492<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000493_8c.html" target="source" name="SetImageViewIterator">SetImageViewIterator</a></h2>
494<div class="doc-section">
495
cristyc3ebda22010-06-27 17:11:57 +0000496<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 +0000497
cristyd6dfc0d2010-06-27 19:30:49 +0000498<p>The callback signature is:</p>
499
500<pre class="text">
501 MagickBooleanType SetImageViewMethod(ImageView *destination,
502 const ssize_t y,const int thread_id,void *context)
503</pre>
504
cristy73b7d4c2010-06-27 00:31:00 +0000505<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000506
507<pre class="text">
508 #pragma omp critical
509</pre>
510
511<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>
512
513<p>The format of the SetImageViewIterator method is:</p>
514
515<pre class="code">
516 MagickBooleanType SetImageViewIterator(ImageView *destination,
517 SetImageViewMethod set,void *context)
518</pre>
519
520<p>A description of each parameter follows:</p></ol>
521
522<h5>destination</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000523<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000524
525<h5>set</h5>
526<ol><p>the set callback method.</p></ol>
527
528<h5>context</h5>
529<ol><p>the user defined context.</p></ol>
530
531 </div>
532<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
533_8c.html" target="source" name="TransferImageViewIterator">TransferImageViewIterator</a></h2>
534<div class="doc-section">
535
cristyc3ebda22010-06-27 17:11:57 +0000536<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 +0000537
cristyd6dfc0d2010-06-27 19:30:49 +0000538<p>The callback signature is:</p>
539
540<pre class="text">
541 MagickBooleanType TransferImageViewMethod(const ImageView *source,
542 ImageView *destination,const ssize_t y,const int thread_id,
543 void *context)
544</pre>
545
cristy73b7d4c2010-06-27 00:31:00 +0000546<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000547
548<pre class="text">
549 #pragma omp critical
550</pre>
551
552<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>
553
554<p>The format of the TransferImageViewIterator method is:</p>
555
556<pre class="code">
557 MagickBooleanType TransferImageViewIterator(ImageView *source,
558 ImageView *destination,TransferImageViewMethod transfer,void *context)
559</pre>
560
561<p>A description of each parameter follows:</p></ol>
562
563<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000564<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000565
566<h5>destination</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000567<ol><p>the destination image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000568
569<h5>transfer</h5>
570<ol><p>the transfer callback method.</p></ol>
571
572<h5>context</h5>
573<ol><p>the user defined context.</p></ol>
574
575 </div>
576<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
577_8c.html" target="source" name="UpdateImageViewIterator">UpdateImageViewIterator</a></h2>
578<div class="doc-section">
579
cristyc3ebda22010-06-27 17:11:57 +0000580<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 +0000581
cristyd6dfc0d2010-06-27 19:30:49 +0000582<p>The callback signature is:</p>
583
584<pre class="text">
585 MagickBooleanType UpdateImageViewMethod(ImageView *source,
586 const ssize_t y,const int thread_id,void *context)
587</pre>
588
cristy73b7d4c2010-06-27 00:31:00 +0000589<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000590
591<pre class="text">
592 #pragma omp critical
593</pre>
594
595<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>
596
597<p>The format of the UpdateImageViewIterator method is:</p>
598
599<pre class="code">
600 MagickBooleanType UpdateImageViewIterator(ImageView *source,
601 UpdateImageViewMethod update,void *context)
602</pre>
603
604<p>A description of each parameter follows:</p></ol>
605
606<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000607<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000608
609<h5>update</h5>
610<ol><p>the update callback method.</p></ol>
611
612<h5>context</h5>
613<ol><p>the user defined context.</p></ol>
614
615 </div>
616
617</div>
618
619<div id="linkbar">
620 <!-- <span id="linkbar-west">&nbsp;</span> -->
621 <span id="linkbar-center">
622 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> &bull;
cristyd6dfc0d2010-06-27 19:30:49 +0000623 <a href="http://studio.webbyland.com/ImageMagick/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
cristy10c87152010-06-26 16:12:21 +0000624 </span>
625 <span id="linkbar-east">&nbsp;</span>
626 </div>
627 <div class="footer">
628 <span id="footer-west">&copy; 1999-2010 ImageMagick Studio LLC</span>
629 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
630 </div>
631 <div style="clear: both; margin: 0; width: 100%; "></div>
632</body>
633</html>