Imagise.AnimationMaker
24.9.1
dotnet add package Imagise.AnimationMaker --version 24.9.1
NuGet\Install-Package Imagise.AnimationMaker -Version 24.9.1
<PackageReference Include="Imagise.AnimationMaker" Version="24.9.1" />
paket add Imagise.AnimationMaker --version 24.9.1
#r "nuget: Imagise.AnimationMaker, 24.9.1"
// Install Imagise.AnimationMaker as a Cake Addin #addin nuget:?package=Imagise.AnimationMaker&version=24.9.1 // Install Imagise.AnimationMaker as a Cake Tool #tool nuget:?package=Imagise.AnimationMaker&version=24.9.1
Imagise.AnimationMaker plugin for .NET
Imagise.AnimationMaker plugin .NET allows creation of animation from the input images aka frames. Anumation may be created in the gif, webp, apng formats
Platform Independence
Imagise.AnimationMaker plugin for .NET can be used to develop applications on Windows Desktop (x86, x64), Windows Server (x86, x64), Windows Azure, Windows Embedded (CE 6.0 R2), as well as Linux x64 nd MacOs. The supported platforms include .Net Core 3.1, .Net6.0, .Net7.0, .Net8.0.
New Features & Enhancements in Version 24.9
Imagise.AnimationMaker is live.
Getting Started with Imagise.AnimationMaker plugin for .NET
Are you ready to give Imagise.AnimationMaker plugin for .NET a try? Simply add Imagise.AnimationMaker nuget package to your .NET application or execute
Install-Package Imagise.AnimationMaker
from Package Manager Console in Visual Studio to fetch the NuGet package. If you already have Imagise.AnimationMaker for .NET and want to upgrade the version, please execute
Update-Package Imagise.AnimationMaker
to get the latest version.
Following examples may give your ideas on further usage
Create apng animation from the input jpeg files in trial mode
using Imagise.AnimationMaker.ImageOptions;
using Imagise.AnimationMaker.Options;
using Imagise.Core;
using Imagise.Core.Creator.Source;
using Imagise.Core.Options;
string inputFolder = "<<your input folder>>";
string outputFolder = "<<your output folder>>";
if (!Directory.Exists(outputFolder))
{
Directory.CreateDirectory(outputFolder);
}
const int FrameDuration = 70;
Core.Creator.ICompositeImage apngImage = null;
try
{
foreach (var inputFilePath in Directory.GetFiles(inputFolder, "*.jpg"))
{
using (var sourceImage = Image.Load(inputFilePath))
{
if (apngImage == null)
{
ApngOptions createOptions = new ApngOptions
{
Source = new FileCreateSource(Path.Combine(outputFolder, "animation.png"), false),
DefaultFrameTime = (uint)FrameDuration,
ColorType = PngColorType.TruecolorWithAlpha,
};
apngImage = (Core.Creator.ICompositeImage)Core.Creator.Image.Create(
createOptions,
sourceImage.Width,
sourceImage.Height);
apngImage.RemoveAllFrames();
}
// add frame
apngImage.AddFrame(sourceImage);
}
}
}
finally
{
if (apngImage != null)
{
apngImage.Save();
apngImage.Dispose();
}
}
Create webp animated image using temporary license, which may be requested fro evaluation
using Imagise.AnimationMaker.ImageOptions;
using Imagise.AnimationMaker.Options;
using Imagise.Core;
using Imagise.Core.Creator.Source;
using Imagise.Core.Options;
string inputFolder = "<<your input folder>>";
string outputFolder = "<<your output folder>>";
Imagise.Core.Licensing.License.SetLicense("<<Path to your temporary license file>>");
string fileMask = "*.jpg";
if (!Directory.Exists(outputFolder))
{
Directory.CreateDirectory(outputFolder);
}
const int AnimationDuration = 1000;
const int FrameDuration = 70;
Core.Creator.ICompositeImage? webpImage = null;
try
{
foreach (var inputFilePath in Directory.GetFiles(templatesFolder, fileMask))
{
var sourceImage = Image.Load(inputFilePath);
{
if (webpImage == null)
{
WebPOptions createOptions = new WebPOptions
{
Source = new FileCreateSource(Path.Combine(outputFolder, "animation.webp"), false),
FullFrame = true,
AnimBackgroundColor = (uint)System.Drawing.Color.Transparent.ToArgb(),
AnimLoopCount = (ushort)(AnimationDuration / FrameDuration)
};
webpImage = (Core.Creator.ICompositeImage)Core.Creator.Image.Create(
createOptions,
sourceImage.Width,
sourceImage.Height);
webpImage.RemoveAllFrames();
}
// add frame
webpImage.AddFrame(sourceImage);
}
}
}
finally
{
if (webpImage != null)
{
webpImage.Save();
webpImage.Dispose();
}
}
Create gif animated image in licensed mode
using Imagise.AnimationMaker.ImageOptions;
using Imagise.AnimationMaker.Options;
using Imagise.Core;
using Imagise.Core.Creator.Source;
using Imagise.Core.Options;
string inputFolder = "<<your input folder>>";
string outputFolder = "<<your output folder>>";
Imagise.Core.Licensing.License.SetLicense("<<Path to your license file>>");
string fileMask = "*.jpg";
if (!Directory.Exists(outputFolder))
{
Directory.CreateDirectory(outputFolder);
}
const int AnimationDuration = 1000;
const int FrameDuration = 70;
Core.Creator.ICompositeImage? gifImage = null;
try
{
foreach (var inputFilePath in Directory.GetFiles(templatesFolder, fileMask))
{
var sourceImage = Image.Load(inputFilePath);
{
if (gifImage == null)
{
GifOptions createOptions = new GifOptions
{
Source = new FileCreateSource(Path.Combine(outputFolder, "animation.gif"), false),
BackgroundColor = System.Drawing.Color.Transparent,
FullFrame = true,
LoopsCount = (int)(AnimationDuration / FrameDuration),
ColorPalette = Core.Palette.ColorPalette.GetCloseImagePalette(sourceImage, 256)
};
gifImage = (Core.Creator.ICompositeImage)Core.Creator.Image.Create(
createOptions,
sourceImage.Width,
sourceImage.Height);
createOptions.SetFrameDuration((Core.Image)gifImage, FrameDuration);
gifImage.RemoveAllFrames();
}
// add frame
gifImage.AddFrame(sourceImage);
}
}
}
finally
{
if (gifImage != null)
{
gifImage.Save();
gifImage.Dispose();
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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 is compatible. 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. |
-
net6.0
- Newtonsoft.Json (>= 13.0.1)
- System.Text.Encoding.CodePages (>= 7.0.0)
-
net8.0
- Newtonsoft.Json (>= 13.0.1)
- System.Text.Encoding.CodePages (>= 7.0.0)
GitHub repositories
This package is not used by any popular GitHub repositories.