开发者

Counting number of pages in tif image file using java

开发者 https://www.devze.com 2023-01-31 00:23 出处:网络
How can i count the number of pages in tiff 开发者_开发知识库file? i get it as byte array ThanksYou could have a look at iText. iText provides you a class called TiffImage.

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

精彩评论

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