Re: Rendering on Windows Server 2008 Possible?
Code: Select all
renderer.render(image, home.getCamera(), null);
ImageIO.write(image, homePhoto.substring(homePhoto.lastIndexOf('.') + 1), new File(homePhoto));Code: Select all
for (Camera camera : home.getStoredCameras()) {
renderer.render(image, camera, null);
int dotIndex = homePhoto.lastIndexOf('.');
String cameraPhoto = homePhoto.substring(0, dotIndex) + "-"
+ camera.getName().replaceAll("/|\\\\|:|;", "-").replace(File.pathSeparatorChar, '-').replace(File.separatorChar, '-')
+ homePhoto.substring(dotIndex);
ImageIO.write(image, homePhoto.substring(dotIndex + 1), new File(cameraPhoto));
}