|
From: Phil E. <pel...@gm...> - 2012-10-19 15:35:01
|
Good idea. If the png version works then the jpg version should also be made to work, Would you be willing to open up an issue for the feature request? : https://github.com/matplotlib/matplotlib/issues/new If your ready and willing to implement such a thing, that would be even better (just open a pull request and we can start reviewing)! All the best, Phil On 19 October 2012 15:59, Rich Signell <rsi...@us...> wrote: > MPL folks, > > Would it be possible to enhance Matplotlib to allow "im=imread(url)" > to work if url returns a JPG? > > Currently (it seems): > > 1. If the URL returns a PNG this works: > > im = imread(urllib2.urlopen(url)) > > 2. If the URL returns a JPG, this DOESN'T work: > > im = imread(urllib2.urlopen(url)) > > .. and neither does this: > im = imread(urllib2.urlopen(url),format='jpg') > > ... but this DOES work: > > im = Image.open(cStringIO.StringIO(urllib.urlopen(url).read())) > > 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)? > > Thanks, > Rich > -- > Dr. Richard P. Signell > USGS, 384 Woods Hole Rd. > Woods Hole, MA 02543-1598 > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |