Skip to main content

[JAI-IMAGEIO] Compressed Image information from Image Reader...

2 replies [Last post]
Anonymous

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Michael J Hess

I created an enhancement request in the "jai-imageio" group (BugID: 4),
but after I submitted the request, I realize it should have been under
the "jai-imageio-core" group. Should I recreate the request in the
"jai-imageio-core" group? Or is it fine where it is?

(Message from ImageIO group:)
> Normally you would get the information from the image metadata. If you are using the JAI-Image I/O Tools ImageReader plug-in then the IIOMetadata object will be null as described in the table here:
> http://java.sun.com/products/java-media/jai/forDevelopers/jai-imageio-1_...
>
> The Java SE Image I/O JPEG ImageReader plug-in does support metadata however. Unfortunately it supports only baseline JPEG up to 8 pits per sample.
>
> Eventually we would like to add metadata support to the JAI-Image I/O plug-in but this is not in the plan right now. If there is interest in this then someone should file an enhancement issue and people should vote for it. The only bug on file presently is in the java.sun.com bug database:
>
> 4782745 codec_imagei 5 Image I/O Tools JPEG reader should emit standard metadata
>
> and it only deals with standard image metadata.
>
> Brian
>
Michael J Hess wrote:
> I posted this to the ImageIO interest group, but realized the
> information might not be there, as the Image Reader I am using comes
> from the JAI ImageIO Tools package....
>
> I am trying to discover compression information from a compressed
> image using the ImageIO framework. I would like to be able to get
> decoder information, and compression information (Ratio, quality, etc).
>
> Currently, I am working in the Jpeg area: I would like to be able to
> see some of the compression parameters that were used the the JPEG,
> (lossy, lossless, progressive info, etc).
>
> Is there an example of how to do this?
>
> Currently, I am doing something liks this:
>
> //create an Image Input Stream for reading.
> ImageInputStream iis = ImageIO.createImageInputStream(is);
>
> //get the "readers" that claim to be able to read this image
> input stream.
> Iterator imageReaders = ImageIO.getImageReaders(iis);
>
> ImageReader ir = imageReaders.next();
>
> //set the input of the ImageReader
> ir.setInput(iis);
>
> //read the first image in the stream.
> IIOImage imagePackage = ir.readAll(0, null);
>
> IIOMetadata iiom = imagePackage.getMetadata();
>
> RenderedImage ri = imagePackage.getRenderedImage();
>
> What I get back is a object for the IIOMetadata , and a
> regular, Renderd Image for the image data. reading the image is
> working fine, I just am unable to get any details about how the image
> was compressed in the first place... jpeg, jpeg-lossless, jpeg-ls,
> compression levels, etc.
>
> If anyone can lend a hand, that would be great.
>
--
*_Michael J Hess_*

*Nighthawk Radiology Services*
------------------------------------------------------------------------
CONFIDENTIALITY NOTICE:
This email, including any attachments, contains information from
NightHawk Radiology Services, which may be confidential or privileged.
The information is intended to be for the use of the individual or
entity named above. If you are not the intended recipient, be aware that
any disclosure, copying, distribution or use of the contents of this
information is prohibited. If you have received this email in error,
please notify NightHawk Radiology Services immediately by forwarding
this message to mhess@nighthawkrad.net
and destroy all electronic and hard
copies of the communication, including attachments.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net

Brian Burkhalter

To ensure proper attention please place in the jai-imageio-code issue tracker.

Thanks,

Brian

On Thu, 26 Jan 2006, Michael J Hess wrote:

> I created an enhancement request in the "jai-imageio" group (BugID: 4), but
> after I submitted the request, I realize it should have been under the
> "jai-imageio-core" group. Should I recreate the request in the
> "jai-imageio-core" group? Or is it fine where it is?
>
> (Message from ImageIO group:)
>> Normally you would get the information from the image metadata. If you are
>> using the JAI-Image I/O Tools ImageReader plug-in then the IIOMetadata
>> object will be null as described in the table here:
>> http://java.sun.com/products/java-media/jai/forDevelopers/jai-imageio-1_...
>>
>> The Java SE Image I/O JPEG ImageReader plug-in does support metadata
>> however. Unfortunately it supports only baseline JPEG up to 8 pits per
>> sample.
>>
>> Eventually we would like to add metadata support to the JAI-Image I/O
>> plug-in but this is not in the plan right now. If there is interest in this
>> then someone should file an enhancement issue and people should vote for
>> it. The only bug on file presently is in the java.sun.com bug database:
>>
>> 4782745 codec_imagei 5 Image I/O Tools JPEG reader should emit standard
>> metadata
>>
>> and it only deals with standard image metadata.
>>
>> Brian
>>
> Michael J Hess wrote:
>> I posted this to the ImageIO interest group, but realized the information
>> might not be there, as the Image Reader I am using comes from the JAI
>> ImageIO Tools package....
>>
>> I am trying to discover compression information from a compressed image
>> using the ImageIO framework. I would like to be able to get decoder
>> information, and compression information (Ratio, quality, etc).
>>
>> Currently, I am working in the Jpeg area: I would like to be able to see
>> some of the compression parameters that were used the the JPEG, (lossy,
>> lossless, progressive info, etc).
>>
>> Is there an example of how to do this?
>>
>> Currently, I am doing something liks this:
>>
>> //create an Image Input Stream for reading.
>> ImageInputStream iis = ImageIO.createImageInputStream(is);
>> //get the "readers" that claim to be able to read this image
>> input stream.
>> Iterator imageReaders = ImageIO.getImageReaders(iis);
>>
>> ImageReader ir = imageReaders.next();
>> //set the input of the ImageReader
>> ir.setInput(iis);
>> //read the first image in the stream.
>> IIOImage imagePackage = ir.readAll(0, null);
>>
>> IIOMetadata iiom = imagePackage.getMetadata();
>>
>> RenderedImage ri = imagePackage.getRenderedImage();
>>
>> What I get back is a object for the IIOMetadata , and a regular,
>> Renderd Image for the image data. reading the image is working fine, I
>> just am unable to get any details about how the image was compressed in the
>> first place... jpeg, jpeg-lossless, jpeg-ls, compression levels, etc.
>>
>> If anyone can lend a hand, that would be great.
>>
> --
> *_Michael J Hess_*
>
> *Nighthawk Radiology Services*
> ------------------------------------------------------------------------
> CONFIDENTIALITY NOTICE:
> This email, including any attachments, contains information from NightHawk
> Radiology Services, which may be confidential or privileged. The information
> is intended to be for the use of the individual or entity named above. If you
> are not the intended recipient, be aware that any disclosure, copying,
> distribution or use of the contents of this information is prohibited. If you
> have received this email in error, please notify NightHawk Radiology Services
> immediately by forwarding this message to mhess@nighthawkrad.net
> and destroy all electronic and hard
> copies of the communication, including attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
> For additional commands, e-mail: interest-help@jai-imageio.dev.java.net
>
>

----------------
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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net