• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2
3
4
5<!DOCTYPE html>
6<html lang="en">
7<head>
8    <title>ImageMagick: MagickWand, C API for ImageMagick: Wand View Methods</title>
9  <meta charset="utf-8" />
10  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
11  <meta name="viewport" content="width=device-width, initial-scale=1" />
12  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
13  <meta name="application-name" content="ImageMagick"/>
14  <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."/>
15  <meta name="application-url" content="http://www.imagemagick.org"/>
16  <meta name="generator" content="PHP"/>
17  <meta name="keywords" content="magickwc, api, for, imagemagick:, wview, methods, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"/>
18  <meta name="rating" content="GENERAL"/>
19  <meta name="robots" content="INDEX, FOLLOW"/>
20  <meta name="generator" content="ImageMagick Studio LLC"/>
21  <meta name="author" content="ImageMagick Studio LLC"/>
22  <meta name="revisit-after" content="2 DAYS"/>
23  <meta name="resource-type" content="document"/>
24  <meta name="copyright" content="Copyright (c) 1999-2016 ImageMagick Studio LLC"/>
25  <meta name="distribution" content="Global"/>
26  <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/>
27  <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
28  <link rel="icon" href="../images/wand.png"/>
29  <link rel="shortcut icon" href="../images/wand.ico"/>
30  <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:900,400,400italic,700,700italic,300,300italic|Open+Sans:300italic,400italic,700italic,300,400,600,700">
31  <link rel="stylesheet" href="../css/magick.html"/>
32</head>
33<body>
34<div class="main">
35<div class="magick-masthead">
36  <div class="container">
37    <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle"
38         style="display:block"
39         data-ad-client="ca-pub-3129977114552745"
40         data-ad-slot="6345125851"
41         data-ad-format="auto"></ins>
42    <script>
43      (adsbygoogle = window.adsbygoogle || []).push({});
44    </script>
45    <nav class="magick-nav">
46      <a class="magick-nav-item " href="../index.html">Home</a>
47      <a class="magick-nav-item " href="../binary-releases.html">Download</a>
48      <a class="magick-nav-item " href="../command-line-tools.html">Tools</a>
49      <a class="magick-nav-item " href="../command-line-processing.html">Command-line</a>
50      <a class="magick-nav-item " href="../resources.html">Resources</a>
51      <a class="magick-nav-item " href="api.html">Develop</a>
52      <a class="magick-nav-item " href="http://www.imagemagick.org/script/search.php">Search</a>
53      <a class="magick-nav-item pull-right" href="https://www.imagemagick.org/discourse-server/">Community</a>
54    </nav>
55  </div>
56</div>
57<div class="container">
58<div class="magick-header">
59<p class="text-center"><a href="wand-view.html#CloneWandView">CloneWandView</a> &#8226; <a href="wand-view.html#DestroyWandView">DestroyWandView</a> &#8226; <a href="wand-view.html#DuplexTransferWandViewIterator">DuplexTransferWandViewIterator</a> &#8226; <a href="wand-view.html#GetWandViewException">GetWandViewException</a> &#8226; <a href="wand-view.html#GetWandViewExtent">GetWandViewExtent</a> &#8226; <a href="wand-view.html#GetWandViewIterator">GetWandViewIterator</a> &#8226; <a href="wand-view.html#GetWandViewPixels">GetWandViewPixels</a> &#8226; <a href="wand-view.html#GetWandViewWand">GetWandViewWand</a> &#8226; <a href="wand-view.html#IsWandView">IsWandView</a> &#8226; <a href="wand-view.html#NewWandView">NewWandView</a> &#8226; <a href="wand-view.html#NewWandViewExtent">NewWandViewExtent</a> &#8226; <a href="wand-view.html#SetWandViewDescription">SetWandViewDescription</a> &#8226; <a href="wand-view.html#SetWandViewIterator">SetWandViewIterator</a> &#8226; <a href="wand-view.html#TransferWandViewIterator">TransferWandViewIterator</a> &#8226; <a href="wand-view.html#UpdateWandViewIterator">UpdateWandViewIterator</a></p>
60
61<h2><a href="http://www.imagemagick.org/api/MagickWand/wand-view_8c.html" id="CloneWandView">CloneWandView</a></h2>
62
63<p>CloneWandView() makes a copy of the specified wand view.</p>
64
65<p>The format of the CloneWandView method is:</p>
66
67<pre class="text">
68WandView *CloneWandView(const WandView *wand_view)
69</pre>
70
71<p>A description of each parameter follows:</p>
72
73<dd>
74</dd>
75
76<dd> </dd>
77<dl class="dl-horizontal">
78<dt>wand_view</dt>
79<dd>the wand view. </dd>
80
81<dd>  </dd>
82</dl>
83<h2><a href="http://www.imagemagick.org/api/MagickWand/wand-view_8c.html" id="DestroyWandView">DestroyWandView</a></h2>
84
85<p>DestroyWandView() deallocates memory associated with a wand view.</p>
86
87<p>The format of the DestroyWandView method is:</p>
88
89<pre class="text">
90WandView *DestroyWandView(WandView *wand_view)
91</pre>
92
93<p>A description of each parameter follows:</p>
94
95<dd>
96</dd>
97
98<dd> </dd>
99<dl class="dl-horizontal">
100<dt>wand_view</dt>
101<dd>the wand view. </dd>
102
103<dd>  </dd>
104</dl>
105<h2><a href="http://www.imagemagick.org/api/MagickWand/wand-view_8c.html" id="DuplexTransferWandViewIterator">DuplexTransferWandViewIterator</a></h2>
106
107<p>DuplexTransferWandViewIterator() iterates over three wand 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 wand view is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension are permitted.</p>
108
109<p>The callback signature is:</p>
110
111<pre class="text">
112MagickBooleanType DuplexTransferImageViewMethod(const WandView *source,
113  const WandView *duplex,WandView *destination,const ssize_t y,
114  const int thread_id,void *context)
115</pre>
116
117<p>Use this pragma if the view is not single threaded:</p>
118
119<pre class="text">
120    #pragma omp critical
121</pre>
122
123<p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p>
124
125<p>The format of the DuplexTransferWandViewIterator method is:</p>
126
127<pre class="text">
128MagickBooleanType DuplexTransferWandViewIterator(WandView *source,
129  WandView *duplex,WandView *destination,
130  DuplexTransferWandViewMethod transfer,void *context)
131</pre>
132
133<p>A description of each parameter follows:</p>
134
135<dd>
136</dd>
137
138<dd> </dd>
139<dl class="dl-horizontal">
140<dt>source</dt>
141<dd>the source wand view. </dd>
142
143<dd> </dd>
144<dt>duplex</dt>
145<dd>the duplex wand view. </dd>
146
147<dd> </dd>
148<dt>destination</dt>
149<dd>the destination wand view. </dd>
150
151<dd> </dd>
152<dt>transfer</dt>
153<dd>the transfer callback method. </dd>
154
155<dd> </dd>
156<dt>context</dt>
157<dd>the user defined context. </dd>
158
159<dd>  </dd>
160</dl>
161<h2><a href="http://www.imagemagick.org/api/MagickWand/wand-view_8c.html" id="GetWandViewException">GetWandViewException</a></h2>
162
163<p>GetWandViewException() returns the severity, reason, and description of any error that occurs when utilizing a wand view.</p>
164
165<p>The format of the GetWandViewException method is:</p>
166
167<pre class="text">
168char *GetWandViewException(const WandView *wand_view,
169  ExceptionType *severity)
170</pre>
171
172<p>A description of each parameter follows:</p>
173
174<dd>
175</dd>
176
177<dd> </dd>
178<dl class="dl-horizontal">
179<dt>wand_view</dt>
180<dd>the pixel wand_view. </dd>
181
182<dd> </dd>
183<dt>severity</dt>
184<dd>the severity of the error is returned here. </dd>
185
186<dd>  </dd>
187</dl>
188<h2><a href="http://www.imagemagick.org/api/MagickWand/wand-view_8c.html" id="GetWandViewExtent">GetWandViewExtent</a></h2>
189
190<p>GetWandViewExtent() returns the wand view extent.</p>
191
192<p>The format of the GetWandViewExtent method is:</p>
193
194<pre class="text">
195RectangleInfo GetWandViewExtent(const WandView *wand_view)
196</pre>
197
198<p>A description of each parameter follows:</p>
199
200<dd>
201</dd>
202
203<dd> </dd>
204<dl class="dl-horizontal">
205<dt>wand_view</dt>
206<dd>the wand view. </dd>
207
208<dd>  </dd>
209</dl>
210<h2><a href="http://www.imagemagick.org/api/MagickWand/wand-view_8c.html" id="GetWandViewIterator">GetWandViewIterator</a></h2>
211
212<p>GetWandViewIterator() iterates over the wand 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>
213
214<p>The callback signature is:</p>
215
216<pre class="text">
217MagickBooleanType GetImageViewMethod(const WandView *source,
218  const ssize_t y,const int thread_id,void *context)
219</pre>
220
221<p>Use this pragma if the view is not single threaded:</p>
222
223<pre class="text">
224    #pragma omp critical
225</pre>
226
227<p>to define a section of code in your callback get method that must be executed by a single thread at a time.</p>
228
229<p>The format of the GetWandViewIterator method is:</p>
230
231<pre class="text">
232MagickBooleanType GetWandViewIterator(WandView *source,
233  GetWandViewMethod get,void *context)
234</pre>
235
236<p>A description of each parameter follows:</p>
237
238<dd>
239</dd>
240
241<dd> </dd>
242<dl class="dl-horizontal">
243<dt>source</dt>
244<dd>the source wand view. </dd>
245
246<dd> </dd>
247<dt>get</dt>
248<dd>the get callback method. </dd>
249
250<dd> </dd>
251<dt>context</dt>
252<dd>the user defined context. </dd>
253
254<dd>  </dd>
255</dl>
256<h2><a href="http://www.imagemagick.org/api/MagickWand/wand-view_8c.html" id="GetWandViewPixels">GetWandViewPixels</a></h2>
257
258<p>GetWandViewPixels() returns the wand view pixel_wands.</p>
259
260<p>The format of the GetWandViewPixels method is:</p>
261
262<pre class="text">
263PixelWand *GetWandViewPixels(const WandView *wand_view)
264</pre>
265
266<p>A description of each parameter follows:</p>
267
268<dd>
269</dd>
270
271<dd> </dd>
272<dl class="dl-horizontal">
273<dt>wand_view</dt>
274<dd>the wand view. </dd>
275
276<dd>  </dd>
277</dl>
278<h2><a href="http://www.imagemagick.org/api/MagickWand/wand-view_8c.html" id="GetWandViewWand">GetWandViewWand</a></h2>
279
280<p>GetWandViewWand() returns the magick wand associated with the wand view.</p>
281
282<p>The format of the GetWandViewWand method is:</p>
283
284<pre class="text">
285MagickWand *GetWandViewWand(const WandView *wand_view)
286</pre>
287
288<p>A description of each parameter follows:</p>
289
290<dd>
291</dd>
292
293<dd> </dd>
294<dl class="dl-horizontal">
295<dt>wand_view</dt>
296<dd>the wand view. </dd>
297
298<dd>  </dd>
299</dl>
300<h2><a href="http://www.imagemagick.org/api/MagickWand/wand-view_8c.html" id="IsWandView">IsWandView</a></h2>
301
302<p>IsWandView() returns MagickTrue if the the parameter is verified as a wand view object.</p>
303
304<p>The format of the IsWandView method is:</p>
305
306<pre class="text">
307MagickBooleanType IsWandView(const WandView *wand_view)
308</pre>
309
310<p>A description of each parameter follows:</p>
311
312<dd>
313</dd>
314
315<dd> </dd>
316<dl class="dl-horizontal">
317<dt>wand_view</dt>
318<dd>the wand view. </dd>
319
320<dd>  </dd>
321</dl>
322<h2><a href="http://www.imagemagick.org/api/MagickWand/wand-view_8c.html" id="NewWandView">NewWandView</a></h2>
323
324<p>NewWandView() returns a wand view required for all other methods in the Wand View API.</p>
325
326<p>The format of the NewWandView method is:</p>
327
328<pre class="text">
329WandView *NewWandView(MagickWand *wand)
330</pre>
331
332<p>A description of each parameter follows:</p>
333
334<dd>
335</dd>
336
337<dd> </dd>
338<dl class="dl-horizontal">
339<dt>wand</dt>
340<dd>the wand. </dd>
341
342<dd>  </dd>
343</dl>
344<h2><a href="http://www.imagemagick.org/api/MagickWand/wand-view_8c.html" id="NewWandViewExtent">NewWandViewExtent</a></h2>
345
346<p>NewWandViewExtent() returns a wand view required for all other methods in the Wand View API.</p>
347
348<p>The format of the NewWandViewExtent method is:</p>
349
350<pre class="text">
351WandView *NewWandViewExtent(MagickWand *wand,const ssize_t x,
352  const ssize_t y,const size_t width,const size_t height)
353</pre>
354
355<p>A description of each parameter follows:</p>
356
357<dd>
358</dd>
359
360<dd> </dd>
361<dl class="dl-horizontal">
362<dt>wand</dt>
363<dd>the magick wand. </dd>
364
365<dd> </dd>
366<dt>x,y,columns,rows</dt>
367<dd> These values define the perimeter of a extent of pixel_wands view. </dd>
368
369<dd>  </dd>
370</dl>
371<h2><a href="http://www.imagemagick.org/api/MagickWand/wand-view_8c.html" id="SetWandViewDescription">SetWandViewDescription</a></h2>
372
373<p>SetWandViewDescription() associates a description with an image view.</p>
374
375<p>The format of the SetWandViewDescription method is:</p>
376
377<pre class="text">
378void SetWandViewDescription(WandView *image_view,const char *description)
379</pre>
380
381<p>A description of each parameter follows:</p>
382
383<dd>
384</dd>
385
386<dd> </dd>
387<dl class="dl-horizontal">
388<dt>wand_view</dt>
389<dd>the wand view. </dd>
390
391<dd> </dd>
392<dt>description</dt>
393<dd>the wand view description. </dd>
394
395<dd>  </dd>
396</dl>
397<h2><a href="http://www.imagemagick.org/api/MagickWand/wand-view_8c.html" id="SetWandViewIterator">SetWandViewIterator</a></h2>
398
399<p>SetWandViewIterator() iterates over the wand 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>
400
401<p>The callback signature is:</p>
402
403<pre class="text">
404MagickBooleanType SetImageViewMethod(ImageView *destination,
405  const ssize_t y,const int thread_id,void *context)
406</pre>
407
408<p>Use this pragma if the view is not single threaded:</p>
409
410<pre class="text">
411    #pragma omp critical
412</pre>
413
414<p>to define a section of code in your callback set method that must be executed by a single thread at a time.</p>
415
416<p>The format of the SetWandViewIterator method is:</p>
417
418<pre class="text">
419MagickBooleanType SetWandViewIterator(WandView *destination,
420  SetWandViewMethod set,void *context)
421</pre>
422
423<p>A description of each parameter follows:</p>
424
425<dd>
426</dd>
427
428<dd> </dd>
429<dl class="dl-horizontal">
430<dt>destination</dt>
431<dd>the wand view. </dd>
432
433<dd> </dd>
434<dt>set</dt>
435<dd>the set callback method. </dd>
436
437<dd> </dd>
438<dt>context</dt>
439<dd>the user defined context. </dd>
440
441<dd>  </dd>
442</dl>
443<h2><a href="http://www.imagemagick.org/api/MagickWand/wand-view_8c.html" id="TransferWandViewIterator">TransferWandViewIterator</a></h2>
444
445<p>TransferWandViewIterator() iterates over two wand 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 wand view is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension are permitted.</p>
446
447<p>The callback signature is:</p>
448
449<pre class="text">
450MagickBooleanType TransferImageViewMethod(const WandView *source,
451  WandView *destination,const ssize_t y,const int thread_id,
452  void *context)
453</pre>
454
455<p>Use this pragma if the view is not single threaded:</p>
456
457<pre class="text">
458    #pragma omp critical
459</pre>
460
461<p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p>
462
463<p>The format of the TransferWandViewIterator method is:</p>
464
465<pre class="text">
466MagickBooleanType TransferWandViewIterator(WandView *source,
467  WandView *destination,TransferWandViewMethod transfer,void *context)
468</pre>
469
470<p>A description of each parameter follows:</p>
471
472<dd>
473</dd>
474
475<dd> </dd>
476<dl class="dl-horizontal">
477<dt>source</dt>
478<dd>the source wand view. </dd>
479
480<dd> </dd>
481<dt>destination</dt>
482<dd>the destination wand view. </dd>
483
484<dd> </dd>
485<dt>transfer</dt>
486<dd>the transfer callback method. </dd>
487
488<dd> </dd>
489<dt>context</dt>
490<dd>the user defined context. </dd>
491
492<dd>  </dd>
493</dl>
494<h2><a href="http://www.imagemagick.org/api/MagickWand/wand-view_8c.html" id="UpdateWandViewIterator">UpdateWandViewIterator</a></h2>
495
496<p>UpdateWandViewIterator() iterates over the wand 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>
497
498<p>The callback signature is:</p>
499
500<pre class="text">
501MagickBooleanType UpdateImageViewMethod(WandView *source,const ssize_t y,
502  const int thread_id,void *context)
503</pre>
504
505<p>Use this pragma if the view is not single threaded:</p>
506
507<pre class="text">
508    #pragma omp critical
509</pre>
510
511<p>to define a section of code in your callback update method that must be executed by a single thread at a time.</p>
512
513<p>The format of the UpdateWandViewIterator method is:</p>
514
515<pre class="text">
516MagickBooleanType UpdateWandViewIterator(WandView *source,
517  UpdateWandViewMethod update,void *context)
518</pre>
519
520<p>A description of each parameter follows:</p>
521
522<dd>
523</dd>
524
525<dd> </dd>
526<dl class="dl-horizontal">
527<dt>source</dt>
528<dd>the source wand view. </dd>
529
530<dd> </dd>
531<dt>update</dt>
532<dd>the update callback method. </dd>
533
534<dd> </dd>
535<dt>context</dt>
536<dd>the user defined context. </dd>
537
538<dd>  </dd>
539</dl>
540</div>
541  <footer class="magick-footer">
542    <p><a href="../support.html">Donate</a> •
543     <a href="../sitemap.html">Sitemap</a> •
544    <a href="../links.html">Related</a> •
545    <a href="../architecture.html">Architecture</a>
546</p>
547    <p><a href="wand-view.html#">Back to top</a> •
548    <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
549    <a href="http://www.imagemagick.org/script/contact.php">Contact Us</a></p>
550        <p><small>©  1999-2016 ImageMagick Studio LLC</small></p>
551  </footer>
552</div><!-- /.container -->
553
554  <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
555  <script src="../js/magick.html"></script>
556</div>
557</body>
558</html>
559