Table of Contents

Enum Jpeg2000ColorSpace

Namespace
Egami.Formats.Jpeg2000
Assembly
Egami.dll

The color space a JPEG 2000 file declares.

public enum Jpeg2000ColorSpace

Fields

CieLab = 5

CIELab (JPX enumerated 14), converted to sRGB.

Cmyk = 4

CMYK (JPX enumerated 12).

Gray = 2

Grayscale (enumerated 17).

Icc = 6

An ICC profile, kept in IccProfile.

Other = 7

Another JPX enumerated space, read as its components say; EnumeratedColorSpace names it.

Srgb = 1

sRGB (enumerated 16).

Sycc = 3

sYCC (enumerated 18), converted to RGB.

Unspecified = 0

None: a raw codestream, or a JP2 file whose colour specification Egami does not 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}");
}