1 2 3 4 5 <!DOCTYPE html> 6 <html lang="en"> 7 <head> 8 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" /> 9 <title>ImageMagick: MagickCore, C API for ImageMagick: Image View Methods</title> 10 <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 Bzier curves."/> 13 <meta name="application-url" content="http://www.imagemagick.org"/> 14 <meta name="generator" content="PHP"/> 15 <meta name="keywords" content="magickcore, c, api, for, imagemagick:, 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-2016 ImageMagick Studio LLC"/> 23 <meta name="distribution" content="Global"/> 24 <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/> 25 <link rel="icon" href="../image/wand.png"/> 26 <link rel="shortcut icon" href="../image/wand.ico"/> 27 <link rel="stylesheet" href="../css/magick.php"/> 28 </head> 29 <body> 30 <div class="main"> 31 <div class="magick-masthead"> 32 <div class="container"> 33 <script async="async" src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" 34 style="display:block" 35 data-ad-client="ca-pub-3129977114552745" 36 data-ad-slot="6345125851" 37 data-ad-format="auto"></ins> 38 <script> 39 (adsbygoogle = window.adsbygoogle || []).push({}); 40 </script> 41 <nav class="magick-nav"> 42 <a class="magick-nav-item " href="../index.php">Home</a> 43 <a class="magick-nav-item " href="../script/binary-releases.php">Download</a> 44 <a class="magick-nav-item " href="../script/command-line-tools.php">Tools</a> 45 <a class="magick-nav-item " href="../script/command-line-options.php">Options</a> 46 <a class="magick-nav-item " href="../script/resources.php">Resources</a> 47 <a class="magick-nav-item " href="../script/api.php">Develop</a> 48 <a class="magick-nav-item " href="../script/search.php">Search</a> 49 <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a> 50 </nav> 51 </div> 52 </div> 53 <div class="container"> 54 <div class="magick-header"> 55 <p class="text-center"><a href="image-view.php#CloneImageView">CloneImageView</a> • <a href="image-view.php#DestroyImageView">DestroyImageView</a> • <a href="image-view.php#DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a> • <a href="image-view.php#GetImageViewAuthenticMetacontent">GetImageViewAuthenticMetacontent</a> • <a href="image-view.php#GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a> • <a href="image-view.php#GetImageViewException">GetImageViewException</a> • <a href="image-view.php#GetImageViewExtent">GetImageViewExtent</a> • <a href="image-view.php#GetImageViewImage">GetImageViewImage</a> • <a href="image-view.php#GetImageViewIterator">GetImageViewIterator</a> • <a href="image-view.php#GetImageViewVirtualMetacontent">GetImageViewVirtualMetacontent</a> • <a href="image-view.php#GetImageViewVirtualPixels">GetImageViewVirtualPixels</a> • <a href="image-view.php#IsImageView">IsImageView</a> • <a href="image-view.php#NewImageView">NewImageView</a> • <a href="image-view.php#NewImageViewRegion">NewImageViewRegion</a> • <a href="image-view.php#SetImageViewDescription">SetImageViewDescription</a> • <a href="image-view.php#SetImageViewIterator">SetImageViewIterator</a> • <a href="image-view.php#TransferImageViewIterator">TransferImageViewIterator</a> • <a href="image-view.php#UpdateImageViewIterator">UpdateImageViewIterator</a></p> 56 57 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image-view_8c.html" id="CloneImageView">CloneImageView</a></h2> 58 59 <p>CloneImageView() makes a copy of the specified image view.</p> 60 61 <p>The format of the CloneImageView method is:</p> 62 63 <pre class="text"> 64 ImageView *CloneImageView(const ImageView *image_view) 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>image_view</dt> 75 <dd>the image view. </dd> 76 77 <dd> </dd> 78 </dl> 79 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image-view_8c.html" id="DestroyImageView">DestroyImageView</a></h2> 80 81 <p>DestroyImageView() deallocates memory associated with a image view.</p> 82 83 <p>The format of the DestroyImageView method is:</p> 84 85 <pre class="text"> 86 ImageView *DestroyImageView(ImageView *image_view) 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>image_view</dt> 97 <dd>the image view. </dd> 98 99 <dd> </dd> 100 </dl> 101 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image-view_8c.html" id="DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a></h2> 102 103 <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> 104 105 <p>The callback signature is:</p> 106 107 <pre class="text"> 108 MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source, 109 const ImageView *duplex,ImageView *destination,const ssize_t y, 110 const int thread_id,void *context) 111 </pre> 112 113 <p>Use this pragma if the view is not single threaded:</p> 114 115 <pre class="text"> 116 #pragma omp critical 117 </pre> 118 119 <p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p> 120 121 <p>The format of the DuplexTransferImageViewIterator method is:</p> 122 123 <pre class="text"> 124 MagickBooleanType DuplexTransferImageViewIterator(ImageView *source, 125 ImageView *duplex,ImageView *destination, 126 DuplexTransferImageViewMethod transfer,void *context) 127 </pre> 128 129 <p>A description of each parameter follows:</p> 130 131 <dd> 132 </dd> 133 134 <dd> </dd> 135 <dl class="dl-horizontal"> 136 <dt>source</dt> 137 <dd>the source image view. </dd> 138 139 <dd> </dd> 140 <dt>duplex</dt> 141 <dd>the duplex image view. </dd> 142 143 <dd> </dd> 144 <dt>destination</dt> 145 <dd>the destination image view. </dd> 146 147 <dd> </dd> 148 <dt>transfer</dt> 149 <dd>the transfer callback method. </dd> 150 151 <dd> </dd> 152 <dt>context</dt> 153 <dd>the user defined context. </dd> 154 155 <dd> </dd> 156 </dl> 157 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewAuthenticMetacontent">GetImageViewAuthenticMetacontent</a></h2> 158 159 <p>GetImageViewAuthenticMetacontent() returns the image view authentic meta-content.</p> 160 161 <p>The format of the GetImageViewAuthenticPixels method is:</p> 162 163 <pre class="text"> 164 void *GetImageViewAuthenticMetacontent( 165 const ImageView *image_view) 166 </pre> 167 168 <p>A description of each parameter follows:</p> 169 170 <dd> 171 </dd> 172 173 <dd> </dd> 174 <dl class="dl-horizontal"> 175 <dt>image_view</dt> 176 <dd>the image view. </dd> 177 178 <dd> </dd> 179 </dl> 180 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a></h2> 181 182 <p>GetImageViewAuthenticPixels() returns the image view authentic pixels.</p> 183 184 <p>The format of the GetImageViewAuthenticPixels method is:</p> 185 186 <pre class="text"> 187 Quantum *GetImageViewAuthenticPixels(const ImageView *image_view) 188 </pre> 189 190 <p>A description of each parameter follows:</p> 191 192 <dd> 193 </dd> 194 195 <dd> </dd> 196 <dl class="dl-horizontal"> 197 <dt>image_view</dt> 198 <dd>the image view. </dd> 199 200 <dd> </dd> 201 </dl> 202 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewException">GetImageViewException</a></h2> 203 204 <p>GetImageViewException() returns the severity, reason, and description of any error that occurs when utilizing a image view.</p> 205 206 <p>The format of the GetImageViewException method is:</p> 207 208 <pre class="text"> 209 char *GetImageViewException(const PixelImage *image_view, 210 ExceptionType *severity) 211 </pre> 212 213 <p>A description of each parameter follows:</p> 214 215 <dd> 216 </dd> 217 218 <dd> </dd> 219 <dl class="dl-horizontal"> 220 <dt>image_view</dt> 221 <dd>the pixel image_view. </dd> 222 223 <dd> </dd> 224 <dt>severity</dt> 225 <dd>the severity of the error is returned here. </dd> 226 227 <dd> </dd> 228 </dl> 229 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewExtent">GetImageViewExtent</a></h2> 230 231 <p>GetImageViewExtent() returns the image view extent.</p> 232 233 <p>The format of the GetImageViewExtent method is:</p> 234 235 <pre class="text"> 236 RectangleInfo GetImageViewExtent(const ImageView *image_view) 237 </pre> 238 239 <p>A description of each parameter follows:</p> 240 241 <dd> 242 </dd> 243 244 <dd> </dd> 245 <dl class="dl-horizontal"> 246 <dt>image_view</dt> 247 <dd>the image view. </dd> 248 249 <dd> </dd> 250 </dl> 251 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewImage">GetImageViewImage</a></h2> 252 253 <p>GetImageViewImage() returns the image associated with the image view.</p> 254 255 <p>The format of the GetImageViewImage method is:</p> 256 257 <pre class="text"> 258 MagickCore *GetImageViewImage(const ImageView *image_view) 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>image_view</dt> 269 <dd>the image view. </dd> 270 271 <dd> </dd> 272 </dl> 273 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewIterator">GetImageViewIterator</a></h2> 274 275 <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> 276 277 <p>The callback signature is:</p> 278 279 <pre class="text"> 280 MagickBooleanType GetImageViewMethod(const ImageView *source, 281 const ssize_t y,const int thread_id,void *context) 282 </pre> 283 284 <p>Use this pragma if the view is not single threaded:</p> 285 286 <pre class="text"> 287 #pragma omp critical 288 </pre> 289 290 <p>to define a section of code in your callback get method that must be executed by a single thread at a time.</p> 291 292 <p>The format of the GetImageViewIterator method is:</p> 293 294 <pre class="text"> 295 MagickBooleanType GetImageViewIterator(ImageView *source, 296 GetImageViewMethod get,void *context) 297 </pre> 298 299 <p>A description of each parameter follows:</p> 300 301 <dd> 302 </dd> 303 304 <dd> </dd> 305 <dl class="dl-horizontal"> 306 <dt>source</dt> 307 <dd>the source image view. </dd> 308 309 <dd> </dd> 310 <dt>get</dt> 311 <dd>the get callback method. </dd> 312 313 <dd> </dd> 314 <dt>context</dt> 315 <dd>the user defined context. </dd> 316 317 <dd> </dd> 318 </dl> 319 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewVirtualMetacontent">GetImageViewVirtualMetacontent</a></h2> 320 321 <p>GetImageViewVirtualMetacontent() returns the image view virtual meta-content.</p> 322 323 <p>The format of the GetImageViewVirtualMetacontent method is:</p> 324 325 <pre class="text"> 326 const void *GetImageViewVirtualMetacontent( 327 const ImageView *image_view) 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>image_view</dt> 338 <dd>the image view. </dd> 339 340 <dd> </dd> 341 </dl> 342 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewVirtualPixels">GetImageViewVirtualPixels</a></h2> 343 344 <p>GetImageViewVirtualPixels() returns the image view virtual pixels.</p> 345 346 <p>The format of the GetImageViewVirtualPixels method is:</p> 347 348 <pre class="text"> 349 const Quantum *GetImageViewVirtualPixels(const ImageView *image_view) 350 </pre> 351 352 <p>A description of each parameter follows:</p> 353 354 <dd> 355 </dd> 356 357 <dd> </dd> 358 <dl class="dl-horizontal"> 359 <dt>image_view</dt> 360 <dd>the image view. </dd> 361 362 <dd> </dd> 363 </dl> 364 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image-view_8c.html" id="IsImageView">IsImageView</a></h2> 365 366 <p>IsImageView() returns MagickTrue if the the parameter is verified as a image view object.</p> 367 368 <p>The format of the IsImageView method is:</p> 369 370 <pre class="text"> 371 MagickBooleanType IsImageView(const ImageView *image_view) 372 </pre> 373 374 <p>A description of each parameter follows:</p> 375 376 <dd> 377 </dd> 378 379 <dd> </dd> 380 <dl class="dl-horizontal"> 381 <dt>image_view</dt> 382 <dd>the image view. </dd> 383 384 <dd> </dd> 385 </dl> 386 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image-view_8c.html" id="NewImageView">NewImageView</a></h2> 387 388 <p>NewImageView() returns a image view required for all other methods in the Image View API.</p> 389 390 <p>The format of the NewImageView method is:</p> 391 392 <pre class="text"> 393 ImageView *NewImageView(MagickCore *wand,ExceptionInfo *exception) 394 </pre> 395 396 <p>A description of each parameter follows:</p> 397 398 <dd> 399 </dd> 400 401 <dd> </dd> 402 <dl class="dl-horizontal"> 403 <dt>image</dt> 404 <dd>the image. </dd> 405 406 <dd> </dd> 407 <dt>exception</dt> 408 <dd>return any errors or warnings in this structure. </dd> 409 410 <dd> </dd> 411 </dl> 412 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image-view_8c.html" id="NewImageViewRegion">NewImageViewRegion</a></h2> 413 414 <p>NewImageViewRegion() returns a image view required for all other methods in the Image View API.</p> 415 416 <p>The format of the NewImageViewRegion method is:</p> 417 418 <pre class="text"> 419 ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x, 420 const ssize_t y,const size_t width,const size_t height, 421 ExceptionInfo *exception) 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>wand</dt> 432 <dd>the magick wand. </dd> 433 434 <dd> </dd> 435 <dt>x,y,columns,rows</dt> 436 <dd> These values define the perimeter of a extent of pixel_wands view. </dd> 437 438 <dd> </dd> 439 <dt>exception</dt> 440 <dd>return any errors or warnings in this structure. </dd> 441 442 <dd> </dd> 443 </dl> 444 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image-view_8c.html" id="SetImageViewDescription">SetImageViewDescription</a></h2> 445 446 <p>SetImageViewDescription() associates a description with an image view.</p> 447 448 <p>The format of the SetImageViewDescription method is:</p> 449 450 <pre class="text"> 451 void SetImageViewDescription(ImageView *image_view, 452 const char *description) 453 </pre> 454 455 <p>A description of each parameter follows:</p> 456 457 <dd> 458 </dd> 459 460 <dd> </dd> 461 <dl class="dl-horizontal"> 462 <dt>image_view</dt> 463 <dd>the image view. </dd> 464 465 <dd> </dd> 466 <dt>description</dt> 467 <dd>the image view description. </dd> 468 469 <dd> </dd> 470 </dl> 471 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image-view_8c.html" id="SetImageViewIterator">SetImageViewIterator</a></h2> 472 473 <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> 474 475 <p>The callback signature is:</p> 476 477 <pre class="text"> 478 MagickBooleanType SetImageViewMethod(ImageView *destination, 479 const ssize_t y,const int thread_id,void *context) 480 </pre> 481 482 <p>Use this pragma if the view is not single threaded:</p> 483 484 <pre class="text"> 485 #pragma omp critical 486 </pre> 487 488 <p>to define a section of code in your callback set method that must be executed by a single thread at a time.</p> 489 490 <p>The format of the SetImageViewIterator method is:</p> 491 492 <pre class="text"> 493 MagickBooleanType SetImageViewIterator(ImageView *destination, 494 SetImageViewMethod set,void *context) 495 </pre> 496 497 <p>A description of each parameter follows:</p> 498 499 <dd> 500 </dd> 501 502 <dd> </dd> 503 <dl class="dl-horizontal"> 504 <dt>destination</dt> 505 <dd>the image view. </dd> 506 507 <dd> </dd> 508 <dt>set</dt> 509 <dd>the set callback method. </dd> 510 511 <dd> </dd> 512 <dt>context</dt> 513 <dd>the user defined context. </dd> 514 515 <dd> </dd> 516 </dl> 517 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image-view_8c.html" id="TransferImageViewIterator">TransferImageViewIterator</a></h2> 518 519 <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> 520 521 <p>The callback signature is:</p> 522 523 <pre class="text"> 524 MagickBooleanType TransferImageViewMethod(const ImageView *source, 525 ImageView *destination,const ssize_t y,const int thread_id, 526 void *context) 527 </pre> 528 529 <p>Use this pragma if the view is not single threaded:</p> 530 531 <pre class="text"> 532 #pragma omp critical 533 </pre> 534 535 <p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p> 536 537 <p>The format of the TransferImageViewIterator method is:</p> 538 539 <pre class="text"> 540 MagickBooleanType TransferImageViewIterator(ImageView *source, 541 ImageView *destination,TransferImageViewMethod transfer,void *context) 542 </pre> 543 544 <p>A description of each parameter follows:</p> 545 546 <dd> 547 </dd> 548 549 <dd> </dd> 550 <dl class="dl-horizontal"> 551 <dt>source</dt> 552 <dd>the source image view. </dd> 553 554 <dd> </dd> 555 <dt>destination</dt> 556 <dd>the destination image view. </dd> 557 558 <dd> </dd> 559 <dt>transfer</dt> 560 <dd>the transfer callback method. </dd> 561 562 <dd> </dd> 563 <dt>context</dt> 564 <dd>the user defined context. </dd> 565 566 <dd> </dd> 567 </dl> 568 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image-view_8c.html" id="UpdateImageViewIterator">UpdateImageViewIterator</a></h2> 569 570 <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> 571 572 <p>The callback signature is:</p> 573 574 <pre class="text"> 575 MagickBooleanType UpdateImageViewMethod(ImageView *source, 576 const ssize_t y,const int thread_id,void *context) 577 </pre> 578 579 <p>Use this pragma if the view is not single threaded:</p> 580 581 <pre class="text"> 582 #pragma omp critical 583 </pre> 584 585 <p>to define a section of code in your callback update method that must be executed by a single thread at a time.</p> 586 587 <p>The format of the UpdateImageViewIterator method is:</p> 588 589 <pre class="text"> 590 MagickBooleanType UpdateImageViewIterator(ImageView *source, 591 UpdateImageViewMethod update,void *context) 592 </pre> 593 594 <p>A description of each parameter follows:</p> 595 596 <dd> 597 </dd> 598 599 <dd> </dd> 600 <dl class="dl-horizontal"> 601 <dt>source</dt> 602 <dd>the source image view. </dd> 603 604 <dd> </dd> 605 <dt>update</dt> 606 <dd>the update callback method. </dd> 607 608 <dd> </dd> 609 <dt>context</dt> 610 <dd>the user defined context. </dd> 611 612 <dd> </dd> 613 </dl> 614 </div> 615 <footer class="magick-footer"> 616 <p><a href="../script/support.php">Donate</a> 617 <a href="../script/sitemap.php">Sitemap</a> 618 <a href="../script/links.php">Related</a> 619 <a href="../script/architecture.php">Architecture</a> 620 </p> 621 <p><a href="image-view.php#">Back to top</a> 622 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> 623 <a href="../script/contact.php">Contact Us</a></p> 624 <p><small> 1999-2016 ImageMagick Studio LLC</small></p> 625 </footer> 626 </div><!-- /.container --> 627 628 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> 629 <script src="http://nextgen.imagemagick.org/js/magick.php"></script> 630 </div> 631 </body> 632 </html> 633