Image.levelize

applies the reversed level operation to just the 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.

It can be used for example 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.

Parameters

blackPoint Quantum

Specifies the darkest color in the image.

whitePoint Quantum

Specifies the lightest color in the image.

gamma double

Specifies the gamma correction to apply to the image.

channel ChannelType

The channels to level.

Meta