]> granicus.if.org Git - imagemagick/blob - www/api/enhance.html
Clone the image->image_info structure to prevent a dangling pointer
[imagemagick] / www / api / enhance.html
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4   
5     <title>ImageMagick: MagickCore, C API for ImageMagick: Enhance an Image</title>
6   <meta http-equiv="content-type" content="text/html; charset=utf-8">
7   <meta name="application-name" content="ImageMagick">
8   <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 Bézier curves.">
9   <meta name="application-url" content="http://www.imagemagick.org">
10   <meta name="generator" content="PHP">
11   <meta name="keywords" content="magickcore, c, api, for, imagemagick:, enhance, an, image, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert">
12   <meta name="rating" content="GENERAL">
13   <meta name="robots" content="INDEX, FOLLOW">
14   <meta name="generator" content="ImageMagick Studio LLC">
15   <meta name="author" content="ImageMagick Studio LLC">
16   <meta name="revisit-after" content="2 DAYS">
17   <meta name="resource-type" content="document">
18   <meta name="copyright" content="Copyright (c) 1999-2015 ImageMagick Studio LLC">
19   <meta name="distribution" content="Global">
20   <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1">
21   <link rel="icon" href="../images/wand.png">
22   <link rel="shortcut icon" href="../images/wand.ico">
23   <link rel="stylesheet" href="../css/magick.html">
24 </head>
25 <body>
26 <div class="main">
27 <div class="magick-masthead">
28   <div class="container">
29     <script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3129977114552745" data-ad-slot="6345125851" data-ad-format="auto"></ins>
30     <script>
31     (adsbygoogle = window.adsbygoogle || []).push({});
32     </script>
33     <nav class="magick-nav">
34       <a class="magick-nav-item " href="../index.html">Home</a>
35       <a class="magick-nav-item " href="../binary-releases.html">Download</a>
36       <a class="magick-nav-item " href="../command-line-tools.html">Tools</a>
37       <a class="magick-nav-item " href="../command-line-options.html">Options</a>
38       <a class="magick-nav-item " href="../resources.html">Resources</a>
39       <a class="magick-nav-item " href="api.html">Develop</a>
40       <a class="magick-nav-item " href="http://nextgen.imagemagick.org/script/search.php">Search</a>
41       <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a>
42     </nav>
43   </div>
44 </div>
45 <div class="container">
46 <div class="magick-header">
47 <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#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%20NormalizeImage">The NormalizeImage</a> • <a href="enhance.html#SigmoidalContrastImage">SigmoidalContrastImage</a></p>
48
49 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="AutoGammaImage">AutoGammaImage</a></h2>
50
51 <p>AutoGammaImage() extract the 'mean' from the image and adjust the image to try make set its gamma appropriatally.</p>
52
53 <p>The format of the AutoGammaImage method is:</p>
54
55 <pre class="text">
56 MagickBooleanType AutoGammaImage(Image *image,ExceptionInfo *exception)
57 </pre>
58
59 <p>A description of each parameter follows:</p>
60
61 <dd>
62 </dd>
63
64 <dd> </dd>
65 <dl class="dl-horizontal">
66 <dt>image</dt>
67 <dd>The image to auto-level </dd>
68
69 <dd> </dd>
70 <dt>exception</dt>
71 <dd>return any errors or warnings in this structure. </dd>
72
73 <dd>  </dd>
74 </dl>
75 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="AutoLevelImage">AutoLevelImage</a></h2>
76
77 <p>AutoLevelImage() adjusts the levels of a particular image channel by scaling the minimum and maximum values to the full quantum range.</p>
78
79 <p>The format of the LevelImage method is:</p>
80
81 <pre class="text">
82 MagickBooleanType AutoLevelImage(Image *image,ExceptionInfo *exception)
83 </pre>
84
85 <p>A description of each parameter follows:</p>
86
87 <dd>
88 </dd>
89
90 <dd> </dd>
91 <dl class="dl-horizontal">
92 <dt>image</dt>
93 <dd>The image to auto-level </dd>
94
95 <dd> </dd>
96 <dt>exception</dt>
97 <dd>return any errors or warnings in this structure. </dd>
98
99 <dd>  </dd>
100 </dl>
101 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="BrightnessContrastImage">BrightnessContrastImage</a></h2>
102
103 <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>
104
105 <p>The format of the BrightnessContrastImage method is:</p>
106
107 <pre class="text">
108 MagickBooleanType BrightnessContrastImage(Image *image,
109   const double brightness,const double contrast,ExceptionInfo *exception)
110 </pre>
111
112 <p>A description of each parameter follows:</p>
113
114 <dd>
115 </dd>
116
117 <dd> </dd>
118 <dl class="dl-horizontal">
119 <dt>image</dt>
120 <dd>the image. </dd>
121
122 <dd> </dd>
123 <dt>brightness</dt>
124 <dd>the brightness percent (-100 .. 100). </dd>
125
126 <dd> </dd>
127 <dt>contrast</dt>
128 <dd>the contrast percent (-100 .. 100). </dd>
129
130 <dd> </dd>
131 <dt>exception</dt>
132 <dd>return any errors or warnings in this structure. </dd>
133
134 <dd>  </dd>
135 </dl>
136 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="ClutImage">ClutImage</a></h2>
137
138 <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>
139
140 <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>
141
142 <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>
143
144 <p>The format of the ClutImage method is:</p>
145
146 <pre class="text">
147 MagickBooleanType ClutImage(Image *image,Image *clut_image,
148   const PixelInterpolateMethod method,ExceptionInfo *exception)
149 </pre>
150
151 <p>A description of each parameter follows:</p>
152
153 <dd>
154 </dd>
155
156 <dd> </dd>
157 <dl class="dl-horizontal">
158 <dt>image</dt>
159 <dd>the image, which is replaced by indexed CLUT values </dd>
160
161 <dd> </dd>
162 <dt>clut_image</dt>
163 <dd>the color lookup table image for replacement color values. </dd>
164
165 <dd> </dd>
166 <dt>method</dt>
167 <dd>the pixel interpolation method. </dd>
168
169 <dd> </dd>
170 <dt>exception</dt>
171 <dd>return any errors or warnings in this structure. </dd>
172
173 <dd>  </dd>
174 </dl>
175 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="ColorDecisionListImage">ColorDecisionListImage</a></h2>
176
177 <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>
178
179 <pre class="text">
180     &lt;ColorCorrectionCollection xmlns="urn:ASC:CDL:v1.2"&gt;
181     &lt;ColorCorrection id="cc03345"&gt;
182           &lt;SOPNode&gt;
183                &lt;Slope&gt; 0.9 1.2 0.5 &lt;/Slope&gt;
184                &lt;Offset&gt; 0.4 -0.5 0.6 &lt;/Offset&gt;
185                &lt;Power&gt; 1.0 0.8 1.5 &lt;/Power&gt;
186           &lt;/SOPNode&gt;
187           &lt;SATNode&gt;
188                &lt;Saturation&gt; 0.85 &lt;/Saturation&gt;
189           &lt;/SATNode&gt;
190     &lt;/ColorCorrection&gt;
191     &lt;/ColorCorrectionCollection&gt;
192 </pre>
193
194 <p>which includes the slop, offset, and power for each of the RGB channels as well as the saturation.</p>
195
196 <p>The format of the ColorDecisionListImage method is:</p>
197
198 <pre class="text">
199 MagickBooleanType ColorDecisionListImage(Image *image,
200   const char *color_correction_collection,ExceptionInfo *exception)
201 </pre>
202
203 <p>A description of each parameter follows:</p>
204
205 <dd>
206 </dd>
207
208 <dd> </dd>
209 <dl class="dl-horizontal">
210 <dt>image</dt>
211 <dd>the image. </dd>
212
213 <dd> </dd>
214 <dt>color_correction_collection</dt>
215 <dd>the color correction collection in XML. </dd>
216
217 <dd> </dd>
218 <dt>exception</dt>
219 <dd>return any errors or warnings in this structure. </dd>
220
221 <dd>  </dd>
222 </dl>
223 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="ContrastImage">ContrastImage</a></h2>
224
225 <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>
226
227 <p>The format of the ContrastImage method is:</p>
228
229 <pre class="text">
230 MagickBooleanType ContrastImage(Image *image,
231   const MagickBooleanType sharpen,ExceptionInfo *exception)
232 </pre>
233
234 <p>A description of each parameter follows:</p>
235
236 <dd>
237 </dd>
238
239 <dd> </dd>
240 <dl class="dl-horizontal">
241 <dt>image</dt>
242 <dd>the image. </dd>
243
244 <dd> </dd>
245 <dt>sharpen</dt>
246 <dd>Increase or decrease image contrast. </dd>
247
248 <dd> </dd>
249 <dt>exception</dt>
250 <dd>return any errors or warnings in this structure. </dd>
251
252 <dd>  </dd>
253 </dl>
254 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="ContrastStretchImage">ContrastStretchImage</a></h2>
255
256 <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>
257
258 <p>The format of the ContrastStretchImage method is:</p>
259
260 <pre class="text">
261 MagickBooleanType ContrastStretchImage(Image *image,
262   const char *levels,ExceptionInfo *exception)
263 </pre>
264
265 <p>A description of each parameter follows:</p>
266
267 <dd>
268 </dd>
269
270 <dd> </dd>
271 <dl class="dl-horizontal">
272 <dt>image</dt>
273 <dd>the image. </dd>
274
275 <dd> </dd>
276 <dt>black_point</dt>
277 <dd>the black point. </dd>
278
279 <dd> </dd>
280 <dt>white_point</dt>
281 <dd>the white point. </dd>
282
283 <dd> </dd>
284 <dt>levels</dt>
285 <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>
286
287 <dd> </dd>
288 <dt>exception</dt>
289 <dd>return any errors or warnings in this structure. </dd>
290
291 <dd>  </dd>
292 </dl>
293 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="EnhanceImage">EnhanceImage</a></h2>
294
295 <p>EnhanceImage() applies a digital filter that improves the quality of a noisy image.</p>
296
297 <p>The format of the EnhanceImage method is:</p>
298
299 <pre class="text">
300 Image *EnhanceImage(const Image *image,ExceptionInfo *exception)
301 </pre>
302
303 <p>A description of each parameter follows:</p>
304
305 <dd>
306 </dd>
307
308 <dd> </dd>
309 <dl class="dl-horizontal">
310 <dt>image</dt>
311 <dd>the image. </dd>
312
313 <dd> </dd>
314 <dt>exception</dt>
315 <dd>return any errors or warnings in this structure. </dd>
316
317 <dd>  </dd>
318 </dl>
319 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="EqualizeImage">EqualizeImage</a></h2>
320
321 <p>EqualizeImage() applies a histogram equalization to the image.</p>
322
323 <p>The format of the EqualizeImage method is:</p>
324
325 <pre class="text">
326 MagickBooleanType EqualizeImage(Image *image,ExceptionInfo *exception)
327 </pre>
328
329 <p>A description of each parameter follows:</p>
330
331 <dd>
332 </dd>
333
334 <dd> </dd>
335 <dl class="dl-horizontal">
336 <dt>image</dt>
337 <dd>the image. </dd>
338
339 <dd> </dd>
340 <dt>exception</dt>
341 <dd>return any errors or warnings in this structure. </dd>
342
343 <dd>  </dd>
344 </dl>
345 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="GammaImage">GammaImage</a></h2>
346
347 <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>
348
349 <p>You can also reduce the influence of a particular channel with a gamma value of 0.</p>
350
351 <p>The format of the GammaImage method is:</p>
352
353 <pre class="text">
354 MagickBooleanType GammaImage(Image *image,const double gamma,
355   ExceptionInfo *exception)
356 </pre>
357
358 <p>A description of each parameter follows:</p>
359
360 <dd>
361 </dd>
362
363 <dd> </dd>
364 <dl class="dl-horizontal">
365 <dt>image</dt>
366 <dd>the image. </dd>
367
368 <dd> </dd>
369 <dt>level</dt>
370 <dd>the image gamma as a string (e.g. 1.6,1.2,1.0). </dd>
371
372 <dd> </dd>
373 <dt>gamma</dt>
374 <dd>the image gamma. </dd>
375
376 <dd>  </dd>
377 </dl>
378 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="GrayscaleImage">GrayscaleImage</a></h2>
379
380 <p>GrayscaleImage() converts the image to grayscale.</p>
381
382 <p>The format of the GrayscaleImage method is:</p>
383
384 <pre class="text">
385 MagickBooleanType GrayscaleImage(Image *image,
386   const PixelIntensityMethod method ,ExceptionInfo *exception)
387 </pre>
388
389 <p>A description of each parameter follows:</p>
390
391 <dd>
392 </dd>
393
394 <dd> </dd>
395 <dl class="dl-horizontal">
396 <dt>image</dt>
397 <dd>the image. </dd>
398
399 <dd> </dd>
400 <dt>method</dt>
401 <dd>the pixel intensity method. </dd>
402
403 <dd> </dd>
404 <dt>exception</dt>
405 <dd>return any errors or warnings in this structure. </dd>
406
407 <dd>  </dd>
408 </dl>
409 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="HaldClutImage">HaldClutImage</a></h2>
410
411 <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>
412
413 <p>The format of the HaldClutImage method is:</p>
414
415 <pre class="text">
416 MagickBooleanType HaldClutImage(Image *image,Image *hald_image,
417   ExceptionInfo *exception)
418 </pre>
419
420 <p>A description of each parameter follows:</p>
421
422 <dd>
423 </dd>
424
425 <dd> </dd>
426 <dl class="dl-horizontal">
427 <dt>image</dt>
428 <dd>the image, which is replaced by indexed CLUT values </dd>
429
430 <dd> </dd>
431 <dt>hald_image</dt>
432 <dd>the color lookup table image for replacement color values. </dd>
433
434 <dd> </dd>
435 <dt>exception</dt>
436 <dd>return any errors or warnings in this structure. </dd>
437
438 <dd>  </dd>
439 </dl>
440 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="LevelImage">LevelImage</a></h2>
441
442 <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>
443
444 <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>
445
446 <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>
447
448 <p>Gamma specifies a gamma correction to apply to the image.</p>
449
450 <p>The format of the LevelImage method is:</p>
451
452 <pre class="text">
453 MagickBooleanType LevelImage(Image *image,const double black_point,
454   const double white_point,const double gamma,ExceptionInfo *exception)
455 </pre>
456
457 <p>A description of each parameter follows:</p>
458
459 <dd>
460 </dd>
461
462 <dd> </dd>
463 <dl class="dl-horizontal">
464 <dt>image</dt>
465 <dd>the image. </dd>
466
467 <dd> </dd>
468 <dt>black_point</dt>
469 <dd>The level to map zero (black) to. </dd>
470
471 <dd> </dd>
472 <dt>white_point</dt>
473 <dd>The level to map QuantumRange (white) to. </dd>
474
475 <dd> </dd>
476 <dt>exception</dt>
477 <dd>return any errors or warnings in this structure. </dd>
478
479 <dd>  </dd>
480 </dl>
481 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="LevelizeImage">LevelizeImage</a></h2>
482
483 <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>
484
485 <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>
486
487 <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>
488
489 <p>The format of the LevelizeImage method is:</p>
490
491 <pre class="text">
492 MagickBooleanType LevelizeImage(Image *image,const double black_point,
493   const double white_point,const double gamma,ExceptionInfo *exception)
494 </pre>
495
496 <p>A description of each parameter follows:</p>
497
498 <dd>
499 </dd>
500
501 <dd> </dd>
502 <dl class="dl-horizontal">
503 <dt>image</dt>
504 <dd>the image. </dd>
505
506 <dd> </dd>
507 <dt>black_point</dt>
508 <dd>The level to map zero (black) to. </dd>
509
510 <dd> </dd>
511 <dt>white_point</dt>
512 <dd>The level to map QuantumRange (white) to. </dd>
513
514 <dd> </dd>
515 <dt>gamma</dt>
516 <dd>adjust gamma by this factor before mapping values. </dd>
517
518 <dd> </dd>
519 <dt>exception</dt>
520 <dd>return any errors or warnings in this structure. </dd>
521
522 <dd>  </dd>
523 </dl>
524 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="LevelImageColors">LevelImageColors</a></h2>
525
526 <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>
527
528 <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>
529
530 <p>The format of the LevelImageColors method is:</p>
531
532 <pre class="text">
533     MagickBooleanType LevelImageColors(Image *image,
534 const PixelInfo *black_color,const PixelInfo *white_color,
535 const MagickBooleanType invert,ExceptionInfo *exception)
536 </pre>
537
538 <p>A description of each parameter follows:</p>
539
540 <dd>
541 </dd>
542
543 <dd> </dd>
544 <dl class="dl-horizontal">
545 <dt>image</dt>
546 <dd>the image. </dd>
547
548 <dd> </dd>
549 <dt>black_color</dt>
550 <dd>The color to map black to/from </dd>
551
552 <dd> </dd>
553 <dt>white_point</dt>
554 <dd>The color to map white to/from </dd>
555
556 <dd> </dd>
557 <dt>invert</dt>
558 <dd>if true map the colors (levelize), rather than from (level) </dd>
559
560 <dd> </dd>
561 <dt>exception</dt>
562 <dd>return any errors or warnings in this structure. </dd>
563
564 <dd>  </dd>
565 </dl>
566 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="LinearStretchImage">LinearStretchImage</a></h2>
567
568 <p>LinearStretchImage() discards any pixels below the black point and above the white point and levels the remaining pixels.</p>
569
570 <p>The format of the LinearStretchImage method is:</p>
571
572 <pre class="text">
573 MagickBooleanType LinearStretchImage(Image *image,
574   const double black_point,const double white_point,
575   ExceptionInfo *exception)
576 </pre>
577
578 <p>A description of each parameter follows:</p>
579
580 <dd>
581 </dd>
582
583 <dd> </dd>
584 <dl class="dl-horizontal">
585 <dt>image</dt>
586 <dd>the image. </dd>
587
588 <dd> </dd>
589 <dt>black_point</dt>
590 <dd>the black point. </dd>
591
592 <dd> </dd>
593 <dt>white_point</dt>
594 <dd>the white point. </dd>
595
596 <dd> </dd>
597 <dt>exception</dt>
598 <dd>return any errors or warnings in this structure. </dd>
599
600 <dd>  </dd>
601 </dl>
602 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="ModulateImage">ModulateImage</a></h2>
603
604 <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>
605
606 <p>The format of the ModulateImage method is:</p>
607
608 <pre class="text">
609 MagickBooleanType ModulateImage(Image *image,const char *modulate,
610   ExceptionInfo *exception)
611 </pre>
612
613 <p>A description of each parameter follows:</p>
614
615 <dd>
616 </dd>
617
618 <dd> </dd>
619 <dl class="dl-horizontal">
620 <dt>image</dt>
621 <dd>the image. </dd>
622
623 <dd> </dd>
624 <dt>modulate</dt>
625 <dd>Define the percent change in brightness, saturation, and hue. </dd>
626
627 <dd> </dd>
628 <dt>exception</dt>
629 <dd>return any errors or warnings in this structure. </dd>
630
631 <dd>  </dd>
632 </dl>
633 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="NegateImage">NegateImage</a></h2>
634
635 <p>NegateImage() negates the colors in the reference image.  The grayscale option means that only grayscale values within the image are negated.</p>
636
637 <p>The format of the NegateImage method is:</p>
638
639 <pre class="text">
640 MagickBooleanType NegateImage(Image *image,
641   const MagickBooleanType grayscale,ExceptionInfo *exception)
642 </pre>
643
644 <p>A description of each parameter follows:</p>
645
646 <dd>
647 </dd>
648
649 <dd> </dd>
650 <dl class="dl-horizontal">
651 <dt>image</dt>
652 <dd>the image. </dd>
653
654 <dd> </dd>
655 <dt>grayscale</dt>
656 <dd>If MagickTrue, only negate grayscale pixels within the image. </dd>
657
658 <dd> </dd>
659 <dt>exception</dt>
660 <dd>return any errors or warnings in this structure. </dd>
661
662 <dd>  </dd>
663 </dl>
664 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="The_NormalizeImage">The NormalizeImage</a></h2>
665
666 <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>
667
668 <p>The format of the NormalizeImage method is:</p>
669
670 <pre class="text">
671 MagickBooleanType NormalizeImage(Image *image,ExceptionInfo *exception)
672 </pre>
673
674 <p>A description of each parameter follows:</p>
675
676 <dd>
677 </dd>
678
679 <dd> </dd>
680 <dl class="dl-horizontal">
681 <dt>image</dt>
682 <dd>the image. </dd>
683
684 <dd> </dd>
685 <dt>exception</dt>
686 <dd>return any errors or warnings in this structure. </dd>
687
688 <dd>  </dd>
689 </dl>
690 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/enhance_8c.html" id="SigmoidalContrastImage">SigmoidalContrastImage</a></h2>
691
692 <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>
693
694 <p>The format of the SigmoidalContrastImage method is:</p>
695
696 <pre class="text">
697 MagickBooleanType SigmoidalContrastImage(Image *image,
698   const MagickBooleanType sharpen,const char *levels,
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>sharpen</dt>
714 <dd>Increase or decrease image contrast. </dd>
715
716 <dd> </dd>
717 <dt>contrast</dt>
718 <dd>strength of the contrast, the larger the number the more 'threshold-like' it becomes. </dd>
719
720 <dd> </dd>
721 <dt>midpoint</dt>
722 <dd>midpoint of the function as a color value 0 to QuantumRange. </dd>
723
724 <dd> </dd>
725 <dt>exception</dt>
726 <dd>return any errors or warnings in this structure. </dd>
727
728 <dd>  </dd>
729 </dl>
730 </div>
731   <footer class="magick-footer">
732     <p><a href="../support.html">Donate</a> •
733      <a href="../sitemap.html">Sitemap</a> •
734     <a href="../links.html">Related</a> •
735     <a href="../architecture.html">Architecture</a>
736 </p>
737     <p><a href="enhance.html#">Back to top</a> •
738     <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
739     <a href="http://nextgen.imagemagick.org/script/contact.php">Contact Us</a></p>
740         <p><small>©  1999-2015 ImageMagick Studio LLC</small></p>
741   </footer>
742 </div><!-- /.container -->
743
744   <script src="http://nextgen.imagemagick.org/js/magick.html"></script>
745 </div>
746 </body>
747 </html>