sif_parser
sif_parser copied to clipboard
PIL Image.open doesn't work if np_open is imported

When using PIL.Image to open a tiff file, if np_open is imported, a UnicodeDecodeError is raised. It seems that the sif_parser tries to load the image instead of PIL.
from sif_parser import np_open
from PIL import Image
tifim = Image.open('LED.tif')
Thank you. sif_parser has supported the override of PIL.Image, but it is not working. Maybe we can just drop this feature now.
I just realized that the problem I reported last week is related to this one. In my code, I open an image by using matplotlib and I got the same UnicodeDecodeError. However, I don't have the same issue when I import sif_parser inside a function, it works properly by doing that.