Class WebpFrameDetails
Details of one frame of an animated WebP, kept in FormatDetails. Delay, blending, disposal and the frame's rectangle are in FrameMetadata.
public sealed class WebpFrameDetails : FormatDetails
- Inheritance
-
WebpFrameDetails
- Inherited Members
Examples
using Raster<Rgba8> image = Raster.Load<Rgba8>("duck.webp");
WebpDetails webp = (WebpDetails)image.Metadata.FormatDetails!;
Console.WriteLine($"{(webp.Lossless ? "lossless" : "lossy")}, extended: {webp.Extended}, alpha: {webp.HasAlpha}");
// Chunks Egami does not read are kept and written back where they were.
foreach (WebpChunk chunk in webp.OtherChunks)
{
Console.WriteLine($"{chunk.Type}: {chunk.Data.Length} bytes, {chunk.Position}");
}
// An animation's frames say whether each was stored lossless.
foreach (Frame<Rgba8> frame in image.Frames)
{
Console.WriteLine(frame.Metadata.FormatDetails is WebpFrameDetails { Lossless: true } ? "lossless frame" : "lossy frame");
}
Properties
Lossless
Gets or sets whether the frame was stored lossless (VP8L) rather than lossy (VP8).
public bool Lossless { get; set; }
Property Value
Methods
Copy()
Returns a deep copy.
public override FormatDetails Copy()
Returns
- FormatDetails
The copy.