Regarding the issue, I saw that SVG-Salamander is small enough for my projects. But I do not know if I can use it for this either one or the other.
Any idea?
If I canβt, do you know any other small PNG SVG rasterizer in java?
thanks for all.
I am using this code:
public static void main(String[] args) throws IOException, SVGException { // TODO Auto-generated method stub File f = new File("./src/game_scheme.svg"); SVGUniverse svgUniverse = new SVGUniverse(); SVGDiagram diagram = svgUniverse.getDiagram(svgUniverse.loadSVG(f.toURL())); BufferedImage bi = new BufferedImage(320, 240, BufferedImage.TYPE_INT_ARGB); Graphics2D ig2 = bi.createGraphics(); diagram.render(ig2); ImageIO.write(bi, "PNG", new File("./yourImageName.png")); }
But the images are not smooth :(, any idea?
A.Quiroga
source share