|
-
Mar 4th, 2002, 01:12 PM
#1
Thread Starter
Hyperactive Member
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?
-
Mar 11th, 2002, 09:41 AM
#2
Thread Starter
Hyperactive Member
Com'on! Only 4 people looked at this. Surely someone must have some insite to this?
-
Mar 11th, 2002, 10:56 AM
#3
transcendental analytic
I don't see your point, you want to have the bitmap to hdd or vice versa?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Mar 12th, 2002, 04:51 AM
#4
Fanatic Member
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...
Teaudirenopossum.Musasapientumfixaestinaure.
(I can't hear you. There's a banana in my ear)
-
Mar 12th, 2002, 09:58 PM
#5
Thread Starter
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|