{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/11316","repository_url":"https://api.github.com/repos/matplotlib/matplotlib","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/11316/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/11316/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/11316/events","html_url":"https://github.com/matplotlib/matplotlib/issues/11316","id":326746553,"number":11316,"title":"imshow alpha interpolation looks wrong","user":{"login":"fargiolas","id":133750,"avatar_url":"https://avatars2.githubusercontent.com/u/133750?v=4","gravatar_id":"","url":"https://api.github.com/users/fargiolas","html_url":"https://github.com/fargiolas","followers_url":"https://api.github.com/users/fargiolas/followers","following_url":"https://api.github.com/users/fargiolas/following{/other_user}","gists_url":"https://api.github.com/users/fargiolas/gists{/gist_id}","starred_url":"https://api.github.com/users/fargiolas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fargiolas/subscriptions","organizations_url":"https://api.github.com/users/fargiolas/orgs","repos_url":"https://api.github.com/users/fargiolas/repos","events_url":"https://api.github.com/users/fargiolas/events{/privacy}","received_events_url":"https://api.github.com/users/fargiolas/received_events","type":"User","site_admin":false},"labels":[{"id":151692197,"url":"https://api.github.com/repos/matplotlib/matplotlib/labels/backend/agg","name":"backend/agg","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":{"login":"tacaswell","id":199813,"avatar_url":"https://avatars3.githubusercontent.com/u/199813?v=4","gravatar_id":"","url":"https://api.github.com/users/tacaswell","html_url":"https://github.com/tacaswell","followers_url":"https://api.github.com/users/tacaswell/followers","following_url":"https://api.github.com/users/tacaswell/following{/other_user}","gists_url":"https://api.github.com/users/tacaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/tacaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacaswell/subscriptions","organizations_url":"https://api.github.com/users/tacaswell/orgs","repos_url":"https://api.github.com/users/tacaswell/repos","events_url":"https://api.github.com/users/tacaswell/events{/privacy}","received_events_url":"https://api.github.com/users/tacaswell/received_events","type":"User","site_admin":false},"assignees":[{"login":"tacaswell","id":199813,"avatar_url":"https://avatars3.githubusercontent.com/u/199813?v=4","gravatar_id":"","url":"https://api.github.com/users/tacaswell","html_url":"https://github.com/tacaswell","followers_url":"https://api.github.com/users/tacaswell/followers","following_url":"https://api.github.com/users/tacaswell/following{/other_user}","gists_url":"https://api.github.com/users/tacaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/tacaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacaswell/subscriptions","organizations_url":"https://api.github.com/users/tacaswell/orgs","repos_url":"https://api.github.com/users/tacaswell/repos","events_url":"https://api.github.com/users/tacaswell/events{/privacy}","received_events_url":"https://api.github.com/users/tacaswell/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/35","html_url":"https://github.com/matplotlib/matplotlib/milestone/35","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/35/labels","id":3382328,"number":35,"title":"v3.1","description":"","creator":{"login":"tacaswell","id":199813,"avatar_url":"https://avatars3.githubusercontent.com/u/199813?v=4","gravatar_id":"","url":"https://api.github.com/users/tacaswell","html_url":"https://github.com/tacaswell","followers_url":"https://api.github.com/users/tacaswell/followers","following_url":"https://api.github.com/users/tacaswell/following{/other_user}","gists_url":"https://api.github.com/users/tacaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/tacaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacaswell/subscriptions","organizations_url":"https://api.github.com/users/tacaswell/orgs","repos_url":"https://api.github.com/users/tacaswell/repos","events_url":"https://api.github.com/users/tacaswell/events{/privacy}","received_events_url":"https://api.github.com/users/tacaswell/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2018-05-29T02:12:40Z","updated_at":"2018-05-29T02:13:07Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2018-05-26T15:32:57Z","updated_at":"2018-05-29T03:03:55Z","closed_at":null,"author_association":"NONE","body":"Hi, not much of an issue, but it seems that `imshow` is not interpolating RGBA images in the proper way. There was some discussion about a similar issue in #9906 which ended up on a documentation note:\r\n\r\n> imshow expects RGB images adopting the straight (unassociated) alpha representation.\r\n\r\nIf that's the case `imshow` should still switch to associated colors (premultiply alpha) before interpolation to avoid artefacts like the one below, shouldn't it?\r\n\r\n```\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\n\r\nfig, (axl, axr) = plt.subplots(1, 2)\r\n\r\n# full green image\r\nimg = np.zeros((5, 5, 4))\r\nimg[...,1] = np.ones((5, 5))\r\n# transparent above main diagonal\r\nimg[...,3] = np.tril(np.ones((5, 5), dtype=np.uint8))\r\n\r\naxl.imshow(img, interpolation=\"none\")\r\naxr.imshow(img, interpolation=\"bilinear\")\r\n\r\nplt.show()\r\n```\r\n\r\n![bug](https://user-images.githubusercontent.com/133750/40577662-a7ca9184-6109-11e8-99c6-3201b98c8c78.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/392640024","html_url":"https://github.com/matplotlib/matplotlib/issues/11316#issuecomment-392640024","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/11316","id":392640024,"user":{"login":"fargiolas","id":133750,"avatar_url":"https://avatars2.githubusercontent.com/u/133750?v=4","gravatar_id":"","url":"https://api.github.com/users/fargiolas","html_url":"https://github.com/fargiolas","followers_url":"https://api.github.com/users/fargiolas/followers","following_url":"https://api.github.com/users/fargiolas/following{/other_user}","gists_url":"https://api.github.com/users/fargiolas/gists{/gist_id}","starred_url":"https://api.github.com/users/fargiolas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fargiolas/subscriptions","organizations_url":"https://api.github.com/users/fargiolas/orgs","repos_url":"https://api.github.com/users/fargiolas/repos","events_url":"https://api.github.com/users/fargiolas/events{/privacy}","received_events_url":"https://api.github.com/users/fargiolas/received_events","type":"User","site_admin":false},"created_at":"2018-05-29T03:03:55Z","updated_at":"2018-05-29T03:03:55Z","author_association":"NONE","body":"@tacaswell maybe my description can be a bit misleading. Black fringing is a common artifact when some part of a graphic pipeline uses premultiplied alpha while others don't, but I'm not entirely sure that's what's happening here."}}
{"actor":{"display_login":"fargiolas"}}