-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Imread format: unclear what are allowed values #19907
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
Comments
We could probably just point to |
We special case png to a known fast path (which is probably an artifact of us formerly owning a wrapping of lib png) and some special casing of urls, but otherwise we fall back to I have several concerns about documenting supported extension here. As @jklymak points out the list may depend on exactly how PIL is compiled or what other libraries are installed, we do not want to document any normalization / aliasing that TLDR: 👍 on linking to |
Are you saying you think imread should be removed from matplotlib? That actually would make more sense to me, if it's essentially just a wrapper for PIL.Image.open |
Yes it is a vestige of when PIL was a difficult dependency/didn't exist. Also Matplotlib has a legacy in matlab, which has imread. I think there is general consensus that we should try to stick to just plotting and not emulate everything matlab does. OTOH deprecations are painful particularly for simple wrappers, so... |
If we were starting from scratch I would be against putting it in, but it has been there from 2004 and removing it would break a lot of people for mostly aesthetic reasons...so it stays. |
In this description, the documentation provides no instruction on allowed values. This information is necessary in order to properly use the function. For example for a jpeg do you add format='.JPEG', 'JPEG', 'jpeg', 'JPG' etc...
matplotlib/lib/matplotlib/image.py
Lines 1437 to 1440 in 7ce970e
The text was updated successfully, but these errors were encountered: