Exemple #1
0
 public static IBitmap GifToBitmap(this byte[] buffer)
 {
     using (GifFile gifFile = new GifFile(buffer))
     {
         return(gifFile.GetBitmap());
     }
 }
Exemple #2
0
 public static IBitmap GetWindowIcon()
 {
     using (Stream resourceStream = WindowIcon)
         using (MemoryStream ms = new MemoryStream())
         {
             resourceStream.CopyTo(ms);
             using (GifFile gifFile = new GifFile(ms.ToArray()))
             {
                 return(gifFile.GetBitmap());
             }
         }
 }