ImageEn, unit imageenio

TImageEnIO.LoadFromStreamTIFF

TImageEnIO.LoadFromStreamTIFF


Declaration

function LoadFromStreamTIFF(Stream: TStream): integer;


Description

Loads an image from a stream containing a TIFF file (rev. 6.0, Packbits, LZW, CCITT G.3 and G.4).

Returns the number of images contained in the stream or -1 if an error was encountered while loading, such as the file not being TIFF format (Aborting will be true). Result will always be -1 if AsyncMode=True.

Note:
 You can abort loading by setting Aborting to true
 If StreamHeaders property is True, the stream must have a special header (saved using SaveToStreamTIFF)
 LoadFromStreamTIFF does not reset the position of the stream, so you may need to first call Stream.Position := 0;


Example

// loads a TIFF file with LoadFromStreamTIFF
var
  fs: TFileStream;
Begin
  fs := TFileStream.Create('C:\myfile.tif', fmOpenRead);
  ImageEnView1.IO.LoadFromStreamTIFF(fs);
  fs.free;
End;


See Also

 LoadFromFileTIFF
 SaveToStreamTIFF
 InsertToStreamTIFF
 ReplaceStreamTIFF
 TIFF_ImageIndex
 TIFF_ImageCount
 EnumTIFFStream (Image Count)
 Global Image Methods