超大圖片加載
pip install openslide-python;加載超大圖片出現問題:
- PIL.Image.DecompressionBombError: Image size (***67***314 pixels) exceeds limit of ***89***70 pixels, could be decompression bomb DOS attack.
- user@ubuntu:~/***$ python
- Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55)
- [GCC 7.2.0] on linux2
- Type "help", "copyright", "credits" or "license" for more information.
- >>> from PIL import Image
- >>> Image.MAX_IMAGE_PIXELS = 1000000000
- >>> im = Image.open(r'test.bmp')
- >>> im.show()
- >>> im.show()
- >>> im
- <PIL.BmpImagePlugin.BmpImageFile image mode=L size=***8***73x***0***8 at 0x7FE65A5***E90>