
01.06.2006, 22:27
|
|
Познающий
Регистрация: 19.01.2006
Сообщений: 58
Провел на форуме: 108297
Репутация:
6
|
|
procedure TForm1.Button1Click(Sender: TObject);
const
BytesPerPixel = 4;
var
b1, b2: TBitmap;
c1, c2: PByte;
x, y, z,d: Integer;
begin
b1:=TBitmap.Create;
b2:=TBitmap.Create;
d:= 0;
b1.LoadFromFile('d:\1.bmp');
b2.LoadFromFile('d:\2.bmp');
Assert(b1.PixelFormat = b2.PixelFormat);
for y := 0 to b1.Height - 1 do begin
c1 := b1.Scanline[y];
c2 := b2.Scanline[y];
for x := 0 to b1.Width - 1 do
for z := 0 to BytesPerPixel-1 do
begin
Inc(d, Integer(c1^ <> c2^));
Inc(c1);
Inc(c2);
end;
end;
if d<>0 then ShowMessage('OTLICHIE ESTb');
end;
|
|
|