Error opening TIFF in python unknown pseudo-tag

匿名 (未验证) 提交于 2019-12-03 01:22:02

问题:

I am trying to open a .TIFF image in python. My code is

import numpy as np import matplotlib.pyplot as plt from PIL import Image  photos = Image.open("haz(1,8grados).tif") photos.show() 

and I am getting the error

TIFFSetField: tempfile.tif: Unknown pseudo-tag 65538. 

Can anyone help with this? I am running python 3 in Mac OS High Sierra.

回答1:

This is a confirmed bug in PIL / Pillow. It is otherwise an innocent warning, and nothing you need to do differently. You can't silence the warning, however, it is emitted from the TIFF decoding library that PIL depends on.

You can either download the Pillow source code and apply the fix for the bug locally, or wait for the new quarterly release that will be published in January 2019.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!