Fix for ocr import

Currently works only for .pdf files, with this .png and .jpg should also work (fixes #512)
pull/579/head
szopin 2022-09-16 10:12:46 +02:00 committed by GitHub
parent 7d06740579
commit 79e067188e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ def handler(q=False):
image = img.make_blob('png')
log.debug("Final image size is {}x{}".format(pdf.width, pdf.height * (p + 1)))
else:
image = document
image = base64.b64decode(request["data"])
image_file = BytesIO(image)
image_file.seek(0)