ant*_*ony 7 python tiff python-imaging-library
这应该相对容易,但是谁知道......
有没有办法使用PIL/Pillow检索多页TIFF文件中的帧数,而不会迭代整个堆栈直到seek引发错误?
尝试使用n_frames:
from PIL import Image
tiffstack = Image.open('my_img.tiff')
tiffstack.load()
print(tiffstack.n_frames)
Run Code Online (Sandbox Code Playgroud)