Показать сообщение отдельно
  #3  
Старый 25.06.2018, 21:00
Аватар для Alegun
Alegun Alegun вне форума
LMD-DML
 
Регистрация: 12.07.2009
Адрес: Богородское
Сообщения: 3,025
Версия Delphi: D7E
Репутация: 1834
По умолчанию

Цитата:
Сообщение от lmikle
А мож это подойдет?...
Но вот этот быстрее всех сравнивает
Код:
function IsSameBitmapUsingScanLine(B1, B2: TBitmap): boolean;
var
 i           : Integer;
 ScanBytes   : Integer;
begin
  Result:= (B1<>nil) and (B2<>nil);
  if not Result then exit;
  Result:=(b1.Width=b2.Width) and (b1.Height=b2.Height) and (b1.PixelFormat=b2.PixelFormat) ;

  if not Result then exit;

  ScanBytes := Abs(Integer(B1.Scanline[1]) - Integer(B1.Scanline[0]));
  for i:=0 to B1.Height-1 do
  Begin
    Result:=CompareMem(B1.ScanLine[i],B2.ScanLine[i],ScanBytes);
    if not Result then exit;
  End;

end;
Ответить с цитированием