You can use a similar approach to draw vector data into a BufferedImage in order to generate a PNG file. author: Jody Garnett