Table of Contents

Class Jpeg2000Details

Namespace
Egami.Formats.Jpeg2000
Assembly
Egami.dll

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

IList<Jpeg2000Channel>

ColorSpace

Gets or sets the color space the file declares.

public Jpeg2000ColorSpace ColorSpace { get; set; }

Property Value

Jpeg2000ColorSpace

Comments

Gets the codestream's text comments (COM markers).

public IList<string> Comments { get; }

Property Value

IList<string>

Components

Gets the codestream's components as stored.

public IList<Jpeg2000Component> Components { get; }

Property Value

IList<Jpeg2000Component>

Container

Gets or sets the container the codestream came in.

public Jpeg2000Container Container { get; set; }

Property Value

Jpeg2000Container

DecompositionLevels

Gets or sets the number of wavelet decomposition levels.

public int DecompositionLevels { get; set; }

Property Value

int

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

int

HasPalette

Gets or sets whether the file has a palette (pclr).

public bool HasPalette { get; set; }

Property Value

bool

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

bool

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

int

ProgressionOrder

Gets or sets the order the codestream's packets come in.

public Jpeg2000ProgressionOrder ProgressionOrder { get; set; }

Property Value

Jpeg2000ProgressionOrder

QualityLayers

Gets or sets the number of quality layers.

public int QualityLayers { get; set; }

Property Value

int

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

bool

TileCount

Gets or sets the number of tiles.

public int TileCount { get; set; }

Property Value

int

TileHeight

Gets or sets the tile height on the reference grid.

public int TileHeight { get; set; }

Property Value

int

TileWidth

Gets or sets the tile width on the reference grid.

public int TileWidth { get; set; }

Property Value

int

Methods

Copy()

Returns a deep copy.

public override FormatDetails Copy()

Returns

FormatDetails

The copy.