Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure PrepareBitmap(Bitmap: TBitmap; const Buffer: array of Integer);
- var
- I, X, Y: Integer;
- Pixels: PByteArray;
- const
- PixelSize = SizeOf(TRGBQuad);
- begin
- I := 0;
- for Y := 0 to Bitmap.Height - 1 do
- begin
- Pixels := Bitmap.ScanLine[Y];
- for X := 0 to Bitmap.Width - 1 do
- begin
- PRGBQuad(@Pixels^[(X * PixelSize)])^ := TRGBQuad(Buffer[I]);
- Inc(I);
- end;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement