Class TiffStreamReader
- Namespace
- Aspose.Imaging.FileFormats.Tiff.FileManagement
- Assembly
- Aspose.Imaging.dll
The tiff stream for handling little endian tiff file format.
public class TiffStreamReader : #=zxGUTFrklD4PGEf4eGKsc3gL0G_AllGKYEXlNWJTTJ9qablcRaoyoVec=
- Inheritance
-
#=zxGUTFrklD4PGEf4eGKsc3gL0G_AllGKYEXlNWJTTJ9qablcRaoyoVec=TiffStreamReader
- Derived
- Inherited Members
Constructors
TiffStreamReader(StreamContainer)
Initializes a new instance of the TiffStreamReader class.
public TiffStreamReader(StreamContainer streamContainer)
Parameters
streamContainerStreamContainerThe stream container.
TiffStreamReader(byte[])
Initializes a new instance of the TiffStreamReader class.
public TiffStreamReader(byte[] data)
Parameters
databyte[]The byte array data.
TiffStreamReader(byte[], int)
Initializes a new instance of the TiffStreamReader class.
public TiffStreamReader(byte[] data, int startIndex)
Parameters
TiffStreamReader(byte[], int, int)
Initializes a new instance of the TiffStreamReader class.
public TiffStreamReader(byte[] data, int startIndex, int dataLength)
Parameters
databyte[]The byte array data.
startIndexintThe start index into
data.dataLengthintLength of the data.
Properties
Length
Gets the reader length.
public long Length { get; }
Property Value
- long
The reader length.
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
trueif exceptions are thrown on incorrect data processing; otherwise, the error conditions are silently ignored.
Methods
ProcessReadDataDouble(byte[])
Performs a conversion to the double array.
protected virtual double[] ProcessReadDataDouble(byte[] data)
Parameters
databyte[]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
databyte[]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
databyte[]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
databyte[]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
databyte[]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
databyte[]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
databyte[]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
databyte[]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
arraybyte[]The array to fill.
arrayIndexintThe array index to start putting values to.
positionlongThe stream position to read from.
countlongThe 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
Returns
- byte[]
The array of unsigned byte values.
ReadDouble(long)
Read a single double value from the stream.
public double ReadDouble(long position)
Parameters
positionlongThe 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
Returns
- double[]
The array of double values.
ReadFloat(long)
Read a single float value from the stream.
public float ReadFloat(long position)
Parameters
positionlongThe 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
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
positionlongThe 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
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
positionlongThe 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
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
positionlongThe 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
Returns
- sbyte[]
The array of signed byte values.
ReadSInt(long)
Read signed integer value from the stream.
public int ReadSInt(long position)
Parameters
positionlongThe 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
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
positionlongThe 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
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
positionlongThe 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
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
positionlongThe 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
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
positionlongThe 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
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
positionlongThe 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
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
startPositionlongThe start position to start conversion from.
Returns
- StreamContainer
The StreamContainer with converted data.