SampleTarget method (ILEADRasterProcess)
short SampleTarget (ILEADRaster *pRaster, OLE_COLOR crSample, OLE_COLOR crTarget, long lFlags); | |
Overview |
Refer to Applying Artistic Effects |
Remarks
(Raster Pro and above toolkits) Corrects color values by shifting the sample colors to the target colors.
For example, suppose you are working with a color image. In crSample you set the red value portion of the RGB macro to 125, the green portion to 165 and the blue portion to 100. In crTarget you set the red value portion to 170, the green to 120 and the blue to 200. If you set SAMP_BLUE in lFlags, then for every pixel in the bitmap that has a blue value of 100, that blue value will be changed to 200, thus shifting the colors in the bitmap. Depending on whether you set SAMP_LOW, SAMP_MID, or SAMP_HIGH, either the shadow values in the blue channel will be remapped, or the midtone values in the blue channel will be remapped, or the highlight values in the blue channel will be remapped.
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.
For gray scale bitmaps the gray value of the crSample and crTarget are used, and the different channel flags have the same effect since it works on the same channel (gray channel).
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