blob: 76eddf43fc5ae27d0d8fc7b5638446165cda873a [file] [log] [blame]
Cristy594d2772015-11-15 10:47:42 -05001
2
3
4
cristy29dc8652015-05-12 16:26:21 +00005<!DOCTYPE html>
cristy44443b92015-05-05 00:06:07 +00006<html lang="en">
cristy06f63f22012-10-31 00:50:07 +00007<head>
Cristy594d2772015-11-15 10:47:42 -05008 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
cristy29f2c972015-07-28 13:37:46 +00009 <title>ImageMagick: MagickCore, C API for ImageMagick: Image View Methods</title>
Cristy594d2772015-11-15 10:47:42 -050010 <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
11 <meta name="application-name" content="ImageMagick"/>
12 <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves."/>
13 <meta name="application-url" content="http://www.imagemagick.org"/>
14 <meta name="generator" content="PHP"/>
15 <meta name="keywords" content="magickcore, c, api, for, imagemagick:, image, view, methods, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"/>
16 <meta name="rating" content="GENERAL"/>
17 <meta name="robots" content="INDEX, FOLLOW"/>
18 <meta name="generator" content="ImageMagick Studio LLC"/>
19 <meta name="author" content="ImageMagick Studio LLC"/>
20 <meta name="revisit-after" content="2 DAYS"/>
21 <meta name="resource-type" content="document"/>
Cristyce4a3552015-12-14 13:53:35 -050022 <meta name="copyright" content="Copyright (c) 1999-2015 ImageMagick Studio LLC"/>
Cristy594d2772015-11-15 10:47:42 -050023 <meta name="distribution" content="Global"/>
24 <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/>
25 <link rel="icon" href="../images/wand.png"/>
26 <link rel="shortcut icon" href="../images/wand.ico"/>
27 <link rel="stylesheet" href="../css/magick.html"/>
cristy06f63f22012-10-31 00:50:07 +000028</head>
cristy44443b92015-05-05 00:06:07 +000029<body>
cristy06f63f22012-10-31 00:50:07 +000030<div class="main">
cristy44443b92015-05-05 00:06:07 +000031<div class="magick-masthead">
32 <div class="container">
Cristye93be682015-11-26 09:07:51 -050033 <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle"
Cristy594d2772015-11-15 10:47:42 -050034 style="display:block"
35 data-ad-client="ca-pub-3129977114552745"
36 data-ad-slot="6345125851"
37 data-ad-format="auto"></ins>
cristy29f2c972015-07-28 13:37:46 +000038 <script>
Cristy542697a2015-10-12 20:10:32 -040039 (adsbygoogle = window.adsbygoogle || []).push({});
cristy44443b92015-05-05 00:06:07 +000040 </script>
cristy44443b92015-05-05 00:06:07 +000041 <nav class="magick-nav">
cristy2f563d42015-05-06 23:36:51 +000042 <a class="magick-nav-item " href="../index.html">Home</a>
cristyea2793e2015-05-31 16:52:26 +000043 <a class="magick-nav-item " href="../binary-releases.html">Download</a>
cristy38185362015-05-07 20:09:56 +000044 <a class="magick-nav-item " href="../command-line-tools.html">Tools</a>
Cristye93be682015-11-26 09:07:51 -050045 <a class="magick-nav-item " href="../command-line-processing.html">Command-line</a>
cristyea2793e2015-05-31 16:52:26 +000046 <a class="magick-nav-item " href="../resources.html">Resources</a>
47 <a class="magick-nav-item " href="api.html">Develop</a>
cristy5b8fe762015-06-09 16:24:03 +000048 <a class="magick-nav-item " href="http://nextgen.imagemagick.org/script/search.php">Search</a>
cristya1890f02015-05-15 23:32:44 +000049 <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a>
cristy44443b92015-05-05 00:06:07 +000050 </nav>
51 </div>
52</div>
53<div class="container">
cristy4e638cd2015-05-07 16:47:40 +000054<div class="magick-header">
Cristy594d2772015-11-15 10:47:42 -050055<p class="text-center"><a href="image-view.html#CloneImageView">CloneImageView</a> &#8226; <a href="image-view.html#DestroyImageView">DestroyImageView</a> &#8226; <a href="image-view.html#DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a> &#8226; <a href="image-view.html#GetImageViewAuthenticMetacontent">GetImageViewAuthenticMetacontent</a> &#8226; <a href="image-view.html#GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a> &#8226; <a href="image-view.html#GetImageViewException">GetImageViewException</a> &#8226; <a href="image-view.html#GetImageViewExtent">GetImageViewExtent</a> &#8226; <a href="image-view.html#GetImageViewImage">GetImageViewImage</a> &#8226; <a href="image-view.html#GetImageViewIterator">GetImageViewIterator</a> &#8226; <a href="image-view.html#GetImageViewVirtualMetacontent">GetImageViewVirtualMetacontent</a> &#8226; <a href="image-view.html#GetImageViewVirtualPixels">GetImageViewVirtualPixels</a> &#8226; <a href="image-view.html#IsImageView">IsImageView</a> &#8226; <a href="image-view.html#NewImageView">NewImageView</a> &#8226; <a href="image-view.html#NewImageViewRegion">NewImageViewRegion</a> &#8226; <a href="image-view.html#SetImageViewDescription">SetImageViewDescription</a> &#8226; <a href="image-view.html#SetImageViewIterator">SetImageViewIterator</a> &#8226; <a href="image-view.html#TransferImageViewIterator">TransferImageViewIterator</a> &#8226; <a href="image-view.html#UpdateImageViewIterator">UpdateImageViewIterator</a></p>
cristy06f63f22012-10-31 00:50:07 +000056
Cristye93be682015-11-26 09:07:51 -050057<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="CloneImageView">CloneImageView</a></h2>
cristycecc9492015-06-09 16:53:50 +000058
59<p>CloneImageView() makes a copy of the specified image view.</p>
60
61<p>The format of the CloneImageView method is:</p>
62
63<pre class="text">
64ImageView *CloneImageView(const ImageView *image_view)
65</pre>
66
67<p>A description of each parameter follows:</p>
68
69<dd>
70</dd>
71
72<dd> </dd>
73<dl class="dl-horizontal">
74<dt>image_view</dt>
75<dd>the image view. </dd>
76
77<dd> </dd>
78</dl>
Cristye93be682015-11-26 09:07:51 -050079<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="DestroyImageView">DestroyImageView</a></h2>
cristycecc9492015-06-09 16:53:50 +000080
81<p>DestroyImageView() deallocates memory associated with a image view.</p>
82
83<p>The format of the DestroyImageView method is:</p>
84
85<pre class="text">
86ImageView *DestroyImageView(ImageView *image_view)
87</pre>
88
89<p>A description of each parameter follows:</p>
90
91<dd>
92</dd>
93
94<dd> </dd>
95<dl class="dl-horizontal">
96<dt>image_view</dt>
97<dd>the image view. </dd>
98
99<dd> </dd>
100</dl>
Cristye93be682015-11-26 09:07:51 -0500101<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a></h2>
cristycecc9492015-06-09 16:53:50 +0000102
103<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>
104
105<p>The callback signature is:</p>
106
107<pre class="text">
108MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source,
109 const ImageView *duplex,ImageView *destination,const ssize_t y,
110 const int thread_id,void *context)
111</pre>
112
113<p>Use this pragma if the view is not single threaded:</p>
114
115<pre class="text">
116 #pragma omp critical
117</pre>
118
119<p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p>
120
121<p>The format of the DuplexTransferImageViewIterator method is:</p>
122
123<pre class="text">
124MagickBooleanType DuplexTransferImageViewIterator(ImageView *source,
125 ImageView *duplex,ImageView *destination,
126 DuplexTransferImageViewMethod transfer,void *context)
127</pre>
128
129<p>A description of each parameter follows:</p>
130
131<dd>
132</dd>
133
134<dd> </dd>
135<dl class="dl-horizontal">
136<dt>source</dt>
137<dd>the source image view. </dd>
138
139<dd> </dd>
140<dt>duplex</dt>
141<dd>the duplex image view. </dd>
142
143<dd> </dd>
144<dt>destination</dt>
145<dd>the destination image view. </dd>
146
147<dd> </dd>
148<dt>transfer</dt>
149<dd>the transfer callback method. </dd>
150
151<dd> </dd>
152<dt>context</dt>
153<dd>the user defined context. </dd>
154
155<dd> </dd>
156</dl>
Cristye93be682015-11-26 09:07:51 -0500157<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewAuthenticMetacontent">GetImageViewAuthenticMetacontent</a></h2>
cristycecc9492015-06-09 16:53:50 +0000158
159<p>GetImageViewAuthenticMetacontent() returns the image view authentic meta-content.</p>
160
161<p>The format of the GetImageViewAuthenticPixels method is:</p>
162
163<pre class="text">
164void *GetImageViewAuthenticMetacontent(
165 const ImageView *image_view)
166</pre>
167
168<p>A description of each parameter follows:</p>
169
170<dd>
171</dd>
172
173<dd> </dd>
174<dl class="dl-horizontal">
175<dt>image_view</dt>
176<dd>the image view. </dd>
177
178<dd> </dd>
179</dl>
Cristye93be682015-11-26 09:07:51 -0500180<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a></h2>
cristycecc9492015-06-09 16:53:50 +0000181
182<p>GetImageViewAuthenticPixels() returns the image view authentic pixels.</p>
183
184<p>The format of the GetImageViewAuthenticPixels method is:</p>
185
186<pre class="text">
187Quantum *GetImageViewAuthenticPixels(const ImageView *image_view)
188</pre>
189
190<p>A description of each parameter follows:</p>
191
192<dd>
193</dd>
194
195<dd> </dd>
196<dl class="dl-horizontal">
197<dt>image_view</dt>
198<dd>the image view. </dd>
199
200<dd> </dd>
201</dl>
Cristye93be682015-11-26 09:07:51 -0500202<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewException">GetImageViewException</a></h2>
cristycecc9492015-06-09 16:53:50 +0000203
204<p>GetImageViewException() returns the severity, reason, and description of any error that occurs when utilizing a image view.</p>
205
206<p>The format of the GetImageViewException method is:</p>
207
208<pre class="text">
209char *GetImageViewException(const PixelImage *image_view,
210 ExceptionType *severity)
211</pre>
212
213<p>A description of each parameter follows:</p>
214
215<dd>
216</dd>
217
218<dd> </dd>
219<dl class="dl-horizontal">
220<dt>image_view</dt>
221<dd>the pixel image_view. </dd>
222
223<dd> </dd>
224<dt>severity</dt>
225<dd>the severity of the error is returned here. </dd>
226
227<dd> </dd>
228</dl>
Cristye93be682015-11-26 09:07:51 -0500229<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewExtent">GetImageViewExtent</a></h2>
cristycecc9492015-06-09 16:53:50 +0000230
231<p>GetImageViewExtent() returns the image view extent.</p>
232
233<p>The format of the GetImageViewExtent method is:</p>
234
235<pre class="text">
236RectangleInfo GetImageViewExtent(const ImageView *image_view)
237</pre>
238
239<p>A description of each parameter follows:</p>
240
241<dd>
242</dd>
243
244<dd> </dd>
245<dl class="dl-horizontal">
246<dt>image_view</dt>
247<dd>the image view. </dd>
248
249<dd> </dd>
250</dl>
Cristye93be682015-11-26 09:07:51 -0500251<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewImage">GetImageViewImage</a></h2>
cristycecc9492015-06-09 16:53:50 +0000252
253<p>GetImageViewImage() returns the image associated with the image view.</p>
254
255<p>The format of the GetImageViewImage method is:</p>
256
257<pre class="text">
258MagickCore *GetImageViewImage(const ImageView *image_view)
259</pre>
260
261<p>A description of each parameter follows:</p>
262
263<dd>
264</dd>
265
266<dd> </dd>
267<dl class="dl-horizontal">
268<dt>image_view</dt>
269<dd>the image view. </dd>
270
271<dd> </dd>
272</dl>
Cristye93be682015-11-26 09:07:51 -0500273<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewIterator">GetImageViewIterator</a></h2>
cristycecc9492015-06-09 16:53:50 +0000274
275<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>
276
277<p>The callback signature is:</p>
278
279<pre class="text">
280MagickBooleanType GetImageViewMethod(const ImageView *source,
281 const ssize_t y,const int thread_id,void *context)
282</pre>
283
284<p>Use this pragma if the view is not single threaded:</p>
285
286<pre class="text">
287 #pragma omp critical
288</pre>
289
290<p>to define a section of code in your callback get method that must be executed by a single thread at a time.</p>
291
292<p>The format of the GetImageViewIterator method is:</p>
293
294<pre class="text">
295MagickBooleanType GetImageViewIterator(ImageView *source,
296 GetImageViewMethod get,void *context)
297</pre>
298
299<p>A description of each parameter follows:</p>
300
301<dd>
302</dd>
303
304<dd> </dd>
305<dl class="dl-horizontal">
306<dt>source</dt>
307<dd>the source image view. </dd>
308
309<dd> </dd>
310<dt>get</dt>
311<dd>the get callback method. </dd>
312
313<dd> </dd>
314<dt>context</dt>
315<dd>the user defined context. </dd>
316
317<dd> </dd>
318</dl>
Cristye93be682015-11-26 09:07:51 -0500319<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewVirtualMetacontent">GetImageViewVirtualMetacontent</a></h2>
cristycecc9492015-06-09 16:53:50 +0000320
321<p>GetImageViewVirtualMetacontent() returns the image view virtual meta-content.</p>
322
323<p>The format of the GetImageViewVirtualMetacontent method is:</p>
324
325<pre class="text">
326const void *GetImageViewVirtualMetacontent(
327 const ImageView *image_view)
328</pre>
329
330<p>A description of each parameter follows:</p>
331
332<dd>
333</dd>
334
335<dd> </dd>
336<dl class="dl-horizontal">
337<dt>image_view</dt>
338<dd>the image view. </dd>
339
340<dd> </dd>
341</dl>
Cristye93be682015-11-26 09:07:51 -0500342<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewVirtualPixels">GetImageViewVirtualPixels</a></h2>
cristycecc9492015-06-09 16:53:50 +0000343
344<p>GetImageViewVirtualPixels() returns the image view virtual pixels.</p>
345
346<p>The format of the GetImageViewVirtualPixels method is:</p>
347
348<pre class="text">
349const Quantum *GetImageViewVirtualPixels(const ImageView *image_view)
350</pre>
351
352<p>A description of each parameter follows:</p>
353
354<dd>
355</dd>
356
357<dd> </dd>
358<dl class="dl-horizontal">
359<dt>image_view</dt>
360<dd>the image view. </dd>
361
362<dd> </dd>
363</dl>
Cristye93be682015-11-26 09:07:51 -0500364<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="IsImageView">IsImageView</a></h2>
cristycecc9492015-06-09 16:53:50 +0000365
366<p>IsImageView() returns MagickTrue if the the parameter is verified as a image view object.</p>
367
368<p>The format of the IsImageView method is:</p>
369
370<pre class="text">
371MagickBooleanType IsImageView(const ImageView *image_view)
372</pre>
373
374<p>A description of each parameter follows:</p>
375
376<dd>
377</dd>
378
379<dd> </dd>
380<dl class="dl-horizontal">
381<dt>image_view</dt>
382<dd>the image view. </dd>
383
384<dd> </dd>
385</dl>
Cristye93be682015-11-26 09:07:51 -0500386<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="NewImageView">NewImageView</a></h2>
cristycecc9492015-06-09 16:53:50 +0000387
388<p>NewImageView() returns a image view required for all other methods in the Image View API.</p>
389
390<p>The format of the NewImageView method is:</p>
391
392<pre class="text">
393ImageView *NewImageView(MagickCore *wand,ExceptionInfo *exception)
394</pre>
395
396<p>A description of each parameter follows:</p>
397
398<dd>
399</dd>
400
401<dd> </dd>
402<dl class="dl-horizontal">
403<dt>image</dt>
404<dd>the image. </dd>
405
406<dd> </dd>
407<dt>exception</dt>
408<dd>return any errors or warnings in this structure. </dd>
409
410<dd> </dd>
411</dl>
Cristye93be682015-11-26 09:07:51 -0500412<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="NewImageViewRegion">NewImageViewRegion</a></h2>
cristycecc9492015-06-09 16:53:50 +0000413
414<p>NewImageViewRegion() returns a image view required for all other methods in the Image View API.</p>
415
416<p>The format of the NewImageViewRegion method is:</p>
417
418<pre class="text">
419ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
420 const ssize_t y,const size_t width,const size_t height,
421 ExceptionInfo *exception)
422</pre>
423
424<p>A description of each parameter follows:</p>
425
426<dd>
427</dd>
428
429<dd> </dd>
430<dl class="dl-horizontal">
431<dt>wand</dt>
432<dd>the magick wand. </dd>
433
434<dd> </dd>
435<dt>x,y,columns,rows</dt>
436<dd> These values define the perimeter of a extent of pixel_wands view. </dd>
437
438<dd> </dd>
439<dt>exception</dt>
440<dd>return any errors or warnings in this structure. </dd>
441
442<dd> </dd>
443</dl>
Cristye93be682015-11-26 09:07:51 -0500444<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="SetImageViewDescription">SetImageViewDescription</a></h2>
cristycecc9492015-06-09 16:53:50 +0000445
446<p>SetImageViewDescription() associates a description with an image view.</p>
447
448<p>The format of the SetImageViewDescription method is:</p>
449
450<pre class="text">
451void SetImageViewDescription(ImageView *image_view,
452 const char *description)
453</pre>
454
455<p>A description of each parameter follows:</p>
456
457<dd>
458</dd>
459
460<dd> </dd>
461<dl class="dl-horizontal">
462<dt>image_view</dt>
463<dd>the image view. </dd>
464
465<dd> </dd>
466<dt>description</dt>
467<dd>the image view description. </dd>
468
469<dd> </dd>
470</dl>
Cristye93be682015-11-26 09:07:51 -0500471<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="SetImageViewIterator">SetImageViewIterator</a></h2>
cristycecc9492015-06-09 16:53:50 +0000472
473<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>
474
475<p>The callback signature is:</p>
476
477<pre class="text">
478MagickBooleanType SetImageViewMethod(ImageView *destination,
479 const ssize_t y,const int thread_id,void *context)
480</pre>
481
482<p>Use this pragma if the view is not single threaded:</p>
483
484<pre class="text">
485 #pragma omp critical
486</pre>
487
488<p>to define a section of code in your callback set method that must be executed by a single thread at a time.</p>
489
490<p>The format of the SetImageViewIterator method is:</p>
491
492<pre class="text">
493MagickBooleanType SetImageViewIterator(ImageView *destination,
494 SetImageViewMethod set,void *context)
495</pre>
496
497<p>A description of each parameter follows:</p>
498
499<dd>
500</dd>
501
502<dd> </dd>
503<dl class="dl-horizontal">
504<dt>destination</dt>
505<dd>the image view. </dd>
506
507<dd> </dd>
508<dt>set</dt>
509<dd>the set callback method. </dd>
510
511<dd> </dd>
512<dt>context</dt>
513<dd>the user defined context. </dd>
514
515<dd> </dd>
516</dl>
Cristye93be682015-11-26 09:07:51 -0500517<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="TransferImageViewIterator">TransferImageViewIterator</a></h2>
cristycecc9492015-06-09 16:53:50 +0000518
519<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>
520
521<p>The callback signature is:</p>
522
523<pre class="text">
524MagickBooleanType TransferImageViewMethod(const ImageView *source,
525 ImageView *destination,const ssize_t y,const int thread_id,
526 void *context)
527</pre>
528
529<p>Use this pragma if the view is not single threaded:</p>
530
531<pre class="text">
532 #pragma omp critical
533</pre>
534
535<p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p>
536
537<p>The format of the TransferImageViewIterator method is:</p>
538
539<pre class="text">
540MagickBooleanType TransferImageViewIterator(ImageView *source,
541 ImageView *destination,TransferImageViewMethod transfer,void *context)
542</pre>
543
544<p>A description of each parameter follows:</p>
545
546<dd>
547</dd>
548
549<dd> </dd>
550<dl class="dl-horizontal">
551<dt>source</dt>
552<dd>the source image view. </dd>
553
554<dd> </dd>
555<dt>destination</dt>
556<dd>the destination image view. </dd>
557
558<dd> </dd>
559<dt>transfer</dt>
560<dd>the transfer callback method. </dd>
561
562<dd> </dd>
563<dt>context</dt>
564<dd>the user defined context. </dd>
565
566<dd> </dd>
567</dl>
Cristye93be682015-11-26 09:07:51 -0500568<h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="UpdateImageViewIterator">UpdateImageViewIterator</a></h2>
cristycecc9492015-06-09 16:53:50 +0000569
570<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>
571
572<p>The callback signature is:</p>
573
574<pre class="text">
575MagickBooleanType UpdateImageViewMethod(ImageView *source,
576 const ssize_t y,const int thread_id,void *context)
577</pre>
578
579<p>Use this pragma if the view is not single threaded:</p>
580
581<pre class="text">
582 #pragma omp critical
583</pre>
584
585<p>to define a section of code in your callback update method that must be executed by a single thread at a time.</p>
586
587<p>The format of the UpdateImageViewIterator method is:</p>
588
589<pre class="text">
590MagickBooleanType UpdateImageViewIterator(ImageView *source,
591 UpdateImageViewMethod update,void *context)
592</pre>
593
594<p>A description of each parameter follows:</p>
595
596<dd>
597</dd>
598
599<dd> </dd>
600<dl class="dl-horizontal">
601<dt>source</dt>
602<dd>the source image view. </dd>
603
604<dd> </dd>
605<dt>update</dt>
606<dd>the update callback method. </dd>
607
608<dd> </dd>
609<dt>context</dt>
610<dd>the user defined context. </dd>
611
612<dd> </dd>
613</dl>
cristy06f63f22012-10-31 00:50:07 +0000614</div>
cristy44443b92015-05-05 00:06:07 +0000615 <footer class="magick-footer">
cristy29f2c972015-07-28 13:37:46 +0000616 <p><a href="../support.html">Donate</a>
617 <a href="../sitemap.html">Sitemap</a>
cristy38185362015-05-07 20:09:56 +0000618 <a href="../links.html">Related</a>
cristy29f2c972015-07-28 13:37:46 +0000619 <a href="../architecture.html">Architecture</a>
cristy44443b92015-05-05 00:06:07 +0000620</p>
621 <p><a href="image-view.html#">Back to top</a>
cristyea2793e2015-05-31 16:52:26 +0000622 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a>
cristy5b8fe762015-06-09 16:24:03 +0000623 <a href="http://nextgen.imagemagick.org/script/contact.php">Contact Us</a></p>
Cristyce4a3552015-12-14 13:53:35 -0500624 <p><small>© 1999-2015 ImageMagick Studio LLC</small></p>
cristy44443b92015-05-05 00:06:07 +0000625 </footer>
626</div><!-- /.container -->
cristy06f63f22012-10-31 00:50:07 +0000627
Cristye93be682015-11-26 09:07:51 -0500628 <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
cristy29f2c972015-07-28 13:37:46 +0000629 <script src="http://nextgen.imagemagick.org/js/magick.html"></script>
cristy44cbd482013-08-04 20:53:36 +0000630</div>
cristy06f63f22012-10-31 00:50:07 +0000631</body>
cristy5a367e42015-05-05 12:39:18 +0000632</html>