Counting number of pages in tif image file using java
How can i count the number of pages in tiff 开发者_开发知识库file? i get it as byte array
Thanks
You could have a look at iText. iText provides you a class called TiffImage.
TiffImage.getNumberOfPages(new RandomAccessFileOrArray(/* your file, input stream or byte array */));
You can get the number of pages using the Java Advanced Imaging API. I.e. Using:
ImageDecoder.getNumPages()
An example of how to use it can be found here.
精彩评论