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>MagickWand, C API: Wand 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="magickwc, api:, wview, 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="wand-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="wand-view.html#CloneWandView">CloneWandView</a> • <a href="wand-view.html#DestroyWandView">DestroyWandView</a> • <a href="wand-view.html#DuplexTransferWandViewIterator">DuplexTransferWandViewIterator</a> • <a href="wand-view.html#GetWandViewException">GetWandViewException</a> • <a href="wand-view.html#GetWandViewExtent">GetWandViewExtent</a> • <a href="wand-view.html#GetWandViewIterator">GetWandViewIterator</a> • <a href="wand-view.html#GetWandViewPixels">GetWandViewPixels</a> • <a href="wand-view.html#GetWandViewWand">GetWandViewWand</a> • <a href="wand-view.html#IsWandView">IsWandView</a> • <a href="wand-view.html#NewWandView">NewWandView</a> • <a href="wand-view.html#NewWandViewExtent">NewWandViewExtent</a> • <a href="wand-view.html#SetWandViewDescription">SetWandViewDescription</a> • <a href="wand-view.html#SetWandViewIterator">SetWandViewIterator</a> • <a href="wand-view.html#TransferWandViewIterator">TransferWandViewIterator</a> • <a href="wand-view.html#UpdateWandViewIterator">UpdateWandViewIterator</a></p> 85 86 <h2><a href="../../api/MagickWand/wand-view_8c.html" id="CloneWandView">CloneWandView</a></h2> 87 88 <p>CloneWandView() makes a copy of the specified wand view.</p> 89 90 <p>The format of the CloneWandView method is:</p> 91 92 <pre class="text"> 93 WandView *CloneWandView(const WandView *wand_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>wand_view</dt> 104 <dd>the wand view. </dd> 105 106 <dd> </dd> 107 </dl> 108 <h2><a href="../../api/MagickWand/wand-view_8c.html" id="DestroyWandView">DestroyWandView</a></h2> 109 110 <p>DestroyWandView() deallocates memory associated with a wand view.</p> 111 112 <p>The format of the DestroyWandView method is:</p> 113 114 <pre class="text"> 115 WandView *DestroyWandView(WandView *wand_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>wand_view</dt> 126 <dd>the wand view. </dd> 127 128 <dd> </dd> 129 </dl> 130 <h2><a href="../../api/MagickWand/wand-view_8c.html" id="DuplexTransferWandViewIterator">DuplexTransferWandViewIterator</a></h2> 131 132 <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> 133 134 <p>The callback signature is:</p> 135 136 <pre class="text"> 137 MagickBooleanType DuplexTransferImageViewMethod(const WandView *source, 138 const WandView *duplex,WandView *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 DuplexTransferWandViewIterator method is:</p> 151 152 <pre class="text"> 153 MagickBooleanType DuplexTransferWandViewIterator(WandView *source, 154 WandView *duplex,WandView *destination, 155 DuplexTransferWandViewMethod 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 wand view. </dd> 167 168 <dd> </dd> 169 <dt>duplex</dt> 170 <dd>the duplex wand view. </dd> 171 172 <dd> </dd> 173 <dt>destination</dt> 174 <dd>the destination wand 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/MagickWand/wand-view_8c.html" id="GetWandViewException">GetWandViewException</a></h2> 187 188 <p>GetWandViewException() returns the severity, reason, and description of any error that occurs when utilizing a wand view.</p> 189 190 <p>The format of the GetWandViewException method is:</p> 191 192 <pre class="text"> 193 char *GetWandViewException(const WandView *wand_view, 194 ExceptionType *severity) 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>wand_view</dt> 205 <dd>the pixel wand_view. </dd> 206 207 <dd> </dd> 208 <dt>severity</dt> 209 <dd>the severity of the error is returned here. </dd> 210 211 <dd> </dd> 212 </dl> 213 <h2><a href="../../api/MagickWand/wand-view_8c.html" id="GetWandViewExtent">GetWandViewExtent</a></h2> 214 215 <p>GetWandViewExtent() returns the wand view extent.</p> 216 217 <p>The format of the GetWandViewExtent method is:</p> 218 219 <pre class="text"> 220 RectangleInfo GetWandViewExtent(const WandView *wand_view) 221 </pre> 222 223 <p>A description of each parameter follows:</p> 224 225 <dd> 226 </dd> 227 228 <dd> </dd> 229 <dl class="dl-horizontal"> 230 <dt>wand_view</dt> 231 <dd>the wand view. </dd> 232 233 <dd> </dd> 234 </dl> 235 <h2><a href="../../api/MagickWand/wand-view_8c.html" id="GetWandViewIterator">GetWandViewIterator</a></h2> 236 237 <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> 238 239 <p>The callback signature is:</p> 240 241 <pre class="text"> 242 MagickBooleanType GetImageViewMethod(const WandView *source, 243 const ssize_t y,const int thread_id,void *context) 244 </pre> 245 246 <p>Use this pragma if the view is not single threaded:</p> 247 248 <pre class="text"> 249 #pragma omp critical 250 </pre> 251 252 <p>to define a section of code in your callback get method that must be executed by a single thread at a time.</p> 253 254 <p>The format of the GetWandViewIterator method is:</p> 255 256 <pre class="text"> 257 MagickBooleanType GetWandViewIterator(WandView *source, 258 GetWandViewMethod get,void *context) 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>source</dt> 269 <dd>the source wand view. </dd> 270 271 <dd> </dd> 272 <dt>get</dt> 273 <dd>the get callback method. </dd> 274 275 <dd> </dd> 276 <dt>context</dt> 277 <dd>the user defined context. </dd> 278 279 <dd> </dd> 280 </dl> 281 <h2><a href="../../api/MagickWand/wand-view_8c.html" id="GetWandViewPixels">GetWandViewPixels</a></h2> 282 283 <p>GetWandViewPixels() returns the wand view pixel_wands.</p> 284 285 <p>The format of the GetWandViewPixels method is:</p> 286 287 <pre class="text"> 288 PixelWand *GetWandViewPixels(const WandView *wand_view) 289 </pre> 290 291 <p>A description of each parameter follows:</p> 292 293 <dd> 294 </dd> 295 296 <dd> </dd> 297 <dl class="dl-horizontal"> 298 <dt>wand_view</dt> 299 <dd>the wand view. </dd> 300 301 <dd> </dd> 302 </dl> 303 <h2><a href="../../api/MagickWand/wand-view_8c.html" id="GetWandViewWand">GetWandViewWand</a></h2> 304 305 <p>GetWandViewWand() returns the magick wand associated with the wand view.</p> 306 307 <p>The format of the GetWandViewWand method is:</p> 308 309 <pre class="text"> 310 MagickWand *GetWandViewWand(const WandView *wand_view) 311 </pre> 312 313 <p>A description of each parameter follows:</p> 314 315 <dd> 316 </dd> 317 318 <dd> </dd> 319 <dl class="dl-horizontal"> 320 <dt>wand_view</dt> 321 <dd>the wand view. </dd> 322 323 <dd> </dd> 324 </dl> 325 <h2><a href="../../api/MagickWand/wand-view_8c.html" id="IsWandView">IsWandView</a></h2> 326 327 <p>IsWandView() returns MagickTrue if the the parameter is verified as a wand view object.</p> 328 329 <p>The format of the IsWandView method is:</p> 330 331 <pre class="text"> 332 MagickBooleanType IsWandView(const WandView *wand_view) 333 </pre> 334 335 <p>A description of each parameter follows:</p> 336 337 <dd> 338 </dd> 339 340 <dd> </dd> 341 <dl class="dl-horizontal"> 342 <dt>wand_view</dt> 343 <dd>the wand view. </dd> 344 345 <dd> </dd> 346 </dl> 347 <h2><a href="../../api/MagickWand/wand-view_8c.html" id="NewWandView">NewWandView</a></h2> 348 349 <p>NewWandView() returns a wand view required for all other methods in the Wand View API.</p> 350 351 <p>The format of the NewWandView method is:</p> 352 353 <pre class="text"> 354 WandView *NewWandView(MagickWand *wand) 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>wand</dt> 365 <dd>the wand. </dd> 366 367 <dd> </dd> 368 </dl> 369 <h2><a href="../../api/MagickWand/wand-view_8c.html" id="NewWandViewExtent">NewWandViewExtent</a></h2> 370 371 <p>NewWandViewExtent() returns a wand view required for all other methods in the Wand View API.</p> 372 373 <p>The format of the NewWandViewExtent method is:</p> 374 375 <pre class="text"> 376 WandView *NewWandViewExtent(MagickWand *wand,const ssize_t x, 377 const ssize_t y,const size_t width,const size_t height) 378 </pre> 379 380 <p>A description of each parameter follows:</p> 381 382 <dd> 383 </dd> 384 385 <dd> </dd> 386 <dl class="dl-horizontal"> 387 <dt>wand</dt> 388 <dd>the magick wand. </dd> 389 390 <dd> </dd> 391 <dt>x,y,columns,rows</dt> 392 <dd> These values define the perimeter of a extent of pixel_wands view. </dd> 393 394 <dd> </dd> 395 </dl> 396 <h2><a href="../../api/MagickWand/wand-view_8c.html" id="SetWandViewDescription">SetWandViewDescription</a></h2> 397 398 <p>SetWandViewDescription() associates a description with an image view.</p> 399 400 <p>The format of the SetWandViewDescription method is:</p> 401 402 <pre class="text"> 403 void SetWandViewDescription(WandView *image_view,const char *description) 404 </pre> 405 406 <p>A description of each parameter follows:</p> 407 408 <dd> 409 </dd> 410 411 <dd> </dd> 412 <dl class="dl-horizontal"> 413 <dt>wand_view</dt> 414 <dd>the wand view. </dd> 415 416 <dd> </dd> 417 <dt>description</dt> 418 <dd>the wand view description. </dd> 419 420 <dd> </dd> 421 </dl> 422 <h2><a href="../../api/MagickWand/wand-view_8c.html" id="SetWandViewIterator">SetWandViewIterator</a></h2> 423 424 <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> 425 426 <p>The callback signature is:</p> 427 428 <pre class="text"> 429 MagickBooleanType SetImageViewMethod(ImageView *destination, 430 const ssize_t y,const int thread_id,void *context) 431 </pre> 432 433 <p>Use this pragma if the view is not single threaded:</p> 434 435 <pre class="text"> 436 #pragma omp critical 437 </pre> 438 439 <p>to define a section of code in your callback set method that must be executed by a single thread at a time.</p> 440 441 <p>The format of the SetWandViewIterator method is:</p> 442 443 <pre class="text"> 444 MagickBooleanType SetWandViewIterator(WandView *destination, 445 SetWandViewMethod set,void *context) 446 </pre> 447 448 <p>A description of each parameter follows:</p> 449 450 <dd> 451 </dd> 452 453 <dd> </dd> 454 <dl class="dl-horizontal"> 455 <dt>destination</dt> 456 <dd>the wand view. </dd> 457 458 <dd> </dd> 459 <dt>set</dt> 460 <dd>the set callback method. </dd> 461 462 <dd> </dd> 463 <dt>context</dt> 464 <dd>the user defined context. </dd> 465 466 <dd> </dd> 467 </dl> 468 <h2><a href="../../api/MagickWand/wand-view_8c.html" id="TransferWandViewIterator">TransferWandViewIterator</a></h2> 469 470 <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> 471 472 <p>The callback signature is:</p> 473 474 <pre class="text"> 475 MagickBooleanType TransferImageViewMethod(const WandView *source, 476 WandView *destination,const ssize_t y,const int thread_id, 477 void *context) 478 </pre> 479 480 <p>Use this pragma if the view is not single threaded:</p> 481 482 <pre class="text"> 483 #pragma omp critical 484 </pre> 485 486 <p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p> 487 488 <p>The format of the TransferWandViewIterator method is:</p> 489 490 <pre class="text"> 491 MagickBooleanType TransferWandViewIterator(WandView *source, 492 WandView *destination,TransferWandViewMethod transfer,void *context) 493 </pre> 494 495 <p>A description of each parameter follows:</p> 496 497 <dd> 498 </dd> 499 500 <dd> </dd> 501 <dl class="dl-horizontal"> 502 <dt>source</dt> 503 <dd>the source wand view. </dd> 504 505 <dd> </dd> 506 <dt>destination</dt> 507 <dd>the destination wand view. </dd> 508 509 <dd> </dd> 510 <dt>transfer</dt> 511 <dd>the transfer callback method. </dd> 512 513 <dd> </dd> 514 <dt>context</dt> 515 <dd>the user defined context. </dd> 516 517 <dd> </dd> 518 </dl> 519 <h2><a href="../../api/MagickWand/wand-view_8c.html" id="UpdateWandViewIterator">UpdateWandViewIterator</a></h2> 520 521 <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> 522 523 <p>The callback signature is:</p> 524 525 <pre class="text"> 526 MagickBooleanType UpdateImageViewMethod(WandView *source,const ssize_t y, 527 const int thread_id,void *context) 528 </pre> 529 530 <p>Use this pragma if the view is not single threaded:</p> 531 532 <pre class="text"> 533 #pragma omp critical 534 </pre> 535 536 <p>to define a section of code in your callback update method that must be executed by a single thread at a time.</p> 537 538 <p>The format of the UpdateWandViewIterator method is:</p> 539 540 <pre class="text"> 541 MagickBooleanType UpdateWandViewIterator(WandView *source, 542 UpdateWandViewMethod update,void *context) 543 </pre> 544 545 <p>A description of each parameter follows:</p> 546 547 <dd> 548 </dd> 549 550 <dd> </dd> 551 <dl class="dl-horizontal"> 552 <dt>source</dt> 553 <dd>the source wand view. </dd> 554 555 <dd> </dd> 556 <dt>update</dt> 557 <dd>the update callback method. </dd> 558 559 <dd> </dd> 560 <dt>context</dt> 561 <dd>the user defined context. </dd> 562 563 <dd> </dd> 564 </dl> 565 </div> 566 </div> 567 </main><!-- /.container --> 568 <footer class="magick-footer"> 569 <p><a href="../../www/security-policy.html">Security</a> 570 <a href="../../www/architecture.html">Architecture</a> 571 <a href="../../www/links.html">Related</a> 572 <a href="../../www/sitemap.html">Sitemap</a> 573 574 <a href="wand-view.html#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../../images/wand.ico"/></a> 575 576 <a href="http://pgp.mit.edu/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> 577 <a href="../../www/support.html">Donate</a> 578 <a href="../../www/contact.html">Contact Us</a> 579 <br/> 580 <small> 1999-2019 ImageMagick Studio LLC</small></p> 581 </footer> 582 583 <!-- Javascript assets --> 584 <script src="../assets/magick.js" crossorigin="anonymous"></script> 585 <script>window.jQuery || document.write('<script src="https://localhost/ajax/libs/jquery/3.3.1/jquery.min.js"><\/script>')</script> 586 </body> 587 </html> 588 <!-- Magick Cache 30th December 2018 04:25 -->