In Bitmap speichern sollte ganz einfach sein:
Delphi-Quellcode:
procedure SaveToBMP(Heightmap: Single2dArray; filename:
string);
var bmp : TBitmap;
i,k : Integer;
begin
bmp := TBitmap.create;
try
bmp.width := length(HeightMap);
bmp.Height := length(Heightmap[0]);
for i := 0
to bmp.width -1
do
for k := 0
to bmp.height -1
do
bmp.pixels[i,k] :=
RGB(Heightmap[i,k],HeightMap.[i,k],HeightMap.[i,k]);
bmp.savetofile(filename);
finally
bmp.free;
end;
end;
sorry wegen der formatierung
Lukas Erlacher
Suche Grafiktablett. Spenden/Gebrauchtangebote willkommen.
Gotteskrieger gesucht!
For it is the chief characteristic of the religion of science that it works. - Isaac Asimov, Foundation I, Buch 1