Took me a while to find this, but finally found a solution:
Install Magick.NET via NuGet, license can be found here:
https://magick.codeplex.com/license
Example code:
var newWidth = 100;
using (var collection = new MagickImageCollection(new FileInfo(@"C:est.gif")))
{
collection.Coalesce();
foreach (var image in collection)
{
image.Resize(newWidth, 0);
}
collection.Write(@"c:
esized.gif");
}
From my tests, this works with alpha channels and varying frame rates. Seems to be perfect!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…