Click or drag to resize

TiffDecoderReadRegion Method

Decodes a specified region of a TIFF image given a source Stream.

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


Type: System.IOStream
A Stream containing the encoded image data.
Type: System.DrawingRectangle
A rectangular region of the image to decode.
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.ReadRegion(System.IO.Stream,System.Drawing.Rectangle,System.Int32,Atalasoft.Imaging.ProgressEventHandler)"]


IRegionReadableReadRegion(Stream, Rectangle, Int32, ProgressEventHandler)
Thrown if the image stream is not located at the beginning of a valid TIFF file.
Thrown if the region parameter is outside the image bounds.

This method will read only the strips or tiles that it needs in order to compose and image of the indicated rectangular region, and trim any excess data. This can be significantly faster than reading the entire image if only a specified region needs to be decoded. To maximize benefit of this method, use multiple tiles or strips per image.

For reading only a single strip or tile, see ReadStrip(Stream, Int32, Int32, ProgressEventHandler) or ReadTile(Stream, Point, Int32, ProgressEventHandler).

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

See Also