Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
I have a PictureBox on my Form in windows appliation and i am setting imagelocation property of PictureBox then i am facing this issue

pictureBox1.ImageLocation = @"c:\2.jpg";

my image is more than 7 mb and the i am facing issue

" out of memory exception"
Posted

1 solution

There is nothing much to discuss here. "Out of memory" should be prevented, not fixed. If you have not enough memory, you have not enough. Your 7 MB is next to nothing these days though. Anyway, you did not provide any relevant information, not a sample project. Maybe your system memory is scarce, maybe you have a memory leak (yes, you can have leaks of memory in a .NET application, you can even have the managed memory leaks, isn't it obvious?). Not enough information to add anything else.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900