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

Suppress PIL.Image.DecompressionBombError #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion solve.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

def solve(factory, method, input_file, output_file):
# Load Image
print ("Loading Image")

# Set this flag for extremely large mazes, as PIL thinks they are a decompression DOS attack, and PIL will throw an error. This suppresses that error.
Image.MAX_IMAGE_PIXELS = None

im = Image.open(input_file)

# Create the maze (and time it) - for many mazes this is more time consuming than solving the maze
Expand Down