implement PAPERLESS_OCR_MAX_IMAGE_PIXELS

This commit is contained in:
Henning Häcker
2022-03-19 01:03:45 +01:00
committed by Johann Bauer
parent 9a758fc3dc
commit a8887b211e
3 changed files with 11 additions and 0 deletions

View File

@@ -8,6 +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)
class NoTextFoundException(Exception):
pass