title: C# Show webp in Picturebox with both animated and static .webp files
body: <p>I have a bunch of .webp files on my disk. I now want to show these files in a picturebox inside of my WinForm application (one after the other). Converting webp to bitmaps works. The problem is that some of the webp files are animated.</p>
  <p>The app should be capable to see if a webp file is static or animated and should convert it to something that can be shown in the picturebox.</p>
  <p>This is my current Code to show static webp file:</p>
  <pre><code>Imazen.WebP.SimpleDecoder decoder = new Imazen.WebP.SimpleDecoder();
  var bytes = File.ReadAllBytes(filename);
  var bitmap = decoder.DecodeFromBytes(bytes, bytes.Length);
  pictureBox1.Image = bitmap;
  </code></pre>
  <p>This uses a wrapper for libwebp. But I am totally fine with different resources/libraries. Most methods mentioned on the web demand that you already know the target type (f.e. gif jpg etc). Any input in appriciated.</p>