开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜