Class TiffDataType
Namespace: Aspose.Imaging.FileFormats.Tiff
Assembly: Aspose.Imaging.dll (25.2.0)
The TIFF data type.
[JsonObject(MemberSerialization.OptIn)]
public abstract class TiffDataType : IComparable
Inheritance
Derived
TiffASCIIType, TiffCommonArrayType, TiffUndefinedType, TiffUnknownType
Implements
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
TiffDataType(ushort)
Initializes a new instance of the Aspose.Imaging.FileFormats.Tiff.TiffDataType class.
[JsonConstructor]
protected TiffDataType(ushort tagId)
Parameters
tagId
ushort
The tag id.
Properties
Count
Gets the count of elements.
public abstract ulong Count { get; }
Property Value
DataSize
Gets the tag value size.
public virtual ulong DataSize { get; }
Property Value
ElementSize
Gets the element size in bytes.
public virtual byte ElementSize { get; }
Property Value
Id
Gets tag id as number.
[JsonProperty]
public ushort Id { get; }
Property Value
IsValid
Gets a value indicating whether tag data is valid. The valid tag contains data which may be preserved. The invalid tag cannot be stored.
public bool IsValid { get; }
Property Value
TagId
Gets the tag id.
public TiffTags TagId { get; }
Property Value
TagType
Gets the tag type.
public abstract TiffDataTypes TagType { get; }
Property Value
Value
Gets or sets the value this data type contains.
public abstract object Value { get; set; }
Property Value
Methods
CompareTo(object)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public int CompareTo(object obj)
Parameters
obj
object
An object to compare with this instance.
Returns
A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings:
Value
Meaning
Less than zero
This instance is less than obj
.
Zero
This instance is equal to obj
.
Greater than zero
This instance is greater than obj
.
Exceptions
Expected TiffDataType type.
CopyInstanceData(TiffDataType)
Copies the instance data into the cloned type.
protected virtual void CopyInstanceData(TiffDataType clonedType)
Parameters
clonedType
TiffDataType
The cloned type.
CreateInstance()
Creates a new instance.
protected abstract TiffDataType CreateInstance()
Returns
A new Aspose.Imaging.FileFormats.Tiff.TiffDataType instance.
DeepClone()
Performs a deep clone of this instance.
public virtual TiffDataType DeepClone()
Returns
A deep clone of the current instance.
GetAdditionalDataSize(byte)
Gets the additional tag value size in bytes (in case the tag can not fit the whole tag value).
public virtual ulong GetAdditionalDataSize(byte sizeOfTagValue)
Parameters
sizeOfTagValue
byte
Size of tag value: 4 or 8 for BigTiff.
Returns
The additional data size in bytes.
GetAlignedDataSize(byte)
Gets the data size aligned in 4-byte (int) or 8-byte (long) boundary.
public ulong GetAlignedDataSize(byte sizeOfTagValue)
Parameters
sizeOfTagValue
byte
Size of tag value.
Returns
The aligned data size in bytes.
ReadData(TiffStreamReader, long, long)
Reads the additional data.
protected abstract void ReadData(TiffStreamReader dataStream, long position, long count)
Parameters
dataStream
TiffStreamReader
The data stream.
position
long
The position to read from.
count
long
The count of elements.
ReadTag(TiffStreamReader, long)
Reads the tag data.
public static TiffDataType ReadTag(TiffStreamReader dataStream, long position)
Parameters
dataStream
TiffStreamReader
The data stream.
position
long
The tag position.
Returns
The read tag.
Exceptions
dataStream
ToString()
Returns a System.String that represents this instance.
public override string ToString()
Returns
A System.String that represents this instance.
WriteAdditionalData(TiffStreamWriter)
Writes the additional tag data.
public abstract long WriteAdditionalData(TiffStreamWriter dataStream)
Parameters
dataStream
TiffStreamWriter
The data stream.
Returns
The actual bytes written.
WriteTag(TiffStreamWriter, long)
Writes the tag data.
public void WriteTag(TiffStreamWriter dataStream, long additionalDataOffset)
Parameters
dataStream
TiffStreamWriter
The data stream.
additionalDataOffset
long
The offset to write additional data to.
Exceptions
Unable to Write values for + this.TagType + Message : + exception.Message
WriteTagValueOrOffset(TiffStreamWriter, long)
Writes the tag value or additional offset.
protected abstract void WriteTagValueOrOffset(TiffStreamWriter dataStream, long additionalDataOffset)
Parameters
dataStream
TiffStreamWriter
The data stream.
additionalDataOffset
long
The additional data offset.