Archived

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

How to save a Directdraw7 surface to .bmp?

This topic is 5010 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

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