If you are referring to creating your own file format then yes, you can do that. The MEMBLOCKS commands are useful here. You can also write directly to disk too. But making your own picture format (or any media) isn't a walk in the park. You have to think about your header (the initial bytes that id the file type), any metadata (optional extra info, usually part of the header) and then your data arrangement (your image). Remember it should be both coherent and portable (one of the reasons png is considered the best raster graphics format).
In short: you can. But do you need to?
What it comes down to is more what you want to do this for. If you merely wish to keep users from mucking with your media, you can use a small, homebrew encryption (like a basic 3 rounds) that will keep most people out as anybody with a little cryptology knowledge would not waste their time on messing with an app's images (unless they really are mentally ill).
If you want your own format for effeciency, go crazy! Just make sure you read and write correctly to/from your files.
You should look up Memblocks and File Commands in the DBPro help for more detailed information if you want to make your own formats.