PIL(low) and multi-page TIFFS

前端 未结 1 625
你的背包
你的背包 2020-12-07 01:50

This should be relatively easy, but who knows...

Is there a way to retrieve the number of frames in a multi-page TIFF file using PIL/Pillow, without iterating throug

相关标签:
1条回答
  • 2020-12-07 02:30

    Try using n_frames:

    from PIL import Image
    
    tiffstack = Image.open('my_img.tiff')
    tiffstack.load()
    
    print(tiffstack.n_frames)
    
    0 讨论(0)
提交回复
热议问题