Image processing, encoding, and compression is done in dedicated hardware (for both still photo and video). I suppose you could implement this if you didn't mind waiting 30 minutes to save each photo.
Features that are NOT possible - please don't request them :
Custom codecs
Codecs are not implemented on the general-purpose ARM processor. Only MJPEG might be technically possible, since the camera already saves JPEGs.