ColorReplace method (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

int ColorReplace(int nHue, int nSaturation, int nBrightness, LPREPLACECOLOR pColorReplace, unsigned uColorCount);

Delphi Syntax

Function ColorReplace (nHue: L_INT; nSaturation: L_INT; nBrightness: L_INT; pColorReplace: LPREPLACECOLOR; uColorCount: L_UINT): L_INT;

Overview

Refer to Correcting Colors

Remarks

Replaces specified colors by adjusting values of hue, saturation and brightness.

The value of the uFuzziness member of the REPLACECOLOR record (structure) determines the range around each color where the pixels will be changed according to nHue, nSaturation and nBrightness.

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

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:

Intensity method, GammaCorrect method, Contrast method, HistoContrast method, StretchIntensity method, RemapIntensity method, Invert method, Saturation method, HistoEqualize method, Fill method, Pixel property, GetHistogram method, WindowLevel method, Hue method, Average method, Median method, AddNoise method, IntensityDetect method, ColorThreshold method, ChangeHueSatInt method

Topics:

Raster Images: Modifying Intensity Values

 

Using Color Values in LEADTOOLS