Specifically, you should take a look at the Batik Rasterizer.
Here are the associated JavaDocs for manipulating it at the code level:
- http://xmlgraphics.apache.org/batik/javadoc/
- http://xmlgraphics.apache.org/batik/javadoc/org/apache/batik/apps/rasterizer/package-frame.html