Table of Contents

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

Info RasterInfo

The image, as Probe(Stream, EgamiContext?, ReaderOptions?) describes it.

ChromaFormat ChromaFormat?

The planes' chroma format, or null when loading planes is not supported.

BitDepth int

The planes' bits per sample, or 0.

Color YuvColor?

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

int

CanLoad

Gets a value indicating whether Load(Stream, EgamiContext?, ReaderOptions?) gives planes.

public bool CanLoad { get; }

Property Value

bool

ChromaFormat

The planes' chroma format, or null when loading planes is not supported.

public ChromaFormat? ChromaFormat { get; init; }

Property Value

ChromaFormat?

Color

The planes' color description, or null.

public YuvColor? Color { get; init; }

Property Value

YuvColor?

Info

public RasterInfo Info { get; init; }

Property Value

RasterInfo