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