JCL Help:TJclBitmap32.Bits
JCL Help: TJclBitmap32.Bits Property
Search in JCL Help
Search in all projects
Summary
Pointer to the pixel data.
Pascal
public property Bits: PColor32Array;
Description
The bits property contains the address of the first (top-left) pixel in a bitmap. If the bitmap is not allocated (width or height is zero), the returned address is nil. Note, that numbering of rows starts from the top-most one. Data is continuously allocated in memory, row by row. You may safely access Width * Height elements, each of them is a 4-byte TColor32 value. For example:var
P: PColor32Array;
begin
P := Bitmap32.Bits;
for I := 0 to Bitmap32.Width * Bitmap32.Height - 1 do
P[I] := Gray32(Random(255)); // fill with a random grayscale noise end;
Note, that in this code no size verification is required, if width or height is zero, their product is zero and the loop will never be executed.
See Also
TJclBitmap32.Height TJclBitmap32.Width TJclBitmap32.PixelPtr TJclBitmap32.ScanLine TColor32 TColor32Array
About
Donator
Alex Denissov
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page