ColorLUTParams structure (gdipluseffects.h)
A ColorLUTParams structure contains members (color lookup tables) that specify color adjustments to a bitmap.
You can apply a custom adjustment to a bitmap by following these steps.
- Create a ColorLUTParams structure.
- Each member of the ColorLUTParams structure is a color lookup table (array of 256 bytes) for a particular color channel, alpha, red, green, or blue. Assign values of your choice to the four lookup tables.
- Pass the address of the ColorLUTParams structure to the ColorLUT::SetParameters method of a ColorLUT object.
- Pass the address of the ColorLUT object to the Graphics::DrawImage method or to the Bitmap::ApplyEffect method.
struct ColorLUTParams {
ColorChannelLUT lutB;
ColorChannelLUT lutG;
ColorChannelLUT lutR;
ColorChannelLUT lutA;
};
lutB
Type: ColorChannelLUT
Array of 256 bytes that specifies the adjustment for the blue channel.
lutG
Type: ColorChannelLUT
Array of 256 bytes that specifies the adjustment for the green channel.
lutR
Type: ColorChannelLUT
Array of 256 bytes that specifies the adjustment for the red channel.
lutA
Type: ColorChannelLUT
Array of 256 bytes that specifies the adjustment for the alpha channel.
A lookup table specifies how existing color channel values should be replaced by new values. A color channel value of j is replaced by the jth entry in the lookup table for that channel. For example, an existing blue channel value of 25 would be replaced by the value of lutB[25].
The ColorChannelLUT data type is defined in GdiplusColorMatrix.h as follows:
typedef BYTE ColorChannelLUT[256];
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Header | gdipluseffects.h (include Gdiplus.h) |