Delphi stream file read BMP to the array, the array values are printed?

bgr : array of byte;
ms:TMemoryStream;



ms:=TMemoryStream.Create;
ms.LoadFromFile('h:\delphi\9.bmp');
ms.Position:=0;
setLength(bgr, ms.size);
ms.ReadBuffer(bgr[0], ms.size);
//Here the (. Bmp read the BGR array.
How the BGR displayed in the memo?
Or save as TXT file?

Started by Bertram at February 03, 2016 - 10:55 AM

To show what?? Like using Notepad to open BMP files, see in Notepad?

Posted by Ingrid at February 16, 2016 - 11:36 AM

Each data in IntToStr () is transformed, and then output.

Posted by King at February 25, 2016 - 11:52 AM


var
I: integer;
begin
for I := 0 to length(arr) -1 do
Memo1.Line.Add(IntToStr(arr[I]));
end;

Posted by King at January 11, 2017 - 10:28 AM