Link to home
Start Free TrialLog in
Avatar of makunag
makunag

asked on

Counting number of pages in tif image file using java

I need to count the number of pages in .tif file. I want the easiest way to do it preferebly using standard java library itself. I am not doing any other image processing so I would like to rather stay away from installing libraries like Lizeard, JAI, ITEXT etc. I did lot of search but got overwhelmed by all kind of image processing examples. I just need to count number of pages in tif image, that's all.

So please help me find the easiest and fastest way to count the number of pages in tif file.

Thanks a lot.
Avatar of contactkarthi
contactkarthi
Flag of United States of America image

ASKER CERTIFIED SOLUTION
Avatar of contactkarthi
contactkarthi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of makunag
makunag

ASKER

Thanks contactkarthi, that should work. But I was hoping for something without using any external library. I tried imageio which comes with java 1.4, but couldn't get it to work. Is there is no way to get to number of pages using imageio? Can any one confirm it?
If none, then I will use JAI libraries.

Thanks.
JAI is Java Advanced Imaging

so i think there will be no other option in the standard java libraries that come with SDK