Class JpegLsFormat
JPEG-LS (ITU-T T.87, ISO/IEC 14495-1; .jls): lossless and near-lossless coding of 2 to 16-bit samples by context modelling and Golomb codes, as DICOM uses it. Reads every interleave mode, restart markers, preset parameters, mapping tables (palettes), subsampled components and HP's colour transforms; writes lossless and near-lossless files of 1 to 4 components. Registered with WithJpegLs(EgamiContext).
public static class JpegLsFormat
- Inheritance
-
JpegLsFormat
- 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
Info
Gets the format's registration: name, MIME type, extension, signature, reader and writer.
public static FormatInfo Info { get; }