convert all unsuported image modes
This commit is contained in:
parent
13e360ac97
commit
a0b66637d1
1 changed files with 1 additions and 1 deletions
|
@ -61,7 +61,7 @@ def resize_image(data, width=None, size=None):
|
||||||
else:
|
else:
|
||||||
data = StringIO(data)
|
data = StringIO(data)
|
||||||
source = Image.open(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 = source.convert('RGB')
|
||||||
source_width = source.size[0]
|
source_width = source.size[0]
|
||||||
source_height = source.size[1]
|
source_height = source.size[1]
|
||||||
|
|
Loading…
Add table
Reference in a new issue