示例#1
0
文件: Image.cs 项目: sbarisic/Kernel
        public static Image FromFile(string filename)
        {
            if (string.IsNullOrEmpty(filename))
            {
                throw new ArgumentNullException("filename");
            }
            int         width, height;
            PixelFormat pixelFormat;
            IntPtr      native = LibIGraph.BitmapFromFile(filename, out width, out height, out pixelFormat);

            return(new Bitmap(native, width, height, pixelFormat));
        }