blob: b7a1f9b0f1e21f0279aea9e62b8edcc1637c8c2d [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: MagickWand, C API for ImageMagick: Pixel Iterator 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="magickwc, api, for, imagemagick:, pixel, iterator, 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="pixel-iterator.html#ClearPixelIterator">ClearPixelIterator</a> &#8226; <a href="pixel-iterator.html#ClonePixelIterator">ClonePixelIterator</a> &#8226; <a href="pixel-iterator.html#DestroyPixelIterator">DestroyPixelIterator</a> &#8226; <a href="pixel-iterator.html#IsPixelIterator">IsPixelIterator</a> &#8226; <a href="pixel-iterator.html#NewPixelIterator">NewPixelIterator</a> &#8226; <a href="pixel-iterator.html#PixelClearIteratorException">PixelClearIteratorException</a> &#8226; <a href="pixel-iterator.html#NewPixelRegionIterator">NewPixelRegionIterator</a> &#8226; <a href="pixel-iterator.html#PixelGetCurrentIteratorRow">PixelGetCurrentIteratorRow</a> &#8226; <a href="pixel-iterator.html#PixelGetIteratorException">PixelGetIteratorException</a> &#8226; <a href="pixel-iterator.html#PixelGetIteratorExceptionType">PixelGetIteratorExceptionType</a> &#8226; <a href="pixel-iterator.html#PixelGetIteratorRow">PixelGetIteratorRow</a> &#8226; <a href="pixel-iterator.html#PixelGetNextIteratorRow">PixelGetNextIteratorRow</a> &#8226; <a href="pixel-iterator.html#PixelGetPreviousIteratorRow">PixelGetPreviousIteratorRow</a> &#8226; <a href="pixel-iterator.html#PixelResetIterator">PixelResetIterator</a> &#8226; <a href="pixel-iterator.html#PixelSetFirstIteratorRow">PixelSetFirstIteratorRow</a> &#8226; <a href="pixel-iterator.html#PixelSetIteratorRow">PixelSetIteratorRow</a> &#8226; <a href="pixel-iterator.html#PixelSetLastIteratorRow">PixelSetLastIteratorRow</a> &#8226; <a href="pixel-iterator.html#PixelSyncIterator">PixelSyncIterator</a></p>
cristy06f63f22012-10-31 00:50:07 +000056
Cristye93be682015-11-26 09:07:51 -050057<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="ClearPixelIterator">ClearPixelIterator</a></h2>
cristycecc9492015-06-09 16:53:50 +000058
59<p>ClearPixelIterator() clear resources associated with a PixelIterator.</p>
60
61<p>The format of the ClearPixelIterator method is:</p>
62
63<pre class="text">
64void ClearPixelIterator(PixelIterator *iterator)
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>iterator</dt>
75<dd>the pixel iterator. </dd>
76
77<dd> </dd>
78</dl>
Cristye93be682015-11-26 09:07:51 -050079<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="ClonePixelIterator">ClonePixelIterator</a></h2>
cristycecc9492015-06-09 16:53:50 +000080
81<p>ClonePixelIterator() makes an exact copy of the specified iterator.</p>
82
83<p>The format of the ClonePixelIterator method is:</p>
84
85<pre class="text">
86PixelIterator *ClonePixelIterator(const PixelIterator *iterator)
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>iterator</dt>
97<dd>the magick iterator. </dd>
98
99<dd> </dd>
100</dl>
Cristye93be682015-11-26 09:07:51 -0500101<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="DestroyPixelIterator">DestroyPixelIterator</a></h2>
cristycecc9492015-06-09 16:53:50 +0000102
103<p>DestroyPixelIterator() deallocates resources associated with a PixelIterator.</p>
104
105<p>The format of the DestroyPixelIterator method is:</p>
106
107<pre class="text">
108PixelIterator *DestroyPixelIterator(PixelIterator *iterator)
109</pre>
110
111<p>A description of each parameter follows:</p>
112
113<dd>
114</dd>
115
116<dd> </dd>
117<dl class="dl-horizontal">
118<dt>iterator</dt>
119<dd>the pixel iterator. </dd>
120
121<dd> </dd>
122</dl>
Cristye93be682015-11-26 09:07:51 -0500123<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="IsPixelIterator">IsPixelIterator</a></h2>
cristycecc9492015-06-09 16:53:50 +0000124
125<p>IsPixelIterator() returns MagickTrue if the iterator is verified as a pixel iterator.</p>
126
127<p>The format of the IsPixelIterator method is:</p>
128
129<pre class="text">
130MagickBooleanType IsPixelIterator(const PixelIterator *iterator)
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>iterator</dt>
141<dd>the magick iterator. </dd>
142
143<dd> </dd>
144</dl>
Cristye93be682015-11-26 09:07:51 -0500145<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="NewPixelIterator">NewPixelIterator</a></h2>
cristycecc9492015-06-09 16:53:50 +0000146
147<p>NewPixelIterator() returns a new pixel iterator.</p>
148
149<p>The format of the NewPixelIterator method is:</p>
150
151<pre class="text">
152PixelIterator *NewPixelIterator(MagickWand *wand)
153</pre>
154
155<p>A description of each parameter follows:</p>
156
157<dd>
158</dd>
159
160<dd> </dd>
161<dl class="dl-horizontal">
162<dt>wand</dt>
163<dd>the magick wand. </dd>
164
165<dd> </dd>
166</dl>
Cristye93be682015-11-26 09:07:51 -0500167<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelClearIteratorException">PixelClearIteratorException</a></h2>
cristycecc9492015-06-09 16:53:50 +0000168
169<p>PixelClearIteratorException() clear any exceptions associated with the iterator.</p>
170
171<p>The format of the PixelClearIteratorException method is:</p>
172
173<pre class="text">
174MagickBooleanType PixelClearIteratorException(PixelIterator *iterator)
175</pre>
176
177<p>A description of each parameter follows:</p>
178
179<dd>
180</dd>
181
182<dd> </dd>
183<dl class="dl-horizontal">
184<dt>iterator</dt>
185<dd>the pixel iterator. </dd>
186
187<dd> </dd>
188</dl>
Cristye93be682015-11-26 09:07:51 -0500189<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="NewPixelRegionIterator">NewPixelRegionIterator</a></h2>
cristycecc9492015-06-09 16:53:50 +0000190
191<p>NewPixelRegionIterator() returns a new pixel iterator.</p>
192
193<p>The format of the NewPixelRegionIterator method is:</p>
194
195<pre class="text">
196PixelIterator *NewPixelRegionIterator(MagickWand *wand,const ssize_t x,
197 const ssize_t y,const size_t width,const size_t height)
198</pre>
199
200<p>A description of each parameter follows:</p>
201
202<dd>
203</dd>
204
205<dd> </dd>
206<dl class="dl-horizontal">
207<dt>wand</dt>
208<dd>the magick wand. </dd>
209
210<dd> </dd>
211<dt>x,y,columns,rows</dt>
212<dd> These values define the perimeter of a region of pixels. </dd>
213
214<dd> </dd>
215</dl>
Cristye93be682015-11-26 09:07:51 -0500216<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelGetCurrentIteratorRow">PixelGetCurrentIteratorRow</a></h2>
cristycecc9492015-06-09 16:53:50 +0000217
218<p>PixelGetCurrentIteratorRow() returns the current row as an array of pixel wands from the pixel iterator.</p>
219
220<p>The format of the PixelGetCurrentIteratorRow method is:</p>
221
222<pre class="text">
223PixelWand **PixelGetCurrentIteratorRow(PixelIterator *iterator,
224 size_t *number_wands)
225</pre>
226
227<p>A description of each parameter follows:</p>
228
229<dd>
230</dd>
231
232<dd> </dd>
233<dl class="dl-horizontal">
234<dt>iterator</dt>
235<dd>the pixel iterator. </dd>
236
237<dd> </dd>
238<dt>number_wands</dt>
239<dd>the number of pixel wands. </dd>
240
241<dd> </dd>
242</dl>
Cristye93be682015-11-26 09:07:51 -0500243<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelGetIteratorException">PixelGetIteratorException</a></h2>
cristycecc9492015-06-09 16:53:50 +0000244
245<p>PixelGetIteratorException() returns the severity, reason, and description of any error that occurs when using other methods in this API.</p>
246
247<p>The format of the PixelGetIteratorException method is:</p>
248
249<pre class="text">
250char *PixelGetIteratorException(const PixelIterator *iterator,
251 ExceptionType *severity)
252</pre>
253
254<p>A description of each parameter follows:</p>
255
256<dd>
257</dd>
258
259<dd> </dd>
260<dl class="dl-horizontal">
261<dt>iterator</dt>
262<dd>the pixel iterator. </dd>
263
264<dd> </dd>
265<dt>severity</dt>
266<dd>the severity of the error is returned here. </dd>
267
268<dd> </dd>
269</dl>
Cristye93be682015-11-26 09:07:51 -0500270<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelGetIteratorExceptionType">PixelGetIteratorExceptionType</a></h2>
cristycecc9492015-06-09 16:53:50 +0000271
272<p>PixelGetIteratorExceptionType() the exception type associated with the iterator. If no exception has occurred, UndefinedExceptionType is returned.</p>
273
274<p>The format of the PixelGetIteratorExceptionType method is:</p>
275
276<pre class="text">
277ExceptionType PixelGetIteratorExceptionType(
278 const PixelIterator *iterator)
279</pre>
280
281<p>A description of each parameter follows:</p>
282
283<dd>
284</dd>
285
286<dd> </dd>
287<dl class="dl-horizontal">
288<dt>iterator</dt>
289<dd>the pixel iterator. </dd>
290
291<dd> </dd>
292</dl>
Cristye93be682015-11-26 09:07:51 -0500293<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelGetIteratorRow">PixelGetIteratorRow</a></h2>
cristycecc9492015-06-09 16:53:50 +0000294
295<p>PixelGetIteratorRow() returns the current pixel iterator row.</p>
296
297<p>The format of the PixelGetIteratorRow method is:</p>
298
299<pre class="text">
300MagickBooleanType PixelGetIteratorRow(PixelIterator *iterator)
301</pre>
302
303<p>A description of each parameter follows:</p>
304
305<dd>
306</dd>
307
308<dd> </dd>
309<dl class="dl-horizontal">
310<dt>iterator</dt>
311<dd>the pixel iterator. </dd>
312
313<dd> </dd>
314</dl>
Cristye93be682015-11-26 09:07:51 -0500315<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelGetNextIteratorRow">PixelGetNextIteratorRow</a></h2>
cristycecc9492015-06-09 16:53:50 +0000316
317<p>PixelGetNextIteratorRow() returns the next row as an array of pixel wands from the pixel iterator.</p>
318
319<p>The format of the PixelGetNextIteratorRow method is:</p>
320
321<pre class="text">
322PixelWand **PixelGetNextIteratorRow(PixelIterator *iterator,
323 size_t *number_wands)
324</pre>
325
326<p>A description of each parameter follows:</p>
327
328<dd>
329</dd>
330
331<dd> </dd>
332<dl class="dl-horizontal">
333<dt>iterator</dt>
334<dd>the pixel iterator. </dd>
335
336<dd> </dd>
337<dt>number_wands</dt>
338<dd>the number of pixel wands. </dd>
339
340<dd> </dd>
341</dl>
Cristye93be682015-11-26 09:07:51 -0500342<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelGetPreviousIteratorRow">PixelGetPreviousIteratorRow</a></h2>
cristycecc9492015-06-09 16:53:50 +0000343
344<p>PixelGetPreviousIteratorRow() returns the previous row as an array of pixel wands from the pixel iterator.</p>
345
346<p>The format of the PixelGetPreviousIteratorRow method is:</p>
347
348<pre class="text">
349PixelWand **PixelGetPreviousIteratorRow(PixelIterator *iterator,
350 size_t *number_wands)
351</pre>
352
353<p>A description of each parameter follows:</p>
354
355<dd>
356</dd>
357
358<dd> </dd>
359<dl class="dl-horizontal">
360<dt>iterator</dt>
361<dd>the pixel iterator. </dd>
362
363<dd> </dd>
364<dt>number_wands</dt>
365<dd>the number of pixel wands. </dd>
366
367<dd> </dd>
368</dl>
Cristye93be682015-11-26 09:07:51 -0500369<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelResetIterator">PixelResetIterator</a></h2>
cristycecc9492015-06-09 16:53:50 +0000370
371<p>PixelResetIterator() resets the pixel iterator. Use it in conjunction with PixelGetNextIteratorRow() to iterate over all the pixels in a pixel container.</p>
372
373<p>The format of the PixelResetIterator method is:</p>
374
375<pre class="text">
376void PixelResetIterator(PixelIterator *iterator)
377</pre>
378
379<p>A description of each parameter follows:</p>
380
381<dd>
382</dd>
383
384<dd> </dd>
385<dl class="dl-horizontal">
386<dt>iterator</dt>
387<dd>the pixel iterator. </dd>
388
389<dd> </dd>
390</dl>
Cristye93be682015-11-26 09:07:51 -0500391<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelSetFirstIteratorRow">PixelSetFirstIteratorRow</a></h2>
cristycecc9492015-06-09 16:53:50 +0000392
393<p>PixelSetFirstIteratorRow() sets the pixel iterator to the first pixel row.</p>
394
395<p>The format of the PixelSetFirstIteratorRow method is:</p>
396
397<pre class="text">
398void PixelSetFirstIteratorRow(PixelIterator *iterator)
399</pre>
400
401<p>A description of each parameter follows:</p>
402
403<dd>
404</dd>
405
406<dd> </dd>
407<dl class="dl-horizontal">
408<dt>iterator</dt>
409<dd>the magick iterator. </dd>
410
411<dd> </dd>
412</dl>
Cristye93be682015-11-26 09:07:51 -0500413<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelSetIteratorRow">PixelSetIteratorRow</a></h2>
cristycecc9492015-06-09 16:53:50 +0000414
415<p>PixelSetIteratorRow() set the pixel iterator row.</p>
416
417<p>The format of the PixelSetIteratorRow method is:</p>
418
419<pre class="text">
420MagickBooleanType PixelSetIteratorRow(PixelIterator *iterator,
421 const ssize_t row)
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>iterator</dt>
432<dd>the pixel iterator. </dd>
433
434<dd> </dd>
435</dl>
Cristye93be682015-11-26 09:07:51 -0500436<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelSetLastIteratorRow">PixelSetLastIteratorRow</a></h2>
cristycecc9492015-06-09 16:53:50 +0000437
438<p>PixelSetLastIteratorRow() sets the pixel iterator to the last pixel row.</p>
439
440<p>The format of the PixelSetLastIteratorRow method is:</p>
441
442<pre class="text">
443void PixelSetLastIteratorRow(PixelIterator *iterator)
444</pre>
445
446<p>A description of each parameter follows:</p>
447
448<dd>
449</dd>
450
451<dd> </dd>
452<dl class="dl-horizontal">
453<dt>iterator</dt>
454<dd>the magick iterator. </dd>
455
456<dd> </dd>
457</dl>
Cristye93be682015-11-26 09:07:51 -0500458<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelSyncIterator">PixelSyncIterator</a></h2>
cristycecc9492015-06-09 16:53:50 +0000459
460<p>PixelSyncIterator() syncs the pixel iterator.</p>
461
462<p>The format of the PixelSyncIterator method is:</p>
463
464<pre class="text">
465MagickBooleanType PixelSyncIterator(PixelIterator *iterator)
466</pre>
467
468<p>A description of each parameter follows:</p>
469
470<dd>
471</dd>
472
473<dd> </dd>
474<dl class="dl-horizontal">
475<dt>iterator</dt>
476<dd>the pixel iterator. </dd>
477
478<dd> </dd>
479</dl>
cristy06f63f22012-10-31 00:50:07 +0000480</div>
cristy44443b92015-05-05 00:06:07 +0000481 <footer class="magick-footer">
cristy29f2c972015-07-28 13:37:46 +0000482 <p><a href="../support.html">Donate</a>
483 <a href="../sitemap.html">Sitemap</a>
cristy38185362015-05-07 20:09:56 +0000484 <a href="../links.html">Related</a>
cristy29f2c972015-07-28 13:37:46 +0000485 <a href="../architecture.html">Architecture</a>
cristy44443b92015-05-05 00:06:07 +0000486</p>
487 <p><a href="pixel-iterator.html#">Back to top</a>
cristyea2793e2015-05-31 16:52:26 +0000488 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a>
cristy5b8fe762015-06-09 16:24:03 +0000489 <a href="http://nextgen.imagemagick.org/script/contact.php">Contact Us</a></p>
Cristyce4a3552015-12-14 13:53:35 -0500490 <p><small>© 1999-2015 ImageMagick Studio LLC</small></p>
cristy44443b92015-05-05 00:06:07 +0000491 </footer>
492</div><!-- /.container -->
cristy06f63f22012-10-31 00:50:07 +0000493
Cristye93be682015-11-26 09:07:51 -0500494 <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
cristy29f2c972015-07-28 13:37:46 +0000495 <script src="http://nextgen.imagemagick.org/js/magick.html"></script>
cristy44cbd482013-08-04 20:53:36 +0000496</div>
cristy06f63f22012-10-31 00:50:07 +0000497</body>
cristy5a367e42015-05-05 12:39:18 +0000498</html>