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.
So please help me find the easiest and fastest way to count the number of pages in tif file.
Thanks a lot.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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
so i think there will be no other option in the standard java libraries that come with SDK
http://www.asprise.com/product/javatiff/
it has a method countPages
http://www.asprise.com/product/javatiff/javadoc/index.html