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: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public AtalaImage ReadRegion(
	Stream stream,
	Rectangle region,
	int frameIndex,
	ProgressEventHandler progress
)

Parameters

stream
Type: System.IOStream
A Stream containing the encoded image data.
region
Type: System.DrawingRectangle
A rectangular region of the image to decode.
frameIndex
Type: SystemInt32
The zero based frame index to load from a multi-page Tiff file.
progress
Type: Atalasoft.ImagingProgressEventHandler
The progress delegate. Can be set to null (Nothing in Visual Basic).

Return Value

Type: AtalaImage

Implements

IRegionReadableReadRegion(Stream, Rectangle, Int32, ProgressEventHandler)
Exceptions
ExceptionCondition
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.
Remarks

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