Jump to content
  • Advertisement

Archived

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

Muzlack

saving bmp to a file

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

Hello everyone. I would like to write a sprite making program and I''d like to save the bitmap data along with the sprite information. I''d either like to do it with the data I''d get from locking the surface, or from the BitmapInfo structs. Thanks

Share this post


Link to post
Share on other sites
Advertisement
Wotsit have specifications on most alot of common fileformats.



What does God want?
Does God want goodness or the choice of goodness?
Is a man who chooses the bad perhaps in some way better than a man who has the good imposed upon him?

Share this post


Link to post
Share on other sites
Well, I was more asking was after I get the data into a USHORT *, How can I write that to a file, and load it back again?

Share this post


Link to post
Share on other sites
Sorry, I''m really unskilled in the conversions and file saving area... After I get this data into the BYTE *, then I can just do fwrite(data,sizeof(data),1,fp) ? then fread(data,sizeof(data),1,fp) ? Or is there another step? then, to copy this onto a surface, I need it to be a USHORT *, can I just convert this data? Thanks.

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!