ImageEn, unit ImageEnIO

TImageEnIO.LoadFromStreamTIFF

TImageEnIO.LoadFromStreamTIFF

Declaration

function LoadFromStreamTIFF(Stream: TStream): Integer;

Description

Load an image from a stream containing a TIFF file (rev. 6.0, Packbits, LZW, CCITT G.3 and G.4, etc).
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

// Load 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