From c10e84eb8043a473fed337611984b52808ada195 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 072fddf8..82da7d6a 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')