There are C++ functions to save and load pictures/textures.
However they need a bit technical parameters or picture is saved/loaded as garbage or format that i cannot find out.
I did save and load, but because of those settings, and that i could not find documentation (or i did not bother) i dropped idea.
But stuff is there in C++.
ps.
When you make mistake using those functions, and for some reason picture is not correctly loaded expect crash to desktop (because pointers are wrong). So make sure you have backups!