AutoColorLevel method (ILEADRasterProcess)
short AutoColorLevel (ILEADRaster * pRaster, long lBlackClip, long lWhiteClip, long lFlags); | |
Overview |
Refer to Correcting Colors |
Remarks
(Raster Pro and above toolkits) Applies one of several types of automatic color leveling to an image.
This method makes the dark values darker and the light values lighter, which automatically enhances shadows and brightens the image. It also maximizes the tonal range of the image. It enhances the contrast and intensity using the image's histogram and a color distribution-based algorithm.
If you set the AUTO_NOPROCESS flag in lFlags, the ColorLevel properties, listed below, will be updated with the color leveling information used by the AutoColorLevel method.
If you then call the ColorLevel method with the same values set in the Color Level properties, you will obtain the same result that you would have obtained if you had called the AutoColorLevel method with the leveling flag by itself.
If the image is a grayscale image, then AUTO_LEVEL, AUTO_CONTRAST and AUTO_INTENSITY give identical results. The properties listed above will have the same values.
This function 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.
As an example, the following figure shows an image before any automatic color leveling has been performed:
The following figure shows what would happen if you start with the original image and apply the AutoColorLevel method using the AUTO_LEVEL flag.
The following figure shows what would happen if you start with the original image and apply the AutoColorLevel method using the AUTO_INTENSITY flag.
The following figure shows what would happen if you start with the original image and apply the AutoColorLevel method using the AUTO_CONTRAST flag.
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