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 - MagickCore, C API: Enhance an Image</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="magickcore, c, api:, 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-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="enhance.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="../../"><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="../../">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="https://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="enhance.html#AutoGammaImage">AutoGammaImage</a> • <a href="enhance.html#AutoLevelImage">AutoLevelImage</a> • <a href="enhance.html#BrightnessContrastImage">BrightnessContrastImage</a> • <a href="enhance.html#CLAHEImage">CLAHEImage</a> • <a href="enhance.html#ClutImage">ClutImage</a> • <a href="enhance.html#ColorDecisionListImage">ColorDecisionListImage</a> • <a href="enhance.html#ContrastImage">ContrastImage</a> • <a href="enhance.html#ContrastStretchImage">ContrastStretchImage</a> • <a href="enhance.html#EnhanceImage">EnhanceImage</a> • <a href="enhance.html#EqualizeImage">EqualizeImage</a> • <a href="enhance.html#GammaImage">GammaImage</a> • <a href="enhance.html#GrayscaleImage">GrayscaleImage</a> • <a href="enhance.html#HaldClutImage">HaldClutImage</a> • <a href="enhance.html#LevelImage">LevelImage</a> • <a href="enhance.html#LevelizeImage">LevelizeImage</a> • <a href="enhance.html#LevelImageColors">LevelImageColors</a> • <a href="enhance.html#LinearStretchImage">LinearStretchImage</a> • <a href="enhance.html#ModulateImage">ModulateImage</a> • <a href="enhance.html#NegateImage">NegateImage</a> • <a href="enhance.html#The NormalizeImage">The NormalizeImage</a> • <a href="enhance.html#SigmoidalContrastImage">SigmoidalContrastImage</a></p> 91 92<h2><a href="../../api/MagickCore/enhance_8c.html" id="AutoGammaImage">AutoGammaImage</a></h2> 93 94<p>AutoGammaImage() extract the 'mean' from the image and adjust the image to try make set its gamma appropriatally.</p> 95 96<p>The format of the AutoGammaImage method is:</p> 97 98<pre class="text"> 99MagickBooleanType AutoGammaImage(Image *image,ExceptionInfo *exception) 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>image</dt> 110<dd>The image to auto-level </dd> 111 112<dd> </dd> 113<dt>exception</dt> 114<dd>return any errors or warnings in this structure. </dd> 115 116<dd> </dd> 117</dl> 118<h2><a href="../../api/MagickCore/enhance_8c.html" id="AutoLevelImage">AutoLevelImage</a></h2> 119 120<p>AutoLevelImage() adjusts the levels of a particular image channel by scaling the minimum and maximum values to the full quantum range.</p> 121 122<p>The format of the LevelImage method is:</p> 123 124<pre class="text"> 125MagickBooleanType AutoLevelImage(Image *image,ExceptionInfo *exception) 126</pre> 127 128<p>A description of each parameter follows:</p> 129 130<dd> 131</dd> 132 133<dd> </dd> 134<dl class="dl-horizontal"> 135<dt>image</dt> 136<dd>The image to auto-level </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="../../api/MagickCore/enhance_8c.html" id="BrightnessContrastImage">BrightnessContrastImage</a></h2> 145 146<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> 147 148<p>The format of the BrightnessContrastImage method is:</p> 149 150<pre class="text"> 151MagickBooleanType BrightnessContrastImage(Image *image, 152 const double brightness,const double contrast,ExceptionInfo *exception) 153</pre> 154 155<p>A description of each parameter follows:</p> 156 157<dd> 158</dd> 159 160<dd> </dd> 161<dl class="dl-horizontal"> 162<dt>image</dt> 163<dd>the image. </dd> 164 165<dd> </dd> 166<dt>brightness</dt> 167<dd>the brightness percent (-100 .. 100). </dd> 168 169<dd> </dd> 170<dt>contrast</dt> 171<dd>the contrast percent (-100 .. 100). </dd> 172 173<dd> </dd> 174<dt>exception</dt> 175<dd>return any errors or warnings in this structure. </dd> 176 177<dd> </dd> 178</dl> 179<h2><a href="../../api/MagickCore/enhance_8c.html" id="CLAHEImage">CLAHEImage</a></h2> 180 181<p>CLAHEImage() is a variant of adaptive histogram equalization in which the contrast amplification is limited, so as to reduce this problem of noise amplification.</p> 182 183<p>Adapted from implementation by Karel Zuiderveld, karel@cv.ruu.nl in "Graphics Gems IV", Academic Press, 1994.</p> 184 185<p>The format of the CLAHEImage method is:</p> 186 187<pre class="text"> 188MagickBooleanType CLAHEImage(Image *image,const size_t width, 189 const size_t height,const size_t number_bins,const double clip_limit, 190 ExceptionInfo *exception) 191</pre> 192 193<p>A description of each parameter follows:</p> 194 195<dd> 196</dd> 197 198<dd> </dd> 199<dl class="dl-horizontal"> 200<dt>image</dt> 201<dd>the image. </dd> 202 203<dd> </dd> 204<dt>width</dt> 205<dd>the width of the tile divisions to use in horizontal direction. </dd> 206 207<dd> </dd> 208<dt>height</dt> 209<dd>the height of the tile divisions to use in vertical direction. </dd> 210 211<dd> </dd> 212<dt>number_bins</dt> 213<dd>number of bins for histogram ("dynamic range"). </dd> 214 215<dd> </dd> 216<dt>clip_limit</dt> 217<dd>contrast limit for localised changes in contrast. A limit less than 1 results in standard non-contrast limited AHE. </dd> 218 219<dd> </dd> 220<dt>exception</dt> 221<dd>return any errors or warnings in this structure. </dd> 222 223<dd> </dd> 224</dl> 225<h2><a href="../../api/MagickCore/enhance_8c.html" id="ClutImage">ClutImage</a></h2> 226 227<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> 228 229<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> 230 231<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> 232 233<p>The format of the ClutImage method is:</p> 234 235<pre class="text"> 236MagickBooleanType ClutImage(Image *image,Image *clut_image, 237 const PixelInterpolateMethod method,ExceptionInfo *exception) 238</pre> 239 240<p>A description of each parameter follows:</p> 241 242<dd> 243</dd> 244 245<dd> </dd> 246<dl class="dl-horizontal"> 247<dt>image</dt> 248<dd>the image, which is replaced by indexed CLUT values </dd> 249 250<dd> </dd> 251<dt>clut_image</dt> 252<dd>the color lookup table image for replacement color values. </dd> 253 254<dd> </dd> 255<dt>method</dt> 256<dd>the pixel interpolation method. </dd> 257 258<dd> </dd> 259<dt>exception</dt> 260<dd>return any errors or warnings in this structure. </dd> 261 262<dd> </dd> 263</dl> 264<h2><a href="../../api/MagickCore/enhance_8c.html" id="ColorDecisionListImage">ColorDecisionListImage</a></h2> 265 266<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> 267 268<pre class="text"> 269 <ColorCorrectionCollection xmlns="urn:ASC:CDL:v1.2"> 270 <ColorCorrection id="cc03345"> 271 <SOPNode> 272 <Slope> 0.9 1.2 0.5 </Slope> 273 <Offset> 0.4 -0.5 0.6 </Offset> 274 <Power> 1.0 0.8 1.5 </Power> 275 </SOPNode> 276 <SATNode> 277 <Saturation> 0.85 </Saturation> 278 </SATNode> 279 </ColorCorrection> 280 </ColorCorrectionCollection> 281</pre> 282 283<p>which includes the slop, offset, and power for each of the RGB channels as well as the saturation.</p> 284 285<p>The format of the ColorDecisionListImage method is:</p> 286 287<pre class="text"> 288MagickBooleanType ColorDecisionListImage(Image *image, 289 const char *color_correction_collection,ExceptionInfo *exception) 290</pre> 291 292<p>A description of each parameter follows:</p> 293 294<dd> 295</dd> 296 297<dd> </dd> 298<dl class="dl-horizontal"> 299<dt>image</dt> 300<dd>the image. </dd> 301 302<dd> </dd> 303<dt>color_correction_collection</dt> 304<dd>the color correction collection in XML. </dd> 305 306<dd> </dd> 307<dt>exception</dt> 308<dd>return any errors or warnings in this structure. </dd> 309 310<dd> </dd> 311</dl> 312<h2><a href="../../api/MagickCore/enhance_8c.html" id="ContrastImage">ContrastImage</a></h2> 313 314<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> 315 316<p>The format of the ContrastImage method is:</p> 317 318<pre class="text"> 319MagickBooleanType ContrastImage(Image *image, 320 const MagickBooleanType sharpen,ExceptionInfo *exception) 321</pre> 322 323<p>A description of each parameter follows:</p> 324 325<dd> 326</dd> 327 328<dd> </dd> 329<dl class="dl-horizontal"> 330<dt>image</dt> 331<dd>the image. </dd> 332 333<dd> </dd> 334<dt>sharpen</dt> 335<dd>Increase or decrease image contrast. </dd> 336 337<dd> </dd> 338<dt>exception</dt> 339<dd>return any errors or warnings in this structure. </dd> 340 341<dd> </dd> 342</dl> 343<h2><a href="../../api/MagickCore/enhance_8c.html" id="ContrastStretchImage">ContrastStretchImage</a></h2> 344 345<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> 346 347<p>The format of the ContrastStretchImage method is:</p> 348 349<pre class="text"> 350MagickBooleanType ContrastStretchImage(Image *image, 351 const char *levels,ExceptionInfo *exception) 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</dt> 362<dd>the image. </dd> 363 364<dd> </dd> 365<dt>black_point</dt> 366<dd>the black point. </dd> 367 368<dd> </dd> 369<dt>white_point</dt> 370<dd>the white point. </dd> 371 372<dd> </dd> 373<dt>levels</dt> 374<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> 375 376<dd> </dd> 377<dt>exception</dt> 378<dd>return any errors or warnings in this structure. </dd> 379 380<dd> </dd> 381</dl> 382<h2><a href="../../api/MagickCore/enhance_8c.html" id="EnhanceImage">EnhanceImage</a></h2> 383 384<p>EnhanceImage() applies a digital filter that improves the quality of a noisy image.</p> 385 386<p>The format of the EnhanceImage method is:</p> 387 388<pre class="text"> 389Image *EnhanceImage(const Image *image,ExceptionInfo *exception) 390</pre> 391 392<p>A description of each parameter follows:</p> 393 394<dd> 395</dd> 396 397<dd> </dd> 398<dl class="dl-horizontal"> 399<dt>image</dt> 400<dd>the image. </dd> 401 402<dd> </dd> 403<dt>exception</dt> 404<dd>return any errors or warnings in this structure. </dd> 405 406<dd> </dd> 407</dl> 408<h2><a href="../../api/MagickCore/enhance_8c.html" id="EqualizeImage">EqualizeImage</a></h2> 409 410<p>EqualizeImage() applies a histogram equalization to the image.</p> 411 412<p>The format of the EqualizeImage method is:</p> 413 414<pre class="text"> 415MagickBooleanType EqualizeImage(Image *image,ExceptionInfo *exception) 416</pre> 417 418<p>A description of each parameter follows:</p> 419 420<dd> 421</dd> 422 423<dd> </dd> 424<dl class="dl-horizontal"> 425<dt>image</dt> 426<dd>the image. </dd> 427 428<dd> </dd> 429<dt>exception</dt> 430<dd>return any errors or warnings in this structure. </dd> 431 432<dd> </dd> 433</dl> 434<h2><a href="../../api/MagickCore/enhance_8c.html" id="GammaImage">GammaImage</a></h2> 435 436<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> 437 438<p>You can also reduce the influence of a particular channel with a gamma value of 0.</p> 439 440<p>The format of the GammaImage method is:</p> 441 442<pre class="text"> 443MagickBooleanType GammaImage(Image *image,const double gamma, 444 ExceptionInfo *exception) 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<dt>level</dt> 459<dd>the image gamma as a string (e.g. 1.6,1.2,1.0). </dd> 460 461<dd> </dd> 462<dt>gamma</dt> 463<dd>the image gamma. </dd> 464 465<dd> </dd> 466</dl> 467<h2><a href="../../api/MagickCore/enhance_8c.html" id="GrayscaleImage">GrayscaleImage</a></h2> 468 469<p>GrayscaleImage() converts the image to grayscale.</p> 470 471<p>The format of the GrayscaleImage method is:</p> 472 473<pre class="text"> 474MagickBooleanType GrayscaleImage(Image *image, 475 const PixelIntensityMethod method ,ExceptionInfo *exception) 476</pre> 477 478<p>A description of each parameter follows:</p> 479 480<dd> 481</dd> 482 483<dd> </dd> 484<dl class="dl-horizontal"> 485<dt>image</dt> 486<dd>the image. </dd> 487 488<dd> </dd> 489<dt>method</dt> 490<dd>the pixel intensity method. </dd> 491 492<dd> </dd> 493<dt>exception</dt> 494<dd>return any errors or warnings in this structure. </dd> 495 496<dd> </dd> 497</dl> 498<h2><a href="../../api/MagickCore/enhance_8c.html" id="HaldClutImage">HaldClutImage</a></h2> 499 500<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> 501 502<p>The format of the HaldClutImage method is:</p> 503 504<pre class="text"> 505MagickBooleanType HaldClutImage(Image *image,Image *hald_image, 506 ExceptionInfo *exception) 507</pre> 508 509<p>A description of each parameter follows:</p> 510 511<dd> 512</dd> 513 514<dd> </dd> 515<dl class="dl-horizontal"> 516<dt>image</dt> 517<dd>the image, which is replaced by indexed CLUT values </dd> 518 519<dd> </dd> 520<dt>hald_image</dt> 521<dd>the color lookup table image for replacement color values. </dd> 522 523<dd> </dd> 524<dt>exception</dt> 525<dd>return any errors or warnings in this structure. </dd> 526 527<dd> </dd> 528</dl> 529<h2><a href="../../api/MagickCore/enhance_8c.html" id="LevelImage">LevelImage</a></h2> 530 531<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> 532 533<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> 534 535<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> 536 537<p>Gamma specifies a gamma correction to apply to the image.</p> 538 539<p>The format of the LevelImage method is:</p> 540 541<pre class="text"> 542MagickBooleanType LevelImage(Image *image,const double black_point, 543 const double white_point,const double gamma,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_point</dt> 558<dd>The level to map zero (black) to. </dd> 559 560<dd> </dd> 561<dt>white_point</dt> 562<dd>The level to map QuantumRange (white) to. </dd> 563 564<dd> </dd> 565<dt>exception</dt> 566<dd>return any errors or warnings in this structure. </dd> 567 568<dd> </dd> 569</dl> 570<h2><a href="../../api/MagickCore/enhance_8c.html" id="LevelizeImage">LevelizeImage</a></h2> 571 572<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> 573 574<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> 575 576<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> 577 578<p>The format of the LevelizeImage method is:</p> 579 580<pre class="text"> 581MagickBooleanType LevelizeImage(Image *image,const double black_point, 582 const double white_point,const double gamma,ExceptionInfo *exception) 583</pre> 584 585<p>A description of each parameter follows:</p> 586 587<dd> 588</dd> 589 590<dd> </dd> 591<dl class="dl-horizontal"> 592<dt>image</dt> 593<dd>the image. </dd> 594 595<dd> </dd> 596<dt>black_point</dt> 597<dd>The level to map zero (black) to. </dd> 598 599<dd> </dd> 600<dt>white_point</dt> 601<dd>The level to map QuantumRange (white) to. </dd> 602 603<dd> </dd> 604<dt>gamma</dt> 605<dd>adjust gamma by this factor before mapping values. </dd> 606 607<dd> </dd> 608<dt>exception</dt> 609<dd>return any errors or warnings in this structure. </dd> 610 611<dd> </dd> 612</dl> 613<h2><a href="../../api/MagickCore/enhance_8c.html" id="LevelImageColors">LevelImageColors</a></h2> 614 615<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> 616 617<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> 618 619<p>The format of the LevelImageColors method is:</p> 620 621<pre class="text"> 622 MagickBooleanType LevelImageColors(Image *image, 623const PixelInfo *black_color,const PixelInfo *white_color, 624const MagickBooleanType invert,ExceptionInfo *exception) 625</pre> 626 627<p>A description of each parameter follows:</p> 628 629<dd> 630</dd> 631 632<dd> </dd> 633<dl class="dl-horizontal"> 634<dt>image</dt> 635<dd>the image. </dd> 636 637<dd> </dd> 638<dt>black_color</dt> 639<dd>The color to map black to/from </dd> 640 641<dd> </dd> 642<dt>white_point</dt> 643<dd>The color to map white to/from </dd> 644 645<dd> </dd> 646<dt>invert</dt> 647<dd>if true map the colors (levelize), rather than from (level) </dd> 648 649<dd> </dd> 650<dt>exception</dt> 651<dd>return any errors or warnings in this structure. </dd> 652 653<dd> </dd> 654</dl> 655<h2><a href="../../api/MagickCore/enhance_8c.html" id="LinearStretchImage">LinearStretchImage</a></h2> 656 657<p>LinearStretchImage() discards any pixels below the black point and above the white point and levels the remaining pixels.</p> 658 659<p>The format of the LinearStretchImage method is:</p> 660 661<pre class="text"> 662MagickBooleanType LinearStretchImage(Image *image, 663 const double black_point,const double white_point, 664 ExceptionInfo *exception) 665</pre> 666 667<p>A description of each parameter follows:</p> 668 669<dd> 670</dd> 671 672<dd> </dd> 673<dl class="dl-horizontal"> 674<dt>image</dt> 675<dd>the image. </dd> 676 677<dd> </dd> 678<dt>black_point</dt> 679<dd>the black point. </dd> 680 681<dd> </dd> 682<dt>white_point</dt> 683<dd>the white point. </dd> 684 685<dd> </dd> 686<dt>exception</dt> 687<dd>return any errors or warnings in this structure. </dd> 688 689<dd> </dd> 690</dl> 691<h2><a href="../../api/MagickCore/enhance_8c.html" id="ModulateImage">ModulateImage</a></h2> 692 693<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> 694 695<p>The format of the ModulateImage method is:</p> 696 697<pre class="text"> 698MagickBooleanType ModulateImage(Image *image,const char *modulate, 699 ExceptionInfo *exception) 700</pre> 701 702<p>A description of each parameter follows:</p> 703 704<dd> 705</dd> 706 707<dd> </dd> 708<dl class="dl-horizontal"> 709<dt>image</dt> 710<dd>the image. </dd> 711 712<dd> </dd> 713<dt>modulate</dt> 714<dd>Define the percent change in brightness, saturation, and hue. </dd> 715 716<dd> </dd> 717<dt>exception</dt> 718<dd>return any errors or warnings in this structure. </dd> 719 720<dd> </dd> 721</dl> 722<h2><a href="../../api/MagickCore/enhance_8c.html" id="NegateImage">NegateImage</a></h2> 723 724<p>NegateImage() negates the colors in the reference image. The grayscale option means that only grayscale values within the image are negated.</p> 725 726<p>The format of the NegateImage method is:</p> 727 728<pre class="text"> 729MagickBooleanType NegateImage(Image *image, 730 const MagickBooleanType grayscale,ExceptionInfo *exception) 731</pre> 732 733<p>A description of each parameter follows:</p> 734 735<dd> 736</dd> 737 738<dd> </dd> 739<dl class="dl-horizontal"> 740<dt>image</dt> 741<dd>the image. </dd> 742 743<dd> </dd> 744<dt>grayscale</dt> 745<dd>If MagickTrue, only negate grayscale pixels within the image. </dd> 746 747<dd> </dd> 748<dt>exception</dt> 749<dd>return any errors or warnings in this structure. </dd> 750 751<dd> </dd> 752</dl> 753<h2><a href="../../api/MagickCore/enhance_8c.html" id="The_NormalizeImage">The NormalizeImage</a></h2> 754 755<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> 756 757<p>The format of the NormalizeImage method is:</p> 758 759<pre class="text"> 760MagickBooleanType NormalizeImage(Image *image,ExceptionInfo *exception) 761</pre> 762 763<p>A description of each parameter follows:</p> 764 765<dd> 766</dd> 767 768<dd> </dd> 769<dl class="dl-horizontal"> 770<dt>image</dt> 771<dd>the image. </dd> 772 773<dd> </dd> 774<dt>exception</dt> 775<dd>return any errors or warnings in this structure. </dd> 776 777<dd> </dd> 778</dl> 779<h2><a href="../../api/MagickCore/enhance_8c.html" id="SigmoidalContrastImage">SigmoidalContrastImage</a></h2> 780 781<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> 782 783<p>The format of the SigmoidalContrastImage method is:</p> 784 785<pre class="text"> 786MagickBooleanType SigmoidalContrastImage(Image *image, 787 const MagickBooleanType sharpen,const char *levels, 788 ExceptionInfo *exception) 789</pre> 790 791<p>A description of each parameter follows:</p> 792 793<dd> 794</dd> 795 796<dd> </dd> 797<dl class="dl-horizontal"> 798<dt>image</dt> 799<dd>the image. </dd> 800 801<dd> </dd> 802<dt>sharpen</dt> 803<dd>Increase or decrease image contrast. </dd> 804 805<dd> </dd> 806<dt>contrast</dt> 807<dd>strength of the contrast, the larger the number the more 'threshold-like' it becomes. </dd> 808 809<dd> </dd> 810<dt>midpoint</dt> 811<dd>midpoint of the function as a color value 0 to QuantumRange. </dd> 812 813<dd> </dd> 814<dt>exception</dt> 815<dd>return any errors or warnings in this structure. </dd> 816 817<dd> </dd> 818</dl> 819</div> 820 </div> 821 </main><!-- /.container --> 822 <footer class="magick-footer"> 823 <p><a href="../../www/security-policy.html">Security</a> • 824 <a href="../../www/architecture.html">Architecture</a> 825 826 <a href="enhance.html#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../../images/wand.ico"/></a> 827 828 <a href="../../www/links.html">Related</a> • 829 <a href="../../www/sitemap.html">Sitemap</a> 830 <br/> 831 <a href="../../www/support.html">Donate</a> • 832 <a href="http://pgp.mit.edu/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> • 833 <a href="../../www/contact.html">Contact Us</a> 834 <br/> 835 <small>© 1999-2020 ImageMagick Studio LLC</small></p> 836 </footer> 837 838 <!-- Javascript assets --> 839 <script src="../assets/magick.js" crossorigin="anonymous"></script> 840 <script>window.jQuery || document.write('<script src="https://localhost/ajax/libs/jquery/3.4.1/jquery.min.js"><\/script>')</script> 841</body> 842</html> 843<!-- Magick Cache 4th January 2020 19:27 -->