I am trying to create a picturebox of large size. I am able to create and draw Bitmap of size upto 8500x8500. But when I clear it and load another Bitmap of same size, it shows OutofMemoryException. I am running this on a DELL laptop with 8GB RAM and i7 processor.
Following is the code snippet:
pictureBox_MouseMove()
{
//Draw some lines...
}
buttonClear_Click()
{
Bitmap new_image = new Bitmap(8500,8500); // OutofMemoryException
}
I would also like to know how to allocate memory to these objects.
Thanks in advance.