ImageEn, unit hyieutils

TIEHashStream.GetHash

TIEHashStream.GetHash


Declaration

function GetHash: AnsiString;


Description

Calculates the hash and returns the string representation of the hash.


Example

// Save image with a unique name (by creating a hash from the jpeg content and using it as the filename)
var
  hashStream: TIEHashStream;
begin
  ImageEnView1.IO.LoadFromFile('input.jpg');
  hashStream := TIEHashStream.Create(iehaMD5);
  try
    ImageEnView1.IO.SaveToStreamJpeg(hashStream);
    hashStream.SaveToFile(hashStream.GetHash()+'.jpg');
  finally
    hashStream.Free;
  end;
end;