NewBeeMedia.Encoders.Gif 1.0.1.6

dotnet add package NewBeeMedia.Encoders.Gif --version 1.0.1.6
                    
NuGet\Install-Package NewBeeMedia.Encoders.Gif -Version 1.0.1.6
                    
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="NewBeeMedia.Encoders.Gif" Version="1.0.1.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NewBeeMedia.Encoders.Gif" Version="1.0.1.6" />
                    
Directory.Packages.props
<PackageReference Include="NewBeeMedia.Encoders.Gif" />
                    
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 NewBeeMedia.Encoders.Gif --version 1.0.1.6
                    
#r "nuget: NewBeeMedia.Encoders.Gif, 1.0.1.6"
                    
#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 NewBeeMedia.Encoders.Gif@1.0.1.6
                    
#: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=NewBeeMedia.Encoders.Gif&version=1.0.1.6
                    
Install as a Cake Addin
#tool nuget:?package=NewBeeMedia.Encoders.Gif&version=1.0.1.6
                    
Install as a Cake Tool

I haven’t found a satisfying GIF encoder for dotnet yet, so I built one with AI (KIMI K3).

GIF89a animation encoder based on SkiaSharp:

  • Encodes multiple equally sized SKBitmap frames sequentially into a single GIF animation
  • Supports scaling compression (Scale / MaxWidth / MaxHeight) to drastically reduce file size
  • Frame-difference optimization: only encodes regions changed from the previous frame; unchanged pixels are output as transparent
  • Toggleable LZW compression: when disabled, raw literal bitstream is used (valid GIF, larger file size but faster encoding)
  • Built-in NeuQuant neural-network palette quantization (automatically trims unused colors)
  • Supports transparent pixels (alpha threshold binarization), loop count, and per-frame delay

Dependencies: NuGet package SkiaSharp (written against 2.88.x API; notes inside ScaleBitmap() explain adaptation for 3.x)

Usage Example:

int delayHundredths = (int)Math.Round(100.0 / stage.FrameRate);
using var gifEncoder = GifEncoder.Create(filePath, delayHundredths);
for (int currentFrame = 0; currentFrame < frames; currentFrame++)
{
    using var bmp = ...;
    if (bmp == null) break;
    gifEncoder.AddFrame(bmp);
}

Scaling compression example (halve width and height; file size roughly 1/4 of original):

using var gifEncoder = GifEncoder.Create(filePath, delayHundredths,
    new GifEncoderOptions { Scale = 0.5 });

Or limit the longest edge:

new GifEncoderOptions { MaxWidth = 480 }

Disable frame-difference optimization / LZW compression:

new GifEncoderOptions { EnableFrameDiff = false, EnableLzwCompression = false }
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 NewBeeMedia.Encoders.Gif:

Package Downloads
NewBeeVG

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1.6 30 9/28/2026