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: Enhance an Image</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:, enhance, an, image, 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="enhance.php#AutoGammaImage">AutoGammaImage</a> • <a href="enhance.php#AutoLevelImage">AutoLevelImage</a> • <a href="enhance.php#BrightnessContrastImage">BrightnessContrastImage</a> • <a href="enhance.php#ClutImage">ClutImage</a> • <a href="enhance.php#ColorDecisionListImage">ColorDecisionListImage</a> • <a href="enhance.php#ContrastImage">ContrastImage</a> • <a href="enhance.php#ContrastStretchImage">ContrastStretchImage</a> • <a href="enhance.php#EnhanceImage">EnhanceImage</a> • <a href="enhance.php#EqualizeImage">EqualizeImage</a> • <a href="enhance.php#GammaImage">GammaImage</a> • <a href="enhance.php#GrayscaleImage">GrayscaleImage</a> • <a href="enhance.php#HaldClutImage">HaldClutImage</a> • <a href="enhance.php#LevelImage">LevelImage</a> • <a href="enhance.php#LevelizeImage">LevelizeImage</a> • <a href="enhance.php#LevelImageColors">LevelImageColors</a> • <a href="enhance.php#LinearStretchImage">LinearStretchImage</a> • <a href="enhance.php#ModulateImage">ModulateImage</a> • <a href="enhance.php#NegateImage">NegateImage</a> • <a href="enhance.php#The NormalizeImage">The NormalizeImage</a> • <a href="enhance.php#SigmoidalContrastImage">SigmoidalContrastImage</a></p> 56 57 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="AutoGammaImage">AutoGammaImage</a></h2> 58 59 <p>AutoGammaImage() extract the 'mean' from the image and adjust the image to try make set its gamma appropriatally.</p> 60 61 <p>The format of the AutoGammaImage method is:</p> 62 63 <pre class="text"> 64 MagickBooleanType AutoGammaImage(Image *image,ExceptionInfo *exception) 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</dt> 75 <dd>The image to auto-level </dd> 76 77 <dd> </dd> 78 <dt>exception</dt> 79 <dd>return any errors or warnings in this structure. </dd> 80 81 <dd> </dd> 82 </dl> 83 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="AutoLevelImage">AutoLevelImage</a></h2> 84 85 <p>AutoLevelImage() adjusts the levels of a particular image channel by scaling the minimum and maximum values to the full quantum range.</p> 86 87 <p>The format of the LevelImage method is:</p> 88 89 <pre class="text"> 90 MagickBooleanType AutoLevelImage(Image *image,ExceptionInfo *exception) 91 </pre> 92 93 <p>A description of each parameter follows:</p> 94 95 <dd> 96 </dd> 97 98 <dd> </dd> 99 <dl class="dl-horizontal"> 100 <dt>image</dt> 101 <dd>The image to auto-level </dd> 102 103 <dd> </dd> 104 <dt>exception</dt> 105 <dd>return any errors or warnings in this structure. </dd> 106 107 <dd> </dd> 108 </dl> 109 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="BrightnessContrastImage">BrightnessContrastImage</a></h2> 110 111 <p>BrightnessContrastImage() changes the brightness and/or contrast of an image. It converts the brightness and contrast parameters into slope and intercept and calls a polynomical function to apply to the image.</p> 112 113 <p>The format of the BrightnessContrastImage method is:</p> 114 115 <pre class="text"> 116 MagickBooleanType BrightnessContrastImage(Image *image, 117 const double brightness,const double contrast,ExceptionInfo *exception) 118 </pre> 119 120 <p>A description of each parameter follows:</p> 121 122 <dd> 123 </dd> 124 125 <dd> </dd> 126 <dl class="dl-horizontal"> 127 <dt>image</dt> 128 <dd>the image. </dd> 129 130 <dd> </dd> 131 <dt>brightness</dt> 132 <dd>the brightness percent (-100 .. 100). </dd> 133 134 <dd> </dd> 135 <dt>contrast</dt> 136 <dd>the contrast percent (-100 .. 100). </dd> 137 138 <dd> </dd> 139 <dt>exception</dt> 140 <dd>return any errors or warnings in this structure. </dd> 141 142 <dd> </dd> 143 </dl> 144 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="ClutImage">ClutImage</a></h2> 145 146 <p>ClutImage() replaces each color value in the given image, by using it as an index to lookup a replacement color value in a Color Look UP Table in the form of an image. The values are extracted along a diagonal of the CLUT image so either a horizontal or vertial gradient image can be used.</p> 147 148 <p>Typically this is used to either re-color a gray-scale image according to a color gradient in the CLUT image, or to perform a freeform histogram (level) adjustment according to the (typically gray-scale) gradient in the CLUT image.</p> 149 150 <p>When the 'channel' mask includes the matte/alpha transparency channel but one image has no such channel it is assumed that that image is a simple gray-scale image that will effect the alpha channel values, either for gray-scale coloring (with transparent or semi-transparent colors), or a histogram adjustment of existing alpha channel values. If both images have matte channels, direct and normal indexing is applied, which is rarely used.</p> 151 152 <p>The format of the ClutImage method is:</p> 153 154 <pre class="text"> 155 MagickBooleanType ClutImage(Image *image,Image *clut_image, 156 const PixelInterpolateMethod method,ExceptionInfo *exception) 157 </pre> 158 159 <p>A description of each parameter follows:</p> 160 161 <dd> 162 </dd> 163 164 <dd> </dd> 165 <dl class="dl-horizontal"> 166 <dt>image</dt> 167 <dd>the image, which is replaced by indexed CLUT values </dd> 168 169 <dd> </dd> 170 <dt>clut_image</dt> 171 <dd>the color lookup table image for replacement color values. </dd> 172 173 <dd> </dd> 174 <dt>method</dt> 175 <dd>the pixel interpolation method. </dd> 176 177 <dd> </dd> 178 <dt>exception</dt> 179 <dd>return any errors or warnings in this structure. </dd> 180 181 <dd> </dd> 182 </dl> 183 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="ColorDecisionListImage">ColorDecisionListImage</a></h2> 184 185 <p>ColorDecisionListImage() accepts a lightweight Color Correction Collection (CCC) file which solely contains one or more color corrections and applies the correction to the image. Here is a sample CCC file:</p> 186 187 <pre class="text"> 188 <ColorCorrectionCollection xmlns="urn:ASC:CDL:v1.2"> 189 <ColorCorrection id="cc03345"> 190 <SOPNode> 191 <Slope> 0.9 1.2 0.5 </Slope> 192 <Offset> 0.4 -0.5 0.6 </Offset> 193 <Power> 1.0 0.8 1.5 </Power> 194 </SOPNode> 195 <SATNode> 196 <Saturation> 0.85 </Saturation> 197 </SATNode> 198 </ColorCorrection> 199 </ColorCorrectionCollection> 200 </pre> 201 202 <p>which includes the slop, offset, and power for each of the RGB channels as well as the saturation.</p> 203 204 <p>The format of the ColorDecisionListImage method is:</p> 205 206 <pre class="text"> 207 MagickBooleanType ColorDecisionListImage(Image *image, 208 const char *color_correction_collection,ExceptionInfo *exception) 209 </pre> 210 211 <p>A description of each parameter follows:</p> 212 213 <dd> 214 </dd> 215 216 <dd> </dd> 217 <dl class="dl-horizontal"> 218 <dt>image</dt> 219 <dd>the image. </dd> 220 221 <dd> </dd> 222 <dt>color_correction_collection</dt> 223 <dd>the color correction collection in XML. </dd> 224 225 <dd> </dd> 226 <dt>exception</dt> 227 <dd>return any errors or warnings in this structure. </dd> 228 229 <dd> </dd> 230 </dl> 231 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="ContrastImage">ContrastImage</a></h2> 232 233 <p>ContrastImage() enhances the intensity differences between the lighter and darker elements of the image. Set sharpen to a MagickTrue to increase the image contrast otherwise the contrast is reduced.</p> 234 235 <p>The format of the ContrastImage method is:</p> 236 237 <pre class="text"> 238 MagickBooleanType ContrastImage(Image *image, 239 const MagickBooleanType sharpen,ExceptionInfo *exception) 240 </pre> 241 242 <p>A description of each parameter follows:</p> 243 244 <dd> 245 </dd> 246 247 <dd> </dd> 248 <dl class="dl-horizontal"> 249 <dt>image</dt> 250 <dd>the image. </dd> 251 252 <dd> </dd> 253 <dt>sharpen</dt> 254 <dd>Increase or decrease image contrast. </dd> 255 256 <dd> </dd> 257 <dt>exception</dt> 258 <dd>return any errors or warnings in this structure. </dd> 259 260 <dd> </dd> 261 </dl> 262 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="ContrastStretchImage">ContrastStretchImage</a></h2> 263 264 <p>ContrastStretchImage() is a simple image enhancement technique that attempts to improve the contrast in an image by 'stretching' the range of intensity values it contains to span a desired range of values. It differs from the more sophisticated histogram equalization in that it can only apply a linear scaling function to the image pixel values. As a result the 'enhancement' is less harsh.</p> 265 266 <p>The format of the ContrastStretchImage method is:</p> 267 268 <pre class="text"> 269 MagickBooleanType ContrastStretchImage(Image *image, 270 const char *levels,ExceptionInfo *exception) 271 </pre> 272 273 <p>A description of each parameter follows:</p> 274 275 <dd> 276 </dd> 277 278 <dd> </dd> 279 <dl class="dl-horizontal"> 280 <dt>image</dt> 281 <dd>the image. </dd> 282 283 <dd> </dd> 284 <dt>black_point</dt> 285 <dd>the black point. </dd> 286 287 <dd> </dd> 288 <dt>white_point</dt> 289 <dd>the white point. </dd> 290 291 <dd> </dd> 292 <dt>levels</dt> 293 <dd>Specify the levels where the black and white points have the range of 0 to number-of-pixels (e.g. 1, 10x90, etc.). </dd> 294 295 <dd> </dd> 296 <dt>exception</dt> 297 <dd>return any errors or warnings in this structure. </dd> 298 299 <dd> </dd> 300 </dl> 301 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="EnhanceImage">EnhanceImage</a></h2> 302 303 <p>EnhanceImage() applies a digital filter that improves the quality of a noisy image.</p> 304 305 <p>The format of the EnhanceImage method is:</p> 306 307 <pre class="text"> 308 Image *EnhanceImage(const Image *image,ExceptionInfo *exception) 309 </pre> 310 311 <p>A description of each parameter follows:</p> 312 313 <dd> 314 </dd> 315 316 <dd> </dd> 317 <dl class="dl-horizontal"> 318 <dt>image</dt> 319 <dd>the image. </dd> 320 321 <dd> </dd> 322 <dt>exception</dt> 323 <dd>return any errors or warnings in this structure. </dd> 324 325 <dd> </dd> 326 </dl> 327 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="EqualizeImage">EqualizeImage</a></h2> 328 329 <p>EqualizeImage() applies a histogram equalization to the image.</p> 330 331 <p>The format of the EqualizeImage method is:</p> 332 333 <pre class="text"> 334 MagickBooleanType EqualizeImage(Image *image,ExceptionInfo *exception) 335 </pre> 336 337 <p>A description of each parameter follows:</p> 338 339 <dd> 340 </dd> 341 342 <dd> </dd> 343 <dl class="dl-horizontal"> 344 <dt>image</dt> 345 <dd>the image. </dd> 346 347 <dd> </dd> 348 <dt>exception</dt> 349 <dd>return any errors or warnings in this structure. </dd> 350 351 <dd> </dd> 352 </dl> 353 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="GammaImage">GammaImage</a></h2> 354 355 <p>GammaImage() gamma-corrects a particular image channel. The same image viewed on different devices will have perceptual differences in the way the image's intensities are represented on the screen. Specify individual gamma levels for the red, green, and blue channels, or adjust all three with the gamma parameter. Values typically range from 0.8 to 2.3.</p> 356 357 <p>You can also reduce the influence of a particular channel with a gamma value of 0.</p> 358 359 <p>The format of the GammaImage method is:</p> 360 361 <pre class="text"> 362 MagickBooleanType GammaImage(Image *image,const double gamma, 363 ExceptionInfo *exception) 364 </pre> 365 366 <p>A description of each parameter follows:</p> 367 368 <dd> 369 </dd> 370 371 <dd> </dd> 372 <dl class="dl-horizontal"> 373 <dt>image</dt> 374 <dd>the image. </dd> 375 376 <dd> </dd> 377 <dt>level</dt> 378 <dd>the image gamma as a string (e.g. 1.6,1.2,1.0). </dd> 379 380 <dd> </dd> 381 <dt>gamma</dt> 382 <dd>the image gamma. </dd> 383 384 <dd> </dd> 385 </dl> 386 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="GrayscaleImage">GrayscaleImage</a></h2> 387 388 <p>GrayscaleImage() converts the image to grayscale.</p> 389 390 <p>The format of the GrayscaleImage method is:</p> 391 392 <pre class="text"> 393 MagickBooleanType GrayscaleImage(Image *image, 394 const PixelIntensityMethod method ,ExceptionInfo *exception) 395 </pre> 396 397 <p>A description of each parameter follows:</p> 398 399 <dd> 400 </dd> 401 402 <dd> </dd> 403 <dl class="dl-horizontal"> 404 <dt>image</dt> 405 <dd>the image. </dd> 406 407 <dd> </dd> 408 <dt>method</dt> 409 <dd>the pixel intensity method. </dd> 410 411 <dd> </dd> 412 <dt>exception</dt> 413 <dd>return any errors or warnings in this structure. </dd> 414 415 <dd> </dd> 416 </dl> 417 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="HaldClutImage">HaldClutImage</a></h2> 418 419 <p>HaldClutImage() applies a Hald color lookup table to the image. A Hald color lookup table is a 3-dimensional color cube mapped to 2 dimensions. Create it with the HALD coder. You can apply any color transformation to the Hald image and then use this method to apply the transform to the image.</p> 420 421 <p>The format of the HaldClutImage method is:</p> 422 423 <pre class="text"> 424 MagickBooleanType HaldClutImage(Image *image,Image *hald_image, 425 ExceptionInfo *exception) 426 </pre> 427 428 <p>A description of each parameter follows:</p> 429 430 <dd> 431 </dd> 432 433 <dd> </dd> 434 <dl class="dl-horizontal"> 435 <dt>image</dt> 436 <dd>the image, which is replaced by indexed CLUT values </dd> 437 438 <dd> </dd> 439 <dt>hald_image</dt> 440 <dd>the color lookup table image for replacement color values. </dd> 441 442 <dd> </dd> 443 <dt>exception</dt> 444 <dd>return any errors or warnings in this structure. </dd> 445 446 <dd> </dd> 447 </dl> 448 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="LevelImage">LevelImage</a></h2> 449 450 <p>LevelImage() adjusts the levels of a particular image channel by scaling the colors falling between specified white and black points to the full available quantum range.</p> 451 452 <p>The parameters provided represent the black, and white points. The black point specifies the darkest color in the image. Colors darker than the black point are set to zero. White point specifies the lightest color in the image. Colors brighter than the white point are set to the maximum quantum value.</p> 453 454 <p>If a '!' flag is given, map black and white colors to the given levels rather than mapping those levels to black and white. See LevelizeImage() below.</p> 455 456 <p>Gamma specifies a gamma correction to apply to the image.</p> 457 458 <p>The format of the LevelImage method is:</p> 459 460 <pre class="text"> 461 MagickBooleanType LevelImage(Image *image,const double black_point, 462 const double white_point,const double gamma,ExceptionInfo *exception) 463 </pre> 464 465 <p>A description of each parameter follows:</p> 466 467 <dd> 468 </dd> 469 470 <dd> </dd> 471 <dl class="dl-horizontal"> 472 <dt>image</dt> 473 <dd>the image. </dd> 474 475 <dd> </dd> 476 <dt>black_point</dt> 477 <dd>The level to map zero (black) to. </dd> 478 479 <dd> </dd> 480 <dt>white_point</dt> 481 <dd>The level to map QuantumRange (white) to. </dd> 482 483 <dd> </dd> 484 <dt>exception</dt> 485 <dd>return any errors or warnings in this structure. </dd> 486 487 <dd> </dd> 488 </dl> 489 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="LevelizeImage">LevelizeImage</a></h2> 490 491 <p>LevelizeImage() applies the reversed LevelImage() operation to just the specific channels specified. It compresses the full range of color values, so that they lie between the given black and white points. Gamma is applied before the values are mapped.</p> 492 493 <p>LevelizeImage() can be called with by using a +level command line API option, or using a '!' on a -level or LevelImage() geometry string.</p> 494 495 <p>It can be used to de-contrast a greyscale image to the exact levels specified. Or by using specific levels for each channel of an image you can convert a gray-scale image to any linear color gradient, according to those levels.</p> 496 497 <p>The format of the LevelizeImage method is:</p> 498 499 <pre class="text"> 500 MagickBooleanType LevelizeImage(Image *image,const double black_point, 501 const double white_point,const double gamma,ExceptionInfo *exception) 502 </pre> 503 504 <p>A description of each parameter follows:</p> 505 506 <dd> 507 </dd> 508 509 <dd> </dd> 510 <dl class="dl-horizontal"> 511 <dt>image</dt> 512 <dd>the image. </dd> 513 514 <dd> </dd> 515 <dt>black_point</dt> 516 <dd>The level to map zero (black) to. </dd> 517 518 <dd> </dd> 519 <dt>white_point</dt> 520 <dd>The level to map QuantumRange (white) to. </dd> 521 522 <dd> </dd> 523 <dt>gamma</dt> 524 <dd>adjust gamma by this factor before mapping values. </dd> 525 526 <dd> </dd> 527 <dt>exception</dt> 528 <dd>return any errors or warnings in this structure. </dd> 529 530 <dd> </dd> 531 </dl> 532 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="LevelImageColors">LevelImageColors</a></h2> 533 534 <p>LevelImageColors() maps the given color to "black" and "white" values, linearly spreading out the colors, and level values on a channel by channel bases, as per LevelImage(). The given colors allows you to specify different level ranges for each of the color channels separately.</p> 535 536 <p>If the boolean 'invert' is set true the image values will modifyed in the reverse direction. That is any existing "black" and "white" colors in the image will become the color values given, with all other values compressed appropriatally. This effectivally maps a greyscale gradient into the given color gradient.</p> 537 538 <p>The format of the LevelImageColors method is:</p> 539 540 <pre class="text"> 541 MagickBooleanType LevelImageColors(Image *image, 542 const PixelInfo *black_color,const PixelInfo *white_color, 543 const MagickBooleanType invert,ExceptionInfo *exception) 544 </pre> 545 546 <p>A description of each parameter follows:</p> 547 548 <dd> 549 </dd> 550 551 <dd> </dd> 552 <dl class="dl-horizontal"> 553 <dt>image</dt> 554 <dd>the image. </dd> 555 556 <dd> </dd> 557 <dt>black_color</dt> 558 <dd>The color to map black to/from </dd> 559 560 <dd> </dd> 561 <dt>white_point</dt> 562 <dd>The color to map white to/from </dd> 563 564 <dd> </dd> 565 <dt>invert</dt> 566 <dd>if true map the colors (levelize), rather than from (level) </dd> 567 568 <dd> </dd> 569 <dt>exception</dt> 570 <dd>return any errors or warnings in this structure. </dd> 571 572 <dd> </dd> 573 </dl> 574 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="LinearStretchImage">LinearStretchImage</a></h2> 575 576 <p>LinearStretchImage() discards any pixels below the black point and above the white point and levels the remaining pixels.</p> 577 578 <p>The format of the LinearStretchImage method is:</p> 579 580 <pre class="text"> 581 MagickBooleanType LinearStretchImage(Image *image, 582 const double black_point,const double white_point, 583 ExceptionInfo *exception) 584 </pre> 585 586 <p>A description of each parameter follows:</p> 587 588 <dd> 589 </dd> 590 591 <dd> </dd> 592 <dl class="dl-horizontal"> 593 <dt>image</dt> 594 <dd>the image. </dd> 595 596 <dd> </dd> 597 <dt>black_point</dt> 598 <dd>the black point. </dd> 599 600 <dd> </dd> 601 <dt>white_point</dt> 602 <dd>the white point. </dd> 603 604 <dd> </dd> 605 <dt>exception</dt> 606 <dd>return any errors or warnings in this structure. </dd> 607 608 <dd> </dd> 609 </dl> 610 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="ModulateImage">ModulateImage</a></h2> 611 612 <p>ModulateImage() lets you control the brightness, saturation, and hue of an image. Modulate represents the brightness, saturation, and hue as one parameter (e.g. 90,150,100). If the image colorspace is HSL, the modulation is lightness, saturation, and hue. For HWB, use blackness, whiteness, and hue. And for HCL, use chrome, luma, and hue.</p> 613 614 <p>The format of the ModulateImage method is:</p> 615 616 <pre class="text"> 617 MagickBooleanType ModulateImage(Image *image,const char *modulate, 618 ExceptionInfo *exception) 619 </pre> 620 621 <p>A description of each parameter follows:</p> 622 623 <dd> 624 </dd> 625 626 <dd> </dd> 627 <dl class="dl-horizontal"> 628 <dt>image</dt> 629 <dd>the image. </dd> 630 631 <dd> </dd> 632 <dt>modulate</dt> 633 <dd>Define the percent change in brightness, saturation, and hue. </dd> 634 635 <dd> </dd> 636 <dt>exception</dt> 637 <dd>return any errors or warnings in this structure. </dd> 638 639 <dd> </dd> 640 </dl> 641 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="NegateImage">NegateImage</a></h2> 642 643 <p>NegateImage() negates the colors in the reference image. The grayscale option means that only grayscale values within the image are negated.</p> 644 645 <p>The format of the NegateImage method is:</p> 646 647 <pre class="text"> 648 MagickBooleanType NegateImage(Image *image, 649 const MagickBooleanType grayscale,ExceptionInfo *exception) 650 </pre> 651 652 <p>A description of each parameter follows:</p> 653 654 <dd> 655 </dd> 656 657 <dd> </dd> 658 <dl class="dl-horizontal"> 659 <dt>image</dt> 660 <dd>the image. </dd> 661 662 <dd> </dd> 663 <dt>grayscale</dt> 664 <dd>If MagickTrue, only negate grayscale pixels within the image. </dd> 665 666 <dd> </dd> 667 <dt>exception</dt> 668 <dd>return any errors or warnings in this structure. </dd> 669 670 <dd> </dd> 671 </dl> 672 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="The_NormalizeImage">The NormalizeImage</a></h2> 673 674 <p>The NormalizeImage() method enhances the contrast of a color image by mapping the darkest 2 percent of all pixel to black and the brightest 1 percent to white.</p> 675 676 <p>The format of the NormalizeImage method is:</p> 677 678 <pre class="text"> 679 MagickBooleanType NormalizeImage(Image *image,ExceptionInfo *exception) 680 </pre> 681 682 <p>A description of each parameter follows:</p> 683 684 <dd> 685 </dd> 686 687 <dd> </dd> 688 <dl class="dl-horizontal"> 689 <dt>image</dt> 690 <dd>the image. </dd> 691 692 <dd> </dd> 693 <dt>exception</dt> 694 <dd>return any errors or warnings in this structure. </dd> 695 696 <dd> </dd> 697 </dl> 698 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="SigmoidalContrastImage">SigmoidalContrastImage</a></h2> 699 700 <p>SigmoidalContrastImage() adjusts the contrast of an image with a non-linear sigmoidal contrast algorithm. Increase the contrast of the image using a sigmoidal transfer function without saturating highlights or shadows. Contrast indicates how much to increase the contrast (0 is none; 3 is typical; 20 is pushing it); mid-point indicates where midtones fall in the resultant image (0 is white; 50 is middle-gray; 100 is black). Set sharpen to MagickTrue to increase the image contrast otherwise the contrast is reduced.</p> 701 702 <p>The format of the SigmoidalContrastImage method is:</p> 703 704 <pre class="text"> 705 MagickBooleanType SigmoidalContrastImage(Image *image, 706 const MagickBooleanType sharpen,const char *levels, 707 ExceptionInfo *exception) 708 </pre> 709 710 <p>A description of each parameter follows:</p> 711 712 <dd> 713 </dd> 714 715 <dd> </dd> 716 <dl class="dl-horizontal"> 717 <dt>image</dt> 718 <dd>the image. </dd> 719 720 <dd> </dd> 721 <dt>sharpen</dt> 722 <dd>Increase or decrease image contrast. </dd> 723 724 <dd> </dd> 725 <dt>contrast</dt> 726 <dd>strength of the contrast, the larger the number the more 'threshold-like' it becomes. </dd> 727 728 <dd> </dd> 729 <dt>midpoint</dt> 730 <dd>midpoint of the function as a color value 0 to QuantumRange. </dd> 731 732 <dd> </dd> 733 <dt>exception</dt> 734 <dd>return any errors or warnings in this structure. </dd> 735 736 <dd> </dd> 737 </dl> 738 </div> 739 <footer class="magick-footer"> 740 <p><a href="../script/support.php">Donate</a> 741 <a href="../script/sitemap.php">Sitemap</a> 742 <a href="../script/links.php">Related</a> 743 <a href="../script/architecture.php">Architecture</a> 744 </p> 745 <p><a href="enhance.php#">Back to top</a> 746 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> 747 <a href="../script/contact.php">Contact Us</a></p> 748 <p><small> 1999-2016 ImageMagick Studio LLC</small></p> 749 </footer> 750 </div><!-- /.container --> 751 752 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> 753 <script src="http://nextgen.imagemagick.org/js/magick.php"></script> 754 </div> 755 </body> 756 </html> 757