1 2 3 4 5 <!DOCTYPE html> 6 <html lang="en"> 7 <head> 8 <title>ImageMagick: MagickCore, C API for ImageMagick: Image 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 Bzier curves."/> 15 <meta name="application-url" content="http://www.imagemagick.org"/> 16 <meta name="generator" content="PHP"/> 17 <meta name="keywords" content="magickcore, c, api, for, imagemagick:, image, 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="image.html#AcquireImage">AcquireImage</a> • <a href="image.html#AcquireImageInfo">AcquireImageInfo</a> • <a href="image.html#AcquireNextImage">AcquireNextImage</a> • <a href="image.html#AppendImages">AppendImages</a> • <a href="image.html#CatchImageException">CatchImageException</a> • <a href="image.html#ClipImagePath">ClipImagePath</a> • <a href="image.html#CloneImage">CloneImage</a> • <a href="image.html#CloneImageInfo">CloneImageInfo</a> • <a href="image.html#CopyImagePixels">CopyImagePixels</a> • <a href="image.html#DestroyImage">DestroyImage</a> • <a href="image.html#DestroyImageInfo">DestroyImageInfo</a> • <a href="image.html#GetImageInfo">GetImageInfo</a> • <a href="image.html#GetImageInfoFile">GetImageInfoFile</a> • <a href="image.html#GetImageMask">GetImageMask</a> • <a href="image.html#GetImageVirtualPixelMethod">GetImageVirtualPixelMethod</a> • <a href="image.html#InterpretImageFilename">InterpretImageFilename</a> • <a href="image.html#IsHighDynamicRangeImage">IsHighDynamicRangeImage</a> • <a href="image.html#IsImageObject">IsImageObject</a> • <a href="image.html#IsTaintImage">IsTaintImage</a> • <a href="image.html#ModifyImage">ModifyImage</a> • <a href="image.html#NewMagickImage">NewMagickImage</a> • <a href="image.html#ReferenceImage">ReferenceImage</a> • <a href="image.html#ResetImagePage">ResetImagePage</a> • <a href="image.html#SetImageBackgroundColor">SetImageBackgroundColor</a> • <a href="image.html#SetImageChannelMask">SetImageChannelMask</a> • <a href="image.html#SetImageColor">SetImageColor</a> • <a href="image.html#SetImageStorageClass">SetImageStorageClass</a> • <a href="image.html#SetImageExtent">SetImageExtent</a> • <a href="image.html#SetImageInfoBlob">SetImageInfoBlob</a> • <a href="image.html#SetImageInfoFile">SetImageInfoFile</a> • <a href="image.html#SetImageMask">SetImageMask</a> • <a href="image.html#SetImageAlpha">SetImageAlpha</a> • <a href="image.html#SetImageVirtualPixelMethod">SetImageVirtualPixelMethod</a> • <a href="image.html#SmushImages">SmushImages</a> • <a href="image.html#StripImage">StripImage</a> • <a href="image.html#SyncImageSettings">SyncImageSettings</a></p> 60 61 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="AcquireImage">AcquireImage</a></h2> 62 63 <p>AcquireImage() returns a pointer to an image structure initialized to default values.</p> 64 65 <p>The format of the AcquireImage method is:</p> 66 67 <pre class="text"> 68 Image *AcquireImage(const ImageInfo *image_info,ExceptionInfo *exception) 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>image_info</dt> 79 <dd>Many of the image default values are set from this structure. For example, filename, compression, depth, background color, and others. </dd> 80 81 <dd> </dd> 82 <dt>exception</dt> 83 <dd>return any errors or warnings in this structure. </dd> 84 85 <dd> </dd> 86 </dl> 87 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="AcquireImageInfo">AcquireImageInfo</a></h2> 88 89 <p>AcquireImageInfo() allocates the ImageInfo structure.</p> 90 91 <p>The format of the AcquireImageInfo method is:</p> 92 93 <pre class="text"> 94 ImageInfo *AcquireImageInfo(void) 95 </pre> 96 97 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="AcquireNextImage">AcquireNextImage</a></h2> 98 99 <p>AcquireNextImage() initializes the next image in a sequence to default values. The next member of image points to the newly allocated image. If there is a memory shortage, next is assigned NULL.</p> 100 101 <p>The format of the AcquireNextImage method is:</p> 102 103 <pre class="text"> 104 void AcquireNextImage(const ImageInfo *image_info,Image *image, 105 ExceptionInfo *exception) 106 </pre> 107 108 <p>A description of each parameter follows:</p> 109 110 <dd> 111 </dd> 112 113 <dd> </dd> 114 <dl class="dl-horizontal"> 115 <dt>image_info</dt> 116 <dd>Many of the image default values are set from this structure. For example, filename, compression, depth, background color, and others. </dd> 117 118 <dd> </dd> 119 <dt>image</dt> 120 <dd>the image. </dd> 121 122 <dd> </dd> 123 <dt>exception</dt> 124 <dd>return any errors or warnings in this structure. </dd> 125 126 <dd> </dd> 127 </dl> 128 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="AppendImages">AppendImages</a></h2> 129 130 <p>AppendImages() takes all images from the current image pointer to the end of the image list and appends them to each other top-to-bottom if the stack parameter is true, otherwise left-to-right.</p> 131 132 <p>The current gravity setting effects how the image is justified in the final image.</p> 133 134 <p>The format of the AppendImages method is:</p> 135 136 <pre class="text"> 137 Image *AppendImages(const Image *images,const MagickBooleanType stack, 138 ExceptionInfo *exception) 139 </pre> 140 141 <p>A description of each parameter follows:</p> 142 143 <dd> 144 </dd> 145 146 <dd> </dd> 147 <dl class="dl-horizontal"> 148 <dt>images</dt> 149 <dd>the image sequence. </dd> 150 151 <dd> </dd> 152 <dt>stack</dt> 153 <dd>A value other than 0 stacks the images top-to-bottom. </dd> 154 155 <dd> </dd> 156 <dt>exception</dt> 157 <dd>return any errors or warnings in this structure. </dd> 158 159 <dd> </dd> 160 </dl> 161 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="CatchImageException">CatchImageException</a></h2> 162 163 <p>CatchImageException() returns if no exceptions are found in the image sequence, otherwise it determines the most severe exception and reports it as a warning or error depending on the severity.</p> 164 165 <p>The format of the CatchImageException method is:</p> 166 167 <pre class="text"> 168 ExceptionType CatchImageException(Image *image) 169 </pre> 170 171 <p>A description of each parameter follows:</p> 172 173 <dd> 174 </dd> 175 176 <dd> </dd> 177 <dl class="dl-horizontal"> 178 <dt>image</dt> 179 <dd>An image sequence. </dd> 180 181 <dd> </dd> 182 </dl> 183 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="ClipImagePath">ClipImagePath</a></h2> 184 185 <p>ClipImagePath() sets the image clip mask based any clipping path information if it exists.</p> 186 187 <p>The format of the ClipImagePath method is:</p> 188 189 <pre class="text"> 190 MagickBooleanType ClipImagePath(Image *image,const char *pathname, 191 const MagickBooleanType inside,ExceptionInfo *exception) 192 </pre> 193 194 <p>A description of each parameter follows:</p> 195 196 <dd> 197 </dd> 198 199 <dd> </dd> 200 <dl class="dl-horizontal"> 201 <dt>image</dt> 202 <dd>the image. </dd> 203 204 <dd> </dd> 205 <dt>pathname</dt> 206 <dd>name of clipping path resource. If name is preceded by #, use clipping path numbered by name. </dd> 207 208 <dd> </dd> 209 <dt>inside</dt> 210 <dd>if non-zero, later operations take effect inside clipping path. Otherwise later operations take effect outside clipping path. </dd> 211 212 <dd> </dd> 213 <dt>exception</dt> 214 <dd>return any errors or warnings in this structure. </dd> 215 216 <dd> </dd> 217 </dl> 218 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="CloneImage">CloneImage</a></h2> 219 220 <p>CloneImage() copies an image and returns the copy as a new image object.</p> 221 222 <p>If the specified columns and rows is 0, an exact copy of the image is returned, otherwise the pixel data is undefined and must be initialized with the QueueAuthenticPixels() and SyncAuthenticPixels() methods. On failure, a NULL image is returned and exception describes the reason for the failure.</p> 223 224 <p>The format of the CloneImage method is:</p> 225 226 <pre class="text"> 227 Image *CloneImage(const Image *image,const size_t columns, 228 const size_t rows,const MagickBooleanType orphan, 229 ExceptionInfo *exception) 230 </pre> 231 232 <p>A description of each parameter follows:</p> 233 234 <dd> 235 </dd> 236 237 <dd> </dd> 238 <dl class="dl-horizontal"> 239 <dt>image</dt> 240 <dd>the image. </dd> 241 242 <dd> </dd> 243 <dt>columns</dt> 244 <dd>the number of columns in the cloned image. </dd> 245 246 <dd> </dd> 247 <dt>rows</dt> 248 <dd>the number of rows in the cloned image. </dd> 249 250 <dd> </dd> 251 <dt>detach</dt> 252 <dd> With a value other than 0, the cloned image is detached from its parent I/O stream. </dd> 253 254 <dd> </dd> 255 <dt>exception</dt> 256 <dd>return any errors or warnings in this structure. </dd> 257 258 <dd> </dd> 259 </dl> 260 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="CloneImageInfo">CloneImageInfo</a></h2> 261 262 <p>CloneImageInfo() makes a copy of the given image info structure. If NULL is specified, a new image info structure is created initialized to default values.</p> 263 264 <p>The format of the CloneImageInfo method is:</p> 265 266 <pre class="text"> 267 ImageInfo *CloneImageInfo(const ImageInfo *image_info) 268 </pre> 269 270 <p>A description of each parameter follows:</p> 271 272 <dd> 273 </dd> 274 275 <dd> </dd> 276 <dl class="dl-horizontal"> 277 <dt>image_info</dt> 278 <dd>the image info. </dd> 279 280 <dd> </dd> 281 </dl> 282 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="CopyImagePixels">CopyImagePixels</a></h2> 283 284 <p>CopyImagePixels() copies pixels from the source image as defined by the geometry the destination image at the specified offset.</p> 285 286 <p>The format of the CopyImagePixels method is:</p> 287 288 <pre class="text"> 289 MagickBooleanType CopyImagePixels(Image *image,const Image *source_image, 290 const RectangleInfo *geometry,const OffsetInfo *offset, 291 ExceptionInfo *exception); 292 </pre> 293 294 <p>A description of each parameter follows:</p> 295 296 <dd> 297 </dd> 298 299 <dd> </dd> 300 <dl class="dl-horizontal"> 301 <dt>image</dt> 302 <dd>the destination image. </dd> 303 304 <dd> </dd> 305 <dt>source_image</dt> 306 <dd>the source image. </dd> 307 308 <dd> </dd> 309 <dt>geometry</dt> 310 <dd>define the dimensions of the source pixel rectangle. </dd> 311 312 <dd> </dd> 313 <dt>offset</dt> 314 <dd>define the offset in the destination image. </dd> 315 316 <dd> </dd> 317 <dt>exception</dt> 318 <dd>return any errors or warnings in this structure. </dd> 319 320 <dd> </dd> 321 </dl> 322 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="DestroyImage">DestroyImage</a></h2> 323 324 <p>DestroyImage() dereferences an image, deallocating memory associated with the image if the reference count becomes zero.</p> 325 326 <p>The format of the DestroyImage method is:</p> 327 328 <pre class="text"> 329 Image *DestroyImage(Image *image) 330 </pre> 331 332 <p>A description of each parameter follows:</p> 333 334 <dd> 335 </dd> 336 337 <dd> </dd> 338 <dl class="dl-horizontal"> 339 <dt>image</dt> 340 <dd>the image. </dd> 341 342 <dd> </dd> 343 </dl> 344 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="DestroyImageInfo">DestroyImageInfo</a></h2> 345 346 <p>DestroyImageInfo() deallocates memory associated with an ImageInfo structure.</p> 347 348 <p>The format of the DestroyImageInfo method is:</p> 349 350 <pre class="text"> 351 ImageInfo *DestroyImageInfo(ImageInfo *image_info) 352 </pre> 353 354 <p>A description of each parameter follows:</p> 355 356 <dd> 357 </dd> 358 359 <dd> </dd> 360 <dl class="dl-horizontal"> 361 <dt>image_info</dt> 362 <dd>the image info. </dd> 363 364 <dd> </dd> 365 </dl> 366 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="GetImageInfo">GetImageInfo</a></h2> 367 368 <p>GetImageInfo() initializes image_info to default values.</p> 369 370 <p>The format of the GetImageInfo method is:</p> 371 372 <pre class="text"> 373 void GetImageInfo(ImageInfo *image_info) 374 </pre> 375 376 <p>A description of each parameter follows:</p> 377 378 <dd> 379 </dd> 380 381 <dd> </dd> 382 <dl class="dl-horizontal"> 383 <dt>image_info</dt> 384 <dd>the image info. </dd> 385 386 <dd> </dd> 387 </dl> 388 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="GetImageInfoFile">GetImageInfoFile</a></h2> 389 390 <p>GetImageInfoFile() returns the image info file member.</p> 391 392 <p>The format of the GetImageInfoFile method is:</p> 393 394 <pre class="text"> 395 FILE *GetImageInfoFile(const ImageInfo *image_info) 396 </pre> 397 398 <p>A description of each parameter follows:</p> 399 400 <dd> 401 </dd> 402 403 <dd> </dd> 404 <dl class="dl-horizontal"> 405 <dt>image_info</dt> 406 <dd>the image info. </dd> 407 408 <dd> </dd> 409 </dl> 410 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="GetImageMask">GetImageMask</a></h2> 411 412 <p>GetImageMask() returns the mask associated with the image.</p> 413 414 <p>The format of the GetImageMask method is:</p> 415 416 <pre class="text"> 417 Image *GetImageMask(const Image *image,const PixelMask type, 418 ExceptionInfo *exception) 419 </pre> 420 421 <p>A description of each parameter follows:</p> 422 423 <dd> 424 </dd> 425 426 <dd> </dd> 427 <dl class="dl-horizontal"> 428 <dt>image</dt> 429 <dd>the image. </dd> 430 431 <dd> </dd> 432 <dt>type</dt> 433 <dd>the mask type, ReadPixelMask or WritePixelMask. </dd> 434 435 <dd> </dd> 436 </dl> 437 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="GetImageVirtualPixelMethod">GetImageVirtualPixelMethod</a></h2> 438 439 <p>GetImageVirtualPixelMethod() gets the "virtual pixels" method for the image. A virtual pixel is any pixel access that is outside the boundaries of the image cache.</p> 440 441 <p>The format of the GetImageVirtualPixelMethod() method is:</p> 442 443 <pre class="text"> 444 VirtualPixelMethod GetImageVirtualPixelMethod(const Image *image) 445 </pre> 446 447 <p>A description of each parameter follows:</p> 448 449 <dd> 450 </dd> 451 452 <dd> </dd> 453 <dl class="dl-horizontal"> 454 <dt>image</dt> 455 <dd>the image. </dd> 456 457 <dd> </dd> 458 </dl> 459 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="InterpretImageFilename">InterpretImageFilename</a></h2> 460 461 <p>InterpretImageFilename() interprets embedded characters in an image filename. The filename length is returned.</p> 462 463 <p>The format of the InterpretImageFilename method is:</p> 464 465 <pre class="text"> 466 size_t InterpretImageFilename(const ImageInfo *image_info,Image *image, 467 const char *format,int value,char *filename,ExceptionInfo *exception) 468 </pre> 469 470 <p>A description of each parameter follows.</p> 471 472 <dt>image_info</dt> 473 <p>the image info..</p> 474 475 <dt>image</dt> 476 <p>the image.</p> 477 478 <dt>format</dt> 479 <p>A filename describing the format to use to write the numeric argument. Only the first numeric format identifier is replaced.</p> 480 481 <dt>value</dt> 482 <p>Numeric value to substitute into format filename.</p> 483 484 <dt>filename</dt> 485 <p>return the formatted filename in this character buffer.</p> 486 487 <dt>exception</dt> 488 <p>return any errors or warnings in this structure.</p> 489 490 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="IsHighDynamicRangeImage">IsHighDynamicRangeImage</a></h2> 491 492 <p>IsHighDynamicRangeImage() returns MagickTrue if any pixel component is non-integer or exceeds the bounds of the quantum depth (e.g. for Q16 0..65535.</p> 493 494 <p>The format of the IsHighDynamicRangeImage method is:</p> 495 496 <pre class="text"> 497 MagickBooleanType IsHighDynamicRangeImage(const Image *image, 498 ExceptionInfo *exception) 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>image</dt> 509 <dd>the image. </dd> 510 511 <dd> </dd> 512 <dt>exception</dt> 513 <dd>return any errors or warnings in this structure. </dd> 514 515 <dd> </dd> 516 </dl> 517 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="IsImageObject">IsImageObject</a></h2> 518 519 <p>IsImageObject() returns MagickTrue if the image sequence contains a valid set of image objects.</p> 520 521 <p>The format of the IsImageObject method is:</p> 522 523 <pre class="text"> 524 MagickBooleanType IsImageObject(const Image *image) 525 </pre> 526 527 <p>A description of each parameter follows:</p> 528 529 <dd> 530 </dd> 531 532 <dd> </dd> 533 <dl class="dl-horizontal"> 534 <dt>image</dt> 535 <dd>the image. </dd> 536 537 <dd> </dd> 538 </dl> 539 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="IsTaintImage">IsTaintImage</a></h2> 540 541 <p>IsTaintImage() returns MagickTrue any pixel in the image has been altered since it was first constituted.</p> 542 543 <p>The format of the IsTaintImage method is:</p> 544 545 <pre class="text"> 546 MagickBooleanType IsTaintImage(const Image *image) 547 </pre> 548 549 <p>A description of each parameter follows:</p> 550 551 <dd> 552 </dd> 553 554 <dd> </dd> 555 <dl class="dl-horizontal"> 556 <dt>image</dt> 557 <dd>the image. </dd> 558 559 <dd> </dd> 560 </dl> 561 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="ModifyImage">ModifyImage</a></h2> 562 563 <p>ModifyImage() ensures that there is only a single reference to the image to be modified, updating the provided image pointer to point to a clone of the original image if necessary.</p> 564 565 <p>The format of the ModifyImage method is:</p> 566 567 <pre class="text"> 568 MagickBooleanType ModifyImage(Image *image,ExceptionInfo *exception) 569 </pre> 570 571 <p>A description of each parameter follows:</p> 572 573 <dd> 574 </dd> 575 576 <dd> </dd> 577 <dl class="dl-horizontal"> 578 <dt>image</dt> 579 <dd>the image. </dd> 580 581 <dd> </dd> 582 <dt>exception</dt> 583 <dd>return any errors or warnings in this structure. </dd> 584 585 <dd> </dd> 586 </dl> 587 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="NewMagickImage">NewMagickImage</a></h2> 588 589 <p>NewMagickImage() creates a blank image canvas of the specified size and background color.</p> 590 591 <p>The format of the NewMagickImage method is:</p> 592 593 <pre class="text"> 594 Image *NewMagickImage(const ImageInfo *image_info,const size_t width, 595 const size_t height,const PixelInfo *background, 596 ExceptionInfo *exception) 597 </pre> 598 599 <p>A description of each parameter follows:</p> 600 601 <dd> 602 </dd> 603 604 <dd> </dd> 605 <dl class="dl-horizontal"> 606 <dt>image</dt> 607 <dd>the image. </dd> 608 609 <dd> </dd> 610 <dt>width</dt> 611 <dd>the image width. </dd> 612 613 <dd> </dd> 614 <dt>height</dt> 615 <dd>the image height. </dd> 616 617 <dd> </dd> 618 <dt>background</dt> 619 <dd>the image color. </dd> 620 621 <dd> </dd> 622 <dt>exception</dt> 623 <dd>return any errors or warnings in this structure. </dd> 624 625 <dd> </dd> 626 </dl> 627 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="ReferenceImage">ReferenceImage</a></h2> 628 629 <p>ReferenceImage() increments the reference count associated with an image returning a pointer to the image.</p> 630 631 <p>The format of the ReferenceImage method is:</p> 632 633 <pre class="text"> 634 Image *ReferenceImage(Image *image) 635 </pre> 636 637 <p>A description of each parameter follows:</p> 638 639 <dd> 640 </dd> 641 642 <dd> </dd> 643 <dl class="dl-horizontal"> 644 <dt>image</dt> 645 <dd>the image. </dd> 646 647 <dd> </dd> 648 </dl> 649 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="ResetImagePage">ResetImagePage</a></h2> 650 651 <p>ResetImagePage() resets the image page canvas and position.</p> 652 653 <p>The format of the ResetImagePage method is:</p> 654 655 <pre class="text"> 656 MagickBooleanType ResetImagePage(Image *image,const char *page) 657 </pre> 658 659 <p>A description of each parameter follows:</p> 660 661 <dd> 662 </dd> 663 664 <dd> </dd> 665 <dl class="dl-horizontal"> 666 <dt>image</dt> 667 <dd>the image. </dd> 668 669 <dd> </dd> 670 <dt>page</dt> 671 <dd>the relative page specification. </dd> 672 673 <dd> </dd> 674 </dl> 675 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageBackgroundColor">SetImageBackgroundColor</a></h2> 676 677 <p>SetImageBackgroundColor() initializes the image pixels to the image background color. The background color is defined by the background_color member of the image structure.</p> 678 679 <p>The format of the SetImage method is:</p> 680 681 <pre class="text"> 682 MagickBooleanType SetImageBackgroundColor(Image *image, 683 ExceptionInfo *exception) 684 </pre> 685 686 <p>A description of each parameter follows:</p> 687 688 <dd> 689 </dd> 690 691 <dd> </dd> 692 <dl class="dl-horizontal"> 693 <dt>image</dt> 694 <dd>the image. </dd> 695 696 <dd> </dd> 697 <dt>exception</dt> 698 <dd>return any errors or warnings in this structure. </dd> 699 700 <dd> </dd> 701 </dl> 702 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageChannelMask">SetImageChannelMask</a></h2> 703 704 <p>SetImageChannelMask() sets the image channel mask from the specified channel mask.</p> 705 706 <p>The format of the SetImageChannelMask method is:</p> 707 708 <pre class="text"> 709 ChannelType SetImageChannelMask(Image *image, 710 const ChannelType channel_mask) 711 </pre> 712 713 <p>A description of each parameter follows:</p> 714 715 <dd> 716 </dd> 717 718 <dd> </dd> 719 <dl class="dl-horizontal"> 720 <dt>image</dt> 721 <dd>the image. </dd> 722 723 <dd> </dd> 724 <dt>channel_mask</dt> 725 <dd>the channel mask. </dd> 726 727 <dd> </dd> 728 </dl> 729 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageColor">SetImageColor</a></h2> 730 731 <p>SetImageColor() set the entire image canvas to the specified color.</p> 732 733 <p>The format of the SetImageColor method is:</p> 734 735 <pre class="text"> 736 MagickBooleanType SetImageColor(Image *image,const PixelInfo *color, 737 ExeptionInfo *exception) 738 </pre> 739 740 <p>A description of each parameter follows:</p> 741 742 <dd> 743 </dd> 744 745 <dd> </dd> 746 <dl class="dl-horizontal"> 747 <dt>image</dt> 748 <dd>the image. </dd> 749 750 <dd> </dd> 751 <dt>background</dt> 752 <dd>the image color. </dd> 753 754 <dd> </dd> 755 <dt>exception</dt> 756 <dd>return any errors or warnings in this structure. </dd> 757 758 <dd> </dd> 759 </dl> 760 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageStorageClass">SetImageStorageClass</a></h2> 761 762 <p>SetImageStorageClass() sets the image class: DirectClass for true color images or PseudoClass for colormapped images.</p> 763 764 <p>The format of the SetImageStorageClass method is:</p> 765 766 <pre class="text"> 767 MagickBooleanType SetImageStorageClass(Image *image, 768 const ClassType storage_class,ExceptionInfo *exception) 769 </pre> 770 771 <p>A description of each parameter follows:</p> 772 773 <dd> 774 </dd> 775 776 <dd> </dd> 777 <dl class="dl-horizontal"> 778 <dt>image</dt> 779 <dd>the image. </dd> 780 781 <dd> </dd> 782 <dt>storage_class</dt> 783 <dd> The image class. </dd> 784 785 <dd> </dd> 786 <dt>exception</dt> 787 <dd>return any errors or warnings in this structure. </dd> 788 789 <dd> </dd> 790 </dl> 791 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageExtent">SetImageExtent</a></h2> 792 793 <p>SetImageExtent() sets the image size (i.e. columns & rows).</p> 794 795 <p>The format of the SetImageExtent method is:</p> 796 797 <pre class="text"> 798 MagickBooleanType SetImageExtent(Image *image,const size_t columns, 799 const size_t rows,ExceptionInfo *exception) 800 </pre> 801 802 <p>A description of each parameter follows:</p> 803 804 <dd> 805 </dd> 806 807 <dd> </dd> 808 <dl class="dl-horizontal"> 809 <dt>image</dt> 810 <dd>the image. </dd> 811 812 <dd> </dd> 813 <dt>columns</dt> 814 <dd> The image width in pixels. </dd> 815 816 <dd> </dd> 817 <dt>rows</dt> 818 <dd> The image height in pixels. </dd> 819 820 <dd> </dd> 821 <dt>exception</dt> 822 <dd>return any errors or warnings in this structure. </dd> 823 824 <dd> </dd> 825 </dl> 826 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageInfoBlob">SetImageInfoBlob</a></h2> 827 828 <p>SetImageInfoBlob() sets the image info blob member.</p> 829 830 <p>The format of the SetImageInfoBlob method is:</p> 831 832 <pre class="text"> 833 void SetImageInfoBlob(ImageInfo *image_info,const void *blob, 834 const size_t length) 835 </pre> 836 837 <p>A description of each parameter follows:</p> 838 839 <dd> 840 </dd> 841 842 <dd> </dd> 843 <dl class="dl-horizontal"> 844 <dt>image_info</dt> 845 <dd>the image info. </dd> 846 847 <dd> </dd> 848 <dt>blob</dt> 849 <dd>the blob. </dd> 850 851 <dd> </dd> 852 <dt>length</dt> 853 <dd>the blob length. </dd> 854 855 <dd> </dd> 856 </dl> 857 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageInfoFile">SetImageInfoFile</a></h2> 858 859 <p>SetImageInfoFile() sets the image info file member.</p> 860 861 <p>The format of the SetImageInfoFile method is:</p> 862 863 <pre class="text"> 864 void SetImageInfoFile(ImageInfo *image_info,FILE *file) 865 </pre> 866 867 <p>A description of each parameter follows:</p> 868 869 <dd> 870 </dd> 871 872 <dd> </dd> 873 <dl class="dl-horizontal"> 874 <dt>image_info</dt> 875 <dd>the image info. </dd> 876 877 <dd> </dd> 878 <dt>file</dt> 879 <dd>the file. </dd> 880 881 <dd> </dd> 882 </dl> 883 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageMask">SetImageMask</a></h2> 884 885 <p>SetImageMask() associates a mask with the image. The mask must be the same dimensions as the image.</p> 886 887 <p>The format of the SetImageMask method is:</p> 888 889 <pre class="text"> 890 MagickBooleanType SetImageMask(Image *image,const PixelMask type, 891 const Image *mask,ExceptionInfo *exception) 892 </pre> 893 894 <p>A description of each parameter follows:</p> 895 896 <dd> 897 </dd> 898 899 <dd> </dd> 900 <dl class="dl-horizontal"> 901 <dt>image</dt> 902 <dd>the image. </dd> 903 904 <dd> </dd> 905 <dt>type</dt> 906 <dd>the mask type, ReadPixelMask or WritePixelMask. </dd> 907 908 <dd> </dd> 909 <dt>mask</dt> 910 <dd>the image mask. </dd> 911 912 <dd> </dd> 913 <dt>exception</dt> 914 <dd>return any errors or warnings in this structure. </dd> 915 916 <dd> </dd> 917 </dl> 918 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageAlpha">SetImageAlpha</a></h2> 919 920 <p>SetImageAlpha() sets the alpha levels of the image.</p> 921 922 <p>The format of the SetImageAlpha method is:</p> 923 924 <pre class="text"> 925 MagickBooleanType SetImageAlpha(Image *image,const Quantum alpha, 926 ExceptionInfo *exception) 927 </pre> 928 929 <p>A description of each parameter follows:</p> 930 931 <dd> 932 </dd> 933 934 <dd> </dd> 935 <dl class="dl-horizontal"> 936 <dt>image</dt> 937 <dd>the image. </dd> 938 939 <dd> </dd> 940 <dt>Alpha</dt> 941 <dd>the level of transparency: 0 is fully opaque and QuantumRange is fully transparent. </dd> 942 943 <dd> </dd> 944 </dl> 945 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageVirtualPixelMethod">SetImageVirtualPixelMethod</a></h2> 946 947 <p>SetImageVirtualPixelMethod() sets the "virtual pixels" method for the image and returns the previous setting. A virtual pixel is any pixel access that is outside the boundaries of the image cache.</p> 948 949 <p>The format of the SetImageVirtualPixelMethod() method is:</p> 950 951 <pre class="text"> 952 VirtualPixelMethod SetImageVirtualPixelMethod(Image *image, 953 const VirtualPixelMethod virtual_pixel_method,ExceptionInfo *exception) 954 </pre> 955 956 <p>A description of each parameter follows:</p> 957 958 <dd> 959 </dd> 960 961 <dd> </dd> 962 <dl class="dl-horizontal"> 963 <dt>image</dt> 964 <dd>the image. </dd> 965 966 <dd> </dd> 967 <dt>virtual_pixel_method</dt> 968 <dd>choose the type of virtual pixel. </dd> 969 970 <dd> </dd> 971 <dt>exception</dt> 972 <dd>return any errors or warnings in this structure. </dd> 973 974 <dd> </dd> 975 </dl> 976 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="SmushImages">SmushImages</a></h2> 977 978 <p>SmushImages() takes all images from the current image pointer to the end of the image list and smushes them to each other top-to-bottom if the stack parameter is true, otherwise left-to-right.</p> 979 980 <p>The current gravity setting now effects how the image is justified in the final image.</p> 981 982 <p>The format of the SmushImages method is:</p> 983 984 <pre class="text"> 985 Image *SmushImages(const Image *images,const MagickBooleanType stack, 986 ExceptionInfo *exception) 987 </pre> 988 989 <p>A description of each parameter follows:</p> 990 991 <dd> 992 </dd> 993 994 <dd> </dd> 995 <dl class="dl-horizontal"> 996 <dt>images</dt> 997 <dd>the image sequence. </dd> 998 999 <dd> </dd> 1000 <dt>stack</dt> 1001 <dd>A value other than 0 stacks the images top-to-bottom. </dd> 1002 1003 <dd> </dd> 1004 <dt>offset</dt> 1005 <dd>minimum distance in pixels between images. </dd> 1006 1007 <dd> </dd> 1008 <dt>exception</dt> 1009 <dd>return any errors or warnings in this structure. </dd> 1010 1011 <dd> </dd> 1012 </dl> 1013 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="StripImage">StripImage</a></h2> 1014 1015 <p>StripImage() strips an image of all profiles and comments.</p> 1016 1017 <p>The format of the StripImage method is:</p> 1018 1019 <pre class="text"> 1020 MagickBooleanType StripImage(Image *image,ExceptionInfo *exception) 1021 </pre> 1022 1023 <p>A description of each parameter follows:</p> 1024 1025 <dd> 1026 </dd> 1027 1028 <dd> </dd> 1029 <dl class="dl-horizontal"> 1030 <dt>image</dt> 1031 <dd>the image. </dd> 1032 1033 <dd> </dd> 1034 <dt>exception</dt> 1035 <dd>return any errors or warnings in this structure. </dd> 1036 1037 <dd> </dd> 1038 </dl> 1039 <h2><a href="http://www.imagemagick.org/api/MagickCore/image_8c.html" id="SyncImageSettings">SyncImageSettings</a></h2> 1040 1041 <p>SyncImageSettings() syncs any image_info global options into per-image attributes.</p> 1042 1043 <p>Note: in IMv6 free form 'options' were always mapped into 'artifacts', so that operations and coders can find such settings. In IMv7 if a desired per-image artifact is not set, then it will directly look for a global option as a fallback, as such this copy is no longer needed, only the link set up.</p> 1044 1045 <p>The format of the SyncImageSettings method is:</p> 1046 1047 <pre class="text"> 1048 MagickBooleanType SyncImageSettings(const ImageInfo *image_info, 1049 Image *image,ExceptionInfo *exception) 1050 MagickBooleanType SyncImagesSettings(const ImageInfo *image_info, 1051 Image *image,ExceptionInfo *exception) 1052 </pre> 1053 1054 <p>A description of each parameter follows:</p> 1055 1056 <dd> 1057 </dd> 1058 1059 <dd> </dd> 1060 <dl class="dl-horizontal"> 1061 <dt>image_info</dt> 1062 <dd>the image info. </dd> 1063 1064 <dd> </dd> 1065 <dt>image</dt> 1066 <dd>the image. </dd> 1067 1068 <dd> </dd> 1069 <dt>exception</dt> 1070 <dd>return any errors or warnings in this structure. </dd> 1071 1072 <dd> </dd> 1073 </dl> 1074 </div> 1075 <footer class="magick-footer"> 1076 <p><a href="../support.html">Donate</a> 1077 <a href="../sitemap.html">Sitemap</a> 1078 <a href="../links.html">Related</a> 1079 <a href="../architecture.html">Architecture</a> 1080 </p> 1081 <p><a href="image.html#">Back to top</a> 1082 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> 1083 <a href="http://www.imagemagick.org/script/contact.php">Contact Us</a></p> 1084 <p><small> 1999-2016 ImageMagick Studio LLC</small></p> 1085 </footer> 1086 </div><!-- /.container --> 1087 1088 <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script> 1089 <script src="../js/magick.html"></script> 1090 </div> 1091 </body> 1092 </html> 1093