Re: Getting a PNG Photo Image
Code: Select all
public class Export3DViewToPNG {
public static void main(String [] args) throws RecorderException, IOException {
Home home = new HomeFileRecorder().readHome("test.sh3d");
HomeComponent3D homeComponent3D = new HomeComponent3D(home);
BufferedImage image = homeComponent3D.getOffScreenImage(400, 400);
File file = new File("tmp.png");
ImageIO.write(image, "png", file);
}
}