ImageEn, unit iexBitmaps

TIEBitmap.GetHash

TIEBitmap.GetHash


Declaration


function GetHash(Algorithm: TIEHashAlgorithm = iehaMD5): AnsiString;


Description


Calculates the hash (using the specified hash algorithm) of the bitmap and returns the string representation of the hash.


Example


// calculates MD5 hash of input.jpg raster bitmap
ImageEnView1.IO.LoadFromFile('input.jpg');
ShowMessage( ImageEnView1.IEBitmap.GetHash() );

// calculates MD5 hash of input.jpg
with TIEHashStream.Create() do
begin
  LoadFromFile('input.jpg');
  ShowMessage( GetHash() );
end;