Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Render APNG and GIF Animations to HTML Web Pages with Play and Pause Option in .NET
// Render APNG To HTML with Play and Pause Option
using (Viewer viewer = new Viewer("animation.apng"))
{
HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources("Web-Page-with-APNG.html");
viewer.View(options);
}
// Render GIF To HTML with Play and Pause Option
using (Viewer viewer = new Viewer("animation.gif"))
{
HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources("Web-Page-with-gif.html");
viewer.View(options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment