Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
queezz opened this issue Sep 27, 2022 · 2 comments
Open

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

queezz opened this issue Sep 27, 2022 · 2 comments

Comments

@queezz
Copy link
Contributor

queezz commented Sep 27, 2022

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
Copy link
Owner

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants