【发布时间】:2010-08-17 06:36:22
【问题描述】:
我正在与德尔福合作。我在我的代码中使用bmp.ScanLine[]。我的代码如下:
bmp := TBitmap.Create;
bmp.Height := imgMain.Height;
bmp.Width := imgMain.Width;
for i := 0 to imgMain.Height - 1 do begin
prgb := bmp.ScanLine[i];
p1 := imgMain.ScanLine[i];
for j := 0 to imgMain.Width - 1 do begin
//Some code
end;
end;
这里,imgMain 是 TBitmap 类型。我的问题是当我执行这段代码时,在行上花费了太多时间
prgb := bmp.ScanLine[i];
p1 := imgMain.ScanLine[i];
请告诉我哪里错了?
【问题讨论】:
-
这些行需要多长时间?你期待什么?