Skip to main content

How to display image from compressed jpeg

2 replies [Last post]
niteshwarbhardwaj
Offline
Joined: 2009-01-29
Points: 0

hi All

I have jpeg compressed buffer / byte array using that I want to diaplay the image in applet.
That is compressed using jpeglib .
How can I decompress that bytes and show image using applet and JAI ImageIO?
What all jars are required for JAI ImageIO?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Ken Warner

ImageIO Tools for JAI is a separate download and will
give you more codecs like for JPEG2000 and TIF but
ordinary JPEG files can be decoded by ImageIO which
is standard in the JRE/JDK. Read ImageIO docs.

You can read the JPEG file as a byte array and then
make a ByteArrayInputStream to give to the ImageIO reader

I do it in my applet.

http://pancyl.com/

Click/Drag to move the image.

jai-imageio@javadesktop.org wrote:
> hi All
>
> I have jpeg compressed buffer / byte array using that I want to diaplay the image in applet.
> That is compressed using jpeglib .
> How can I decompress that bytes and show image using applet and JAI ImageIO?
> What all jars are required for JAI ImageIO?
> [Message sent by forum member 'niteshwarbhardwaj' (niteshwarbhardwaj)]
>
> http://forums.java.net/jive/thread.jspa?messageID=338873
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
> For additional commands, e-mail: interest-help@jai-imageio.dev.java.net
>
>

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

marcojacob
Offline
Joined: 2006-07-10
Points: 0

You can create a ByteArrayInputStream and use it for input to ImageIO
ImageReader.