怎样能把一个数组还原成一个位图(100分)

  • 主题发起人 主题发起人 letgolxh
  • 开始时间 开始时间
L

letgolxh

Unregistered / Unconfirmed
GUEST, unregistred user!
我现在有一个数组
aa :array[Size2048] of Byte
值如下:
(35, 0, 0, 255, 0, 1, 255, 128, 7, 255, 192, 15, 131, 240, 31, 1, 248, 62, 0, 248, 124, 0, 248, 124, 0, 60, 120, 0, 60, 56, 0, 126, 0, 0, 126, 0, 0, 124, 0, 0, 252, 0, 1, 248, 0, 3, 240, 0, 7, 224, 0, 15, 192, 0, 15, 128, 0, 63, 128, 0, 62, 0, 1, 252, 0, 1, 248, 0, 3, 248, 0, 7, 192, 0, 15, 192, 0, 31, 192, 0, 63, 128, 0, 63, 0, 0, 254, 0, 0, 253, 0, 56, 255, 255, 248, 255, 255, 248, 255, 255, 248, 255, 255, 248, 3, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, )
多余的0已省掉
请问我怎样才能把它还原成图像?
请给出详细代码!!
不胜感激!!!
 
http://www.delphibbs.com/delphibbs/dispq.asp?lid=167248
 
bmp := TBitmap.create;
bmp.width := W;
bmp,height := H;
bmp.pixformat := pf8bit;
index := 0;
for i := 0 to h-1 do
for j := 0 to w-1 do
begin
bmp.canvas.pixel[i,j] := RGB(aa[indx],aa[index+1],aa[index+2]);
index := index+3;
end;
 

Similar threads

I
回复
0
查看
649
import
I
I
回复
0
查看
426
import
I
I
回复
0
查看
860
import
I
I
回复
0
查看
499
import
I
后退
顶部