G
Guest
I am using Microsoft Visual Basic .net 2002 Standard. I am coding an application which loads in data from a compressed file. One of the items in the file is a raw RGB565 bitmap, at 800x600 pixels. In a previous version of my app, I used Bitmap.SetPixel() but performance got to be an issue as it took in some cases nearly 30 additional seconds to load the file. I am trying to use Bitmap.LockBits() in combination with Marshall.PtrToStruct() to map a two-dimensional array of Short over the actual bits in the bitmap. Unfortunately, Marshall.PtrToStruct() requires a well-formatted structure, and an array of anything is not acceptable. Thus, I attempted to create a class with 480,000 Short variables and a Property to access them in a manner similar to that I'd use if I were using an array. However, when I tried to load it in the IDE, my swap file broke through 2GB and went on climbing, from 200MB. Attempts to compile the 40MB source code beast by hand have been thwarted by a stack overflow in VBC, and I can't seem to find any option to increase VBC's stack size.
So, how do I manually get access to the bits in a bitmap, given the above troubles?
So, how do I manually get access to the bits in a bitmap, given the above troubles?