Table of Contents

Class WebpReaderOptions

Namespace
Egami.Formats.Webp
Assembly
Egami.dll

Options for reading WebP, on top of the general ReaderOptions.

public sealed record WebpReaderOptions : ReaderOptions, IEquatable<ReaderOptions>, IEquatable<WebpReaderOptions>
Inheritance
WebpReaderOptions
Implements
Inherited Members

Examples

using Raster image = Raster.Load("duck.webp", options: new WebpReaderOptions
{
    UseBackgroundColor = true, // animations: start from the ANIM background color instead of transparent
    FastUpsampling = true,     // lossy files: repeat chroma samples instead of interpolating
});

Properties

Default

Gets the default options.

public static WebpReaderOptions Default { get; }

Property Value

WebpReaderOptions

FastUpsampling

Gets whether lossy files repeat each chroma sample instead of interpolating between samples. Off by default, which matches libwebp's default ("fancy") upsampling; on is a little faster and gives blockier color edges, as for JPEG.

public bool FastUpsampling { get; init; }

Property Value

bool

UseBackgroundColor

Gets whether an animation's canvas starts from, and disposed frames return to, the ANIM chunk's background color instead of transparent. Off by default, as in libwebp, Skia and browsers; RFC 9649 calls the color a hint.

public bool UseBackgroundColor { get; init; }

Property Value

bool