Class YuvRasterInfo
- Namespace
- Egami
- Assembly
- Egami.dll
What Probe(Stream, EgamiContext?, ReaderOptions?) reads from a header: the image as Probe(Stream, EgamiContext?, ReaderOptions?) describes it, and the planes Load(Stream, EgamiContext?, ReaderOptions?) would give, if any.
public sealed record YuvRasterInfo : IEquatable<YuvRasterInfo>
- Inheritance
-
YuvRasterInfo
- Implements
- Inherited Members
Examples
// A JPEG's own planes, as decoded: no chroma upsampling and no color conversion.
YuvRasterInfo info = YuvRaster.Probe("duck.jpg");
Console.WriteLine($"{info.Info.Width}×{info.Info.Height}, planes: {info.ChromaFormat}");
using YuvRaster planes = YuvRaster.Load("duck.jpg");
// Saving JPEG-colored 8-bit planes skips color conversion and downsampling; other planes are converted first.
planes.Save("copy.jpg", new JpegWriterOptions { Quality = 90 });
Constructors
YuvRasterInfo(RasterInfo, ChromaFormat?, int, YuvColor?)
What Probe(Stream, EgamiContext?, ReaderOptions?) reads from a header: the image as Probe(Stream, EgamiContext?, ReaderOptions?) describes it, and the planes Load(Stream, EgamiContext?, ReaderOptions?) would give, if any.
public YuvRasterInfo(RasterInfo Info, ChromaFormat? ChromaFormat, int BitDepth, YuvColor? Color)
Parameters
InfoRasterInfoThe image, as Probe(Stream, EgamiContext?, ReaderOptions?) describes it.
ChromaFormatChromaFormat?The planes' chroma format, or null when loading planes is not supported.
BitDepthintThe planes' bits per sample, or 0.
ColorYuvColor?The planes' color description, or null.
Examples
// A JPEG's own planes, as decoded: no chroma upsampling and no color conversion.
YuvRasterInfo info = YuvRaster.Probe("duck.jpg");
Console.WriteLine($"{info.Info.Width}×{info.Info.Height}, planes: {info.ChromaFormat}");
using YuvRaster planes = YuvRaster.Load("duck.jpg");
// Saving JPEG-colored 8-bit planes skips color conversion and downsampling; other planes are converted first.
planes.Save("copy.jpg", new JpegWriterOptions { Quality = 90 });
Properties
BitDepth
The planes' bits per sample, or 0.
public int BitDepth { get; init; }
Property Value
CanLoad
Gets a value indicating whether Load(Stream, EgamiContext?, ReaderOptions?) gives planes.
public bool CanLoad { get; }
Property Value
ChromaFormat
The planes' chroma format, or null when loading planes is not supported.
public ChromaFormat? ChromaFormat { get; init; }
Property Value
Color
The planes' color description, or null.
public YuvColor? Color { get; init; }
Property Value
Info
The image, as Probe(Stream, EgamiContext?, ReaderOptions?) describes it.
public RasterInfo Info { get; init; }