Removing this question. I need 30 chars
Asked
Active
Viewed 3,144 times
3
-
You are *completely* on the wrong track with this. There's just no conceivable reason left to not run this kind of code on a 64-bit operating system. Change the Platform target setting to AnyCPU. – Hans Passant Jan 29 '14 at 11:59
-
1The program uses some dlls and exes that are for x86 so i was compiling for 32 bits (not my choice, my boss' choice), but I had not though it may be because of that. Thanks for the recommendation anyway – chuel Jan 30 '14 at 10:12
-
1maybe the problem isn't the Memory it self take a look at this [question](http://stackoverflow.com/questions/3911568/wpf-out-of-memory-exception-when-loading-large-amount-of-bitmaps-in-single-insta) – WiiMaxx Jan 31 '14 at 12:58
-
You were right, now it loads the pictures. Please submit it as an aswer and i will accept it – chuel Feb 03 '14 at 10:56
1 Answers
1
If FileStream works to open the file, you might want to give some of the other constructors of Bitmap a try, in particular Bitmap(Stream).
If that doesn't help, you might try loading the raw bmp data, creating a Bitmap with the format you want and copying the data into the Bitmap manually (I'm not familiar with C# Bitmaps, but there should be some way of accessing the data).
Hope this helps.
JaimeBarrachina
- 420
- 7
- 21
-
it was loading the images, but after the second one it still gave me out of memory exception, I tried what WiiMaxx said and it works now – chuel Feb 03 '14 at 10:57