Class TiffDetails
Details only TIFF has, kept per page in FormatDetails.
public sealed class TiffDetails : FormatDetails
- Inheritance
-
TiffDetails
- 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}");
}
Properties
BitsPerSample
Gets or sets the bits of each sample as stored. Defaults to 8.
public int BitsPerSample { get; set; }
Property Value
ByteOrder
Gets or sets the file's byte order. Defaults to little-endian.
public TiffByteOrder ByteOrder { get; set; }
Property Value
Compression
Gets or sets the compression. Defaults to None.
public TiffCompression Compression { get; set; }
Property Value
ExtraSamples
Gets or sets what each extra sample is, in order.
public IList<TiffExtraSample> ExtraSamples { get; set; }
Property Value
InkNames
Gets or sets the ink names of a separated page.
public IList<string> InkNames { get; set; }
Property Value
IsReducedResolution
Gets or sets whether the page is a reduced-resolution copy (NewSubfileType bit 0, or a SubIFD).
public bool IsReducedResolution { get; set; }
Property Value
Layout
Gets or sets whether the file is classic TIFF or BigTIFF. Defaults to classic.
public TiffLayout Layout { get; set; }
Property Value
OtherTags
Gets the tags Egami does not map, kept raw so the TIFF writer writes them back.
public IList<TiffTag> OtherTags { get; }
Property Value
PageIndex
Gets or sets the page's index in the file's chain of directories, counting every directory.
public int PageIndex { get; set; }
Property Value
Photometric
Gets or sets what the samples mean. Defaults to Rgb.
public TiffPhotometric Photometric { get; set; }
Property Value
Planar
Gets or sets whether each sample has its own plane (PlanarConfiguration 2).
public bool Planar { get; set; }
Property Value
Predictor
Gets or sets the predictor. Defaults to None.
public TiffPredictor Predictor { get; set; }
Property Value
RowsPerStrip
Gets or sets the rows in each strip, or null for a tiled page.
public int? RowsPerStrip { get; set; }
Property Value
- int?
SampleFormat
Gets or sets how the samples are numbers. Defaults to unsigned integers.
public TiffSampleFormat SampleFormat { get; set; }
Property Value
TileHeight
Gets or sets the tile height, or null for a page in strips.
public int? TileHeight { get; set; }
Property Value
- int?
TileWidth
Gets or sets the tile width, or null for a page in strips.
public int? TileWidth { get; set; }
Property Value
- int?
Methods
Copy()
Returns a deep copy.
public override FormatDetails Copy()
Returns
- FormatDetails
The copy.
PixelsChanged()
Forgets what the details say about color, once the pixels have been converted to another encoding.
protected override void PixelsChanged()