This repository contains a Windows Runtime Component that wraps up libwebp and allows to decode static and animated WEBP images.
The code is released under the MIT/X11, so feel free to modify and share your changes with the world.
You can use WebPImage.DecodeFromByteArray
method to get a WriteableBitmap
directly from a static WEBP.
If you want to decode an animated WEBP (or you need to decode both) you can use instead WebPImage.CreateFromByteArray
.
This method returns a reference to a WebPImage
object instance that exposes an array of WebPFrame
s via its Frames
property.
You can simply loop the collection and get a WriteableBitmap
from every frame using its RenderFrame
method.
You can install the library via NuGet.
###Install-Package Universal.WebP