Skip to main content

Tiff byte Array to JPEG Byte Array

2 replies [Last post]
manishjs19
Offline
Joined: 2007-01-22

Hello,

I have a Base64 String that contains encoded image data which is in Tiff format. I am successfully able to get TIFF byte array by decoding that String. Now problem is how to convert that TIFF byte array to JPG Byte Array. I need to display the image in a browser.
I am trying to find out which API would help me in accomplishing this task.. If anyone has any idea, then it will be appreciable..

Thanks
Manish

Reply viewing options

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

You should use JAI Image I/O Tools

https://jai-imageio.dev.java.net/

to convert the TIFF data into an image and either JAI Image I/O Tools or the
Java Image I/O Framework

http://java.sun.com/javase/6/docs/technotes/guides/imageio/index.html

to write the image to JPEG data. The reason I say either/or is that both JAI
Image I/O Tools and the Java Image I/O Framework contain JPEG plugins.

For more information on how to use these APIs please refer to the above links
and in particular to the Java Image I/O Guide

http://java.sun.com/javase/6/docs/technotes/guides/imageio/spec/imageio_...

Brian

On Mon, 22 Jan 2007, jai-imageio@javadesktop.org wrote:

> Hello,
>
> I have a Base64 String that contains encoded image data which is in Tiff format. I am successfully able to get TIFF byte array by decoding that String. Now problem is how to convert that TIFF byte array to JPG Byte Array. I need to display the image in a browser.
> I am trying to find out which API would help me in accomplishing this task.. If anyone has any idea, then it will be appreciable..
>
> Thanks
> Manish
> [Message sent by forum member 'manishjs19' (manishjs19)]
>
> http://forums.java.net/jive/thread.jspa?messageID=197179
>
> ---------------------------------------------------------------------
> 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

manishjs19
Offline
Joined: 2007-01-22

Thanks Brian for your reply. I used JAI API for converting Tiff Byte Array to Jpeg Byte Array.

Thanks.