We've been asked why we use our own format for the project files in ArtRage - why didn't we just use PSD, or some other standard.
The answer is because we need to keep a lot of information with the painting. Each layer as well as having colour information also stores the paper texture, the thickness of the paint, whether it's wet or dry, how metalic it is and how shiny it is. When we export the document to a Photoshop PSD, we lose everything except the colour information, which we 'fake' to look like an ArtRage layer.
So a .ptg file contains all the layers, all the tool settings, all the information needed to recreate exactly the painting you were working on.
When we export to .jpg we squash the painting down into one layer, throw away everything except the colour result, and then apply 'compression' which reduces the quality of the image (but makes it a lot smaller and faster to load over the internet).
AndyRage's mantra for graphics engine code:
"Sure - how hard can it be?"