Rick Leir
2009-10-27 13:52:55 UTC
Hi Robo and all,
Maybe I am missing something, but is it not easier to compress a JPEG
using Java 2D libraries? Something like:
// encodes bi as a JPEG data stream
ByteArrayOutputStream out = new ByteArrayOutputStream();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi);
param.setQuality(1.0f, false);
encoder.setJPEGEncodeParam(param);
encoder.encode(bi);
From
http://java.sun.com/products/java-media/2D/samples/suite/Image/JPEGFlip.java
Maybe you looked into this already.
Thanks,
Rick
Maybe I am missing something, but is it not easier to compress a JPEG
using Java 2D libraries? Something like:
// encodes bi as a JPEG data stream
ByteArrayOutputStream out = new ByteArrayOutputStream();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi);
param.setQuality(1.0f, false);
encoder.setJPEGEncodeParam(param);
encoder.encode(bi);
From
http://java.sun.com/products/java-media/2D/samples/suite/Image/JPEGFlip.java
Maybe you looked into this already.
Thanks,
Rick
--
Rick Leir rick (at)leirtech (.) com
613 828 8289 O
613 878 7870 C
http://blinkmonitor.com/
Rick Leir rick (at)leirtech (.) com
613 828 8289 O
613 878 7870 C
http://blinkmonitor.com/