Archived

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

Bitmap Encryption

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

I was curious as to how one goes about encrypting bitmaps. Some call it "offseting" the bitmap. I do not understand how this is done, and I''de also like to know how one goes about storing everything into one datafile and accessing it instead of having a crap load of files in seperate directories. This includes: Maps, Sounds, Music, Objects, Npcs.. basically everything. If anyone has a good online tutorial I could read it would be greatly appreciated.

Share this post


Link to post
Share on other sites
Besides the resource file tutorial, I would *guess* (I haven''t done it) offsetting a bitmap means you''d add an offset to the beggining of the file so no program could open it. So to "encrypt" your bitmap''s simply write some string or a couple bytes to the beggining of the file. Then when you go to load the bitmap make sure you offset you memory code by that number of bytes.

You could also make your own file format if you want to.
Hope this helps!
See ya,
Ben

Share this post


Link to post
Share on other sites
At my web page I have an example of creating your own graphics format and an example of combining several bitmaps and sound files into one animation file.

I never bothered to finish the animation example. Although most of the code for the sound part is there, I never bothered to finish it. These two examples may give you some ideas.

After a quick look at the zip file I noticed that I left out the compiled exe. No big deal, just build the project. I also left out all of the image files. For this reason it might not run. None the less, the code should be of some use.

To make things better you should probably incorperate some sort of directory structer. I don''t believe it would be that hard to accomplish; simply list the directorys at the beginning of your resource file (maybe in a header) and how far into the file that directory is offset.

Share this post


Link to post
Share on other sites