From 0a67c59ad52ce9f1e941c84f972ab0e576e94615 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 30 Jun 2021 18:57:22 +0200 Subject: [PATCH] fix(linux): Improve bitmap conversion Converting some bitmaps fail with a truncation error. This change allows to successfully convert the bitmap files. Fixes #5400. Cherry-pick of #5401. (cherry picked from commit f519c2447d89bc2c16a8b70280bb5dab9534d126) --- linux/keyman-config/keyman_config/convertico.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux/keyman-config/keyman_config/convertico.py b/linux/keyman-config/keyman_config/convertico.py index 845c33454e..8eefe2eebc 100755 --- a/linux/keyman-config/keyman_config/convertico.py +++ b/linux/keyman-config/keyman_config/convertico.py @@ -5,8 +5,9 @@ import numpy as np import os import sys import struct -from PIL import Image +from PIL import Image, ImageFile Image.LOAD_TRUNCATED_IMAGES = True +ImageFile.LOAD_TRUNCATED_IMAGES = True def changeblacktowhite(im):