Skip to main content
gamedev.net
🔒 Locked

DirectDraw

Started by Shaw Mishrak Jul 7, 2000 at 2:29 PM 5 replies 350+ views
Original Post
Shaw Mishrak
Shaw Mishrak
If I wanted to save a DirectDraw surface as a BMP file, wuld I have to manually extract the raw surface data and write a BMP file myself, or are there GDI or DD functions to do this or make it easier? Thanks in advance, Shaw Mishrak
POINT
POINT
i havend came accross any bmp writing fnuctions yet...

writing your own would be simple - you just have to know the format of a bmp file - check www.wotsit.org for details on the bmp file format.
Hootie
Hootie
There is an example in the platform SDK help file under Graphics and Multimedia Services -> GDI -> Using Bitmaps -> Storing a Bitmap.

To get a bitmap off a surface simply GetDC the surface and do a StretchBlt to a bitmap structure in memory. You can create the bitmap area in memory with CreateBitmap.

Edited by - Hootie on July 7, 2000 9:26:28 PM
ziplux
ziplux
I thought I saw an article about how to do this posted on gamedev''s main page. It was about using the GDI to capture a DirectDraw surface to a .BMP I can''t find it on the previously featured articles section, and it''s really bothering me! If anyone knows the whereabouts of this lost article, post a reply!

-----------------------------


My Geekcode: "GCS d s: a14 C++$ P+(++) L+ E-- W+++$ K- w++(+++) O---- M-- Y-- PGP- t X
R- tv+ b++ DI+(+++) D- G e* h!"

Decode my geekcode!

Geekcode.com


Visit our web site:
Asylum Entertainment
goir
goir
DirectX doesn''t have any functions for it.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.