Table of Contents

Enum Jpeg2000Container

Namespace
Egami.Formats.Jpeg2000
Assembly
Egami.dll

The container a JPEG 2000 image came in.

public enum Jpeg2000Container

Fields

Codestream = 0

A raw codestream (J2K, J2C), with no color information.

Jp2 = 1

A JP2 file (T.800 Annex I).

Jph = 3

A JPH file (T.814 Annex D): a JP2 file for a High-Throughput JPEG 2000 codestream.

Jpx = 2

A JPX file (T.801), of which the JP2 parts and the first codestream are read.

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}");
}