public static Bitmap Decode(byte[] data) { try { GimFile file = new GimFile(data); ImgFile file2 = new ImgFile(file.GetDecompressedData(), file.GetWidth(), file.GetHeight(), ImageFormat.Png); return(new Bitmap(new MemoryStream(file2.GetCompressedData()))); } catch { return(null); } }