Is there any function to read a bmp byte by byte return file and convert to pixel and create the bitmap
This is a return of the biometrics image
BUFFER CONVERSION TO BITMAP
BUFFER CONVERSION TO BITMAP
Last edited by marca on Tue Mar 10, 2020 7:54 pm, edited 1 time in total.
Marcelo Ferro da Silveira
Fwh14.04/xHarbour 1.2.3 Simplex / Bcc582 / Pelles 8
SqlLib /xMate/WS
Fwh14.04/xHarbour 1.2.3 Simplex / Bcc582 / Pelles 8
SqlLib /xMate/WS
Re: convert file to bmp
This is the equivalent that exists in Delphi.
BUFFER CONVERSION TO BITMAP
FREECALL/DELPHI
Function RetornaBitMap(biometria : TDigital) : TBitMap;
var
srcBmp: TBitmap;
Color : TColor;
X,Y : Integer;
baite : Byte;
begin
try
srcBmp := TBitmap.Create;
srcBmp.Width := biometria.X;
srcBmp.Height := biometria.Y;
For X := 0 to biometria.X - 1 do
begin
For Y := 0 to biometria.y do
begin
baite := biometria.img[x + srcBmp.Width * y];
srcBmp.canvas.Pixels[X,Y] := RGB(baite, baite, baite);
end;
end;
finally
result := srcBmp;
end;
end;
Since I need to do the same thing for xHarbour
BUFFER CONVERSION TO BITMAP
FREECALL/DELPHI
Function RetornaBitMap(biometria : TDigital) : TBitMap;
var
srcBmp: TBitmap;
Color : TColor;
X,Y : Integer;
baite : Byte;
begin
try
srcBmp := TBitmap.Create;
srcBmp.Width := biometria.X;
srcBmp.Height := biometria.Y;
For X := 0 to biometria.X - 1 do
begin
For Y := 0 to biometria.y do
begin
baite := biometria.img[x + srcBmp.Width * y];
srcBmp.canvas.Pixels[X,Y] := RGB(baite, baite, baite);
end;
end;
finally
result := srcBmp;
end;
end;
Since I need to do the same thing for xHarbour
Marcelo Ferro da Silveira
Fwh14.04/xHarbour 1.2.3 Simplex / Bcc582 / Pelles 8
SqlLib /xMate/WS
Fwh14.04/xHarbour 1.2.3 Simplex / Bcc582 / Pelles 8
SqlLib /xMate/WS
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: BUFFER CONVERSION TO BITMAP
Marcelo,
Please check function CreateMemBitmap() here:
http://forums.fivetechsupport.com/viewt ... 18#p230018
Please check function CreateMemBitmap() here:
http://forums.fivetechsupport.com/viewt ... 18#p230018
Re: BUFFER CONVERSION TO BITMAP
Antonio Linares wrote:Marcelo,
Please check function CreateMemBitmap() here:
http://forums.fivetechsupport.com/viewt ... 18#p230018
Antônio
thanks
Marcelo Ferro da Silveira
Fwh14.04/xHarbour 1.2.3 Simplex / Bcc582 / Pelles 8
SqlLib /xMate/WS
Fwh14.04/xHarbour 1.2.3 Simplex / Bcc582 / Pelles 8
SqlLib /xMate/WS