sif_parser icon indicating copy to clipboard operation
sif_parser copied to clipboard

PIL Image.open doesn't work if np_open is imported

Open queezz opened this issue 3 years ago • 2 comments

image image

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')

queezz avatar Sep 27 '22 04:09 queezz

Thank you. sif_parser has supported the override of PIL.Image, but it is not working. Maybe we can just drop this feature now.

fujiisoup avatar Sep 27 '22 11:09 fujiisoup

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.

Andreaamru2 avatar Nov 27 '23 12:11 Andreaamru2