List of usage examples for org.jfree.chart ChartUtilities encodeAsPNG
public static byte[] encodeAsPNG(BufferedImage image, boolean encodeAlpha, int compression) throws IOException
From source file:tdunnick.jphineas.console.queue.Charts.java
private byte[] getPNG(BufferedImage img) { try {// w w w .j a v a 2 s . com return ChartUtilities.encodeAsPNG(img, true, 3); } catch (IOException e) { e.printStackTrace(); } return null; }