![]() |
![]() |
![]() |
![]() |
TByteMap.ReadFrom
procedure ReadFrom(Source: TBitmap32; Conversion: TConversionType);
Description
ReadFrom allows reading and converting data from TBitmap32 objects into the byte map.
First, the byte map is resized to fit the Source bitmap dimensions, then the 32-bit RGBA color is transformed to 8-bits depending on the conversion type:
Conversion | Action |
---|---|
ctRed | Copies red channel |
ctGreen | Copies green channel |
ctBlue | Copies blue channel |
ctAlpha | Copies alpha channel |
ctUniformRGB | Copies averaged value: (R + G + B) / 3 |
ctWeightedRGB | Copies intensity: R * 0.21 + G * 0.71 + B * 0.08 |
See Also
Copyright ©2000-2007 Alex Denisov and Contributors - Graphics32 v1.8.3 - Build on 4-March-2007