AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TIFF handling in ImageIO

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Tue Dec 12, 2006 3:49 pm    Post subject: TIFF handling in ImageIO Reply with quote



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





PostPosted: Tue Dec 12, 2006 8:01 pm    Post subject: Re: TIFF handling in ImageIO Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.