filename = imagePath + File.separator + level.replace("-", "sub_")
+ "_" + area + "_"
+ file.getName().replaceAll("\\.tmx", ".png");
}
final OrthoMapView myView = new OrthoMapView(map);
if (level.equals("int") && !area.equals("abstract")) {
myView.setZoom(0.25);
} else {
myView.setZoom(0.0625);
}
final Dimension d = myView.getSize();
final BufferedImage i = new BufferedImage(d.width, d.height, BufferedImage.TYPE_INT_ARGB);
final Graphics2D g = i.createGraphics();
g.setClip(0, 0, d.width, d.height);
myView.paint(g);
g.dispose();
try {
ImageIO.write(i, "png", new File(filename));