• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2
3
4
5<!DOCTYPE html>
6<html lang="en">
7<head>
8  <meta charset="utf-8"  />
9  <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1,shrink-to-fit=no"  />
10  <title>MagickCore, C API: Image View Methods @ ImageMagick</title>
11  <meta name="application-name" content="ImageMagick" />
12  <meta name="description" content="Use ImageMagick® to create, edit, compose, or convert bitmap images. You can resize your image, crop it, change its shades and colors, add captions, among other operations." />
13  <meta name="application-url" content="https://imagemagick.org" />
14  <meta name="generator" content="PHP" />
15  <meta name="keywords" content="magickcore, c, api:, 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" />
22  <meta name="copyright" content="Copyright (c) 1999-2017 ImageMagick Studio LLC" />
23  <meta name="distribution" content="Global" />
24  <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1" />
25  <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
26  <link href="image-view.html" rel="canonical" />
27  <link href="../../images/wand.png" rel="icon" />
28  <link href="../../images/wand.ico" rel="shortcut icon" />
29  <link href="../assets/magick.css" rel="stylesheet" />
30</head>
31<body>
32  <header>
33  <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
34    <a class="navbar-brand" href="../../"><img class="d-block" id="icon" alt="ImageMagick" width="32" height="32" src="../../images/wand.ico"/></a>
35    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsMagick" aria-controls="navbarsMagick" aria-expanded="false" aria-label="Toggle navigation">
36      <span class="navbar-toggler-icon"></span>
37    </button>
38
39    <div class="navbar-collapse collapse" id="navbarsMagick" style="">
40    <ul class="navbar-nav mr-auto">
41      <li class="nav-item ">
42        <a class="nav-link" href="quantize.html">Home <span class="sr-only">(current)</span></a>
43      </li>
44      <li class="nav-item ">
45        <a class="nav-link" href="../../www/download.html">Download</a>
46      </li>
47      <li class="nav-item ">
48        <a class="nav-link" href="../../www/command-line-tools.html">Tools</a>
49      </li>
50      <li class="nav-item ">
51        <a class="nav-link" href="../../www/command-line-processing.html">Command-line</a>
52      </li>
53      <li class="nav-item ">
54        <a class="nav-link" href="../../www/resources.html">Resources</a>
55      </li>
56      <li class="nav-item ">
57        <a class="nav-link" href="../../www/develop.html">Develop</a>
58      </li>
59      <li class="nav-item">
60        <a class="nav-link" target="_blank" href="https://imagemagick.org/discourse-server/">Community</a>
61      </li>
62    </ul>
63    <form class="form-inline my-2 my-lg-0" action="https://imagemagick.org/script/search.php">
64      <input class="form-control mr-sm-2" type="text" name="q" placeholder="Search" aria-label="Search">
65      <button class="btn btn-outline-success my-2 my-sm-0" type="submit" name="sa">Search</button>
66    </form>
67    </div>
68  </nav>
69  <div class="container">
70   <script async="async" src="https://localhost/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle"
71         style="display:block"
72         data-ad-client="ca-pub-3129977114552745"
73         data-ad-slot="6345125851"
74         data-ad-format="auto"></ins>
75    <script>
76      (adsbygoogle = window.adsbygoogle || []).push({});
77    </script>
78
79  </div>
80  </header>
81  <main class="container">
82    <div class="magick-template">
83<div class="magick-header">
84<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>
85
86<h2><a href="../../api/MagickCore/image-view_8c.html" id="CloneImageView">CloneImageView</a></h2>
87
88<p>CloneImageView() makes a copy of the specified image view.</p>
89
90<p>The format of the CloneImageView method is:</p>
91
92<pre class="text">
93ImageView *CloneImageView(const ImageView *image_view)
94</pre>
95
96<p>A description of each parameter follows:</p>
97
98<dd>
99</dd>
100
101<dd> </dd>
102<dl class="dl-horizontal">
103<dt>image_view</dt>
104<dd>the image view. </dd>
105
106<dd>  </dd>
107</dl>
108<h2><a href="../../api/MagickCore/image-view_8c.html" id="DestroyImageView">DestroyImageView</a></h2>
109
110<p>DestroyImageView() deallocates memory associated with a image view.</p>
111
112<p>The format of the DestroyImageView method is:</p>
113
114<pre class="text">
115ImageView *DestroyImageView(ImageView *image_view)
116</pre>
117
118<p>A description of each parameter follows:</p>
119
120<dd>
121</dd>
122
123<dd> </dd>
124<dl class="dl-horizontal">
125<dt>image_view</dt>
126<dd>the image view. </dd>
127
128<dd>  </dd>
129</dl>
130<h2><a href="../../api/MagickCore/image-view_8c.html" id="DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a></h2>
131
132<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>
133
134<p>The callback signature is:</p>
135
136<pre class="text">
137MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source,
138  const ImageView *duplex,ImageView *destination,const ssize_t y,
139  const int thread_id,void *context)
140</pre>
141
142<p>Use this pragma if the view is not single threaded:</p>
143
144<pre class="text">
145    #pragma omp critical
146</pre>
147
148<p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p>
149
150<p>The format of the DuplexTransferImageViewIterator method is:</p>
151
152<pre class="text">
153MagickBooleanType DuplexTransferImageViewIterator(ImageView *source,
154  ImageView *duplex,ImageView *destination,
155  DuplexTransferImageViewMethod transfer,void *context)
156</pre>
157
158<p>A description of each parameter follows:</p>
159
160<dd>
161</dd>
162
163<dd> </dd>
164<dl class="dl-horizontal">
165<dt>source</dt>
166<dd>the source image view. </dd>
167
168<dd> </dd>
169<dt>duplex</dt>
170<dd>the duplex image view. </dd>
171
172<dd> </dd>
173<dt>destination</dt>
174<dd>the destination image view. </dd>
175
176<dd> </dd>
177<dt>transfer</dt>
178<dd>the transfer callback method. </dd>
179
180<dd> </dd>
181<dt>context</dt>
182<dd>the user defined context. </dd>
183
184<dd>  </dd>
185</dl>
186<h2><a href="../../api/MagickCore/image-view_8c.html" id="GetImageViewAuthenticMetacontent">GetImageViewAuthenticMetacontent</a></h2>
187
188<p>GetImageViewAuthenticMetacontent() returns the image view authentic meta-content.</p>
189
190<p>The format of the GetImageViewAuthenticPixels method is:</p>
191
192<pre class="text">
193void *GetImageViewAuthenticMetacontent(
194  const ImageView *image_view)
195</pre>
196
197<p>A description of each parameter follows:</p>
198
199<dd>
200</dd>
201
202<dd> </dd>
203<dl class="dl-horizontal">
204<dt>image_view</dt>
205<dd>the image view. </dd>
206
207<dd>  </dd>
208</dl>
209<h2><a href="../../api/MagickCore/image-view_8c.html" id="GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a></h2>
210
211<p>GetImageViewAuthenticPixels() returns the image view authentic pixels.</p>
212
213<p>The format of the GetImageViewAuthenticPixels method is:</p>
214
215<pre class="text">
216Quantum *GetImageViewAuthenticPixels(const ImageView *image_view)
217</pre>
218
219<p>A description of each parameter follows:</p>
220
221<dd>
222</dd>
223
224<dd> </dd>
225<dl class="dl-horizontal">
226<dt>image_view</dt>
227<dd>the image view. </dd>
228
229<dd>  </dd>
230</dl>
231<h2><a href="../../api/MagickCore/image-view_8c.html" id="GetImageViewException">GetImageViewException</a></h2>
232
233<p>GetImageViewException() returns the severity, reason, and description of any error that occurs when utilizing a image view.</p>
234
235<p>The format of the GetImageViewException method is:</p>
236
237<pre class="text">
238char *GetImageViewException(const PixelImage *image_view,
239  ExceptionType *severity)
240</pre>
241
242<p>A description of each parameter follows:</p>
243
244<dd>
245</dd>
246
247<dd> </dd>
248<dl class="dl-horizontal">
249<dt>image_view</dt>
250<dd>the pixel image_view. </dd>
251
252<dd> </dd>
253<dt>severity</dt>
254<dd>the severity of the error is returned here. </dd>
255
256<dd>  </dd>
257</dl>
258<h2><a href="../../api/MagickCore/image-view_8c.html" id="GetImageViewExtent">GetImageViewExtent</a></h2>
259
260<p>GetImageViewExtent() returns the image view extent.</p>
261
262<p>The format of the GetImageViewExtent method is:</p>
263
264<pre class="text">
265RectangleInfo GetImageViewExtent(const ImageView *image_view)
266</pre>
267
268<p>A description of each parameter follows:</p>
269
270<dd>
271</dd>
272
273<dd> </dd>
274<dl class="dl-horizontal">
275<dt>image_view</dt>
276<dd>the image view. </dd>
277
278<dd>  </dd>
279</dl>
280<h2><a href="../../api/MagickCore/image-view_8c.html" id="GetImageViewImage">GetImageViewImage</a></h2>
281
282<p>GetImageViewImage() returns the image associated with the image view.</p>
283
284<p>The format of the GetImageViewImage method is:</p>
285
286<pre class="text">
287MagickCore *GetImageViewImage(const ImageView *image_view)
288</pre>
289
290<p>A description of each parameter follows:</p>
291
292<dd>
293</dd>
294
295<dd> </dd>
296<dl class="dl-horizontal">
297<dt>image_view</dt>
298<dd>the image view. </dd>
299
300<dd>  </dd>
301</dl>
302<h2><a href="../../api/MagickCore/image-view_8c.html" id="GetImageViewIterator">GetImageViewIterator</a></h2>
303
304<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>
305
306<p>The callback signature is:</p>
307
308<pre class="text">
309MagickBooleanType GetImageViewMethod(const ImageView *source,
310  const ssize_t y,const int thread_id,void *context)
311</pre>
312
313<p>Use this pragma if the view is not single threaded:</p>
314
315<pre class="text">
316    #pragma omp critical
317</pre>
318
319<p>to define a section of code in your callback get method that must be executed by a single thread at a time.</p>
320
321<p>The format of the GetImageViewIterator method is:</p>
322
323<pre class="text">
324MagickBooleanType GetImageViewIterator(ImageView *source,
325  GetImageViewMethod get,void *context)
326</pre>
327
328<p>A description of each parameter follows:</p>
329
330<dd>
331</dd>
332
333<dd> </dd>
334<dl class="dl-horizontal">
335<dt>source</dt>
336<dd>the source image view. </dd>
337
338<dd> </dd>
339<dt>get</dt>
340<dd>the get callback method. </dd>
341
342<dd> </dd>
343<dt>context</dt>
344<dd>the user defined context. </dd>
345
346<dd>  </dd>
347</dl>
348<h2><a href="../../api/MagickCore/image-view_8c.html" id="GetImageViewVirtualMetacontent">GetImageViewVirtualMetacontent</a></h2>
349
350<p>GetImageViewVirtualMetacontent() returns the image view virtual meta-content.</p>
351
352<p>The format of the GetImageViewVirtualMetacontent method is:</p>
353
354<pre class="text">
355const void *GetImageViewVirtualMetacontent(
356  const ImageView *image_view)
357</pre>
358
359<p>A description of each parameter follows:</p>
360
361<dd>
362</dd>
363
364<dd> </dd>
365<dl class="dl-horizontal">
366<dt>image_view</dt>
367<dd>the image view. </dd>
368
369<dd>  </dd>
370</dl>
371<h2><a href="../../api/MagickCore/image-view_8c.html" id="GetImageViewVirtualPixels">GetImageViewVirtualPixels</a></h2>
372
373<p>GetImageViewVirtualPixels() returns the image view virtual pixels.</p>
374
375<p>The format of the GetImageViewVirtualPixels method is:</p>
376
377<pre class="text">
378const Quantum *GetImageViewVirtualPixels(const ImageView *image_view)
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>image_view</dt>
389<dd>the image view. </dd>
390
391<dd>  </dd>
392</dl>
393<h2><a href="../../api/MagickCore/image-view_8c.html" id="IsImageView">IsImageView</a></h2>
394
395<p>IsImageView() returns MagickTrue if the the parameter is verified as a image view object.</p>
396
397<p>The format of the IsImageView method is:</p>
398
399<pre class="text">
400MagickBooleanType IsImageView(const ImageView *image_view)
401</pre>
402
403<p>A description of each parameter follows:</p>
404
405<dd>
406</dd>
407
408<dd> </dd>
409<dl class="dl-horizontal">
410<dt>image_view</dt>
411<dd>the image view. </dd>
412
413<dd>  </dd>
414</dl>
415<h2><a href="../../api/MagickCore/image-view_8c.html" id="NewImageView">NewImageView</a></h2>
416
417<p>NewImageView() returns a image view required for all other methods in the Image View API.</p>
418
419<p>The format of the NewImageView method is:</p>
420
421<pre class="text">
422ImageView *NewImageView(MagickCore *wand,ExceptionInfo *exception)
423</pre>
424
425<p>A description of each parameter follows:</p>
426
427<dd>
428</dd>
429
430<dd> </dd>
431<dl class="dl-horizontal">
432<dt>image</dt>
433<dd>the image. </dd>
434
435<dd> </dd>
436<dt>exception</dt>
437<dd>return any errors or warnings in this structure. </dd>
438
439<dd>  </dd>
440</dl>
441<h2><a href="../../api/MagickCore/image-view_8c.html" id="NewImageViewRegion">NewImageViewRegion</a></h2>
442
443<p>NewImageViewRegion() returns a image view required for all other methods in the Image View API.</p>
444
445<p>The format of the NewImageViewRegion method is:</p>
446
447<pre class="text">
448ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
449  const ssize_t y,const size_t width,const size_t height,
450  ExceptionInfo *exception)
451</pre>
452
453<p>A description of each parameter follows:</p>
454
455<dd>
456</dd>
457
458<dd> </dd>
459<dl class="dl-horizontal">
460<dt>wand</dt>
461<dd>the magick wand. </dd>
462
463<dd> </dd>
464<dt>x,y,columns,rows</dt>
465<dd> These values define the perimeter of a extent of pixel_wands view. </dd>
466
467<dd> </dd>
468<dt>exception</dt>
469<dd>return any errors or warnings in this structure. </dd>
470
471<dd>  </dd>
472</dl>
473<h2><a href="../../api/MagickCore/image-view_8c.html" id="SetImageViewDescription">SetImageViewDescription</a></h2>
474
475<p>SetImageViewDescription() associates a description with an image view.</p>
476
477<p>The format of the SetImageViewDescription method is:</p>
478
479<pre class="text">
480void SetImageViewDescription(ImageView *image_view,
481  const char *description)
482</pre>
483
484<p>A description of each parameter follows:</p>
485
486<dd>
487</dd>
488
489<dd> </dd>
490<dl class="dl-horizontal">
491<dt>image_view</dt>
492<dd>the image view. </dd>
493
494<dd> </dd>
495<dt>description</dt>
496<dd>the image view description. </dd>
497
498<dd>  </dd>
499</dl>
500<h2><a href="../../api/MagickCore/image-view_8c.html" id="SetImageViewIterator">SetImageViewIterator</a></h2>
501
502<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>
503
504<p>The callback signature is:</p>
505
506<pre class="text">
507MagickBooleanType SetImageViewMethod(ImageView *destination,
508  const ssize_t y,const int thread_id,void *context)
509</pre>
510
511<p>Use this pragma if the view is not single threaded:</p>
512
513<pre class="text">
514    #pragma omp critical
515</pre>
516
517<p>to define a section of code in your callback set method that must be executed by a single thread at a time.</p>
518
519<p>The format of the SetImageViewIterator method is:</p>
520
521<pre class="text">
522MagickBooleanType SetImageViewIterator(ImageView *destination,
523  SetImageViewMethod set,void *context)
524</pre>
525
526<p>A description of each parameter follows:</p>
527
528<dd>
529</dd>
530
531<dd> </dd>
532<dl class="dl-horizontal">
533<dt>destination</dt>
534<dd>the image view. </dd>
535
536<dd> </dd>
537<dt>set</dt>
538<dd>the set callback method. </dd>
539
540<dd> </dd>
541<dt>context</dt>
542<dd>the user defined context. </dd>
543
544<dd>  </dd>
545</dl>
546<h2><a href="../../api/MagickCore/image-view_8c.html" id="TransferImageViewIterator">TransferImageViewIterator</a></h2>
547
548<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>
549
550<p>The callback signature is:</p>
551
552<pre class="text">
553MagickBooleanType TransferImageViewMethod(const ImageView *source,
554  ImageView *destination,const ssize_t y,const int thread_id,
555  void *context)
556</pre>
557
558<p>Use this pragma if the view is not single threaded:</p>
559
560<pre class="text">
561    #pragma omp critical
562</pre>
563
564<p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p>
565
566<p>The format of the TransferImageViewIterator method is:</p>
567
568<pre class="text">
569MagickBooleanType TransferImageViewIterator(ImageView *source,
570  ImageView *destination,TransferImageViewMethod transfer,void *context)
571</pre>
572
573<p>A description of each parameter follows:</p>
574
575<dd>
576</dd>
577
578<dd> </dd>
579<dl class="dl-horizontal">
580<dt>source</dt>
581<dd>the source image view. </dd>
582
583<dd> </dd>
584<dt>destination</dt>
585<dd>the destination image view. </dd>
586
587<dd> </dd>
588<dt>transfer</dt>
589<dd>the transfer callback method. </dd>
590
591<dd> </dd>
592<dt>context</dt>
593<dd>the user defined context. </dd>
594
595<dd>  </dd>
596</dl>
597<h2><a href="../../api/MagickCore/image-view_8c.html" id="UpdateImageViewIterator">UpdateImageViewIterator</a></h2>
598
599<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>
600
601<p>The callback signature is:</p>
602
603<pre class="text">
604MagickBooleanType UpdateImageViewMethod(ImageView *source,
605  const ssize_t y,const int thread_id,void *context)
606</pre>
607
608<p>Use this pragma if the view is not single threaded:</p>
609
610<pre class="text">
611    #pragma omp critical
612</pre>
613
614<p>to define a section of code in your callback update method that must be executed by a single thread at a time.</p>
615
616<p>The format of the UpdateImageViewIterator method is:</p>
617
618<pre class="text">
619MagickBooleanType UpdateImageViewIterator(ImageView *source,
620  UpdateImageViewMethod update,void *context)
621</pre>
622
623<p>A description of each parameter follows:</p>
624
625<dd>
626</dd>
627
628<dd> </dd>
629<dl class="dl-horizontal">
630<dt>source</dt>
631<dd>the source image view. </dd>
632
633<dd> </dd>
634<dt>update</dt>
635<dd>the update callback method. </dd>
636
637<dd> </dd>
638<dt>context</dt>
639<dd>the user defined context. </dd>
640
641<dd>  </dd>
642</dl>
643</div>
644    </div>
645  </main><!-- /.container -->
646  <footer class="magick-footer">
647    <p><a href="../../www/security-policy.html">Security</a> •
648    <a href="../../www/architecture.html">Architecture</a> •
649    <a href="../../www/links.html">Related</a> •
650     <a href="../../www/sitemap.html">Sitemap</a>
651
652    <a href="image-view.html#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../../images/wand.ico"/></a>
653
654    <a href="http://pgp.mit.edu/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
655    <a href="../../www/support.html">Donate</a> •
656    <a href="../../www/contact.html">Contact Us</a>
657    <br/>
658    <small>© 1999-2019 ImageMagick Studio LLC</small></p>
659  </footer>
660
661  <!-- Javascript assets -->
662  <script src="../assets/magick.js" crossorigin="anonymous"></script>
663  <script>window.jQuery || document.write('<script src="https://localhost/ajax/libs/jquery/3.3.1/jquery.min.js"><\/script>')</script>
664</body>
665</html>
666<!-- Magick Cache 31st December 2018 07:45 -->