blob: 93538746502fa16aa84af2397ed2a3227c77eb21 [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">
cristy851dbce2010-08-06 21:40:00 +0000127 <a title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
128</div>
129<div class="sponsor">
cristy10c87152010-06-26 16:12:21 +0000130 <a title="Sponsor: Webdesign Agentur" href="http://www.ventzke-partner.de">Webdesign Agentur</a><!-- 201101010480 invendio.de-->
131</div>
132<div class="sponsor">
133 <a title="Sponsor: LVM Versicherung" href="http://www.neu-reich.de">LVM Versicherung</a><!-- 201101010480 -->
134</div>
135<div class="sponsor">
136 <a title="Sponsor: Deko.net" href="http://www.deko.net">Deko.net</a><!-- 201101010600 Peterssen-->
137</div>
138<div class="sponsor">
cristy10c87152010-06-26 16:12:21 +0000139 <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>
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";
cristyce69bb02010-07-27 19:49:46 +0000152 google_ad_slot = "0574824969";
153 google_ad_width = 160;
154 google_ad_height = 600;
155 //-->
156 </script>
157 <script type="text/javascript"
158 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
159 </script>
cristy10c87152010-06-26 16:12:21 +0000160</div>
161
162<div class="main">
163
cristyd6dfc0d2010-06-27 19:30:49 +0000164<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 +0000165
166<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
167_8c.html" target="source" name="CloneImageView">CloneImageView</a></h2>
168<div class="doc-section">
169
cristy73b7d4c2010-06-27 00:31:00 +0000170<p>CloneImageView() makes a copy of the specified image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000171
172<p>The format of the CloneImageView method is:</p>
173
174<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000175 ImageView *CloneImageView(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000176</pre>
177
178<p>A description of each parameter follows:</p></ol>
179
cristy73b7d4c2010-06-27 00:31:00 +0000180<h5>image_view</h5>
181<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000182
183 </div>
184<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
185_8c.html" target="source" name="DestroyImageView">DestroyImageView</a></h2>
186<div class="doc-section">
187
cristy73b7d4c2010-06-27 00:31:00 +0000188<p>DestroyImageView() deallocates memory associated with a image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000189
190<p>The format of the DestroyImageView method is:</p>
191
192<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000193 ImageView *DestroyImageView(ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000194</pre>
195
196<p>A description of each parameter follows:</p></ol>
197
cristy73b7d4c2010-06-27 00:31:00 +0000198<h5>image_view</h5>
199<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000200
201 </div>
202<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
203_8c.html" target="source" name="DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a></h2>
204<div class="doc-section">
205
cristyc3ebda22010-06-27 17:11:57 +0000206<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 +0000207
cristyd6dfc0d2010-06-27 19:30:49 +0000208<p>The callback signature is:</p>
209
210<pre class="text">
211 MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source,
212 const ImageView *duplex,ImageView *destination,const ssize_t y,
213 const int thread_id,void *context)
214</pre>
215
cristy73b7d4c2010-06-27 00:31:00 +0000216<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000217
218<pre class="text">
219 #pragma omp critical
220</pre>
221
222<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>
223
224<p>The format of the DuplexTransferImageViewIterator method is:</p>
225
226<pre class="code">
227 MagickBooleanType DuplexTransferImageViewIterator(ImageView *source,
228 ImageView *duplex,ImageView *destination,
229 DuplexTransferImageViewMethod transfer,void *context)
230</pre>
231
232<p>A description of each parameter follows:</p></ol>
233
234<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000235<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000236
237<h5>duplex</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000238<ol><p>the duplex image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000239
240<h5>destination</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000241<ol><p>the destination image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000242
243<h5>transfer</h5>
244<ol><p>the transfer callback method.</p></ol>
245
246<h5>context</h5>
247<ol><p>the user defined context.</p></ol>
248
249 </div>
250<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy73b7d4c2010-06-27 00:31:00 +0000251_8c.html" target="source" name="GetImageViewAuthenticIndexes">GetImageViewAuthenticIndexes</a></h2>
252<div class="doc-section">
253
254<p>GetImageViewAuthenticIndexes() returns the image view authentic indexes.</p></ol>
255
256<p>The format of the GetImageViewAuthenticPixels method is:</p>
257
258<pre class="code">
259 IndexPacket *GetImageViewAuthenticIndexes(const ImageView *image_view)
260</pre>
261
262<p>A description of each parameter follows:</p></ol>
263
264<h5>image_view</h5>
265<ol><p>the image view.</p></ol>
266
267 </div>
268<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
269_8c.html" target="source" name="GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a></h2>
270<div class="doc-section">
271
272<p>GetImageViewAuthenticPixels() returns the image view authentic pixels.</p></ol>
273
274<p>The format of the GetImageViewAuthenticPixels method is:</p>
275
276<pre class="code">
277 PixelPacket *GetImageViewAuthenticPixels(const ImageView *image_view)
278</pre>
279
280<p>A description of each parameter follows:</p></ol>
281
282<h5>image_view</h5>
283<ol><p>the image view.</p></ol>
284
285 </div>
286<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000287_8c.html" target="source" name="GetImageViewException">GetImageViewException</a></h2>
288<div class="doc-section">
289
cristy73b7d4c2010-06-27 00:31:00 +0000290<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 +0000291
292<p>The format of the GetImageViewException method is:</p>
293
294<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000295 char *GetImageViewException(const PixelImage *image_view,
cristy10c87152010-06-26 16:12:21 +0000296 ExceptionType *severity)
297</pre>
298
299<p>A description of each parameter follows:</p></ol>
300
cristy73b7d4c2010-06-27 00:31:00 +0000301<h5>image_view</h5>
302<ol><p>the pixel image_view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000303
304<h5>severity</h5>
305<ol><p>the severity of the error is returned here.</p></ol>
306
307 </div>
308<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristyc3ebda22010-06-27 17:11:57 +0000309_8c.html" target="source" name="GetImageViewExtent">GetImageViewExtent</a></h2>
cristy10c87152010-06-26 16:12:21 +0000310<div class="doc-section">
311
cristyc3ebda22010-06-27 17:11:57 +0000312<p>GetImageViewExtent() returns the image view extent.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000313
cristyc3ebda22010-06-27 17:11:57 +0000314<p>The format of the GetImageViewExtent method is:</p>
cristy10c87152010-06-26 16:12:21 +0000315
316<pre class="code">
cristyc3ebda22010-06-27 17:11:57 +0000317 RectangleInfo GetImageViewExtent(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000318</pre>
319
320<p>A description of each parameter follows:</p></ol>
321
cristy73b7d4c2010-06-27 00:31:00 +0000322<h5>image_view</h5>
323<ol><p>the image view.</p></ol>
324
325 </div>
326<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
327_8c.html" target="source" name="GetImageViewImage">GetImageViewImage</a></h2>
328<div class="doc-section">
329
330<p>GetImageViewImage() returns the image associated with the image view.</p></ol>
331
332<p>The format of the GetImageViewImage method is:</p>
333
334<pre class="code">
335 MagickCore *GetImageViewImage(const ImageView *image_view)
336</pre>
337
338<p>A description of each parameter follows:</p></ol>
339
340<h5>image_view</h5>
341<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000342
343 </div>
344<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
345_8c.html" target="source" name="GetImageViewIterator">GetImageViewIterator</a></h2>
346<div class="doc-section">
347
cristyc3ebda22010-06-27 17:11:57 +0000348<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 +0000349
cristyd6dfc0d2010-06-27 19:30:49 +0000350<p>The callback signature is:</p>
351
352<pre class="text">
353 MagickBooleanType GetImageViewMethod(const ImageView *source,
354 const ssize_t y,const int thread_id,void *context)
355</pre>
356
cristy73b7d4c2010-06-27 00:31:00 +0000357<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000358
359<pre class="text">
360 #pragma omp critical
361</pre>
362
363<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>
364
365<p>The format of the GetImageViewIterator method is:</p>
366
367<pre class="code">
368 MagickBooleanType GetImageViewIterator(ImageView *source,
369 GetImageViewMethod get,void *context)
370</pre>
371
372<p>A description of each parameter follows:</p></ol>
373
374<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000375<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000376
377<h5>get</h5>
378<ol><p>the get callback method.</p></ol>
379
380<h5>context</h5>
381<ol><p>the user defined context.</p></ol>
382
383 </div>
384<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy73b7d4c2010-06-27 00:31:00 +0000385_8c.html" target="source" name="GetImageViewVirtualIndexes">GetImageViewVirtualIndexes</a></h2>
cristy10c87152010-06-26 16:12:21 +0000386<div class="doc-section">
387
cristy73b7d4c2010-06-27 00:31:00 +0000388<p>GetImageViewVirtualIndexes() returns the image view virtual indexes.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000389
cristy73b7d4c2010-06-27 00:31:00 +0000390<p>The format of the GetImageViewVirtualIndexes method is:</p>
cristy10c87152010-06-26 16:12:21 +0000391
392<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000393 const IndexPacket *GetImageViewVirtualIndexes(
394 const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000395</pre>
396
397<p>A description of each parameter follows:</p></ol>
398
cristy73b7d4c2010-06-27 00:31:00 +0000399<h5>image_view</h5>
400<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000401
402 </div>
403<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy73b7d4c2010-06-27 00:31:00 +0000404_8c.html" target="source" name="GetImageViewVirtualPixels">GetImageViewVirtualPixels</a></h2>
cristy10c87152010-06-26 16:12:21 +0000405<div class="doc-section">
406
cristy73b7d4c2010-06-27 00:31:00 +0000407<p>GetImageViewVirtualPixels() returns the image view virtual pixels.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000408
cristy73b7d4c2010-06-27 00:31:00 +0000409<p>The format of the GetImageViewVirtualPixels method is:</p>
cristy10c87152010-06-26 16:12:21 +0000410
411<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000412 const PixelPacket *GetImageViewVirtualPixels(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000413</pre>
414
415<p>A description of each parameter follows:</p></ol>
416
cristy73b7d4c2010-06-27 00:31:00 +0000417<h5>image_view</h5>
418<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000419
420 </div>
421<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000422_8c.html" target="source" name="IsImageView">IsImageView</a></h2>
423<div class="doc-section">
424
cristy73b7d4c2010-06-27 00:31:00 +0000425<p>IsImageView() returns MagickTrue if the the parameter is verified as a image view object.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000426
427<p>The format of the IsImageView method is:</p>
428
429<pre class="code">
cristy73b7d4c2010-06-27 00:31:00 +0000430 MagickBooleanType IsImageView(const ImageView *image_view)
cristy10c87152010-06-26 16:12:21 +0000431</pre>
432
433<p>A description of each parameter follows:</p></ol>
434
cristy73b7d4c2010-06-27 00:31:00 +0000435<h5>image_view</h5>
436<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000437
438 </div>
439<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
440_8c.html" target="source" name="NewImageView">NewImageView</a></h2>
441<div class="doc-section">
442
cristyc3ebda22010-06-27 17:11:57 +0000443<p>NewImageView() returns a image view required for all other methods in the Image View API.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000444
445<p>The format of the NewImageView method is:</p>
446
447<pre class="code">
448 ImageView *NewImageView(MagickCore *wand)
449</pre>
450
451<p>A description of each parameter follows:</p></ol>
452
453<h5>wand</h5>
454<ol><p>the wand.</p></ol>
455
456 </div>
457<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
458_8c.html" target="source" name="NewImageViewRegion">NewImageViewRegion</a></h2>
459<div class="doc-section">
460
cristyc3ebda22010-06-27 17:11:57 +0000461<p>NewImageViewRegion() returns a image view required for all other methods in the Image View API.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000462
463<p>The format of the NewImageViewRegion method is:</p>
464
465<pre class="code">
466 ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
467 const ssize_t y,const size_t width,const size_t height)
468</pre>
469
470<p>A description of each parameter follows:</p></ol>
471
472<h5>wand</h5>
473<ol><p>the magick wand.</p></ol>
474
475<h5>x,y,columns,rows</h5>
cristyc3ebda22010-06-27 17:11:57 +0000476<ol><p>These values define the perimeter of a extent of pixel_wands view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000477
478 </div>
479<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristyd6dfc0d2010-06-27 19:30:49 +0000480_8c.html" target="source" name="SetImageViewDescription">SetImageViewDescription</a></h2>
481<div class="doc-section">
482
483<p>SetImageViewDescription() associates a description with an image view.</p></ol>
484
485<p>The format of the SetImageViewDescription method is:</p>
486
487<pre class="code">
488 void SetImageViewDescription(ImageView *image_view,
489 const char *description)
490</pre>
491
492<p>A description of each parameter follows:</p></ol>
493
494<h5>image_view</h5>
495<ol><p>the image view.</p></ol>
496
497<h5>description</h5>
498<ol><p>the image view description.</p></ol>
499
500 </div>
501<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
cristy10c87152010-06-26 16:12:21 +0000502_8c.html" target="source" name="SetImageViewIterator">SetImageViewIterator</a></h2>
503<div class="doc-section">
504
cristyc3ebda22010-06-27 17:11:57 +0000505<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 +0000506
cristyd6dfc0d2010-06-27 19:30:49 +0000507<p>The callback signature is:</p>
508
509<pre class="text">
510 MagickBooleanType SetImageViewMethod(ImageView *destination,
511 const ssize_t y,const int thread_id,void *context)
512</pre>
513
cristy73b7d4c2010-06-27 00:31:00 +0000514<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000515
516<pre class="text">
517 #pragma omp critical
518</pre>
519
520<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>
521
522<p>The format of the SetImageViewIterator method is:</p>
523
524<pre class="code">
525 MagickBooleanType SetImageViewIterator(ImageView *destination,
526 SetImageViewMethod set,void *context)
527</pre>
528
529<p>A description of each parameter follows:</p></ol>
530
531<h5>destination</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000532<ol><p>the image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000533
534<h5>set</h5>
535<ol><p>the set callback method.</p></ol>
536
537<h5>context</h5>
538<ol><p>the user defined context.</p></ol>
539
540 </div>
541<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
542_8c.html" target="source" name="TransferImageViewIterator">TransferImageViewIterator</a></h2>
543<div class="doc-section">
544
cristyc3ebda22010-06-27 17:11:57 +0000545<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 +0000546
cristyd6dfc0d2010-06-27 19:30:49 +0000547<p>The callback signature is:</p>
548
549<pre class="text">
550 MagickBooleanType TransferImageViewMethod(const ImageView *source,
551 ImageView *destination,const ssize_t y,const int thread_id,
552 void *context)
553</pre>
554
cristy73b7d4c2010-06-27 00:31:00 +0000555<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000556
557<pre class="text">
558 #pragma omp critical
559</pre>
560
561<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>
562
563<p>The format of the TransferImageViewIterator method is:</p>
564
565<pre class="code">
566 MagickBooleanType TransferImageViewIterator(ImageView *source,
567 ImageView *destination,TransferImageViewMethod transfer,void *context)
568</pre>
569
570<p>A description of each parameter follows:</p></ol>
571
572<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000573<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000574
575<h5>destination</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000576<ol><p>the destination image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000577
578<h5>transfer</h5>
579<ol><p>the transfer callback method.</p></ol>
580
581<h5>context</h5>
582<ol><p>the user defined context.</p></ol>
583
584 </div>
585<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view
586_8c.html" target="source" name="UpdateImageViewIterator">UpdateImageViewIterator</a></h2>
587<div class="doc-section">
588
cristyc3ebda22010-06-27 17:11:57 +0000589<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 +0000590
cristyd6dfc0d2010-06-27 19:30:49 +0000591<p>The callback signature is:</p>
592
593<pre class="text">
594 MagickBooleanType UpdateImageViewMethod(ImageView *source,
595 const ssize_t y,const int thread_id,void *context)
596</pre>
597
cristy73b7d4c2010-06-27 00:31:00 +0000598<p>Use this pragma if the view is not single threaded:</p>
cristy10c87152010-06-26 16:12:21 +0000599
600<pre class="text">
601 #pragma omp critical
602</pre>
603
604<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>
605
606<p>The format of the UpdateImageViewIterator method is:</p>
607
608<pre class="code">
609 MagickBooleanType UpdateImageViewIterator(ImageView *source,
610 UpdateImageViewMethod update,void *context)
611</pre>
612
613<p>A description of each parameter follows:</p></ol>
614
615<h5>source</h5>
cristy73b7d4c2010-06-27 00:31:00 +0000616<ol><p>the source image view.</p></ol>
cristy10c87152010-06-26 16:12:21 +0000617
618<h5>update</h5>
619<ol><p>the update callback method.</p></ol>
620
621<h5>context</h5>
622<ol><p>the user defined context.</p></ol>
623
624 </div>
625
626</div>
627
628<div id="linkbar">
cristyce69bb02010-07-27 19:49:46 +0000629 <span id="linkbar-west">&nbsp;</span>
cristy10c87152010-06-26 16:12:21 +0000630 <span id="linkbar-center">
631 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> &bull;
cristya8902942010-07-30 00:49:52 +0000632 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
cristy10c87152010-06-26 16:12:21 +0000633 </span>
634 <span id="linkbar-east">&nbsp;</span>
635 </div>
636 <div class="footer">
637 <span id="footer-west">&copy; 1999-2010 ImageMagick Studio LLC</span>
638 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
639 </div>
640 <div style="clear: both; margin: 0; width: 100%; "></div>
cristya8902942010-07-30 00:49:52 +0000641 <script type="text/javascript">
642 var _gaq = _gaq || [];
643 _gaq.push(['_setAccount', 'UA-17690367-1']);
644 _gaq.push(['_trackPageview']);
645
646 (function() {
647 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
648 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
649 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
650 })();
651 </script>
cristy10c87152010-06-26 16:12:21 +0000652</body>
653</html>