А хотя бы так, хотя на асме можно быстрее проверить, это p0s0l тебе может написать:
| Код | Type TRGB=record b,g,r : byte; end;
ARGB=array [0..1] of TRGB; PARGB=^ARGB; PRGB = ^TRGB;
function CompareImages(A,B : TBitmap) : Boolean; var i,j : integer; p1,p2 : PARGB; begin Result:=false; if A.Width<>B.Width then exit; if A.Height<>B.Height then exit; for i:=0 to A.Height-1 do begin p1:=A.ScanLine[i]; p2:=B.ScanLine[i]; for j:=0 to A.Width-1 do begin if not ((p1[j].r=p2[j].r) and (p1[j].g=p2[j].g) and (p1[j].b=p2[j].b)) then exit; end; end; Result:=true; end;
| |