Swing & Batik: Create an ImageIcon from an SVG file?
Simply put, I'm looking for a way to make an ImageIcon from an SVG file using the batik library. I don't want to have to raster the SVG to disk first, I just want to be able to pull an svg out of the jar file and have it land as a UI element. I feel like this should be reasonably easy, but the batik javadocs aren't telling me what I need to know. (Why batik? Well, we're already using it, so we don't have to run another library past legal.) Devon_C_Miller It's really quite easy, just not very intuitive. You need to extend ImageTranscoder . In the createImage method you allocate a BufferedImage