Search code examples
imagefile-formatdata-protection

Creating my own graphic file type/extension


When I install games on my computer professional and amateur I find that the resources such as pictures have strange extensions so I cannot open them.

As I cannot find these extensions on Google, I figured it was a method of protecting your artwork so it cannot be stolen so easily.

I have a bunch of JPEG, PNG and bitmap files I would like to do this to so people cannot copy them so easily when I distribute my game.

I use C++ and DirectX if that makes any difference.

Does anyone know how this is done? I know I can change a .txt extension to anything and my program will read it just the same but will this work with pictures?


Solution

  • Usually programs don't care about extensions when reading files, so changing extension to an unknown one shouldn't get you in trouble.