blob: 9f643d827b6bb52d241a7fd8f2f6ee474863ceae [file] [log] [blame]
cristydcca3fa2010-12-29 21:50:07 +00001<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
cristy2bd2a982011-02-15 00:52:58 +00003<html version="-//W3C//DTD XHTML 1.1//EN"
4 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
5 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6 xsi:schemaLocation="http://www.w3.org/1999/xhtml
7 http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">
cristy10c87152010-06-26 16:12:21 +00008<head>
cristy3c98a4f2010-08-13 20:09:41 +00009 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
10 <meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U="/>
cristyffb69ed2010-12-25 00:06:48 +000011 <title>ImageMagick: MagickCore, C API for ImageMagick: Image View Methods</title>
cristy10c87152010-06-26 16:12:21 +000012 <meta http-equiv="Content-Language" content="en-US"/>
13 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
14 <meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/>
cristy3c98a4f2010-08-13 20:09:41 +000015 <meta name="Application-name" content="ImageMagick"/>
cristyaf8d6652011-02-04 21:57:45 +000016 <meta name="Description" content="Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats. In addition resize, rotate, shear, distort and transform images."/>
cristy3c98a4f2010-08-13 20:09:41 +000017 <meta name="Application-url" content="http://www.imagemagick.org"/>
cristy10c87152010-06-26 16:12:21 +000018 <meta name="Generator" content="PHP"/>
19 <meta name="Keywords" content="magickcore, c, api, for, imagemagick:, image, view, methods, ImageMagick, ImageMagic, MagickCore, MagickWand, PerlMagick, Magick++, RMagick, PythonMagick, JMagick, TclMagick, Image, Magick, Magic, Wand, ImageMagickObject, Swiss, Army, Knife, Image, Processing"/>
cristy10c87152010-06-26 16:12:21 +000020 <meta name="Rating" content="GENERAL"/>
21 <meta name="Robots" content="INDEX, FOLLOW"/>
22 <meta name="Generator" content="ImageMagick Studio LLC"/>
23 <meta name="Author" content="ImageMagick Studio LLC"/>
24 <meta name="Revisit-after" content="2 DAYS"/>
25 <meta name="Resource-type" content="document"/>
cristy4103d562010-12-10 01:38:54 +000026 <meta name="Copyright" content="Copyright (c) 1999-2011 ImageMagick Studio LLC"/>
cristy10c87152010-06-26 16:12:21 +000027 <meta name="Distribution" content="Global"/>
cristydcca3fa2010-12-29 21:50:07 +000028 <link rel="icon" href="../../images/wand.png"/>
cristy3c98a4f2010-08-13 20:09:41 +000029 <link rel="shortcut icon" href="../../images/wand.ico" type="images/x-icon"/>
30 <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"/>
cristy7a40ba82011-01-08 20:31:18 +000031 <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
cristy3c98a4f2010-08-13 20:09:41 +000032 <style type="text/css" media="all">
33 @import url("../../www/magick.css");
34 </style>
cristydcca3fa2010-12-29 21:50:07 +000035 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
cristy361f4662010-12-31 23:02:52 +000036 <script type="text/javascript" src="../fancybox/jquery.fancybox-1.3.4.pack.js"></script>
37 <link rel="stylesheet" type="text/css" href="../fancybox/jquery.fancybox-1.3.4.css" media="screen" />
38 <script type="text/javascript">
39 $(document).ready(function() {
40 $("a[href$=.jpg],a[href$=.png],a[href$=.gif]").fancybox({
41 'transitionIn' : 'elastic',
42 'transitionOut' : 'elastic',
43 'overlayShow' : false,
44 'opacity' : true
45 });
46 });
47 </script>
cristy10c87152010-06-26 16:12:21 +000048</head>
49
50<body id="www-imagemagick-org">
51<div class="titlebar">
52<a href="../../index.html">
53 <img src="../../images/script.png" alt="[ImageMagick]"
54 style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>
55<a href="http://www.networkredux.com">
56 <img src="../../images/networkredux.png" alt="[sponsor]"
cristy52923442011-01-15 22:54:31 +000057 style="margin-top: 42px; border: 0px; float: left;" /></a>
cristy10c87152010-06-26 16:12:21 +000058<a href="http://www.imagemagick.org/discourse-server/">
cristyaf8d6652011-02-04 21:57:45 +000059 <img src="../../images/logo.jpg"
60 alt="ImageMagick Logo"
cristy178edaf2011-01-23 03:42:39 +000061 style="width: 123px; height: 118px; border: 0px; float: right;" /></a>
cristy10c87152010-06-26 16:12:21 +000062<a href="../../index.html">
cristyaf8d6652011-02-04 21:57:45 +000063 <img src="../../images/sprite.jpg"
64 alt="ImageMagick Sprite"
cristy10c87152010-06-26 16:12:21 +000065 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
66</div>
67
cristyce69bb02010-07-27 19:49:46 +000068<div class="westbar">
cristy10c87152010-06-26 16:12:21 +000069
70<div class="menu">
71 <a title="About ImageMagick" href="../../index.html">About ImageMagick</a>
72</div>
73<div class="sep"></div>
74<div class="menu">
75 <a title="Binary Releases" href="../../www/binary-releases.html">Binary Releases</a>
76</div>
77<div class="sub">
78 <a title="Binary Release: Unix" href="../../www/binary-releases.html#unix">Unix</a>
79</div>
80<div class="sub">
81 <a title="Binary Release: MacOS X" href="../../www/binary-releases.html#macosx">Mac OS X</a>
82</div>
83<div class="sub">
84 <a title="Binary Release: Windows" href="../../www/binary-releases.html#windows">Windows</a>
85</div>
86<div class="sep"></div>
87<div class="menu">
88 <a title="Command-line Tools" href="../../www/command-line-tools.html">Command-line Tools</a>
89</div>
90<div class="sub">
91 <a title="Command-line Tools: Processing" href="../../www/command-line-processing.html">Processing</a>
92</div>
93<div class="sub">
94 <a title="Command-line Tools: Options" href="../../www/command-line-options.html">Options</a>
95</div>
96<div class="sub">
97 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
98</div>
99<div class="menu">
100 <a title="Program Interfaces" href="../../www/api.html">Program Interfaces</a>
101</div>
102<div class="sub">
103 <a title="Program Interface: MagickWand" href="../../www/magick-wand.html">MagickWand</a>
104</div>
105<div class="sub">
106 <a title="Program Interface: MagickCore" href="../../www/magick-core.html">MagickCore</a>
107</div>
108<div class="sub">
109 <a title="Program Interface: PerlMagick" href="../../www/perl-magick.html">PerlMagick</a>
110</div>
111<div class="sub">
cristydcca3fa2010-12-29 21:50:07 +0000112 <a title="Program Interface: Magick++" href="../../www/magick++.html">Magick++</a>
cristy10c87152010-06-26 16:12:21 +0000113</div>
114<div class="sep"></div>
115<div class="menu">
116 <a title="Install from Source" href="../../www/install-source.html">Install from Source</a>
117</div>
118<div class="sub">
119 <a title="Install from Source: Unix" href="../../www/install-source.html#unix">Unix</a>
120</div>
121<div class="sub">
122 <a title="Install from Source: Windows" href="../../www/install-source.html#windows">Windows</a>
123 </div>
124<div class="menu">
125 <a title="Resources" href="../../www/resources.html">Resources</a>
126</div>
127<div class="menu">
128 <a title="Architecture" href="../../www/architecture.html">Architecture</a>
129</div>
130<div class="menu">
131 <a title="Download" href="../../www/download.html">Download</a>
132</div>
133<div class="sep"></div>
134<div class="menu">
cristy52923442011-01-15 22:54:31 +0000135 <a title="Search" href="../../www/search.html">Search</a>
cristy10c87152010-06-26 16:12:21 +0000136</div>
137<div class="sep"></div>
138<div class="menu">
cristyffb69ed2010-12-25 00:06:48 +0000139 <a title="Site Map" href="../../www/sitemap.html">Site Map</a>
cristy10c87152010-06-26 16:12:21 +0000140</div>
141<div class="sub">
cristyffb69ed2010-12-25 00:06:48 +0000142 <a title="Site Map: Links" href="../../www/links.html">Links</a>
cristy10c87152010-06-26 16:12:21 +0000143</div>
144<div class="sep"></div>
145<div class="menu">
146 <a title="Sponsors" href="../../www/sponsors.html">Sponsors:</a>
147
148<div class="sponsbox">
cristy178edaf2011-01-23 03:42:39 +0000149<div class="sponsor">
cristyaf8d6652011-02-04 21:57:45 +0000150 <a title="Sponsor: Best Web Hosting" href="http://webhostinggeeks.com">Best Web Hosting</a><!-- 201110010720 -->
151</div>
152<div class="sponsor">
153 <a title="Sponsor: Web Hosting Ratings" href="http://webhostingrating.com">Web Hosting Ratings</a><!-- 201110010720 -->
154</div>
155<div class="sponsor">
cristy2bd2a982011-02-15 00:52:58 +0000156 <a title="Sponsor: Druckerei" href="http://www.allesdruck.de">Druckerei</a><!-- 201107010240 r.leo -->
cristy178edaf2011-01-23 03:42:39 +0000157</div>
cristyec6b4752011-01-08 03:16:23 +0000158<div class="sponsor">
cristy52923442011-01-15 22:54:31 +0000159 <a title="Sponsor: Web Hosting" href="http://www.bodhost.com/hosting.shtml">Web Hosting</a><!-- 201104010090 -->
cristy73fd1cd2010-09-12 19:14:25 +0000160</div>
161<div class="sponsor">
cristyc5baf4f2010-08-31 15:05:33 +0000162 <a title="Sponsor: Image Converter" href="http://www.batchphoto.com">Image Converter</a><!-- 201103010900 Bits Coffee-->
163</div>
164<div class="sponsor">
cristy851dbce2010-08-06 21:40:00 +0000165 <a title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
166</div>
cristyec6b4752011-01-08 03:16:23 +0000167<div class="sponsor">
cristy178edaf2011-01-23 03:42:39 +0000168 <a title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
169</div>
170<div class="sponsor">
cristy350dea42011-02-15 17:31:04 +0000171 <a title="Sponsor: Fernsehdienst Berlin" href="http://www.atlas-multimedia.de">Fernsehdienst Berlin</a><!-- 2011050100025 atlas.multimedia-->
cristyec6b4752011-01-08 03:16:23 +0000172</div>
cristy10c87152010-06-26 16:12:21 +0000173</div>
cristyce69bb02010-07-27 19:49:46 +0000174</div>
175</div>
cristy10c87152010-06-26 16:12:21 +0000176
cristyce69bb02010-07-27 19:49:46 +0000177<div class="eastbar">
178 <script type="text/javascript">
179 <!--
180 google_ad_client = "pub-3129977114552745";
cristyce69bb02010-07-27 19:49:46 +0000181 google_ad_slot = "0574824969";
182 google_ad_width = 160;
183 google_ad_height = 600;
184 //-->
185 </script>
186 <script type="text/javascript"
187 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
188 </script>
cristy10c87152010-06-26 16:12:21 +0000189</div>
190
191<div class="main">
192
cristy350dea42011-02-15 17:31:04 +0000193<h1>Module image-view Methods</h1>
cristy6f77f692011-02-15 15:31:39 +0000194<p class="navigation-index">[<a href="#CloneImageView">CloneImageView</a> &bull; <a href="#DestroyImageView">DestroyImageView</a> &bull; <a href="#DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a> &bull; <a href="#GetImageViewAuthenticIndexes">GetImageViewAuthenticIndexes</a> &bull; <a href="#GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a> &bull; <a href="#GetImageViewException">GetImageViewException</a> &bull; <a href="#GetImageViewExtent">GetImageViewExtent</a> &bull; <a href="#GetImageViewImage">GetImageViewImage</a> &bull; <a href="#GetImageViewIterator">GetImageViewIterator</a> &bull; <a href="#GetImageViewVirtualIndexes">GetImageViewVirtualIndexes</a> &bull; <a href="#GetImageViewVirtualPixels">GetImageViewVirtualPixels</a> &bull; <a href="#IsImageView">IsImageView</a> &bull; <a href="#NewImageView">NewImageView</a> &bull; <a href="#NewImageViewRegion">NewImageViewRegion</a> &bull; <a href="#SetImageViewDescription">SetImageViewDescription</a> &bull; <a href="#SetImageViewIterator">SetImageViewIterator</a> &bull; <a href="#SetImageViewThreads">SetImageViewThreads</a> &bull; <a href="#TransferImageViewIterator">TransferImageViewIterator</a> &bull; <a href="#UpdateImageViewIterator">UpdateImageViewIterator</a>]</p>
cristy10c87152010-06-26 16:12:21 +0000195
cristy350dea42011-02-15 17:31:04 +0000196<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="CloneImageView">CloneImageView</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000197<div class="doc-section">
198
199<p>CloneImageView() makes a copy of the specified image view.</p>
200
201<p>The format of the CloneImageView method is:</p>
202
203<pre class="code">
204 ImageView *CloneImageView(const ImageView *image_view)
205</pre>
206
207<p>A description of each parameter follows:</p>
208
209<h5>image_view</h5>
210<p>the image view.</p>
211
212 </div>
cristy350dea42011-02-15 17:31:04 +0000213<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="DestroyImageView">DestroyImageView</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000214<div class="doc-section">
215
216<p>DestroyImageView() deallocates memory associated with a image view.</p>
217
218<p>The format of the DestroyImageView method is:</p>
219
220<pre class="code">
221 ImageView *DestroyImageView(ImageView *image_view)
222</pre>
223
224<p>A description of each parameter follows:</p>
225
226<h5>image_view</h5>
227<p>the image view.</p>
228
229 </div>
cristy350dea42011-02-15 17:31:04 +0000230<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000231<div class="doc-section">
232
233<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>
234
235<p>The callback signature is:</p>
236
237<pre class="text">
238 MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source,
239 const ImageView *duplex,ImageView *destination,const ssize_t y,
240 const int thread_id,void *context)
241</pre>
242
243<p>Use this pragma if the view is not single threaded:</p>
244
245<pre class="text">
246 #pragma omp critical
247</pre>
248
249<p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p>
250
251<p>The format of the DuplexTransferImageViewIterator method is:</p>
252
253<pre class="code">
254 MagickBooleanType DuplexTransferImageViewIterator(ImageView *source,
255 ImageView *duplex,ImageView *destination,
256 DuplexTransferImageViewMethod transfer,void *context)
257</pre>
258
259<p>A description of each parameter follows:</p>
260
261<h5>source</h5>
262<p>the source image view.</p>
263
264<h5>duplex</h5>
265<p>the duplex image view.</p>
266
267<h5>destination</h5>
268<p>the destination image view.</p>
269
270<h5>transfer</h5>
271<p>the transfer callback method.</p>
272
273<h5>context</h5>
274<p>the user defined context.</p>
275
276 </div>
cristy350dea42011-02-15 17:31:04 +0000277<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewAuthenticIndexes">GetImageViewAuthenticIndexes</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000278<div class="doc-section">
279
280<p>GetImageViewAuthenticIndexes() returns the image view authentic indexes.</p>
281
282<p>The format of the GetImageViewAuthenticPixels method is:</p>
283
284<pre class="code">
285 IndexPacket *GetImageViewAuthenticIndexes(const ImageView *image_view)
286</pre>
287
288<p>A description of each parameter follows:</p>
289
290<h5>image_view</h5>
291<p>the image view.</p>
292
293 </div>
cristy350dea42011-02-15 17:31:04 +0000294<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000295<div class="doc-section">
296
297<p>GetImageViewAuthenticPixels() returns the image view authentic pixels.</p>
298
299<p>The format of the GetImageViewAuthenticPixels method is:</p>
300
301<pre class="code">
302 PixelPacket *GetImageViewAuthenticPixels(const ImageView *image_view)
303</pre>
304
305<p>A description of each parameter follows:</p>
306
307<h5>image_view</h5>
308<p>the image view.</p>
309
310 </div>
cristy350dea42011-02-15 17:31:04 +0000311<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewException">GetImageViewException</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000312<div class="doc-section">
313
314<p>GetImageViewException() returns the severity, reason, and description of any error that occurs when utilizing a image view.</p>
315
316<p>The format of the GetImageViewException method is:</p>
317
318<pre class="code">
319 char *GetImageViewException(const PixelImage *image_view,
320 ExceptionType *severity)
321</pre>
322
323<p>A description of each parameter follows:</p>
324
325<h5>image_view</h5>
326<p>the pixel image_view.</p>
327
328<h5>severity</h5>
329<p>the severity of the error is returned here.</p>
330
331 </div>
cristy350dea42011-02-15 17:31:04 +0000332<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewExtent">GetImageViewExtent</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000333<div class="doc-section">
334
335<p>GetImageViewExtent() returns the image view extent.</p>
336
337<p>The format of the GetImageViewExtent method is:</p>
338
339<pre class="code">
340 RectangleInfo GetImageViewExtent(const ImageView *image_view)
341</pre>
342
343<p>A description of each parameter follows:</p>
344
345<h5>image_view</h5>
346<p>the image view.</p>
347
348 </div>
cristy350dea42011-02-15 17:31:04 +0000349<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewImage">GetImageViewImage</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000350<div class="doc-section">
351
352<p>GetImageViewImage() returns the image associated with the image view.</p>
353
354<p>The format of the GetImageViewImage method is:</p>
355
356<pre class="code">
357 MagickCore *GetImageViewImage(const ImageView *image_view)
358</pre>
359
360<p>A description of each parameter follows:</p>
361
362<h5>image_view</h5>
363<p>the image view.</p>
364
365 </div>
cristy350dea42011-02-15 17:31:04 +0000366<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewIterator">GetImageViewIterator</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000367<div class="doc-section">
368
369<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>
370
371<p>The callback signature is:</p>
372
373<pre class="text">
374 MagickBooleanType GetImageViewMethod(const ImageView *source,
375 const ssize_t y,const int thread_id,void *context)
376</pre>
377
378<p>Use this pragma if the view is not single threaded:</p>
379
380<pre class="text">
381 #pragma omp critical
382</pre>
383
384<p>to define a section of code in your callback get method that must be executed by a single thread at a time.</p>
385
386<p>The format of the GetImageViewIterator method is:</p>
387
388<pre class="code">
389 MagickBooleanType GetImageViewIterator(ImageView *source,
390 GetImageViewMethod get,void *context)
391</pre>
392
393<p>A description of each parameter follows:</p>
394
395<h5>source</h5>
396<p>the source image view.</p>
397
398<h5>get</h5>
399<p>the get callback method.</p>
400
401<h5>context</h5>
402<p>the user defined context.</p>
403
404 </div>
cristy350dea42011-02-15 17:31:04 +0000405<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewVirtualIndexes">GetImageViewVirtualIndexes</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000406<div class="doc-section">
407
408<p>GetImageViewVirtualIndexes() returns the image view virtual indexes.</p>
409
410<p>The format of the GetImageViewVirtualIndexes method is:</p>
411
412<pre class="code">
413 const IndexPacket *GetImageViewVirtualIndexes(
414 const ImageView *image_view)
415</pre>
416
417<p>A description of each parameter follows:</p>
418
419<h5>image_view</h5>
420<p>the image view.</p>
421
422 </div>
cristy350dea42011-02-15 17:31:04 +0000423<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewVirtualPixels">GetImageViewVirtualPixels</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000424<div class="doc-section">
425
426<p>GetImageViewVirtualPixels() returns the image view virtual pixels.</p>
427
428<p>The format of the GetImageViewVirtualPixels method is:</p>
429
430<pre class="code">
431 const PixelPacket *GetImageViewVirtualPixels(const ImageView *image_view)
432</pre>
433
434<p>A description of each parameter follows:</p>
435
436<h5>image_view</h5>
437<p>the image view.</p>
438
439 </div>
cristy350dea42011-02-15 17:31:04 +0000440<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="IsImageView">IsImageView</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000441<div class="doc-section">
442
443<p>IsImageView() returns MagickTrue if the the parameter is verified as a image view object.</p>
444
445<p>The format of the IsImageView method is:</p>
446
447<pre class="code">
448 MagickBooleanType IsImageView(const ImageView *image_view)
449</pre>
450
451<p>A description of each parameter follows:</p>
452
453<h5>image_view</h5>
454<p>the image view.</p>
455
456 </div>
cristy350dea42011-02-15 17:31:04 +0000457<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="NewImageView">NewImageView</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000458<div class="doc-section">
459
460<p>NewImageView() returns a image view required for all other methods in the Image View API.</p>
461
462<p>The format of the NewImageView method is:</p>
463
464<pre class="code">
465 ImageView *NewImageView(MagickCore *wand)
466</pre>
467
468<p>A description of each parameter follows:</p>
469
470<h5>wand</h5>
471<p>the wand.</p>
472
473 </div>
cristy350dea42011-02-15 17:31:04 +0000474<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="NewImageViewRegion">NewImageViewRegion</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000475<div class="doc-section">
476
477<p>NewImageViewRegion() returns a image view required for all other methods in the Image View API.</p>
478
479<p>The format of the NewImageViewRegion method is:</p>
480
481<pre class="code">
482 ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
483 const ssize_t y,const size_t width,const size_t height)
484</pre>
485
486<p>A description of each parameter follows:</p>
487
488<h5>wand</h5>
489<p>the magick wand.</p>
490
491<h5>x,y,columns,rows</h5>
492<p>These values define the perimeter of a extent of pixel_wands view.</p>
493
494 </div>
cristy350dea42011-02-15 17:31:04 +0000495<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="SetImageViewDescription">SetImageViewDescription</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000496<div class="doc-section">
497
498<p>SetImageViewDescription() associates a description with an image view.</p>
499
500<p>The format of the SetImageViewDescription method is:</p>
501
502<pre class="code">
503 void SetImageViewDescription(ImageView *image_view,
504 const char *description)
505</pre>
506
507<p>A description of each parameter follows:</p>
508
509<h5>image_view</h5>
510<p>the image view.</p>
511
512<h5>description</h5>
513<p>the image view description.</p>
514
515 </div>
cristy350dea42011-02-15 17:31:04 +0000516<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="SetImageViewIterator">SetImageViewIterator</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000517<div class="doc-section">
518
519<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>
520
521<p>The callback signature is:</p>
522
523<pre class="text">
524 MagickBooleanType SetImageViewMethod(ImageView *destination,
525 const ssize_t y,const int thread_id,void *context)
526</pre>
527
528<p>Use this pragma if the view is not single threaded:</p>
529
530<pre class="text">
531 #pragma omp critical
532</pre>
533
534<p>to define a section of code in your callback set method that must be executed by a single thread at a time.</p>
535
536<p>The format of the SetImageViewIterator method is:</p>
537
538<pre class="code">
539 MagickBooleanType SetImageViewIterator(ImageView *destination,
540 SetImageViewMethod set,void *context)
541</pre>
542
543<p>A description of each parameter follows:</p>
544
545<h5>destination</h5>
546<p>the image view.</p>
547
548<h5>set</h5>
549<p>the set callback method.</p>
550
551<h5>context</h5>
552<p>the user defined context.</p>
553
554 </div>
cristy350dea42011-02-15 17:31:04 +0000555<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="SetImageViewThreads">SetImageViewThreads</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000556<div class="doc-section">
557
558<p>SetImageViewThreads() sets the number of threads in a thread team.</p>
559
560<p>The format of the SetImageViewDescription method is:</p>
561
562<pre class="code">
563 void SetImageViewThreads(ImageView *image_view,
564 const size_t number_threads)
565</pre>
566
567<p>A description of each parameter follows:</p>
568
569<h5>image_view</h5>
570<p>the image view.</p>
571
572<h5>number_threads</h5>
573<p>the number of threads in a thread team.</p>
574
575 </div>
cristy350dea42011-02-15 17:31:04 +0000576<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="TransferImageViewIterator">TransferImageViewIterator</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000577<div class="doc-section">
578
579<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>
580
581<p>The callback signature is:</p>
582
583<pre class="text">
584 MagickBooleanType TransferImageViewMethod(const ImageView *source,
585 ImageView *destination,const ssize_t y,const int thread_id,
586 void *context)
587</pre>
588
589<p>Use this pragma if the view is not single threaded:</p>
590
591<pre class="text">
592 #pragma omp critical
593</pre>
594
595<p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p>
596
597<p>The format of the TransferImageViewIterator method is:</p>
598
599<pre class="code">
600 MagickBooleanType TransferImageViewIterator(ImageView *source,
601 ImageView *destination,TransferImageViewMethod transfer,void *context)
602</pre>
603
604<p>A description of each parameter follows:</p>
605
606<h5>source</h5>
607<p>the source image view.</p>
608
609<h5>destination</h5>
610<p>the destination image view.</p>
611
612<h5>transfer</h5>
613<p>the transfer callback method.</p>
614
615<h5>context</h5>
616<p>the user defined context.</p>
617
618 </div>
cristy350dea42011-02-15 17:31:04 +0000619<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="UpdateImageViewIterator">UpdateImageViewIterator</a></h2>
cristy6f77f692011-02-15 15:31:39 +0000620<div class="doc-section">
621
622<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>
623
624<p>The callback signature is:</p>
625
626<pre class="text">
627 MagickBooleanType UpdateImageViewMethod(ImageView *source,
628 const ssize_t y,const int thread_id,void *context)
629</pre>
630
631<p>Use this pragma if the view is not single threaded:</p>
632
633<pre class="text">
634 #pragma omp critical
635</pre>
636
637<p>to define a section of code in your callback update method that must be executed by a single thread at a time.</p>
638
639<p>The format of the UpdateImageViewIterator method is:</p>
640
641<pre class="code">
642 MagickBooleanType UpdateImageViewIterator(ImageView *source,
643 UpdateImageViewMethod update,void *context)
644</pre>
645
646<p>A description of each parameter follows:</p>
647
648<h5>source</h5>
649<p>the source image view.</p>
650
651<h5>update</h5>
652<p>the update callback method.</p>
653
654<h5>context</h5>
655<p>the user defined context.</p>
656
657 </div>
cristy10c87152010-06-26 16:12:21 +0000658
659</div>
660
661<div id="linkbar">
cristyce69bb02010-07-27 19:49:46 +0000662 <span id="linkbar-west">&nbsp;</span>
cristy10c87152010-06-26 16:12:21 +0000663 <span id="linkbar-center">
664 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> &bull;
cristya8902942010-07-30 00:49:52 +0000665 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
cristy10c87152010-06-26 16:12:21 +0000666 </span>
667 <span id="linkbar-east">&nbsp;</span>
668 </div>
669 <div class="footer">
cristy4103d562010-12-10 01:38:54 +0000670 <span id="footer-west">&copy; 1999-2011 ImageMagick Studio LLC</span>
cristy10c87152010-06-26 16:12:21 +0000671 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
672 </div>
673 <div style="clear: both; margin: 0; width: 100%; "></div>
cristya8902942010-07-30 00:49:52 +0000674 <script type="text/javascript">
675 var _gaq = _gaq || [];
676 _gaq.push(['_setAccount', 'UA-17690367-1']);
677 _gaq.push(['_trackPageview']);
678
679 (function() {
680 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
681 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
682 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
683 })();
684 </script>
cristy10c87152010-06-26 16:12:21 +0000685</body>
686</html>