From a0b66637d1a1874d39f9ab8c2dce4681edafe075 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 19 Nov 2015 16:13:13 +0100 Subject: [PATCH] convert all unsuported image modes --- oml/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oml/utils.py b/oml/utils.py index ae5aec3..9f9b312 100644 --- a/oml/utils.py +++ b/oml/utils.py @@ -61,7 +61,7 @@ def resize_image(data, width=None, size=None): else: data = StringIO(data) source = Image.open(data) - if source.mode == 'P': + if source.mode not in ('1', 'CMYK', 'L', 'RGB', 'RGBA', 'RGBX', 'YCbCr'): source = source.convert('RGB') source_width = source.size[0] source_height = source.size[1]