Jpeg2000QualityLayer Class

A quality layer of a JPEG 2000 output (Jpeg2000Encoder.QualityLayers): how many bytes the output may have up to the end of this layer, or the rest of the coding passes.

public sealed class Jpeg2000QualityLayer

Remarks

A target counts everything a reader needs to decode the layers up to this one: the boxes of a JP2 file, the headers, and the packets of this layer and of the previous ones. The encoder keeps the coding passes that reduce the error most for their bytes (the post-compression rate-distortion optimization of T.800, J.14), so that the size is at most the target, unless the headers and the empty packets alone are larger.

Properties

NameDescription
BitsPerPixelGets the largest number of bits per pixel of the output up to this layer, or null.
CompleteGets a layer that holds every coding pass the previous layers do not hold: the last layer of an output that keeps all of its quality.
IsCompleteGets a value indicating whether the layer holds every coding pass the previous layers do not hold.
SizeGets the largest number of bytes of the output up to this layer, or null.

Gets the largest number of bits per pixel of the output up to this layer, or null.

public double? BitsPerPixel { get; }

Property value

double?

Gets a layer that holds every coding pass the previous layers do not hold: the last layer of an output that keeps all of its quality.

public static Jpeg2000QualityLayer Complete { get; }

Property value

Jpeg2000QualityLayer

Gets a value indicating whether the layer holds every coding pass the previous layers do not hold.

public bool IsComplete { get; }

Property value

bool

Gets the largest number of bytes of the output up to this layer, or null.

public long? Size { get; }

Property value

long?

Methods

NameDescription
FromBitsPerPixel(double)Creates a layer that ends when the output has at most bitsPerPixel bits for each pixel of the image.
FromSize(long)Creates a layer that ends when the output has at most bytes bytes.
ToString()Returns a string that represents the current object.

FromBitsPerPixel(double)

Jpeg2000QualityLayer.cs

Creates a layer that ends when the output has at most bitsPerPixel bits for each pixel of the image.

public static Jpeg2000QualityLayer FromBitsPerPixel(double bitsPerPixel)

Parameters

bitsPerPixel double
The size of the output up to the end of the layer, in bits per pixel: 8 times the bytes, divided by the width and the height.

Returns

Jpeg2000QualityLayer The layer.

Exceptions

ArgumentOutOfRangeException
bitsPerPixel is not a positive finite number.

Creates a layer that ends when the output has at most bytes bytes.

public static Jpeg2000QualityLayer FromSize(long bytes)

Parameters

bytes long
The size of the output up to the end of the layer.

Returns

Jpeg2000QualityLayer The layer.

Exceptions

ArgumentOutOfRangeException
bytes is not positive.

Returns a string that represents the current object.

public override string ToString()

Returns

string A string that represents the current object.