Yes, it is not only possible, but very doable as well. I'll make the assumption that your programming in Java. Just make a BufferedImage and save your work to it, then save the image using ImageIO. It's a pretty easy process.
Out on HF and heard nobody, but didn't call CQ? Nobody heard you either. 73 de N7GH