int height = resProfile.getHeight();
if (halveSizeButton.isSelected()) {
width /= 2;
height /= 2;
}
RenderInfo info = new RenderInfo(width, height, RenderMode.INTERACTIVE);
Flame flame = getCurrFlame();
if (!Stereo3dMode.NONE.equals(flame.getStereo3dMode())) {
throw new Exception("Stereo3d-rendering isn't currently supported in the interactive-renderer. Please use the editor or the batch-renderer to create stereo3d-images");
}
double wScl = (double) info.getImageWidth() / (double) flame.getWidth();
double hScl = (double) info.getImageHeight() / (double) flame.getHeight();
flame.setPixelsPerUnit((wScl + hScl) * 0.5 * flame.getPixelsPerUnit());
flame.setWidth(info.getImageWidth());
flame.setHeight(info.getImageHeight());
flame.setSampleDensity(10);
info.setRenderHDR(prefs.isTinaSaveHDRInIR());
info.setRenderHDRIntensityMap(false);
if (flame.getBGColorRed() > 0 || flame.getBGColorGreen() > 0 || flame.getBGColorBlue() > 0) {
image.fillBackground(flame.getBGColorRed(), flame.getBGColorGreen(), flame.getBGColorBlue());
}
renderer = new FlameRenderer(flame, prefs, flame.isBGTransparency(), false);
renderer.registerIterationObserver(this);