Saving DirectDrawSurface4 as a Bitmap (BMP)?

Started by
1 comment, last by Militant 22 years, 8 months ago
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"
I'm not the brightest something or other in a group or similar.~ me ~
Advertisement
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
"lots of shoulddas, coulddas, woulddas in the air, thinking about things they shouldda couldda wouldda donne, however all those shoulddas coulddas woulddas ran away when they saw the little did to come"
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.

This topic is closed to new replies.

Advertisement