Declaration ​
pascal
TByteMap = class(TCustomMap)Description ​
TByteMap is a 2D array container for 8-bit unsigned byte values (Byte), inheriting from TCustomMap.
It is commonly used for grayscale images, alpha channels, stencil masks, heightmaps, and weight maps.
Features & Capabilities ​
- Bitmap Conversion:
ReadFrom: Extracts color channels (, uniform RGB, or weighted intensity) from a TCustomBitmap32.WriteTo: Converts byte values back into bitmap pixels or applies a 256-color palette (TPalette32).
- Drawing & Blending:
DrawTo: Blends byte map data onto a destinationTCustomBitmap32as alpha modulation for a target color (TColor32).
- Arithmetic:
Add,Sub,Multiply: Performs saturated per-pixel scalar arithmetic operations on byte buffer elements.
- Transformation & Resampling:
FlipHorz,FlipVert,Rotate90,Rotate180,Rotate270: Performs spatial orientation flips and 90-degree step rotations.Downsample: Box-filters and downsamples byte map dimensions by integer scaling factors (, up to ).