Image kind |
Number of bits for each pixel |
Recommended typecast to access the scanline data |
COLOR_GRAYSCALE - Each pixel is
intensity from 0 to 2^BitDepth - 1
COLOR_PALETTE - Each pixel is a
index to the palette table |
Bitdepth = 1 |
1
bit |
pByteArray (windows.pas)
(Except for 8 and 16, bit
manangement algorithms should be used since there's more than one
pixel per byte) |
Bitdepth = 2 |
4 bits (not 2) |
Bitdepth = 4 |
4
bits |
Bitdepth = 8 |
1 byte |
Bitdepth = 16
(Grayscale) |
1
byte |
COLOR_RGB - Each pixel contains
values for Red, Green, Blue intensities
COLOR_RGBALPHA - Same as RGB but followed by an Alpha
Value
COLOR_GRAYSCALEALPHA - Same as GRAYSCALE but with alpha
value |
Bitdepth = 8 |
1
byte per sample |
TRGBLine = array[word] of TRGBTriple;
pRGBLine = ^TRGBLine; |
Bitdepth = 16 |
1 byte per sample |