Class Jpeg2000Details
Details only JPEG 2000 has, kept in FormatDetails.
public sealed class Jpeg2000Details : FormatDetails
- Inheritance
-
Jpeg2000Details
- Inherited Members
Examples
using Raster image = Raster.Load("photo.jp2");
var details = (Jpeg2000Details)image.Metadata.FormatDetails!;
Console.WriteLine($"{details.Container}, {(details.Reversible ? "lossless 5/3" : "lossy 9/7")}, {details.DecompositionLevels} levels");
Console.WriteLine($"{details.QualityLayers} layers in {details.ProgressionOrder} order, {details.TileCount} tiles, {details.ColorSpace}");
foreach (Jpeg2000Component component in details.Components)
{
Console.WriteLine($"{component.Precision} bits{(component.IsSigned ? " signed" : "")}, sampled every {component.SubsamplingX}×{component.SubsamplingY}");
}
foreach (Jpeg2000Channel channel in details.Channels)
{
Console.WriteLine($"Channel {channel.Channel}: {channel.Type} for color {channel.Association}");
}
Properties
Channels
Gets the channel definitions (cdef), empty when the file has none.
public IList<Jpeg2000Channel> Channels { get; }
Property Value
ColorSpace
Gets or sets the color space the file declares.
public Jpeg2000ColorSpace ColorSpace { get; set; }
Property Value
Comments
Gets the codestream's text comments (COM markers).
public IList<string> Comments { get; }
Property Value
Components
Gets the codestream's components as stored.
public IList<Jpeg2000Component> Components { get; }
Property Value
Container
Gets or sets the container the codestream came in.
public Jpeg2000Container Container { get; set; }
Property Value
DecompositionLevels
Gets or sets the number of wavelet decomposition levels.
public int DecompositionLevels { get; set; }
Property Value
EnumeratedColorSpace
Gets or sets the enumerated color space number (T.800 Table I.10, T.801 Table M.25), or -1 when there is none.
public int EnumeratedColorSpace { get; set; }
Property Value
HasPalette
Gets or sets whether the file has a palette (pclr).
public bool HasPalette { get; set; }
Property Value
HighThroughput
Gets or sets whether the codestream is a High-Throughput JPEG 2000 one (ITU-T T.814): its code-blocks use the HT block coder, or may mix it with the T.800 one. Egami reads JPEG 2000 and HTJ2K but writes neither, so setting it has no effect on any save; it is settable only as every FormatDetails property is.
public bool HighThroughput { get; set; }
Property Value
Profile
Gets or sets the codestream's capabilities (SIZ Rsiz): 0 for no restrictions, 1 and 2 for profiles 0 and 1; bit 14 (0x4000) marks an HTJ2K codestream.
public int Profile { get; set; }
Property Value
ProgressionOrder
Gets or sets the order the codestream's packets come in.
public Jpeg2000ProgressionOrder ProgressionOrder { get; set; }
Property Value
QualityLayers
Gets or sets the number of quality layers.
public int QualityLayers { get; set; }
Property Value
Reversible
Gets or sets whether the codestream uses the reversible 5/3 wavelet (lossless); otherwise the 9/7 one.
public bool Reversible { get; set; }
Property Value
TileCount
Gets or sets the number of tiles.
public int TileCount { get; set; }
Property Value
TileHeight
Gets or sets the tile height on the reference grid.
public int TileHeight { get; set; }
Property Value
TileWidth
Gets or sets the tile width on the reference grid.
public int TileWidth { get; set; }
Property Value
Methods
Copy()
Returns a deep copy.
public override FormatDetails Copy()
Returns
- FormatDetails
The copy.