From 11bbfef36629e859018ecffaabbb932824cac4a5 Mon Sep 17 00:00:00 2001 From: Gfecito <71032552+Gfecito@users.noreply.github.com> Date: Sat, 15 Apr 2023 12:04:14 -0400 Subject: [PATCH] Changed max Image size to allow reading of huge climate image files --- src/PIL/Image.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index 5a43f6c4a..3538702f7 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -69,8 +69,8 @@ class DecompressionBombError(Exception): pass -# Limit to around a quarter gigabyte for a 24-bit (3 bpp) image -MAX_IMAGE_PIXELS = int(1024 * 1024 * 1024 // 4 // 3) +# We're unworried about potential attacks in this project, since our development is entirely internal +MAX_IMAGE_PIXELS = sys.maxsize try: