extract OCR_MAX_IMAGE_PIXELS into settings.py

This commit is contained in:
Henning Häcker
2022-03-21 22:27:32 +01:00
committed by Johann Bauer
parent 95199bd325
commit 3b4da70c85
3 changed files with 6 additions and 6 deletions

View File

@@ -8,9 +8,7 @@ from documents.parsers import make_thumbnail_from_pdf
from documents.parsers import ParseError
from PIL import Image
Image.MAX_IMAGE_PIXELS = os.environ.get(
'PAPERLESS_OCR_MAX_IMAGE_PIXELS', Image.MAX_IMAGE_PIXELS
)
Image.MAX_IMAGE_PIXELS = settings.OCR_MAX_IMAGE_PIXELS
class NoTextFoundException(Exception):