]> granicus.if.org Git - imagemagick/blob - www/api/image-view.html
(no commit message)
[imagemagick] / www / api / image-view.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" \r
2   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
3 <html version="-//W3C//DTD XHTML 1.1//EN"\r
4       xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"\r
5       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
6       xsi:schemaLocation="http://www.w3.org/1999/xhtml\r
7                           http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">\r
8 <head>\r
9   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>\r
10   <meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U="/>\r
11   <title>ImageMagick: MagickCore, C API for ImageMagick: Image View Methods</title>
12   <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"/>
15   <meta name="Application-name" content="ImageMagick"/>
16   <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."/>
17   <meta name="Application-url" content="http://www.imagemagick.org"/>
18   <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"/>
20   <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"/>
26   <meta name="Copyright" content="Copyright (c) 1999-2011 ImageMagick Studio LLC"/>
27   <meta name="Distribution" content="Global"/>
28   <link rel="icon" href="../../images/wand.png"/>
29   <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"/>\r
31   <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />\r
32   <style type="text/css" media="all">\r
33     @import url("../../www/magick.css");\r
34   </style>\r
35   <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>\r
36   <script type="text/javascript" src="../fancybox/jquery.fancybox-1.3.4.pack.js"></script>\r
37   <link rel="stylesheet" type="text/css" href="../fancybox/jquery.fancybox-1.3.4.css" media="screen" />\r
38   <script type="text/javascript">\r
39     $(document).ready(function() {\r
40       $("a[href$=.jpg],a[href$=.png],a[href$=.gif]").fancybox({\r
41         'transitionIn'  : 'elastic',\r
42         'transitionOut' : 'elastic',\r
43         'overlayShow'   : false,\r
44         'opacity'       : true\r
45       });\r
46     });\r
47   </script>\r
48 </head>\r
49 \r
50 <body id="www-imagemagick-org">\r
51 <div class="titlebar">\r
52 <a href="../../index.html">\r
53   <img src="../../images/script.png" alt="[ImageMagick]"\r
54   style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>\r
55 <a href="http://www.networkredux.com">\r
56   <img src="../../images/networkredux.png" alt="[sponsor]"\r
57   style="margin-top: 42px; border: 0px; float: left;" /></a>\r
58 <a href="http://www.imagemagick.org/discourse-server/">\r
59   <img src="../../images/logo.jpg"\r
60   alt="ImageMagick Logo"\r
61   style="width: 123px; height: 118px; border: 0px; float: right;" /></a>\r
62 <a href="../../index.html">\r
63   <img src="../../images/sprite.jpg"\r
64   alt="ImageMagick Sprite"\r
65   style="width: 114px; height: 118px; border: 0px; float: right;" /></a>\r
66 </div>\r
67 \r
68 <div class="westbar">\r
69 \r
70 <div class="menu">
71   <a title="About ImageMagick" href="../../index.html">About ImageMagick</a>
72 </div>
73 <div class="sep"></div>\r
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: iPhone" href="../../www/binary-releases.html#iPhone">iPhone</a>
85 </div>
86 <div class="sub">
87     <a title="Binary Release: Windows" href="../../www/binary-releases.html#windows">Windows</a>
88 </div>
89 <div class="sep"></div>\r
90 <div class="menu">
91   <a title="Command-line Tools" href="../../www/command-line-tools.html">Command-line Tools</a>
92 </div>
93 <div class="sub">
94     <a title="Command-line Tools: Processing" href="../../www/command-line-processing.html">Processing</a>
95 </div>
96 <div class="sub">
97     <a title="Command-line Tools: Options" href="../../www/command-line-options.html">Options</a>
98 </div>
99 <div class="sub">
100     <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
101 </div>
102 <div class="menu">
103   <a title="Program Interfaces" href="../../www/api.html">Program Interfaces</a>
104 </div>
105 <div class="sub">
106     <a title="Program Interface: MagickWand" href="../../www/magick-wand.html">MagickWand</a>
107 </div>
108 <div class="sub">
109     <a title="Program Interface: MagickCore" href="../../www/magick-core.html">MagickCore</a>
110 </div>
111 <div class="sub">
112     <a title="Program Interface: PerlMagick" href="../../www/perl-magick.html">PerlMagick</a>
113 </div>
114 <div class="sub">
115     <a title="Program Interface: Magick++" href="../../www/magick++.html">Magick++</a>
116 </div>
117 <div class="sep"></div>\r
118 <div  class="menu">
119    <a title="Install from Source" href="../../www/install-source.html">Install from Source</a>
120 </div>
121 <div class="sub">
122     <a title="Install from Source: Unix" href="../../www/install-source.html#unix">Unix</a>
123 </div>
124 <div class="sub">
125     <a title="Install from Source: Windows" href="../../www/install-source.html#windows">Windows</a>
126  </div>
127 <div class="menu">
128   <a title="Resources" href="../../www/resources.html">Resources</a>
129 </div>
130 <div class="menu">
131   <a title="Architecture" href="../../www/architecture.html">Architecture</a>
132 </div>
133 <div class="menu">
134   <a title="Download" href="../../www/download.html">Download</a>
135 </div>
136 <div class="sep"></div>\r
137 <div class="menu">
138   <a title="Search" href="../../www/search.html">Search</a>
139 </div>
140 <div class="sep"></div>\r
141 <div class="menu">
142   <a title="Site Map" href="../../www/sitemap.html">Site Map</a>
143 </div>
144 <div  class="sub">
145   <a title="Site Map: Links" href="../../www/links.html">Links</a>
146 </div>
147 <div class="sep"></div>\r
148 <div  class="menu">
149   <a title="Sponsors" href="../../www/sponsors.html">Sponsors:</a>
150
151 <div class="sponsbox">
152 <div  class="sponsor">
153   <a title="Sponsor: Best Web Hosting" href="http://webhostinggeeks.com">Best Web Hosting</a><!-- 201110010720 -->
154 </div>
155 <div  class="sponsor">
156   <a title="Sponsor: Web Hosting Ratings" href="http://webhostingrating.com">Web Hosting Ratings</a><!-- 201110010720 -->
157 </div>
158 <div  class="sponsor">
159   <a title="Sponsor: Druckerei" href="http://www.allesdruck.de">Druckerei</a><!-- 201107010240 r.leo -->
160 </div>
161 <div class="sponsor">
162   <a title="Sponsor: Web Hosting" href="http://www.bodhost.com/hosting.shtml">Web Hosting</a><!-- 201104010090 -->
163 </div>
164 <div  class="sponsor">
165   <a title="Sponsor: Image Converter" href="http://www.batchphoto.com">Image Converter</a><!-- 201103010900 Bits Coffee-->
166 </div>
167 <div  class="sponsor">
168   <a title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
169 </div>
170 <div  class="sponsor">
171   <a title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
172 </div>
173 <div  class="sponsor">
174    <a title="Sponsor: alaTest.com" href="http://alatest.com">alaTest.com</a><!-- 20110801000300 -->
175 </div>
176 </div>
177 </div>
178 </div>\r
179 \r
180 <div class="eastbar">\r
181   <script type="text/javascript">\r
182   <!--\r
183     google_ad_client = "pub-3129977114552745";\r
184     google_ad_slot = "0574824969";\r
185     google_ad_width = 160;\r
186     google_ad_height = 600;\r
187   //-->\r
188   </script>\r
189   <script type="text/javascript"\r
190     src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
191   </script>\r
192 </div>\r
193 \r
194 <div class="main">\r
195 \r
196 <h1>Module image-view Methods</h1>
197 <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>
198
199 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="CloneImageView">CloneImageView</a></h2>
200 <div class="doc-section">
201
202 <p>CloneImageView() makes a copy of the specified image view.</p>
203
204 <p>The format of the CloneImageView method is:</p>
205
206 <pre class="code">
207   ImageView *CloneImageView(const ImageView *image_view)
208 </pre>
209
210 <p>A description of each parameter follows:</p>
211
212 <h5>image_view</h5>
213 <p>the image view.</p>
214
215  </div>
216 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="DestroyImageView">DestroyImageView</a></h2>
217 <div class="doc-section">
218
219 <p>DestroyImageView() deallocates memory associated with a image view.</p>
220
221 <p>The format of the DestroyImageView method is:</p>
222
223 <pre class="code">
224   ImageView *DestroyImageView(ImageView *image_view)
225 </pre>
226
227 <p>A description of each parameter follows:</p>
228
229 <h5>image_view</h5>
230 <p>the image view.</p>
231
232  </div>
233 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a></h2>
234 <div class="doc-section">
235
236 <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>
237
238 <p>The callback signature is:</p>
239
240 <pre class="text">
241   MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source,
242     const ImageView *duplex,ImageView *destination,const ssize_t y,
243     const int thread_id,void *context)
244 </pre>
245
246 <p>Use this pragma if the view is not single threaded:</p>
247
248 <pre class="text">
249       #pragma omp critical
250 </pre>
251
252 <p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p>
253
254 <p>The format of the DuplexTransferImageViewIterator method is:</p>
255
256 <pre class="code">
257   MagickBooleanType DuplexTransferImageViewIterator(ImageView *source,
258     ImageView *duplex,ImageView *destination,
259     DuplexTransferImageViewMethod transfer,void *context)
260 </pre>
261
262 <p>A description of each parameter follows:</p>
263
264 <h5>source</h5>
265 <p>the source image view.</p>
266
267 <h5>duplex</h5>
268 <p>the duplex image view.</p>
269
270 <h5>destination</h5>
271 <p>the destination image view.</p>
272
273 <h5>transfer</h5>
274 <p>the transfer callback method.</p>
275
276 <h5>context</h5>
277 <p>the user defined context.</p>
278
279  </div>
280 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewAuthenticIndexes">GetImageViewAuthenticIndexes</a></h2>
281 <div class="doc-section">
282
283 <p>GetImageViewAuthenticIndexes() returns the image view authentic indexes.</p>
284
285 <p>The format of the GetImageViewAuthenticPixels method is:</p>
286
287 <pre class="code">
288   IndexPacket *GetImageViewAuthenticIndexes(const ImageView *image_view)
289 </pre>
290
291 <p>A description of each parameter follows:</p>
292
293 <h5>image_view</h5>
294 <p>the image view.</p>
295
296  </div>
297 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a></h2>
298 <div class="doc-section">
299
300 <p>GetImageViewAuthenticPixels() returns the image view authentic pixels.</p>
301
302 <p>The format of the GetImageViewAuthenticPixels method is:</p>
303
304 <pre class="code">
305   PixelPacket *GetImageViewAuthenticPixels(const ImageView *image_view)
306 </pre>
307
308 <p>A description of each parameter follows:</p>
309
310 <h5>image_view</h5>
311 <p>the image view.</p>
312
313  </div>
314 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewException">GetImageViewException</a></h2>
315 <div class="doc-section">
316
317 <p>GetImageViewException() returns the severity, reason, and description of any error that occurs when utilizing a image view.</p>
318
319 <p>The format of the GetImageViewException method is:</p>
320
321 <pre class="code">
322   char *GetImageViewException(const PixelImage *image_view,
323     ExceptionType *severity)
324 </pre>
325
326 <p>A description of each parameter follows:</p>
327
328 <h5>image_view</h5>
329 <p>the pixel image_view.</p>
330
331 <h5>severity</h5>
332 <p>the severity of the error is returned here.</p>
333
334  </div>
335 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewExtent">GetImageViewExtent</a></h2>
336 <div class="doc-section">
337
338 <p>GetImageViewExtent() returns the image view extent.</p>
339
340 <p>The format of the GetImageViewExtent method is:</p>
341
342 <pre class="code">
343   RectangleInfo GetImageViewExtent(const ImageView *image_view)
344 </pre>
345
346 <p>A description of each parameter follows:</p>
347
348 <h5>image_view</h5>
349 <p>the image view.</p>
350
351  </div>
352 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewImage">GetImageViewImage</a></h2>
353 <div class="doc-section">
354
355 <p>GetImageViewImage() returns the image associated with the image view.</p>
356
357 <p>The format of the GetImageViewImage method is:</p>
358
359 <pre class="code">
360   MagickCore *GetImageViewImage(const ImageView *image_view)
361 </pre>
362
363 <p>A description of each parameter follows:</p>
364
365 <h5>image_view</h5>
366 <p>the image view.</p>
367
368  </div>
369 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewIterator">GetImageViewIterator</a></h2>
370 <div class="doc-section">
371
372 <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>
373
374 <p>The callback signature is:</p>
375
376 <pre class="text">
377   MagickBooleanType GetImageViewMethod(const ImageView *source,
378     const ssize_t y,const int thread_id,void *context)
379 </pre>
380
381 <p>Use this pragma if the view is not single threaded:</p>
382
383 <pre class="text">
384       #pragma omp critical
385 </pre>
386
387 <p>to define a section of code in your callback get method that must be executed by a single thread at a time.</p>
388
389 <p>The format of the GetImageViewIterator method is:</p>
390
391 <pre class="code">
392   MagickBooleanType GetImageViewIterator(ImageView *source,
393     GetImageViewMethod get,void *context)
394 </pre>
395
396 <p>A description of each parameter follows:</p>
397
398 <h5>source</h5>
399 <p>the source image view.</p>
400
401 <h5>get</h5>
402 <p>the get callback method.</p>
403
404 <h5>context</h5>
405 <p>the user defined context.</p>
406
407  </div>
408 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewVirtualIndexes">GetImageViewVirtualIndexes</a></h2>
409 <div class="doc-section">
410
411 <p>GetImageViewVirtualIndexes() returns the image view virtual indexes.</p>
412
413 <p>The format of the GetImageViewVirtualIndexes method is:</p>
414
415 <pre class="code">
416   const IndexPacket *GetImageViewVirtualIndexes(
417     const ImageView *image_view)
418 </pre>
419
420 <p>A description of each parameter follows:</p>
421
422 <h5>image_view</h5>
423 <p>the image view.</p>
424
425  </div>
426 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewVirtualPixels">GetImageViewVirtualPixels</a></h2>
427 <div class="doc-section">
428
429 <p>GetImageViewVirtualPixels() returns the image view virtual pixels.</p>
430
431 <p>The format of the GetImageViewVirtualPixels method is:</p>
432
433 <pre class="code">
434   const PixelPacket *GetImageViewVirtualPixels(const ImageView *image_view)
435 </pre>
436
437 <p>A description of each parameter follows:</p>
438
439 <h5>image_view</h5>
440 <p>the image view.</p>
441
442  </div>
443 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="IsImageView">IsImageView</a></h2>
444 <div class="doc-section">
445
446 <p>IsImageView() returns MagickTrue if the the parameter is verified as a image view object.</p>
447
448 <p>The format of the IsImageView method is:</p>
449
450 <pre class="code">
451   MagickBooleanType IsImageView(const ImageView *image_view)
452 </pre>
453
454 <p>A description of each parameter follows:</p>
455
456 <h5>image_view</h5>
457 <p>the image view.</p>
458
459  </div>
460 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="NewImageView">NewImageView</a></h2>
461 <div class="doc-section">
462
463 <p>NewImageView() returns a image view required for all other methods in the Image View API.</p>
464
465 <p>The format of the NewImageView method is:</p>
466
467 <pre class="code">
468   ImageView *NewImageView(MagickCore *wand)
469 </pre>
470
471 <p>A description of each parameter follows:</p>
472
473 <h5>wand</h5>
474 <p>the wand.</p>
475
476  </div>
477 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="NewImageViewRegion">NewImageViewRegion</a></h2>
478 <div class="doc-section">
479
480 <p>NewImageViewRegion() returns a image view required for all other methods in the Image View API.</p>
481
482 <p>The format of the NewImageViewRegion method is:</p>
483
484 <pre class="code">
485   ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
486     const ssize_t y,const size_t width,const size_t height)
487 </pre>
488
489 <p>A description of each parameter follows:</p>
490
491 <h5>wand</h5>
492 <p>the magick wand.</p>
493
494 <h5>x,y,columns,rows</h5>
495 <p>These values define the perimeter of a extent of pixel_wands view.</p>
496
497  </div>
498 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="SetImageViewDescription">SetImageViewDescription</a></h2>
499 <div class="doc-section">
500
501 <p>SetImageViewDescription() associates a description with an image view.</p>
502
503 <p>The format of the SetImageViewDescription method is:</p>
504
505 <pre class="code">
506   void SetImageViewDescription(ImageView *image_view,
507     const char *description)
508 </pre>
509
510 <p>A description of each parameter follows:</p>
511
512 <h5>image_view</h5>
513 <p>the image view.</p>
514
515 <h5>description</h5>
516 <p>the image view description.</p>
517
518  </div>
519 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="SetImageViewIterator">SetImageViewIterator</a></h2>
520 <div class="doc-section">
521
522 <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>
523
524 <p>The callback signature is:</p>
525
526 <pre class="text">
527   MagickBooleanType SetImageViewMethod(ImageView *destination,
528     const ssize_t y,const int thread_id,void *context)
529 </pre>
530
531 <p>Use this pragma if the view is not single threaded:</p>
532
533 <pre class="text">
534       #pragma omp critical
535 </pre>
536
537 <p>to define a section of code in your callback set method that must be executed by a single thread at a time.</p>
538
539 <p>The format of the SetImageViewIterator method is:</p>
540
541 <pre class="code">
542   MagickBooleanType SetImageViewIterator(ImageView *destination,
543     SetImageViewMethod set,void *context)
544 </pre>
545
546 <p>A description of each parameter follows:</p>
547
548 <h5>destination</h5>
549 <p>the image view.</p>
550
551 <h5>set</h5>
552 <p>the set callback method.</p>
553
554 <h5>context</h5>
555 <p>the user defined context.</p>
556
557  </div>
558 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="SetImageViewThreads">SetImageViewThreads</a></h2>
559 <div class="doc-section">
560
561 <p>SetImageViewThreads() sets the number of threads in a thread team.</p>
562
563 <p>The format of the SetImageViewDescription method is:</p>
564
565 <pre class="code">
566   void SetImageViewThreads(ImageView *image_view,
567     const size_t number_threads)
568 </pre>
569
570 <p>A description of each parameter follows:</p>
571
572 <h5>image_view</h5>
573 <p>the image view.</p>
574
575 <h5>number_threads</h5>
576 <p>the number of threads in a thread team.</p>
577
578  </div>
579 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="TransferImageViewIterator">TransferImageViewIterator</a></h2>
580 <div class="doc-section">
581
582 <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>
583
584 <p>The callback signature is:</p>
585
586 <pre class="text">
587   MagickBooleanType TransferImageViewMethod(const ImageView *source,
588     ImageView *destination,const ssize_t y,const int thread_id,
589     void *context)
590 </pre>
591
592 <p>Use this pragma if the view is not single threaded:</p>
593
594 <pre class="text">
595       #pragma omp critical
596 </pre>
597
598 <p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p>
599
600 <p>The format of the TransferImageViewIterator method is:</p>
601
602 <pre class="code">
603   MagickBooleanType TransferImageViewIterator(ImageView *source,
604     ImageView *destination,TransferImageViewMethod transfer,void *context)
605 </pre>
606
607 <p>A description of each parameter follows:</p>
608
609 <h5>source</h5>
610 <p>the source image view.</p>
611
612 <h5>destination</h5>
613 <p>the destination image view.</p>
614
615 <h5>transfer</h5>
616 <p>the transfer callback method.</p>
617
618 <h5>context</h5>
619 <p>the user defined context.</p>
620
621  </div>
622 <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="UpdateImageViewIterator">UpdateImageViewIterator</a></h2>
623 <div class="doc-section">
624
625 <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>
626
627 <p>The callback signature is:</p>
628
629 <pre class="text">
630   MagickBooleanType UpdateImageViewMethod(ImageView *source,
631     const ssize_t y,const int thread_id,void *context)
632 </pre>
633
634 <p>Use this pragma if the view is not single threaded:</p>
635
636 <pre class="text">
637       #pragma omp critical
638 </pre>
639
640 <p>to define a section of code in your callback update method that must be executed by a single thread at a time.</p>
641
642 <p>The format of the UpdateImageViewIterator method is:</p>
643
644 <pre class="code">
645   MagickBooleanType UpdateImageViewIterator(ImageView *source,
646     UpdateImageViewMethod update,void *context)
647 </pre>
648
649 <p>A description of each parameter follows:</p>
650
651 <h5>source</h5>
652 <p>the source image view.</p>
653
654 <h5>update</h5>
655 <p>the update callback method.</p>
656
657 <h5>context</h5>
658 <p>the user defined context.</p>
659
660  </div>
661 \r
662 </div>\r
663 \r
664 <div id="linkbar">\r
665     <span id="linkbar-west">&nbsp;</span>\r
666     <span id="linkbar-center">\r
667       <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> &bull;\r
668       <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>\r
669     </span>\r
670     <span id="linkbar-east">&nbsp;</span>\r
671   </div>\r
672   <div class="footer">\r
673     <span id="footer-west">&copy; 1999-2011 ImageMagick Studio LLC</span>\r
674     <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>\r
675   </div>\r
676   <div style="clear: both; margin: 0; width: 100%; "></div>\r
677   <script type="text/javascript">\r
678     var _gaq = _gaq || [];\r
679     _gaq.push(['_setAccount', 'UA-17690367-1']);\r
680     _gaq.push(['_trackPageview']);\r
681 \r
682     (function() {\r
683       var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\r
684       ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\r
685       var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\r
686     })();\r
687   </script>\r
688 </body>\r
689 </html>\r