byte buffer = null;
using (FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read))
buffer = new byte[fs.Length];
fs.Read(buffer, 0, (int)fs.Length);
FileStream pngStream = new FileStream(file, FileMode.Open, FileAccess.Read);
var image = new Bitmap(pngStream)
Quote:The size of a file mapping object that is backed by a named file is limited by disk space. The size of a file view is limited to the largest available contiguous block of unreserved virtual memory. This is at most 2 GB minus the virtual memory already reserved by the process.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)