ColorLevel method (ILEADRasterProcess)

Visual Basic example

Visual C++ example

 

Syntax

short ColorLevel (ILEADRaster * pRaster, long lFlags);

Overview

Refer to Correcting Colors

Remarks

(Raster Pro and above toolkits) Applies color leveling to an image. It changes the image shadows, midtones and highlights.

Before you call this method, you need to set all Color Level properties. These properties tell the ColorLevel method what constitutes shadows, midtones, and highlights and how to remap the shadows, midtones and highlights.

Control the amount of image balance and leveling by controlling the values of the Color Level properties, listed below:

MasterMinInput

MasterMaxInput

MasterMinOutput

MasterMaxOutput

MasterGamma

RedMinInput

RedMaxInput

RedMinOutput

RedMaxOutput

RedGamma

GreenMinInput

GreenMaxInput

GreenMinOutput

GreenMaxOutput

GreenGamma

BlueMinInput

BlueMaxInput

BlueMinOutput

BlueMaxOutput

BlueGamma

If only LEVEL_MASTER is set in lFlags then the rest of the channels will still be affected.

If the image is a grayscale image, then you must set LEVEL_MASTER in lFlags, otherwise the method will not have any effect.

If XXXMinOutput property > XXXMaxOutput property then the bitmap’s shadows and highlights will be inverted.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

If the bitmap has a region, the effect will be applied on the region only.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements:

MasterMinInput property MasterMaxInput property, MasterMinOutput property, MasterMaxOutput property, MasterGamma property, RedMinInput property, RedMaxInput property, RedMinOutput property, RedMaxOutput property, RedGamma property, GreenMinInput property, GreenMaxInput property, GreenMinOutput property, GreenMaxOutput property, GreenGamma property, BlueMinInput property, BlueMaxInput property, BlueMinOutput property, BlueMaxOutput property, BlueGamma property, AutoColorLevel method

Topics:

Raster Image Functions: Modifying Intensity Values