ContrastLum

Function
The ContrastLum function applies a contrast change on the image, with a smooth falloff on both the low and high ends. You can also move the center of the contrast curve up and down (for example, move it down to make your overall image brighter). Note that this contrast is based on the luminance of the pixel, so it balances red, green, and blue, and you therefore do not shift your hue. So, an image with strong primary colors looks different than an image with the same values in a ContrastRGB, which evaluates each channel separately.

Also note that a roll-off is built into the contrast function, giving you a smooth falloff at the ends of the curve. This is controlled by the softClip parameter.

Parameters
Type
Defaults
Function
value
float
1 The contrast value. A higher value means it pushes your RGB values towards 0 and 1. A value of 0 means no change. A lower value means low contrast.
center
float
.5 This is the center of the contrast curve. A lower value means a brighter image.
softClip
float
0 This controls the drop-off of the curve. When it is increased to 1, you have maximum smoothness of the curve.


Synopsis

image ContrastLum(
  image In,         
  float value, 
  float center,
  float softClip
);

Script
image = ContrastLum( 
  image, 
  value, 
  center, 
  softClip
);


Command Line

shake -contrastlum value center softClip


Examples

shake lisa.iff -contrastl 2
shake lisa.iff -contrastl 2 .3
shake lisa.iff -contrastl 2 .8
shake lisa.iff -contrastl .8

See Also
ContrastRGB, Gamma, Add, Mult,