Masking Image files

Started by
3 comments, last by Kitasia 19 years, 6 months ago
Can someone explain how to release a game without giving out the BMP file? I'm aware people probably won't want to steal the files but you can never be too sure. Thx in advance!!
Advertisement
Pretty much by definition, you can't.
Is there anything that would help? I'd hate for someone to just load up the BMP file and do whatever they want with it.
It depends. You can make things harder, but theres pretty much nothing you can do to stop someone who's determined enough.
If you're loading the image with the GDI function LoadImage(), you could switch to loading the file from a resource. Then the person would have to extract the image from the EXE before they can do anything.
If you're loading the image by passing a memory buffer, then you can do anything you like. You could do something simple like add 1 to each byte in the file, and then when you come to read it, load the buffer, and decrease every byte by 1, then pass the buffer off to be loaded.
If you're loading the image by some way that needs a filename (so it reads the file off the disk), you could maybe try creating a tempoary file in the windows temp directory or somewhere, and decrypting your file to that, then load the file, and then delete it.

Just some ideas...
That'll do. Thx!!!

This topic is closed to new replies.

Advertisement