Huge Memory Hog....
- Posted by Euman <euman at bellsouth.net> Mar 08, 2001
- 372 views
I wanted to include images in my program, use createDIB then BitBlit the images to screen, I spent a fort night prepareing this and am very dissapointed in the memory consumed by this operation. There are many images I have to use in this program and would like to compile these into the main .exe also shrouding the user from the images. I used incbm.e and instead of nameing the images as constant data I changed these to objects so as to zero the sequence after createDIB is called. I used UPX to compress the compiled .exe which resulted in a 190k file, but when run, the program consumed @50meg of RAM. (highly unexceptable) I hope that someone would explain why 225k uncompressed included images would HOG this much RAM. "I used LoadBitmapfromFile and the memory consumption was @ 1meg RAM so I know its not my codeing scheme that's the HOG here." I hoped to share the same palette amongst the images and have designed them with the same. however, createDIB hasn't a method to retrieve the initial palette. I think this could shave a few megs consumption but, not sure. Derek P said he'd look into this because I failed. Would David Cuny's resource.e work to include .bmp's with the translator and if you have a working example how this works, I would appreciate the info. ANY SUGGESTIONs, PLEASE! Euman