Example #1
0
 private static Image getfromWebP(string fullpath)
 {
     try
     {
         if (!Helpers.isExiestWebpDLL())
         {
             MessageBox.Show("libwebp_x86.dll and/or libwebp_x64.dll are missing.\n\nPlease Place them at \n"
                             + Helpers.WEBPDLLPATH, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
             return(null);
         }
         WebP  webp = new WebP();
         Image img  = new Bitmap(webp.Load(fullpath));
         webp.Dispose();
         return(img);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
         MessageBox.Show(ex.Message + "\r\nIn GetImage.getfromWebP", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return(null);
     }
 }