Title: Simplify handling of remote JPGs · Issue #4252 · matplotlib/matplotlib · GitHub
Open Graph Title: Simplify handling of remote JPGs · Issue #4252 · matplotlib/matplotlib
X Title: Simplify handling of remote JPGs · Issue #4252 · matplotlib/matplotlib
Description: Would it be possible to enhance Matplotlib to allow "im=imread(url)" to work if url returns a JPG? Currently (it seems): If the URL returns a PNG this works: im = imread(urllib2.urlopen(url)) If the URL returns a JPG, this DOESN'T work: ...
Open Graph Description: Would it be possible to enhance Matplotlib to allow "im=imread(url)" to work if url returns a JPG? Currently (it seems): If the URL returns a PNG this works: im = imread(urllib2.urlopen(url)) If th...
X Description: Would it be possible to enhance Matplotlib to allow "im=imread(url)" to work if url returns a JPG? Currently (it seems): If the URL returns a PNG this works: im = imread(urllib2.urlopen(u...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/4252
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Simplify handling of remote JPGs","articleBody":"Would it be possible to enhance Matplotlib to allow \"im=imread(url)\"\nto work if url returns a JPG?\n\nCurrently (it seems):\n- If the URL returns a PNG this works:\n\n```\nim = imread(urllib2.urlopen(url))\n```\n- If the URL returns a JPG, this DOESN'T work:\n\n```\nim = imread(urllib2.urlopen(url))\n```\n\n.. and neither does this:\n\n```\nim = imread(urllib2.urlopen(url),format='jpg')\n```\n\n... but this DOES work:\n\n```\nim = Image.open(cStringIO.StringIO(urllib.urlopen(url).read()))\n```\n\nSee an example in Ipython Notebook here:\nhttp://nbviewer.ipython.org/3918576/\n\nSo could just be hidden from the user so that \"im = imread(url)\" would\njust work for JPG (assuming PIL was installed)?\n","author":{"url":"https://github.com/rsignell-usgs","@type":"Person","name":"rsignell-usgs"},"datePublished":"2015-03-20T14:24:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/4252/matplotlib/issues/4252"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f57c90c9-920d-7484-e65a-c13fe6264112 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BB74:2790A:2A78B62:3D6D55C:6A55189A |
| html-safe-nonce | fa80a02054f96fee00620fceb2c22617538f43464d522da588e7ba701d3d60ee |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjc0OjI3OTBBOjJBNzhCNjI6M0Q2RDU1Qzo2QTU1MTg5QSIsInZpc2l0b3JfaWQiOiI1NjQzMTg2OTAwOTg0NzMxODAyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 258d58b4fc7fe2ad6c6f7a01c89be11d6c174bcb69495a1d7d1aae49268cf582 |
| hovercard-subject-tag | issue:63238138 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/4252/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1a5a985fa664cb25e96f99d4b3e6c8eca166da490df13da0758d69e405d9e9fc/matplotlib/matplotlib/issues/4252 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1a5a985fa664cb25e96f99d4b3e6c8eca166da490df13da0758d69e405d9e9fc/matplotlib/matplotlib/issues/4252 |
| og:image:alt | Would it be possible to enhance Matplotlib to allow "im=imread(url)" to work if url returns a JPG? Currently (it seems): If the URL returns a PNG this works: im = imread(urllib2.urlopen(url)) If th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rsignell-usgs |
| hostname | github.com |
| expected-hostname | github.com |
| None | 682d273eacb2ac51680c6eb9c0b270f029f7ce74c32090f319083c34497e28a5 |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3b6d37c6470adadff4194742daaab9a817cc4980 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width