1 2 3 4 5<!DOCTYPE html> 6<html lang="en"> 7<head> 8 <title>ImageMagick: MagickWand, C API for ImageMagick: Pixel Iterator 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:, pixel, iterator, 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="pixel-iterator.html#ClearPixelIterator">ClearPixelIterator</a> • <a href="pixel-iterator.html#ClonePixelIterator">ClonePixelIterator</a> • <a href="pixel-iterator.html#DestroyPixelIterator">DestroyPixelIterator</a> • <a href="pixel-iterator.html#IsPixelIterator">IsPixelIterator</a> • <a href="pixel-iterator.html#NewPixelIterator">NewPixelIterator</a> • <a href="pixel-iterator.html#PixelClearIteratorException">PixelClearIteratorException</a> • <a href="pixel-iterator.html#NewPixelRegionIterator">NewPixelRegionIterator</a> • <a href="pixel-iterator.html#PixelGetCurrentIteratorRow">PixelGetCurrentIteratorRow</a> • <a href="pixel-iterator.html#PixelGetIteratorException">PixelGetIteratorException</a> • <a href="pixel-iterator.html#PixelGetIteratorExceptionType">PixelGetIteratorExceptionType</a> • <a href="pixel-iterator.html#PixelGetIteratorRow">PixelGetIteratorRow</a> • <a href="pixel-iterator.html#PixelGetNextIteratorRow">PixelGetNextIteratorRow</a> • <a href="pixel-iterator.html#PixelGetPreviousIteratorRow">PixelGetPreviousIteratorRow</a> • <a href="pixel-iterator.html#PixelResetIterator">PixelResetIterator</a> • <a href="pixel-iterator.html#PixelSetFirstIteratorRow">PixelSetFirstIteratorRow</a> • <a href="pixel-iterator.html#PixelSetIteratorRow">PixelSetIteratorRow</a> • <a href="pixel-iterator.html#PixelSetLastIteratorRow">PixelSetLastIteratorRow</a> • <a href="pixel-iterator.html#PixelSyncIterator">PixelSyncIterator</a></p> 60 61<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="ClearPixelIterator">ClearPixelIterator</a></h2> 62 63<p>ClearPixelIterator() clear resources associated with a PixelIterator.</p> 64 65<p>The format of the ClearPixelIterator method is:</p> 66 67<pre class="text"> 68void ClearPixelIterator(PixelIterator *iterator) 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>iterator</dt> 79<dd>the pixel iterator. </dd> 80 81<dd> </dd> 82</dl> 83<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="ClonePixelIterator">ClonePixelIterator</a></h2> 84 85<p>ClonePixelIterator() makes an exact copy of the specified iterator.</p> 86 87<p>The format of the ClonePixelIterator method is:</p> 88 89<pre class="text"> 90PixelIterator *ClonePixelIterator(const PixelIterator *iterator) 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>iterator</dt> 101<dd>the magick iterator. </dd> 102 103<dd> </dd> 104</dl> 105<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="DestroyPixelIterator">DestroyPixelIterator</a></h2> 106 107<p>DestroyPixelIterator() deallocates resources associated with a PixelIterator.</p> 108 109<p>The format of the DestroyPixelIterator method is:</p> 110 111<pre class="text"> 112PixelIterator *DestroyPixelIterator(PixelIterator *iterator) 113</pre> 114 115<p>A description of each parameter follows:</p> 116 117<dd> 118</dd> 119 120<dd> </dd> 121<dl class="dl-horizontal"> 122<dt>iterator</dt> 123<dd>the pixel iterator. </dd> 124 125<dd> </dd> 126</dl> 127<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="IsPixelIterator">IsPixelIterator</a></h2> 128 129<p>IsPixelIterator() returns MagickTrue if the iterator is verified as a pixel iterator.</p> 130 131<p>The format of the IsPixelIterator method is:</p> 132 133<pre class="text"> 134MagickBooleanType IsPixelIterator(const PixelIterator *iterator) 135</pre> 136 137<p>A description of each parameter follows:</p> 138 139<dd> 140</dd> 141 142<dd> </dd> 143<dl class="dl-horizontal"> 144<dt>iterator</dt> 145<dd>the magick iterator. </dd> 146 147<dd> </dd> 148</dl> 149<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="NewPixelIterator">NewPixelIterator</a></h2> 150 151<p>NewPixelIterator() returns a new pixel iterator.</p> 152 153<p>The format of the NewPixelIterator method is:</p> 154 155<pre class="text"> 156PixelIterator *NewPixelIterator(MagickWand *wand) 157</pre> 158 159<p>A description of each parameter follows:</p> 160 161<dd> 162</dd> 163 164<dd> </dd> 165<dl class="dl-horizontal"> 166<dt>wand</dt> 167<dd>the magick wand. </dd> 168 169<dd> </dd> 170</dl> 171<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelClearIteratorException">PixelClearIteratorException</a></h2> 172 173<p>PixelClearIteratorException() clear any exceptions associated with the iterator.</p> 174 175<p>The format of the PixelClearIteratorException method is:</p> 176 177<pre class="text"> 178MagickBooleanType PixelClearIteratorException(PixelIterator *iterator) 179</pre> 180 181<p>A description of each parameter follows:</p> 182 183<dd> 184</dd> 185 186<dd> </dd> 187<dl class="dl-horizontal"> 188<dt>iterator</dt> 189<dd>the pixel iterator. </dd> 190 191<dd> </dd> 192</dl> 193<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="NewPixelRegionIterator">NewPixelRegionIterator</a></h2> 194 195<p>NewPixelRegionIterator() returns a new pixel iterator.</p> 196 197<p>The format of the NewPixelRegionIterator method is:</p> 198 199<pre class="text"> 200PixelIterator *NewPixelRegionIterator(MagickWand *wand,const ssize_t x, 201 const ssize_t y,const size_t width,const size_t height) 202</pre> 203 204<p>A description of each parameter follows:</p> 205 206<dd> 207</dd> 208 209<dd> </dd> 210<dl class="dl-horizontal"> 211<dt>wand</dt> 212<dd>the magick wand. </dd> 213 214<dd> </dd> 215<dt>x,y,columns,rows</dt> 216<dd> These values define the perimeter of a region of pixels. </dd> 217 218<dd> </dd> 219</dl> 220<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelGetCurrentIteratorRow">PixelGetCurrentIteratorRow</a></h2> 221 222<p>PixelGetCurrentIteratorRow() returns the current row as an array of pixel wands from the pixel iterator.</p> 223 224<p>The format of the PixelGetCurrentIteratorRow method is:</p> 225 226<pre class="text"> 227PixelWand **PixelGetCurrentIteratorRow(PixelIterator *iterator, 228 size_t *number_wands) 229</pre> 230 231<p>A description of each parameter follows:</p> 232 233<dd> 234</dd> 235 236<dd> </dd> 237<dl class="dl-horizontal"> 238<dt>iterator</dt> 239<dd>the pixel iterator. </dd> 240 241<dd> </dd> 242<dt>number_wands</dt> 243<dd>the number of pixel wands. </dd> 244 245<dd> </dd> 246</dl> 247<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelGetIteratorException">PixelGetIteratorException</a></h2> 248 249<p>PixelGetIteratorException() returns the severity, reason, and description of any error that occurs when using other methods in this API.</p> 250 251<p>The format of the PixelGetIteratorException method is:</p> 252 253<pre class="text"> 254char *PixelGetIteratorException(const PixelIterator *iterator, 255 ExceptionType *severity) 256</pre> 257 258<p>A description of each parameter follows:</p> 259 260<dd> 261</dd> 262 263<dd> </dd> 264<dl class="dl-horizontal"> 265<dt>iterator</dt> 266<dd>the pixel iterator. </dd> 267 268<dd> </dd> 269<dt>severity</dt> 270<dd>the severity of the error is returned here. </dd> 271 272<dd> </dd> 273</dl> 274<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelGetIteratorExceptionType">PixelGetIteratorExceptionType</a></h2> 275 276<p>PixelGetIteratorExceptionType() the exception type associated with the iterator. If no exception has occurred, UndefinedExceptionType is returned.</p> 277 278<p>The format of the PixelGetIteratorExceptionType method is:</p> 279 280<pre class="text"> 281ExceptionType PixelGetIteratorExceptionType( 282 const PixelIterator *iterator) 283</pre> 284 285<p>A description of each parameter follows:</p> 286 287<dd> 288</dd> 289 290<dd> </dd> 291<dl class="dl-horizontal"> 292<dt>iterator</dt> 293<dd>the pixel iterator. </dd> 294 295<dd> </dd> 296</dl> 297<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelGetIteratorRow">PixelGetIteratorRow</a></h2> 298 299<p>PixelGetIteratorRow() returns the current pixel iterator row.</p> 300 301<p>The format of the PixelGetIteratorRow method is:</p> 302 303<pre class="text"> 304MagickBooleanType PixelGetIteratorRow(PixelIterator *iterator) 305</pre> 306 307<p>A description of each parameter follows:</p> 308 309<dd> 310</dd> 311 312<dd> </dd> 313<dl class="dl-horizontal"> 314<dt>iterator</dt> 315<dd>the pixel iterator. </dd> 316 317<dd> </dd> 318</dl> 319<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelGetNextIteratorRow">PixelGetNextIteratorRow</a></h2> 320 321<p>PixelGetNextIteratorRow() returns the next row as an array of pixel wands from the pixel iterator.</p> 322 323<p>The format of the PixelGetNextIteratorRow method is:</p> 324 325<pre class="text"> 326PixelWand **PixelGetNextIteratorRow(PixelIterator *iterator, 327 size_t *number_wands) 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>iterator</dt> 338<dd>the pixel iterator. </dd> 339 340<dd> </dd> 341<dt>number_wands</dt> 342<dd>the number of pixel wands. </dd> 343 344<dd> </dd> 345</dl> 346<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelGetPreviousIteratorRow">PixelGetPreviousIteratorRow</a></h2> 347 348<p>PixelGetPreviousIteratorRow() returns the previous row as an array of pixel wands from the pixel iterator.</p> 349 350<p>The format of the PixelGetPreviousIteratorRow method is:</p> 351 352<pre class="text"> 353PixelWand **PixelGetPreviousIteratorRow(PixelIterator *iterator, 354 size_t *number_wands) 355</pre> 356 357<p>A description of each parameter follows:</p> 358 359<dd> 360</dd> 361 362<dd> </dd> 363<dl class="dl-horizontal"> 364<dt>iterator</dt> 365<dd>the pixel iterator. </dd> 366 367<dd> </dd> 368<dt>number_wands</dt> 369<dd>the number of pixel wands. </dd> 370 371<dd> </dd> 372</dl> 373<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelResetIterator">PixelResetIterator</a></h2> 374 375<p>PixelResetIterator() resets the pixel iterator. Use it in conjunction with PixelGetNextIteratorRow() to iterate over all the pixels in a pixel container.</p> 376 377<p>The format of the PixelResetIterator method is:</p> 378 379<pre class="text"> 380void PixelResetIterator(PixelIterator *iterator) 381</pre> 382 383<p>A description of each parameter follows:</p> 384 385<dd> 386</dd> 387 388<dd> </dd> 389<dl class="dl-horizontal"> 390<dt>iterator</dt> 391<dd>the pixel iterator. </dd> 392 393<dd> </dd> 394</dl> 395<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelSetFirstIteratorRow">PixelSetFirstIteratorRow</a></h2> 396 397<p>PixelSetFirstIteratorRow() sets the pixel iterator to the first pixel row.</p> 398 399<p>The format of the PixelSetFirstIteratorRow method is:</p> 400 401<pre class="text"> 402void PixelSetFirstIteratorRow(PixelIterator *iterator) 403</pre> 404 405<p>A description of each parameter follows:</p> 406 407<dd> 408</dd> 409 410<dd> </dd> 411<dl class="dl-horizontal"> 412<dt>iterator</dt> 413<dd>the magick iterator. </dd> 414 415<dd> </dd> 416</dl> 417<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelSetIteratorRow">PixelSetIteratorRow</a></h2> 418 419<p>PixelSetIteratorRow() set the pixel iterator row.</p> 420 421<p>The format of the PixelSetIteratorRow method is:</p> 422 423<pre class="text"> 424MagickBooleanType PixelSetIteratorRow(PixelIterator *iterator, 425 const ssize_t row) 426</pre> 427 428<p>A description of each parameter follows:</p> 429 430<dd> 431</dd> 432 433<dd> </dd> 434<dl class="dl-horizontal"> 435<dt>iterator</dt> 436<dd>the pixel iterator. </dd> 437 438<dd> </dd> 439</dl> 440<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelSetLastIteratorRow">PixelSetLastIteratorRow</a></h2> 441 442<p>PixelSetLastIteratorRow() sets the pixel iterator to the last pixel row.</p> 443 444<p>The format of the PixelSetLastIteratorRow method is:</p> 445 446<pre class="text"> 447void PixelSetLastIteratorRow(PixelIterator *iterator) 448</pre> 449 450<p>A description of each parameter follows:</p> 451 452<dd> 453</dd> 454 455<dd> </dd> 456<dl class="dl-horizontal"> 457<dt>iterator</dt> 458<dd>the magick iterator. </dd> 459 460<dd> </dd> 461</dl> 462<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-iterator_8c.html" id="PixelSyncIterator">PixelSyncIterator</a></h2> 463 464<p>PixelSyncIterator() syncs the pixel iterator.</p> 465 466<p>The format of the PixelSyncIterator method is:</p> 467 468<pre class="text"> 469MagickBooleanType PixelSyncIterator(PixelIterator *iterator) 470</pre> 471 472<p>A description of each parameter follows:</p> 473 474<dd> 475</dd> 476 477<dd> </dd> 478<dl class="dl-horizontal"> 479<dt>iterator</dt> 480<dd>the pixel iterator. </dd> 481 482<dd> </dd> 483</dl> 484</div> 485 <footer class="magick-footer"> 486 <p><a href="/support.html">Donate</a> • 487 <a href="/sitemap.html">Sitemap</a> • 488 <a href="/links.html">Related</a> • 489 <a href="/architecture.html">Architecture</a> 490</p> 491 <p><a href="pixel-iterator.html#">Back to top</a> • 492 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> • 493 <a href="http://www.imagemagick.org/script/contact.php">Contact Us</a></p> 494 <p><small>© 1999-2016 ImageMagick Studio LLC</small></p> 495 </footer> 496</div><!-- /.container --> 497 498 <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script> 499 <script src="/js/magick.html"></script> 500</div> 501</body> 502</html> 503