LONG HT_ComputeRGBGammaTable(
WORD GammaTableEntries, | |
WORD GammaTableType, | |
USHORT RedGamma, | |
USHORT GreenGamma, | |
USHORT BlueGamma, | |
LPBYTE pGammaTable | |
); |
HT_ComputeRGBGammaTable is a halftone-related GDI service that causes GDI to compute device red, green, and blue intensities based on gamma numbers.
GammaTableType |
Meaning |
0 |
The gamma table’s red, green, and blue values are interleaved together. Each gamma step is 3 bytes; 1 byte each for red, green, and blue. |
1 |
The red, green, and blue tables are packed separately; that is, the entire red table is followed by the entire green table, which is followed by the entire blue table. Individual entries are 1 byte each, making each sub-table a total of GammaTableEntries bytes in length. |
The return value is the number of gamma entries written to pGammaTable; upon success, this value is equal to GammaTableEntries. If GammaTableEntries is less than 2 or greater than 256, the return value is 0.
The red, green, and blue intensities returned in pGammaTable range from 0 to 255.
GDI halftone service routines use a special palette to do halftoning. If the device selects an 8-bit per pixel palette from a pool of 24-bit device colors for a 16-bit or 24-bit type surface, GDI assumes red, green, and blue color steps; each has equal brightness.
GDI provides this service so that the driver can query the 8-bit per pixel halftone palette used by GDI or compute gamma corrected and equalized RGB color intensities for the device.