标签: 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的图像?