DecompressionBombError(msg)
kess-one opened this issue · 1 comments
I apologize in advance for my ignorance, I am trying to complete an image analysis on an unusually large image containing 40 mice brains. When I try to perform some segmentation on larger areas at increased magnification I get a message reading:
PIL.Image.DecompressionBombError: Image size (482223296 pixels) exceeds limit of 178956970 pixels, could be decompression bomb DOS attack.
If I know that this is not a DDOS attack, is there a way I can make exceptions for this?
Thanks so much!
-K
Hi @kess-one, sorry for the late reply.
I have addressed the issue in the samapi version v0.6.0. ksugar/samapi#25
Please setting the PIL_MAX_IMAGE_PIXELS environment variable to see if this resolves the error.
In Linux and MacOS, you can set the environment variable as follows.
export PIL_MAX_IMAGE_PIXELS="" # or specific value (integer)In Windows, you can set the environment variable as follows.
set PIL_MAX_IMAGE_PIXELS="" # or specific value (integer)