Jump to content
  • Advertisement

Archived

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

Mman

How hard would it be to make a custom file format?

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

Yeh, how hard would it be to make a custom file format for a picture file? What would be some info that I would have to include? Any ideas welcome! Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Not very. It really depends on how felxible you want your format to be. If you want simplicity, go for a simple 24 bit file, and store height, width, followed by the raw data(a single 32 bit value per pixel, ignore one byte). You could then extend it, to NOT store that unused byte, to save height*width bytes in the file.

If you wanted to a bit more flexible, you would store the bpp in the file, perhaps the size for data checks, etc.

Z.

Share this post


Link to post
Share on other sites
nowadays resolutions are quite high, and the amount of pixels you might want to add can be quite a lot, most modern file formats have some compresion scheme, this would make your file format more complex, but I am sure you wont want 2 MB(or more) 640X480 bitmaps.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!