fujiisoup / sif_parser

A small package to read Andor Technology Multi-Channel files.
BSD 3-Clause "New" or "Revised" License
15 stars 5 forks source link

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

Open queezz opened 2 years ago

queezz commented 2 years ago

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')
fujiisoup commented 2 years ago

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

Andreaamru2 commented 10 months ago

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.