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

bug/Enable a (global) way to set PIL.Image.MAX_IMAGE_PIXELS #3787

Open
cwang opened this issue Nov 20, 2024 · 0 comments
Open

bug/Enable a (global) way to set PIL.Image.MAX_IMAGE_PIXELS #3787

cwang opened this issue Nov 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cwang
Copy link

cwang commented Nov 20, 2024

Describe the bug
PIL has it's own default max pixels to prevent what they call "decompression bomb DOS attack" - it's 178956970 pixels as it stands now

To Reproduce
Use a very large image exceeding the pixel number

Expected behavior
As a lib, unstructured could expose a new env var to allow downstream to set the max pixels, whose value will be used inside the lib codebase to set PIL.Image.MAX_IMAGE_PIXELS as a result

Screenshots
N/A

Environment Info
N/A

Additional context

Maybe related to #3329

@cwang cwang added the bug Something isn't working label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant