Click or drag to resize

TiffDecoderReadTile Method

Decodes a specified tile from a TIFF image stream that is encoded with strips.

Namespace:  Atalasoft.Imaging.Codec
Assembly:  Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: (.NET 4.5.2, x86)
public AtalaImage ReadTile(
	Stream stream,
	Point location,
	int frameIndex,
	ProgressEventHandler progress


Type: System.IOStream
A Stream containing the encoded image data.
Type: System.DrawingPoint
The pixel location of the top left location of the tile.
Type: SystemInt32
The zero based frame index to load from a multi-page Tiff file.
Type: Atalasoft.ImagingProgressEventHandler
The progress delegate. Can be set to null (Nothing in Visual Basic).

Return Value

Type: AtalaImage

[Missing <returns> documentation for "M:Atalasoft.Imaging.Codec.TiffDecoder.ReadTile(System.IO.Stream,System.Drawing.Point,System.Int32,Atalasoft.Imaging.ProgressEventHandler)"]

Thrown when the top-left corner of a tile doesn't exist at the location specified.
Thrown if the image stream is not located at the beginning of a valid TIFF file.

This method differs from ReadRegion(Stream, Rectangle, Int32, ProgressEventHandler) in that it doesn't check that the source image is tiled. For reading multiple tiles at once, ReadRegion is more efficient. To determine the tile size, query the tag TIFFTAG_TILELENGTH (323) or TIFFTAG_TILEWIDTH (322). If those tags do not exist, then the image is stripped in which case see ReadStrip(Stream, Int32, Int32, ProgressEventHandler).

Note that the image data is not corrected for orientation even when CorrectOrientation is true.

See Also