From f19573a7a08cfdb0cfc7cfe57be33c79dfb41a63 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Sun, 4 Feb 2018 08:02:54 +0100 Subject: [PATCH] [FIX] use png as for pillow interchange --- document_ocr/models/ir_attachment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/document_ocr/models/ir_attachment.py b/document_ocr/models/ir_attachment.py index 1dfb7231..a167cc9e 100644 --- a/document_ocr/models/ir_attachment.py +++ b/document_ocr/models/ir_attachment.py @@ -42,7 +42,7 @@ class IrAttachment(models.Model): else: image_data = StringIO() try: - Image.open(StringIO(data)).save(image_data, 'tiff', + Image.open(StringIO(data)).save(image_data, 'png', dpi=(dpi, dpi)) except IOError: _logger.exception('Failed to OCR image')