How do I save an Image on a DD surface to a file?
 
 
Warder
(3/9/00 7:54:10 pm)

Lets say I have an image on a DirectX Surface, how do I take the image on the surface and save it to a bmp file? I was thinking of bltbit or whatever the surface to a picture box or something and then save it to a file, but how do I do that? I mean is there code to do something like that?



 
MetalWarrior  
(3/9/00 8:52:26 pm)

Well, if you want to do it that way, just do this:
 

dxDC = DXsurface.GetDC

BitBlt Picture1.hDC, 0, 0, dxDC, etc etc

DXsurface.ReleaseDC dxDC

SavePicture "whatever.bmp", Picture1.Image
 

Make sure the picture box's AutoRedraw property is True. Keep in mind I typed that entirely from memory, so it may or may not be *entirely* accurate. =)