Class JpegLsDetails
Details only JPEG-LS has, kept in FormatDetails.
public sealed class JpegLsDetails : FormatDetails
- Inheritance
-
JpegLsDetails
- Inherited Members
Examples
// JPEG-LS (.jls) is lossless or near-lossless; WithExtendedFormats() registers it too.
EgamiContext context = EgamiContext.Default.WithJpegLs();
using Raster duck = Raster.Load("duck.png", context);
duck.Save("duck.jls");
// Load gives the natural pixel type: Gray8 or Gray16, GrayAlpha, Rgb or Rgba, 8 or 16 bits as stored.
using Raster back = Raster.Load("duck.jls", context);
if (back.Metadata.FormatDetails is JpegLsDetails jls)
{
Console.WriteLine($"NEAR {jls.Near}, {jls.Interleave}, {jls.BitsPerSample} bits, {jls.Components} components, {jls.ColorTransform}");
}
Properties
BitsPerSample
Gets or sets the bits of a stored sample, 2 to 16. Fewer than 8 or 16 are scaled to the pixel's full range on load.
public int BitsPerSample { get; set; }
Property Value
ColorTransform
Gets or sets the colour transform the file was coded with.
public JpegLsColorTransform ColorTransform { get; set; }
Property Value
Components
Gets or sets the number of components the file stores.
public int Components { get; set; }
Property Value
Interleave
Gets or sets how the components were interleaved.
public JpegLsInterleave Interleave { get; set; }
Property Value
Near
Gets or sets the largest error of a sample: 0 when the file is lossless. The writer writes it back unless Near says otherwise.
public int Near { get; set; }
Property Value
Palettized
Gets or sets whether the samples were indices into a mapping table (a palette) that gave the pixels.
public bool Palettized { get; set; }
Property Value
Methods
Copy()
Returns a deep copy.
public override FormatDetails Copy()
Returns
- FormatDetails
The copy.