Jump to content
  • Advertisement

Archived

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

Dale

How to save a Directdraw7 surface to .bmp?

This topic is 5294 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. Subject says it all. Is there any tutorials on how to save a Win32 Directdraw7 surface to a bitmap file as 24-bit?

Share this post


Link to post
Share on other sites
Advertisement
In Delphi you can get the Handle of the DirectDraw7 surface, typecast to a TCanvas object which can then be saved as a bitmap.

Not sure if this helps you though

Share this post


Link to post
Share on other sites
He is probably using C++, and so, your advice is useless. Thus, it''s reverse engineering the loading code. Read this article, on loading a BMP, and I think you get the idea of how to save a bitmap(If you create the header, etc. and then write the data from the surface to the file)

http://www.gamedev.net/reference/articles/article1966.asp

Toolmaker



-Earth is 98% full. Please delete anybody you can.

Share this post


Link to post
Share on other sites
Oh sorry, I did mean in C++. My bad.

Anyways, thanks both of you for the advice. I''d seen that article, but thought there might be something similar for saving. But I''ll re-go through it and give it a go on the weekend.

BTW, if you''re interested, I''ve got a map loading system similar to SimCity4 where you can create a map from a jpeg (I chose bmp), and I wanted to save a bmp from the editor. Yes, I know the file is larger than any sort of text file I could generate from the map editor, but it means the end user can create a bmp file on their own and import it.

Thanks
Dale

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!