Click here to Skip to main content
15,867,939 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I am developing a program which has some basic image processing filters and raster to vector convertion fonctions. I am working with bmp, jpeg, png, tiff and geotiff files. The images that i work on can be very big. When i try to open a 190mb bmp file (7000*9000 pixels), i get an exception like "Insufficient memory to continue the execution of the program". My computer has 6GB memory and i try to run my program on 64x CPU. I googled it but couldn't find a good solution. I don't know what the reason can be.

Thanks for any help.
Posted
Updated 7-Jul-21 0:02am
Comments
Sergey Alexandrovich Kryukov 11-Apr-14 10:56am    
The file is certainly too big (why, by the way?), but, just in case: are you really sure that at least one of your assemblies is not targeted to a 32-bit instruction-set architecture? Then the application could be executed by WoW64. Ideally, all targets should be "AnyCPU"...
—SA
Maciej Los 11-Apr-14 12:47pm    
Did you check via task manager how much memory is currently consumed by your program? I think there is a memory leak problem.
phil.o 11-Apr-14 12:55pm    
I think I read somewhere (but I may be wrong) that, regardless of the amount of RAM the computer has, there is a 2 Gb limit of memory a single object can consume.
Çağrı Daşkın 11-Apr-14 15:23pm    
Hello all,
Thank you all for your answers. The images are used in aerial photogrametry. Each photo shows a big area of earth surface. That's why they are so big. Making the platform target "Any CPU" didn't work. My program consumes about 1,5-1,7 gb memory while working with big images. And if what phil says is true, yes, this must be the problem. But i have to work with those big images. Is there any way to make all available memory accesible?
Andrius Leonavicius 11-Apr-14 16:29pm    
Hi,

phil.o is right, memory limit of the .NET object is 2 GB. .NET Framework 4.5 arrays can be greater than 2 GB. Link: http://msdn.microsoft.com/en-us/library/hh285054(v=vs.110).aspx

By the way, there is an article about the memory limits. Link: http://www.codeproject.com/Articles/483475/Memory-Limits-in-a-NET-Process

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