 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Tue Dec 12, 2006 3:49 pm Post subject: TIFF handling in ImageIO |
|
|
Hi
I am trying to covert a tiff to jpeg image. I am able to do that using
ImageIO but reading multi page tiff converts only the first page to
jpeg image. I need to be able to pass page number and get only that
page converted. Anyone has some idea how do it?
Here is the code...
File JpgFile = new File("c://mony.jpg");
BufferedImage bufi = ImageIO.read(new File("c://mony.tiff"));
ImageIO.write(bufi,"jpg",JpgFile );
Thanks in Advance. |
|
| Back to top |
|
 |
Thomas Fritsch Guest
|
Posted: Tue Dec 12, 2006 8:01 pm Post subject: Re: TIFF handling in ImageIO |
|
|
pjaganathan (AT) gmail (DOT) com wrote:
| Quote: |
I am trying to covert a tiff to jpeg image. I am able to do that using
ImageIO but reading multi page tiff converts only the first page to
jpeg image. I need to be able to pass page number and get only that
page converted. Anyone has some idea how do it?
Here is the code...
File JpgFile = new File("c://mony.jpg");
BufferedImage bufi = ImageIO.read(new File("c://mony.tiff"));
ImageIO.write(bufi,"jpg",JpgFile );
|
I once read the images from a multi-frame-GIF (aka animated GIF) by ImageIO.
Hence I guess the same technic applies for reading the images from a
multi-page-TIFF. For details see my answer at
<http://groups.google.de/group/comp.lang.java.programmer/msg/2b0dd609cdcd517f>
--
Thomas |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|