enable the import of picture with alpha channel

- jpg doesnt support alpha channels
 - when importing pictures with alpha channel error shows up
 -- "Could not create the task. OSError: cannot write mode RGBA as JPEG"
 - fix error by converting "RGBA" to "RGB" before saving image
main
Julian Wagenschütz 8 years ago
parent e8b2c40330
commit e4230f7a61

@ -387,6 +387,7 @@ def _create_thread(tid, params):
for name in filenames:
compressed_name = os.path.splitext(name)[0] + '.jpg'
image = Image.open(name)
image = image.convert('RGB')
image.save(compressed_name, quality=compress_quality, optimize=True)
compressed_names.append(compressed_name)
if compressed_name != name:

Loading…
Cancel
Save