-
memdc to hard drive
This question and scenario is asked a zillion times but there has never been a real answer to the best of my knowledge (I really need one!):
I write my screen graphic to memoryDC. Let's say I have 32K of Ram. It uses a touch less than 1% of my available resources. I save it to a .bmp - It's freaking huge (1.4 MB). The DC loads at the blink of an eye - on the other hand the .bmp cranks and then appears.
I want to know how to save this already processed DC as it is for later use on my hard drive, other hard drives, and by a seperate program so memory can already know what it is, display it quickly through my program, and not take mega space.
Compression is out of the question since many of the graphics processing is done on the fly with things like floodfill and getpixel. I can't wait for "unzipping" and can't afford to loose one pixel. The graphic is constantly changed so preloading does not help me. It may contain up to 50 pics that need to be saved.
At this time I can't afford to distribute Oracle or any DB and I want to stay compatible to Win98 as well.
Please someone help me with this. I need to have a file with the memory info contained but don't give a damn if it's viewable in paint or even if it's a readable - Just as long as I can load it to a dc and have it display. Can copyMemoryAPI do this and if so, how?
-
Com'on! Only 4 people looked at this. Surely someone must have some insite to this?
-
I don't see your point, you want to have the bitmap to hdd or vice versa?
-
Ok, if I get this straight, you see that using a bitmap from a memory DC loads way faster than from hard disk, so you want to save the DC to disk?
Look at it this way: the DC does not take less memory than a bitmap does on disk, I don't know where you got that information. A DC loads a whole lot faster because it remains in memory. As we all know, memory can almost go with gigabytes per second nowadays, but hd's can't (at least not normal affordable hd's :)), so that's why it loads slower from disk.
But, saving a DC to disk won't help, because than you would have to load it again, and it will still take you the same amount of time. You can compress them so it will take the load of the hd, but then it will take probably more time to decompress the image in memory, so you'll end up with the same problem after all... although ZLib provides a pretty fast decompression without data loss...
-