Convert webp image to gif

Contents
[ ]

Using Aspose.Imaging we can convert single paged or animated webp image to Gif.

The following code snippet shows you how to convert webp to gif.

using Aspose.Imaging;
using Aspose.Imaging.ImageOptions;
using System.IO;
string templatesFolder = @"c:\Users\USER\Downloads\templates\";
string dataDir = templatesFolder;
using (Aspose.Imaging.FileFormats.Webp.WebPImage image =
(Aspose.Imaging.FileFormats.Webp.WebPImage)Image.Load(dataDir + "template.webp"))
{
GifOptions options = new GifOptions();
image.Save(dataDir + "result.gif", options);
}
File.Delete(dataDir + "result.gif");