Title: matplotlib.pyplot.imread silently fails on uint16 images. · Issue #3616 · matplotlib/matplotlib · GitHub
Open Graph Title: matplotlib.pyplot.imread silently fails on uint16 images. · Issue #3616 · matplotlib/matplotlib
X Title: matplotlib.pyplot.imread silently fails on uint16 images. · Issue #3616 · matplotlib/matplotlib
Description: It assumes the image is uint8 and incorrectly wraps the input at 255: In [1]: from skimage import io In [15]: io.imsave('io3.png', np.array([[0, 1], [0, 4196]], dtype=np.uint16), plugin='pil') In [19]: from matplotlib.pyplot import imrea...
Open Graph Description: It assumes the image is uint8 and incorrectly wraps the input at 255: In [1]: from skimage import io In [15]: io.imsave('io3.png', np.array([[0, 1], [0, 4196]], dtype=np.uint16), plugin='pil') In [...
X Description: It assumes the image is uint8 and incorrectly wraps the input at 255: In [1]: from skimage import io In [15]: io.imsave('io3.png', np.array([[0, 1], [0, 4196]], dtype=np.uint16), plugin=...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/3616
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"matplotlib.pyplot.imread silently fails on uint16 images.","articleBody":"It assumes the image is uint8 and incorrectly wraps the input at 255:\n\n``` python\nIn [1]: from skimage import io\n\nIn [15]: io.imsave('io3.png', np.array([[0, 1], [0, 4196]], dtype=np.uint16),\n plugin='pil')\n\nIn [19]: from matplotlib.pyplot import imread\n\nIn [20]: imread('io3.png')\nOut[20]: \narray([[ 0. , 0.00392157],\n [ 0. , 0.39215687]], dtype=float32)\n\nIn [21]: import matplotlib as mpl\n\nIn [22]: mpl.__version__\nOut[22]: '1.3.1'\n```\n","author":{"url":"https://github.com/jni","@type":"Person","name":"jni"},"datePublished":"2014-10-04T00:31:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":13},"url":"https://github.com/3616/matplotlib/issues/3616"}
| 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:62956249-477f-7bb3-2a1a-f366cebac5d4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D8BE:10B7D9:27D29D:34B991:6A51D8A4 |
| html-safe-nonce | 66f7332ef0b0e9fc1e875cfeda22cd33abd150cb266e94f71a802789dc0d87d8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEJFOjEwQjdEOToyN0QyOUQ6MzRCOTkxOjZBNTFEOEE0IiwidmlzaXRvcl9pZCI6Ijc0NTc4MjAyNDcyMjA5MzQ4MjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0ee34b263f4be0ee66ea656be6338b9f959c9d29f5ea790254c327ef987bc31e |
| hovercard-subject-tag | issue:44863209 |
| 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/3616/issue_layout |
| twitter:image | https://opengraph.githubassets.com/662945883f5843f659b8fe711fbfddc0c0e10b9afb04e3436d8e876b65917297/matplotlib/matplotlib/issues/3616 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/662945883f5843f659b8fe711fbfddc0c0e10b9afb04e3436d8e876b65917297/matplotlib/matplotlib/issues/3616 |
| og:image:alt | It assumes the image is uint8 and incorrectly wraps the input at 255: In [1]: from skimage import io In [15]: io.imsave('io3.png', np.array([[0, 1], [0, 4196]], dtype=np.uint16), plugin='pil') In [... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jni |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width