Error opening TIFF in python unknown pseudo-tag

2019-06-22 05:29发布

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.

标签: python tiff
1条回答
三岁会撩人
2楼-- · 2019-06-22 05:31

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.

查看更多
登录 后发表回答