آموزش دلفی و نکات برنامه نویسی و پاسخ به پرسشهای شما در زمینه برنامه نویسی |
function compareBmp(Bmp1, Bmp2: TBitmap): Boolean;
var y,x: Integer;
P1, P2: PByteArray;
begin
Result := False;
if Bmp1.WIdth <> Bmp2.Width then Exit;
if Bmp1.Height <> Bmp2.Height then Exit;
if Bmp1.PixelFormat <> Bmp2.PixelFormat then Exit;
for y := 0 to Bmp1.Height - 1 do
begin
P1 := PByteArray(Bmp1.Scanline);
P2 := PByteArray(Bmp2.Scanline);
for x := 0 to Bmp1.Width -1 do
if P1[x] <> P2[x] then Exit;
end;
Result := True;
end;
|
|
POWERED BY BLOGFA.COM |
|