Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DecompressionBombError(msg) #20

Open
kess-one opened this issue Aug 1, 2024 · 1 comment
Open

DecompressionBombError(msg) #20

kess-one opened this issue Aug 1, 2024 · 1 comment

Comments

@kess-one
Copy link

kess-one commented Aug 1, 2024

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

@ksugar
Copy link
Owner

ksugar commented Sep 3, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants