Skip to content

Commit 68f9a32

Browse files
authored
Merge pull request #40 from dlcs/feature/decompression_bomb
Increase PIL MAX_IMAGE_PIXELS to avoid decompression bomb warnings
2 parents a675af0 + e16bb1b commit 68f9a32

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repos:
1111
- id: end-of-file-fixer
1212
- id: requirements-txt-fixer
1313
- id: trailing-whitespace
14-
- repo: https://github.com/ambv/black
14+
- repo: https://github.com/psf/black
1515
rev: 23.11.0
1616
hooks:
1717
- id: black

src/app/engine/rasterizers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
from django.conf import settings
44
from pdf2image import convert_from_path
5+
from PIL import Image
6+
7+
Image.MAX_IMAGE_PIXELS = 1000000000
58

69

710
class PdfRasterizer:

0 commit comments

Comments
 (0)