Skip to content

Commit 9397994

Browse files
cccs-rsCopilot
andcommitted
Ignore Pillow's max pixel limit when reading in images
Co-authored-by: Copilot <copilot@github.com>
1 parent 13dcd83 commit 9397994

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

document_preview/document_preview.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
PDF_DPI = int(os.environ.get("PDF_DPI", 150))
4545
IDENTIFY = forge.get_identify(use_cache=os.environ.get("PRIVILEGED", "false").lower() == "true")
4646

47+
# Ignore default max image pixels limit imposed by Pillow
48+
Image.MAX_IMAGE_PIXELS = None
49+
4750

4851
@functools.lru_cache(maxsize=32)
4952
def _read_file_bytes(fp: str) -> bytes:

0 commit comments

Comments
 (0)