AnimatedImage 2.1.0
dotnet add package AnimatedImage --version 2.1.0
NuGet\Install-Package AnimatedImage -Version 2.1.0
<PackageReference Include="AnimatedImage" Version="2.1.0" />
<PackageVersion Include="AnimatedImage" Version="2.1.0" />
<PackageReference Include="AnimatedImage" />
paket add AnimatedImage --version 2.1.0
#r "nuget: AnimatedImage, 2.1.0"
#:package AnimatedImage@2.1.0
#addin nuget:?package=AnimatedImage&version=2.1.0
#tool nuget:?package=AnimatedImage&version=2.1.0
A library to read animated GIF images , animated PNG images and animated WEBP images, usable in code.
When displaying in the UI, consider using AnimatedImage.Avalonia or AnimatedImage.Wpf instead of this library.
How to use
This library abstracts pixel read/write operations, requiring you to implement them yourself. For implementations using SkiaSharp, please refer to BitmapFaceFactory and BitmapFace.
The following code opens a GIF image and renders its frames.
// Read image file
using var imageStream = File.Open("/path/to/image.gif", FileMode.Open);
FrameRenderer.TryCreate(imageStream, new BitmapFaceFactory(), out var renderer);
// If you want to draw an image by frame index.
renderer.ProcessFrame(9);
// If you want to draw an image by time span.
renderer.ProcessFrame(TimeSpan.FromSeconds(34));
// Get the rendererd image.
var bitmapface = (BitmapFace)renderer.Current;
SKBitmap image = bitmapface.Bitmap;
WebP supporting
To use WebP, AnimatedImage.Native library is required.
Features
- Animates GIF images in a normal
Image
control; no need to use a specific control - Takes actual frame duration into account
- Repeat behavior can be specified; if unspecified, the repeat count from the GIF metadata is used
- Notification when the animation completes, in case you need to do something after the animation
- Animation preview in design mode (must be enabled explicitly)
- Support for controlling the animation manually (pause/resume/seek)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
.NET Core | netcoreapp3.1 is compatible. |
.NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
-
.NETCoreApp 3.1
- SharpCompress (>= 0.36.0)
-
.NETFramework 4.6.2
- SharpCompress (>= 0.36.0)
-
.NETFramework 4.7.2
- SharpCompress (>= 0.36.0)
-
net6.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on AnimatedImage:
Package | Downloads |
---|---|
AnimatedImage.Avalonia
A library to display animated GIF, PNG and WebP images in AvaloniaUI |
|
AnimatedImage.Wpf
A library to display animated GIF, PNG and WebP images in WPF |
GitHub repositories
This package is not used by any popular GitHub repositories.