ScanLine怎么用啊?
这个是Delphi帮助里的例子,怎么得到的图片不对呢?我要得到旋转后的图片还有其它好方法吗?主要是要求速度快一点的
var
x,y : Integer;
BitMap : TBitMap;
P : PByteArray;
begin
BitMap := TBitMap.create;
try
BitMap.LoadFromFile('C:\Program Files\Common Files\Borland Shared\Images\Splash\256color\factory.bmp');
for y := 0 to BitMap.Height -1 do
begin
P := BitMap.ScanLine[y];
for x := 0 to BitMap.Width -1 do
P[x] := y;
end;
Canvas.Draw(0,0,BitMap);
finally
BitMap.Free;
end;
end;
我要得到旋转后的图片还有其它好方法吗?主要是要求速度快一点的