procedure ReadFrom(Source: TBitmap32; Conversion: TConversionType);
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 |
Copyright ©2000-2024 Alex Denisov and the Graphics32 Team - Graphics32 2.0 - Help file built on 18 Feb 2024