The two functions in openCV cvLoadImage and cvSaveImage accept file path\'s as arguments.
For example, when saving a image it\'s cvSaveImage(\"/tmp/output.j
This is an indirect answer...
In the past, I've directly used libpng and libjpeg directly to do this. They have a low-level enough API that you can use memory buffers instead of file buffers for reading and writing.