Class TiffTag
A TIFF tag Egami does not map, kept as it was read so the TIFF writer can write it back: GeoTIFF, DNG and private tags.
public sealed record TiffTag : IEquatable<TiffTag>
- Inheritance
-
TiffTag
- Implements
- Inherited Members
Examples
using Raster page = Raster.Load("scan.tif");
TiffDetails tiff = (TiffDetails)page.Metadata.FormatDetails!;
Console.WriteLine($"page {tiff.PageIndex}: {tiff.Photometric}, {tiff.BitsPerSample}-bit, {tiff.Compression}, {tiff.ByteOrder}, {tiff.Layout}");
Console.WriteLine(tiff.TileWidth is int tile ? $"tiles of {tile}" : $"{tiff.RowsPerStrip} rows a strip");
// Tags Egami does not map are kept as they were read.
foreach (TiffTag tag in tiff.OtherTags)
{
Console.WriteLine($"tag {tag.Id}: {tag.Count} × {tag.Type}");
}
Constructors
TiffTag(int, ExifType, int, ReadOnlyMemory<byte>)
A TIFF tag Egami does not map, kept as it was read so the TIFF writer can write it back: GeoTIFF, DNG and private tags.
public TiffTag(int Id, ExifType Type, int Count, ReadOnlyMemory<byte> Value)
Parameters
IdintThe tag number.
TypeExifTypeThe field type.
CountintThe number of values.
ValueReadOnlyMemory<byte>The values, little-endian whatever the file's byte order.
Examples
using Raster page = Raster.Load("scan.tif");
TiffDetails tiff = (TiffDetails)page.Metadata.FormatDetails!;
Console.WriteLine($"page {tiff.PageIndex}: {tiff.Photometric}, {tiff.BitsPerSample}-bit, {tiff.Compression}, {tiff.ByteOrder}, {tiff.Layout}");
Console.WriteLine(tiff.TileWidth is int tile ? $"tiles of {tile}" : $"{tiff.RowsPerStrip} rows a strip");
// Tags Egami does not map are kept as they were read.
foreach (TiffTag tag in tiff.OtherTags)
{
Console.WriteLine($"tag {tag.Id}: {tag.Count} × {tag.Type}");
}
Properties
Count
The number of values.
public int Count { get; init; }
Property Value
Id
The tag number.
public int Id { get; init; }
Property Value
Type
The field type.
public ExifType Type { get; init; }
Property Value
Value
The values, little-endian whatever the file's byte order.
public ReadOnlyMemory<byte> Value { get; init; }