use of org.twak.tweed.gen.FeatureCache.ImageFeatures in project chordatlas by twak.
the class MiniStandalone2d method renderAll.
private void renderAll(MegaFeatures mf, String out) {
System.out.println("processing " + mf + " into " + out);
int c = 0;
for (ImageFeatures i : mf.features) for (MiniFacade m : i.miniFacades) {
if (m.width < 3 || m.height < 3)
continue;
BufferedImage bi = m.render(40, Feature.DOOR, Feature.WINDOW);
BufferedImage bi2 = m.render(40);
File outF = new File(out).getParentFile();
outF.mkdirs();
try {
ImageIO.write(bi, "jpg", new File(out + "_" + c + "_im.jpg"));
ImageIO.write(bi2, "jpg", new File(out + "_" + c + "_ft.jpg"));
} catch (IOException e) {
e.printStackTrace();
}
c++;
}
}
Aggregations