SharpAstro.Webp 3.19.1091

This package has a SemVer 2.0.0 package version: 3.19.1091+7ad1e24ff2888a8f710852c271d40615294cd133.
dotnet add package SharpAstro.Webp --version 3.19.1091
                    
NuGet\Install-Package SharpAstro.Webp -Version 3.19.1091
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SharpAstro.Webp" Version="3.19.1091" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SharpAstro.Webp" Version="3.19.1091" />
                    
Directory.Packages.props
<PackageReference Include="SharpAstro.Webp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SharpAstro.Webp --version 3.19.1091
                    
#r "nuget: SharpAstro.Webp, 3.19.1091"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SharpAstro.Webp@3.19.1091
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SharpAstro.Webp&version=3.19.1091
                    
Install as a Cake Addin
#tool nuget:?package=SharpAstro.Webp&version=3.19.1091
                    
Install as a Cake Tool

SharpAstro.Webp

Pure-managed WebP decoding for .NET 10, derived from RFC 6386 and RFC 9649. There is no encoder.

Supported input includes VP8 lossy, VP8L lossless, ALPH transparency, and animated WebP with full-canvas RGBA frames, random seeking, and frame timing. ICC, EXIF, and XMP metadata are preserved. The SharpAstro.Codecs facade decodes still images and returns frame 0 for animated WebP; use this package's animation API to access the full timeline. Images larger than 67,108,864 pixels are rejected to bound decoder allocations.

using SharpAstro.Webp;

byte[] data = File.ReadAllBytes("image.webp");
WebpImage image = WebpDecoder.Decode(data);
Console.WriteLine($"{image.Width} × {image.Height}");

Decode every frame into a full-canvas RGBA buffer:

WebpAnimation animation = WebpDecoder.DecodeAnimation(data);
foreach (WebpFrame frame in animation.Frames)
{
    Console.WriteLine($"{frame.TimestampMs} ms: {frame.DurationMs} ms");
    byte[] rgba = frame.Rgba;
}

For on-demand playback, seek to the next frame to produce, then decode it:

var decoder = new WebpAnimationDecoder(data);
decoder.Seek(12);
byte[] canvas = new byte[decoder.CanvasWidth * decoder.CanvasHeight * 4];
if (decoder.TryDecodeNextFrame(canvas, out WebpFrameInfo frameInfo))
{
    Console.WriteLine($"Displayed frame {frameInfo.Index}");
}

The decoder is spec-derived from RFC 6386 / RFC 9649; libwebp/libvpx source was not consulted — their binaries are used only as test oracles. Written with AI assistance, whose training data may include libwebp.

Known oracle divergence: anim-vp8l-alpha-hint.webp has a VP8L animation frame with transparent decoded pixels despite a cleared alpha_is_used hint. The RFC 9649 blend flag requires alpha blending, which this decoder follows; anim_dump 1.6.0 emits that frame uncomposited. It is excluded from the anim_dump comparison but remains covered by compositing and seek-versus-sequential tests.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on SharpAstro.Webp:

Package Downloads
SharpAstro.Codecs

Image-codec facade over the SharpAstro codec family: sniff a byte stream's format by its magic-byte signature and dispatch to the matching decoder (PNG, JPEG, TIFF, JPEG XR, OpenEXR, JPEG XL, JBIG2, JPEG 2000, WebP), returning a codec-neutral IDecodedImage (fidelity tier: native bit depth + ColorEncoding colour signalling, with a ToFloats() RGBA float32 view) or decoding zero-copy into a caller-provided 8-bit RGBA buffer (display tier, integer-sample formats). AOT-compatible.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.19.1091 0 10/24/2026