使用PIL/pi将tiff(I;16)转换为JPG

2024-05-15 17:44:17 发布

您现在位置:Python中文网/ 问答频道 /正文

我在将tiff图像从显微镜转换为jpeg(应该在web应用程序中显示)时遇到问题。 我尝试了以下方法:

image = Image.open(file_name)
image.convert(mode="RGB")
image.save('my.jpeg')

>>IOError: cannot write mode I;16 as JPEG

任何人都有将16位TIFF文件转换为JPEG格式的经验。。。 我在下面链接了这样一个文件。 谢谢你的帮助!

https://drive.google.com/open?id=0B04N02JqhWJOWjBPY1RRZkIwbTg


Tags: 文件方法name图像imageweb应用程序convert