-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Simplify handling of remote JPGs #4252
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
This seems like a judgement call to me and I am not sure which side I come down on. On one hand following the batteries included philosophy: yes. On the other hand, do one thing, mpl should be in the business of plotting, not munging data I/O: no. I am not fully convinced mpl should have an |
As an argument for imread(). I am often tasked with creating a plot that With regards to the issue at hand, I really want to know why it is On Fri, Mar 20, 2015 at 10:51 AM, Thomas A Caswell <notifications@github.com
|
But if is anything but a png we are delegating down to PIL anyway. I would argue in those cases you should use one of the (many) other libraries that focus on dealing with image I/O. |
perhaps, but I am usually dealing with PNGs, and imread() "just works" for On Fri, Mar 20, 2015 at 11:14 AM, Thomas A Caswell <notifications@github.com
|
Just had a look at this. Like @tacaswell mentions the reason for the slightly confusing behaviour is that matplotlib includes a specific library to handle There is a StackOverflow post here that describes the I've put together the fix and opened a bug against Pillow for discussing it there. |
@rsignell-usgs @WeatherGod I've submitted a PR to Pillow to add support for opening via file-like handlers (such as HTTP response objects). Hopefully it will make it into |
I am going to close this on our side as @mfitzp has fixed this upstream ;) |
With gcc 5.1.0 it seems that the inner loop of the fast-path in PathNanRemover gets optimized out of existence and the first non-finite entry in the path prevents any further drawing. This PR (rather hackishly) adds explicit de-references to x and y to the loop to make sure the compiler does not decide it is unneeded. Closes matplotlib#4252
With gcc 5.1.0 it seems that the inner loop of the fast-path in PathNanRemover gets optimized out of existence and the first non-finite entry in the path prevents any further drawing. This PR (rather hackishly) adds explicit de-references to x and y to the loop to make sure the compiler does not decide it is unneeded. Closes matplotlib#4252
Would it be possible to enhance Matplotlib to allow "im=imread(url)"
to work if url returns a JPG?
Currently (it seems):
.. and neither does this:
... but this DOES work:
See an example in Ipython Notebook here:
http://nbviewer.ipython.org/3918576/
So could just be hidden from the user so that "im = imread(url)" would
just work for JPG (assuming PIL was installed)?
The text was updated successfully, but these errors were encountered: