function ReadHiddenData(data: PAnsiChar; maxlen: Integer): Integer;
Description
ReadHiddenText and ReadHiddenData return the hidden text or raw data written with WriteHiddenText or WriteHiddenData. Hidden information is stored inside the image (uses a pixel color modulation) and is independent of the image file format.
Use ReadHiddenText to read a simple string or ReadHiddenData to read a buffer of raw data.
If you set data to nil and maxlen to 0, ReadHiddenData will returns the length of data to read.
Note: ◼The hidden text will be lost if you save the image as Jpeg or if you subsample the colors ◼If the image PixelFormat is not ie24RGB, it will be converted
// Hide image "alfa.jpg" within "beta.jpg", then save to "gamma.png" procedure TForm1.Button2(Sender: TObject); var ms: TMemoryStream; begin ImageEnView1.IO.LoadFromFile('C:\beta.jpg'); ms := TMemoryStream.Create; ms.LoadFromFile('C:\alfa.jpg'); ImageEnView1.Proc.WriteHiddenData(ms.Memory, ms.Size); ms.Free(); ImageEnView1.IO.SaveToFile('D:\gamma.png'); end;
// Read a hidden Jpeg image procedure TForm1.Button1Click(Sender: TObject); var ms: TMemoryStream; Begin ImageEnView1.IO.LoadFromFile('D:\gamma.png'); ms := TMemoryStream.Create; ms.Size := ImageEnView1.Proc.ReadHiddenData(nil, 0) ); ImageEnView1.Proc.ReadHiddenData(ms.Memory, ms.Size); ImageEnView2.IO.LoadFromStreamJpeg(ms); ms.Free; End;