/// <summary> /// load bitmap data from file /// </summary> public static byte[] Load(String filename, ref int image_width, ref int image_height) { if (File.Exists(filename)) { sluggish.utilities.gtk.Image img = new sluggish.utilities.gtk.Image(filename); Gdk.Pixbuf buffer = img.MakePixbufFromCompressedData(); image_width = img.Width; image_height = img.Height; byte[] bmp = new byte[img.Width * img.Height * 3]; getBitmap(buffer, bmp); return(bmp); } else { return(null); } }
/// <summary> /// load bitmap data from file /// </summary> public static byte[] Load(string filename, ref int image_width, ref int image_height) { if (File.Exists(filename)) { sluggish.utilities.gtk.Image img = new sluggish.utilities.gtk.Image(filename); Gdk.Pixbuf buffer = img.MakePixbufFromCompressedData(); image_width = img.Width; image_height = img.Height; byte[] bmp = new byte[img.Width * img.Height * 3]; getBitmap(buffer, bmp); return(bmp); } else return(null); }