| From | Sent On | Attachments |
|---|---|---|
| jai-...@javadesktop.org | Jun 26, 2007 6:13 am | |
| Brian Burkhalter | Jun 26, 2007 8:33 am | |
| jai-...@javadesktop.org | Jun 26, 2007 8:55 am | |
| Brian Burkhalter | Jun 26, 2007 8:56 am | |
| jai-...@javadesktop.org | Jun 26, 2007 9:13 am | |
| Brian Burkhalter | Jun 26, 2007 10:13 am |
| Subject: | Re: [JAI-IMAGEIO] JPEG Lossless 8/12 bit | |
|---|---|---|
| From: | Brian Burkhalter (Bria...@Sun.COM) | |
| Date: | Jun 26, 2007 8:56:38 am | |
| List: | net.java.dev.jai-imageio.interest | |
Yes I'm using the Image I/O tools. As I understood it, the JPEG-LS (ISO-14495-1/ITU-T.87) algorithm was different to the JPEG-LOSSLESS (ISO-10918-1/ITU-T.81) algorithm?
Yes.
For this application I need to use the LOSSLESS and not the LS algorithm.
Too bad. I think the compression ratio is generally not as good for that.
my current code looks like:
ImageWriteParam iw_param = writer.getDefaultWriteParam(); iw_param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT); iw_param.setCompressionType("JPEG-LOSSLESS"); iw_param.setCompressionQuality(1.0f);
I don't believe the quality setting is useful here. That value maps to the contents of the Huffman and Quantization tables.
The image io page states that 2-16bit lossless jpegs can be created using JPEG-LOSSLESS, is this just based upon the bit depth of the colormodel?
Yes. To be specific the code is this
int bitDepth = renderedImage.getColorModel().getComponentSize(0);
where 'renderedImage' is the one you are trying to write.
Based upon my test image (8bit depth in the colormodel) and the above code, I get an 8 bit lossless jpeg.
Correct.
---------------- Brian Burkhalter Java Media, Imaging, and Graphics Sun Microsystems, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





