使用Python Imaging Library(PIL)打开具有不同位数的图像

时间:2017-05-08 11:48:43

标签: python python-imaging-library bit-depth

我正在使用PIL打开和操作大量图像。

import os
from PIL import Image
for image in os.listdir():
    im = Image.open(image)
    # do manipulations

对于位深度为24的图像,这是有效的。对于位深度为36或48的图像,这会失败。

如何打开深度不超过24的图像?

0 个答案:

没有答案