Python Pizzle 2.3.0将RGB图像保存为TIF
我正在尝试将RGB图像保存为TIF。虽然我很确定TIF可以处理RGB图像,但我无法让它工作Python Pizzle 2.3.0将RGB图像保存为TIF,python,python-imaging-library,tiff,pillow,Python,Python Imaging Library,Tiff,Pillow,我正在尝试将RGB图像保存为TIF。虽然我很确定TIF可以处理RGB图像,但我无法让它工作 import os from PIL import Image def main(): inFile=os.path.join("C:",os.sep,"temp","input.tif") img=Image.open(inFile) img=img.convert('RGB') img.save(os.path.join("C:",os.sep,"temp","result.tif"),'TIF
import os
from PIL import Image
def main():
inFile=os.path.join("C:",os.sep,"temp","input.tif")
img=Image.open(inFile)
img=img.convert('RGB')
img.save(os.path.join("C:",os.sep,"temp","result.tif"),'TIFF')
然而,当我运行这段代码时,我得到了以下错误
IOError: encoder error -2 when writing image file
libtiff安装在W7盒上
提前谢谢