Open fbacchella opened 11 years ago
If your version works and you have unit tests for it, then we should go with that. My last update to that jpeg part of the code was to make it not call the sun classes directly.
Ron
On Jul 12, 2013, at 5:39 PM, Fabrice Bacchella notifications@github.com wrote:
I'm not sure ImageWorker is working with jpeg format. I tried your ideas for rrd4j and met two problems: iwp.setCompressionQuality(quality) is no use if used without: writer.write(null, new IIOImage(outputImage, null, null), iwp);
writer.setOutput(...) don't take an OutputStream but an ImageOutputStream, that is build with: ImageOutputStream imageStream = ImageIO.createImageOutputStream(stream);
My version can be found at: https://code.google.com/p/rrd4j/source/browse/src/main/java/org/rrd4j/graph/ImageWorker.java#182
I wrote a simple test class that you should use, see https://code.google.com/p/rrd4j/source/browse/src/test/java/org/rrd4j/graph/ImageWriterTest.java
— Reply to this email directly or view it on GitHub.
I'm not sure ImageWorker is working with jpeg format. I tried your ideas for rrd4j and met two problems: iwp.setCompressionQuality(quality) is no use if used without: writer.write(null, new IIOImage(outputImage, null, null), iwp);
writer.setOutput(...) don't take an OutputStream but an ImageOutputStream, that is build with: ImageOutputStream imageStream = ImageIO.createImageOutputStream(stream);
My version can be found at: https://code.google.com/p/rrd4j/source/browse/src/main/java/org/rrd4j/graph/ImageWorker.java#182
I wrote a simple test class that you should use, see https://code.google.com/p/rrd4j/source/browse/src/test/java/org/rrd4j/graph/ImageWriterTest.java