超大圖片加載

超大圖片加載

pip install openslide-python;加載超大圖片出現問題:

  1. PIL.Image.DecompressionBombError: Image size (***67***314 pixels) exceeds limit of ***89***70 pixels, could be decompression bomb DOS attack.  
  2.   
  3. user@ubuntu:~/***$ python  
  4. Python 2.7.15 |Anaconda, Inc.| (default, May  1 2018, 23:32:55)   
  5. [GCC 7.2.0] on linux2  
  6. Type "help""copyright""credits" or "license" for more information.  
  7. >>> from PIL import Image  
  8. >>> Image.MAX_IMAGE_PIXELS = 1000000000  
  9. >>> im = Image.open(r'test.bmp')  
  10. >>> im.show()  
  11. >>> im.show()  
  12. >>> im  
  13. <PIL.BmpImagePlugin.BmpImageFile image mode=L size=***8***73x***0***8 at 0x7FE65A5***E90>  
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章