Table of Contents

Class YuvConvertOptions

Namespace
Egami
Assembly
Egami.dll

The chroma filters for conversions between a YuvRaster and a Raster.

public sealed record YuvConvertOptions : IEquatable<YuvConvertOptions>
Inheritance
YuvConvertOptions
Implements
Inherited Members

Examples

using Raster photo = Raster.Load("duck.png");

// The defaults filter chroma by its siting both ways; Nearest and Fast trade edge quality for speed.
YuvConvertOptions fast = new() { Upsampling = ChromaUpsampling.Nearest, Downsampling = ChromaDownsampling.Fast };
using YuvRaster<byte> yuv = YuvRaster.FromRaster(photo, ChromaFormat.Yuv420, YuvColor.Bt601Limited, options: fast);
using Raster<Rgba8> back = yuv.ToRaster<Rgba8>(fast);

Properties

Default

Gets the defaults: Bilinear and Average.

public static YuvConvertOptions Default { get; }

Property Value

YuvConvertOptions

Downsampling

Gets how chroma is downsampled on the way from RGB. Defaults to Average.

public ChromaDownsampling Downsampling { get; init; }

Property Value

ChromaDownsampling

Upsampling

Gets how chroma is upsampled on the way to RGB. Defaults to Bilinear.

public ChromaUpsampling Upsampling { get; init; }

Property Value

ChromaUpsampling