Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Created March 1, 2021 10:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GroupDocsGists/bf1680841cb8049c1d1162e8010113c9 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/bf1680841cb8049c1d1162e8010113c9 to your computer and use it in GitHub Desktop.
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