public void screenshot(TextureData image, String testImage) throws IOException { File output = new File(testImage); if (!output.getParentFile().exists()) output.getParentFile().mkdirs(); TextureIO.write(image, output); }
protected void screenshot(Chart chart, String filename) throws IOException { File output = new File(filename); if (!output.getParentFile().exists()) output.mkdirs(); TextureIO.write(chart.screenshot(), output); Logger.getLogger(EventRecorder.class).info("screenshot:" + filename); }
/** * Write the TextureData filled by {@link #readPixels(GLAutoDrawable, boolean)} to file */ public void write(final File dest) { try { TextureIO.write(readTextureData, dest); rewindPixelBuffer(); } catch (final IOException ex) { throw new RuntimeException("can not write to file: " + dest.getAbsolutePath(), ex); } }
/** * Write the TextureData filled by {@link #readPixels(GLAutoDrawable, boolean)} to file */ public void write(final File dest) { try { TextureIO.write(readTextureData, dest); rewindPixelBuffer(); } catch (final IOException ex) { throw new RuntimeException("can not write to file: " + dest.getAbsolutePath(), ex); } }
/** * Write the TextureData filled by {@link #readPixels(GLAutoDrawable, boolean)} to file */ public void write(final File dest) { try { TextureIO.write(readTextureData, dest); rewindPixelBuffer(); } catch (final IOException ex) { throw new RuntimeException("can not write to file: " + dest.getAbsolutePath(), ex); } }
@Override public TextureData screenshot(File file) throws IOException { TextureData screen = screenshot(); TextureIO.write(screen, file); return screen; }
@Override public void screenshot(Chart chart, String filename) throws IOException { File output = new File(filename); if (!output.getParentFile().exists()) output.mkdirs(); TextureIO.write(chart.screenshot(), new File(filename)); }
@Override public TextureData screenshot(File file) throws IOException { TextureData screen = screenshot(); TextureIO.write(screen, file); return screen; }
@Override public TextureData screenshot(File file) throws IOException { TextureData screen = screenshot(); TextureIO.write(screen, file); return screen; }
@Override public TextureData screenshot(File file) throws IOException { TextureData screen = screenshot(); TextureIO.write(screen, file); return screen; }
public static void screenshot(Chart chart, String filename) throws IOException { File output = new File(filename); if (!output.getParentFile().exists()) output.mkdirs(); TextureData screen = chart.screenshot(); if(screen!=null){ TextureIO.write(screen, new File(filename)); logger.info("Dumped screenshot in: " + filename); } else{ logger.error("screenshot not available"); } } }
write(data, file);
TextureIO.write(textureData, file);