Archived

This topic is now archived and is closed to further replies.

Militant

Saving DirectDrawSurface4 as a Bitmap (BMP)?

Recommended Posts

The subject explains most of this. I need to be able to take my primary surface and save it as a 24-bit bmp file. I also need to know how to save a bmp once loaded, and maybe modified, for a game editor. Any help? Appreciated. Militant - "Education is that which allows us to get into more intelligent trouble"

Share this post


Link to post
Share on other sites
all bitmaps (and almost all files) have a header struct with all it''s properties, if its in 8-bit 16-bit 24-bit or 32-bit, the size, the palette (if any) and a bunch of other info about the bitmap...

so you''d better take a look at the doc of the header struct, understand how it works and then save in a same file the header with the apropiate information (at the very begining) and the bit-code of the image you want to save (after the header struct)...

jakovo

Share this post


Link to post
Share on other sites
Check out www.wotsit.org for info about different file formats (e.g. BMP). Also, if you''re using the Windows platform you can probably use the DIB functions to save a bitmap. Look at the MSDN docs.

Share this post


Link to post
Share on other sites