Class TiffStreamReader

Class TiffStreamReader

Namespace: Aspose.Imaging.FileFormats.Tiff.FileManagement
Assembly: Aspose.Imaging.dll (25.2.0)

The tiff stream for handling little endian tiff file format.

public class TiffStreamReader : #=zoZFYF645XiIaQ9ZQWyasEuZcv34nAqVVQfTZiy32YTwhWRVBmpo3OhI=

Inheritance

object#=zoZFYF645XiIaQ9ZQWyasEuZcv34nAqVVQfTZiy32YTwhWRVBmpo3OhI=TiffStreamReader

Derived

BigTiffReader, TiffBigEndianStreamReader

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

TiffStreamReader(byte[])

Initializes a new instance of the Aspose.Imaging.FileFormats.Tiff.FileManagement.TiffStreamReader class.

public TiffStreamReader(byte[] data)

Parameters

data byte[]

The byte array data.

TiffStreamReader(byte[], int)

Initializes a new instance of the Aspose.Imaging.FileFormats.Tiff.FileManagement.TiffStreamReader class.

public TiffStreamReader(byte[] data, int startIndex)

Parameters

data byte[]

The byte array data.

startIndex int

The start index into data.

TiffStreamReader(byte[], int, int)

Initializes a new instance of the Aspose.Imaging.FileFormats.Tiff.FileManagement.TiffStreamReader class.

public TiffStreamReader(byte[] data, int startIndex, int dataLength)

Parameters

data byte[]

The byte array data.

startIndex int

The start index into data.

dataLength int

Length of the data.

TiffStreamReader(StreamContainer)

Initializes a new instance of the Aspose.Imaging.FileFormats.Tiff.FileManagement.TiffStreamReader class.

public TiffStreamReader(StreamContainer streamContainer)

Parameters

streamContainer StreamContainer

The stream container.

Properties

Length

Gets the reader length.

public long Length { get; }

Property Value

long

ThrowExceptions

Gets or sets a value indicating whether exceptions are thrown on incorrect data processing (reading or writing to stream).

public bool ThrowExceptions { get; set; }

Property Value

bool

Methods

ProcessReadDataDouble(byte[])

Performs a conversion to the double array.

protected virtual double[] ProcessReadDataDouble(byte[] data)

Parameters

data byte[]

The data to convert.

Returns

double[]

The converted array.

ProcessReadDataFloat(byte[])

Performs a conversion to the float array.

protected virtual float[] ProcessReadDataFloat(byte[] data)

Parameters

data byte[]

The data to convert.

Returns

float[]

The converted array.

ProcessReadDataInt(byte[])

Performs a conversion to the integer array.

protected virtual int[] ProcessReadDataInt(byte[] data)

Parameters

data byte[]

The data to convert.

Returns

int[]

The converted array.

ProcessReadDataLong(byte[])

Performs a conversion to the long array.

protected virtual long[] ProcessReadDataLong(byte[] data)

Parameters

data byte[]

The data to convert.

Returns

long[]

The converted array.

ProcessReadDataShort(byte[])

Performs a conversion to the short array.

protected virtual short[] ProcessReadDataShort(byte[] data)

Parameters

data byte[]

The data to convert.

Returns

short[]

The converted array.

ProcessReadDataUInt(byte[])

Performs a conversion to the unsigned integer array.

protected virtual uint[] ProcessReadDataUInt(byte[] data)

Parameters

data byte[]

The data to convert.

Returns

uint[]

The converted array.

ProcessReadDataULong(byte[])

Performs a conversion to the ushort array.

protected virtual ulong[] ProcessReadDataULong(byte[] data)

Parameters

data byte[]

The data to convert.

Returns

ulong[]

The converted array.

ProcessReadDataUShort(byte[])

Performs a conversion to the unsigned short array.

protected virtual ushort[] ProcessReadDataUShort(byte[] data)

Parameters

data byte[]

The data to convert.

Returns

ushort[]

The converted array.

ReadBytes(byte[], int, long, long)

Reads an array of byte values from the stream.

public long ReadBytes(byte[] array, int arrayIndex, long position, long count)

Parameters

array byte[]

The array to fill.

arrayIndex int

The array index to start putting values to.

position long

The stream position to read from.

count long

The elements count to read.

Returns

long

The array of byte values.

ReadBytes(long, long)

Reads an array of unsigned byte values from the stream.

public byte[] ReadBytes(long position, long count)

Parameters

position long

The position to read from.

count long

The elements count.

Returns

byte[]

The array of unsigned byte values.

ReadDouble(long)

Read a single double value from the stream.

public double ReadDouble(long position)

Parameters

position long

The position to read from.

Returns

double

The single double value.

ReadDoubleArray(long, long)

Reads an array of double values from the stream.

public double[] ReadDoubleArray(long position, long count)

Parameters

position long

The position to read from.

count long

The elements count.

Returns

double[]

The array of double values.

ReadFloat(long)

Read a single float value from the stream.

public float ReadFloat(long position)

Parameters

position long

The position to read from.

Returns

float

The single float value.

ReadFloatArray(long, long)

Reads an array of float values from the stream.

public float[] ReadFloatArray(long position, long count)

Parameters

position long

The position to read from.

count long

The elements count.

Returns

float[]

The array of float values.

Exceptions

ArgumentOutOfRangeException

count;Expected a positive number.

ReadLong(long)

Read unsigned long value from the stream.

public long ReadLong(long position)

Parameters

position long

The position to read from.

Returns

long

An unsigned short value.

ReadLongArray(long, long)

Reads an array of ulong values from the stream.

public long[] ReadLongArray(long position, long count)

Parameters

position long

The position to read from.

count long

The elements count.

Returns

long[]

The ulong array.

Exceptions

ArgumentOutOfRangeException

Argument out of range

ReadRational(long)

Read a single rational number value from the stream.

public TiffRational ReadRational(long position)

Parameters

position long

The position to read from.

Returns

TiffRational

The rational number.

ReadRationalArray(long, long)

Reads an array of rational values from the stream.

public TiffRational[] ReadRationalArray(long position, long count)

Parameters

position long

The position to read from.

count long

The elements count.

Returns

TiffRational[]

The array of rational values.

Exceptions

ArgumentOutOfRangeException

count;Expected a positive number.

ReadSByte(long)

Reads signed byte data from the stream.

public sbyte ReadSByte(long position)

Parameters

position long

The position to read from.

Returns

sbyte

The signed byte value.

ReadSByteArray(long, long)

Reads an array of signed byte values from the stream.

public sbyte[] ReadSByteArray(long position, long count)

Parameters

position long

The position to read from.

count long

The elements count.

Returns

sbyte[]

The array of signed byte values.

ReadSInt(long)

Read signed integer value from the stream.

public int ReadSInt(long position)

Parameters

position long

The position to read from.

Returns

int

A signed integer value.

ReadSIntArray(long, long)

Reads an array of signed integer values from the stream.

public int[] ReadSIntArray(long position, long count)

Parameters

position long

The position to read from.

count long

The elements count.

Returns

int[]

The array of signed integer values.

Exceptions

ArgumentOutOfRangeException

count;Total bytes count is negative. + count + x4= + totalBytes

ReadSRational(long)

Read a single signed rational number value from the stream.

public TiffSRational ReadSRational(long position)

Parameters

position long

The position to read from.

Returns

TiffSRational

The signed rational number.

ReadSRationalArray(long, long)

Reads an array of signed rational values from the stream.

public TiffSRational[] ReadSRationalArray(long position, long count)

Parameters

position long

The position to read from.

count long

The elements count.

Returns

TiffSRational[]

The array of signed rational values.

Exceptions

ArgumentOutOfRangeException

count;Expected a positive number.

ReadSShort(long)

Read signed short value from the stream.

public short ReadSShort(long position)

Parameters

position long

The position to read from.

Returns

short

A signed short value.

ReadSShortArray(long, long)

Reads an array of signed short values from the stream.

public short[] ReadSShortArray(long position, long count)

Parameters

position long

The position to read from.

count long

The elements count.

Returns

short[]

The array of signed short values.

Exceptions

ArgumentOutOfRangeException

count;Expected a positive number.

ReadUInt(long)

Read unsigned integer value from the stream.

public uint ReadUInt(long position)

Parameters

position long

The position to read from.

Returns

uint

An unsigned integer value.

ReadUIntArray(long, long)

Reads an array of unsigned integer values from the stream.

public uint[] ReadUIntArray(long position, long count)

Parameters

position long

The position to read from.

count long

The elements count.

Returns

uint[]

The array of unsigned integer values.

Exceptions

ArgumentOutOfRangeException

count;Total bytes count is negative. + count + x4= + totalBytes

ReadULong(long)

Read unsigned long value from the stream.

public ulong ReadULong(long position)

Parameters

position long

The position to read from.

Returns

ulong

An unsigned short value.

ReadULongArray(long, long)

Reads an array of ulong values from the stream.

public ulong[] ReadULongArray(long position, long count)

Parameters

position long

The position to read from.

count long

The elements count.

Returns

ulong[]

The ulong array.

Exceptions

ArgumentOutOfRangeException

Argument out of range

ReadUShort(long)

Read unsigned short value from the stream.

public ushort ReadUShort(long position)

Parameters

position long

The position to read from.

Returns

ushort

An unsigned short value.

ReadUShortArray(long, long)

Reads an array of unsigned integer values from the stream.

public ushort[] ReadUShortArray(long position, long count)

Parameters

position long

The position to read from.

count long

The elements count.

Returns

ushort[]

The array of unsigned integer values.

Exceptions

ArgumentOutOfRangeException

count;Total bytes count is negative. + count + x2= + totalBytes

ToStreamContainer(long)

Converts the underlying data to the stream container.

public StreamContainer ToStreamContainer(long startPosition)

Parameters

startPosition long

The start position to start conversion from.

Returns

StreamContainer

The Aspose.Imaging.StreamContainer with converted data.