{"action":"created","comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/comments/44212932","id":44212932,"diff_hunk":"@@ -562,24 +580,22 @@ def print_jpg(self, filename_or_obj, *args, **kwargs):\n             *progressive*: If present, indicates that this image\n                 should be stored as a progressive JPEG file.\n             \"\"\"\n-            buf, size = self.print_to_buffer()\n+            buf, (w, h) = self.print_to_buffer()\n+            buf = np.array(memoryview(buf)).reshape((w, h, 4))","path":"lib/matplotlib/backends/backend_agg.py","position":51,"original_position":51,"commit_id":"5bb8754fe832adf8835b1b34f07d3c7024e30dc2","original_commit_id":"5bb8754fe832adf8835b1b34f07d3c7024e30dc2","user":{"login":"mdboom","id":38294,"avatar_url":"https://avatars.githubusercontent.com/u/38294?v=3","gravatar_id":"","url":"https://api.github.com/users/mdboom","html_url":"https://github.com/mdboom","followers_url":"https://api.github.com/users/mdboom/followers","following_url":"https://api.github.com/users/mdboom/following{/other_user}","gists_url":"https://api.github.com/users/mdboom/gists{/gist_id}","starred_url":"https://api.github.com/users/mdboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdboom/subscriptions","organizations_url":"https://api.github.com/users/mdboom/orgs","repos_url":"https://api.github.com/users/mdboom/repos","events_url":"https://api.github.com/users/mdboom/events{/privacy}","received_events_url":"https://api.github.com/users/mdboom/received_events","type":"User","site_admin":false},"body":"(h, w, 4) here too.","created_at":"2015-11-07T14:44:55Z","updated_at":"2015-11-07T14:44:55Z","html_url":"https://github.com/matplotlib/matplotlib/pull/5415#discussion_r44212932","pull_request_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/5415","_links":{"self":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/comments/44212932"},"html":{"href":"https://github.com/matplotlib/matplotlib/pull/5415#discussion_r44212932"},"pull_request":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/5415"}}},"pull_request":{"url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/5415","id":49916472,"html_url":"https://github.com/matplotlib/matplotlib/pull/5415","diff_url":"https://github.com/matplotlib/matplotlib/pull/5415.diff","patch_url":"https://github.com/matplotlib/matplotlib/pull/5415.patch","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5415","number":5415,"state":"open","locked":false,"title":"Properly handle transparency for animations","user":{"login":"cbreeden","id":12069845,"avatar_url":"https://avatars.githubusercontent.com/u/12069845?v=3","gravatar_id":"","url":"https://api.github.com/users/cbreeden","html_url":"https://github.com/cbreeden","followers_url":"https://api.github.com/users/cbreeden/followers","following_url":"https://api.github.com/users/cbreeden/following{/other_user}","gists_url":"https://api.github.com/users/cbreeden/gists{/gist_id}","starred_url":"https://api.github.com/users/cbreeden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbreeden/subscriptions","organizations_url":"https://api.github.com/users/cbreeden/orgs","repos_url":"https://api.github.com/users/cbreeden/repos","events_url":"https://api.github.com/users/cbreeden/events{/privacy}","received_events_url":"https://api.github.com/users/cbreeden/received_events","type":"User","site_admin":false},"body":"This PR is a first attempt at fixing #5335.  I have added a `flatten` kwarg for `savefig` in the agg backend that will allow animation.py remove all transparency before sending it to its respective animator.  I don't think it would be a good idea to merge this just yet, but was looking for feedback before proceeding.\r\n\r\nI guess I would still need to write a test.  I'm not sure I handled the dimensions correctly for `_write_png`, animations look correct from `write='imagemagick_file` but that's definitely worth double checking.","created_at":"2015-11-06T05:04:40Z","updated_at":"2015-11-07T14:44:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"63e6586c42201982a78beae1447e52f9038c89b7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/5415/commits","review_comments_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/5415/comments","review_comment_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5415/comments","statuses_url":"https://api.github.com/repos/matplotlib/matplotlib/statuses/5bb8754fe832adf8835b1b34f07d3c7024e30dc2","head":{"label":"cbreeden:transparent-animations","ref":"transparent-animations","sha":"5bb8754fe832adf8835b1b34f07d3c7024e30dc2","user":{"login":"cbreeden","id":12069845,"avatar_url":"https://avatars.githubusercontent.com/u/12069845?v=3","gravatar_id":"","url":"https://api.github.com/users/cbreeden","html_url":"https://github.com/cbreeden","followers_url":"https://api.github.com/users/cbreeden/followers","following_url":"https://api.github.com/users/cbreeden/following{/other_user}","gists_url":"https://api.github.com/users/cbreeden/gists{/gist_id}","starred_url":"https://api.github.com/users/cbreeden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbreeden/subscriptions","organizations_url":"https://api.github.com/users/cbreeden/orgs","repos_url":"https://api.github.com/users/cbreeden/repos","events_url":"https://api.github.com/users/cbreeden/events{/privacy}","received_events_url":"https://api.github.com/users/cbreeden/received_events","type":"User","site_admin":false},"repo":{"id":45650571,"name":"matplotlib","full_name":"cbreeden/matplotlib","owner":{"login":"cbreeden","id":12069845,"avatar_url":"https://avatars.githubusercontent.com/u/12069845?v=3","gravatar_id":"","url":"https://api.github.com/users/cbreeden","html_url":"https://github.com/cbreeden","followers_url":"https://api.github.com/users/cbreeden/followers","following_url":"https://api.github.com/users/cbreeden/following{/other_user}","gists_url":"https://api.github.com/users/cbreeden/gists{/gist_id}","starred_url":"https://api.github.com/users/cbreeden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbreeden/subscriptions","organizations_url":"https://api.github.com/users/cbreeden/orgs","repos_url":"https://api.github.com/users/cbreeden/repos","events_url":"https://api.github.com/users/cbreeden/events{/privacy}","received_events_url":"https://api.github.com/users/cbreeden/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cbreeden/matplotlib","description":"matplotlib: plotting with Python","fork":true,"url":"https://api.github.com/repos/cbreeden/matplotlib","forks_url":"https://api.github.com/repos/cbreeden/matplotlib/forks","keys_url":"https://api.github.com/repos/cbreeden/matplotlib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cbreeden/matplotlib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cbreeden/matplotlib/teams","hooks_url":"https://api.github.com/repos/cbreeden/matplotlib/hooks","issue_events_url":"https://api.github.com/repos/cbreeden/matplotlib/issues/events{/number}","events_url":"https://api.github.com/repos/cbreeden/matplotlib/events","assignees_url":"https://api.github.com/repos/cbreeden/matplotlib/assignees{/user}","branches_url":"https://api.github.com/repos/cbreeden/matplotlib/branches{/branch}","tags_url":"https://api.github.com/repos/cbreeden/matplotlib/tags","blobs_url":"https://api.github.com/repos/cbreeden/matplotlib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cbreeden/matplotlib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cbreeden/matplotlib/git/refs{/sha}","trees_url":"https://api.github.com/repos/cbreeden/matplotlib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cbreeden/matplotlib/statuses/{sha}","languages_url":"https://api.github.com/repos/cbreeden/matplotlib/languages","stargazers_url":"https://api.github.com/repos/cbreeden/matplotlib/stargazers","contributors_url":"https://api.github.com/repos/cbreeden/matplotlib/contributors","subscribers_url":"https://api.github.com/repos/cbreeden/matplotlib/subscribers","subscription_url":"https://api.github.com/repos/cbreeden/matplotlib/subscription","commits_url":"https://api.github.com/repos/cbreeden/matplotlib/commits{/sha}","git_commits_url":"https://api.github.com/repos/cbreeden/matplotlib/git/commits{/sha}","comments_url":"https://api.github.com/repos/cbreeden/matplotlib/comments{/number}","issue_comment_url":"https://api.github.com/repos/cbreeden/matplotlib/issues/comments{/number}","contents_url":"https://api.github.com/repos/cbreeden/matplotlib/contents/{+path}","compare_url":"https://api.github.com/repos/cbreeden/matplotlib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cbreeden/matplotlib/merges","archive_url":"https://api.github.com/repos/cbreeden/matplotlib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cbreeden/matplotlib/downloads","issues_url":"https://api.github.com/repos/cbreeden/matplotlib/issues{/number}","pulls_url":"https://api.github.com/repos/cbreeden/matplotlib/pulls{/number}","milestones_url":"https://api.github.com/repos/cbreeden/matplotlib/milestones{/number}","notifications_url":"https://api.github.com/repos/cbreeden/matplotlib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cbreeden/matplotlib/labels{/name}","releases_url":"https://api.github.com/repos/cbreeden/matplotlib/releases{/id}","created_at":"2015-11-06T01:10:31Z","updated_at":"2015-11-06T01:10:49Z","pushed_at":"2015-11-07T14:14:34Z","git_url":"git://github.com/cbreeden/matplotlib.git","ssh_url":"git@github.com:cbreeden/matplotlib.git","clone_url":"https://github.com/cbreeden/matplotlib.git","svn_url":"https://github.com/cbreeden/matplotlib","homepage":"http://matplotlib.org/","size":221907,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"matplotlib:master","ref":"master","sha":"6910b924a93945b76d14f80c8f8d33b8ae08d346","user":{"login":"matplotlib","id":215947,"avatar_url":"https://avatars.githubusercontent.com/u/215947?v=3","gravatar_id":"","url":"https://api.github.com/users/matplotlib","html_url":"https://github.com/matplotlib","followers_url":"https://api.github.com/users/matplotlib/followers","following_url":"https://api.github.com/users/matplotlib/following{/other_user}","gists_url":"https://api.github.com/users/matplotlib/gists{/gist_id}","starred_url":"https://api.github.com/users/matplotlib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matplotlib/subscriptions","organizations_url":"https://api.github.com/users/matplotlib/orgs","repos_url":"https://api.github.com/users/matplotlib/repos","events_url":"https://api.github.com/users/matplotlib/events{/privacy}","received_events_url":"https://api.github.com/users/matplotlib/received_events","type":"Organization","site_admin":false},"repo":{"id":1385122,"name":"matplotlib","full_name":"matplotlib/matplotlib","owner":{"login":"matplotlib","id":215947,"avatar_url":"https://avatars.githubusercontent.com/u/215947?v=3","gravatar_id":"","url":"https://api.github.com/users/matplotlib","html_url":"https://github.com/matplotlib","followers_url":"https://api.github.com/users/matplotlib/followers","following_url":"https://api.github.com/users/matplotlib/following{/other_user}","gists_url":"https://api.github.com/users/matplotlib/gists{/gist_id}","starred_url":"https://api.github.com/users/matplotlib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matplotlib/subscriptions","organizations_url":"https://api.github.com/users/matplotlib/orgs","repos_url":"https://api.github.com/users/matplotlib/repos","events_url":"https://api.github.com/users/matplotlib/events{/privacy}","received_events_url":"https://api.github.com/users/matplotlib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/matplotlib/matplotlib","description":"matplotlib: plotting with Python","fork":false,"url":"https://api.github.com/repos/matplotlib/matplotlib","forks_url":"https://api.github.com/repos/matplotlib/matplotlib/forks","keys_url":"https://api.github.com/repos/matplotlib/matplotlib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matplotlib/matplotlib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matplotlib/matplotlib/teams","hooks_url":"https://api.github.com/repos/matplotlib/matplotlib/hooks","issue_events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/events{/number}","events_url":"https://api.github.com/repos/matplotlib/matplotlib/events","assignees_url":"https://api.github.com/repos/matplotlib/matplotlib/assignees{/user}","branches_url":"https://api.github.com/repos/matplotlib/matplotlib/branches{/branch}","tags_url":"https://api.github.com/repos/matplotlib/matplotlib/tags","blobs_url":"https://api.github.com/repos/matplotlib/matplotlib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matplotlib/matplotlib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matplotlib/matplotlib/git/refs{/sha}","trees_url":"https://api.github.com/repos/matplotlib/matplotlib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matplotlib/matplotlib/statuses/{sha}","languages_url":"https://api.github.com/repos/matplotlib/matplotlib/languages","stargazers_url":"https://api.github.com/repos/matplotlib/matplotlib/stargazers","contributors_url":"https://api.github.com/repos/matplotlib/matplotlib/contributors","subscribers_url":"https://api.github.com/repos/matplotlib/matplotlib/subscribers","subscription_url":"https://api.github.com/repos/matplotlib/matplotlib/subscription","commits_url":"https://api.github.com/repos/matplotlib/matplotlib/commits{/sha}","git_commits_url":"https://api.github.com/repos/matplotlib/matplotlib/git/commits{/sha}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/comments{/number}","issue_comment_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments{/number}","contents_url":"https://api.github.com/repos/matplotlib/matplotlib/contents/{+path}","compare_url":"https://api.github.com/repos/matplotlib/matplotlib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matplotlib/matplotlib/merges","archive_url":"https://api.github.com/repos/matplotlib/matplotlib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matplotlib/matplotlib/downloads","issues_url":"https://api.github.com/repos/matplotlib/matplotlib/issues{/number}","pulls_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls{/number}","milestones_url":"https://api.github.com/repos/matplotlib/matplotlib/milestones{/number}","notifications_url":"https://api.github.com/repos/matplotlib/matplotlib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/labels{/name}","releases_url":"https://api.github.com/repos/matplotlib/matplotlib/releases{/id}","created_at":"2011-02-19T03:17:12Z","updated_at":"2015-11-07T14:03:34Z","pushed_at":"2015-11-07T14:14:35Z","git_url":"git://github.com/matplotlib/matplotlib.git","ssh_url":"git@github.com:matplotlib/matplotlib.git","clone_url":"https://github.com/matplotlib/matplotlib.git","svn_url":"https://github.com/matplotlib/matplotlib","homepage":"http://matplotlib.org/","size":317869,"stargazers_count":2976,"watchers_count":2976,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1512,"mirror_url":null,"open_issues_count":722,"forks":1512,"open_issues":722,"watchers":2976,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/5415"},"html":{"href":"https://github.com/matplotlib/matplotlib/pull/5415"},"issue":{"href":"https://api.github.com/repos/matplotlib/matplotlib/issues/5415"},"comments":{"href":"https://api.github.com/repos/matplotlib/matplotlib/issues/5415/comments"},"review_comments":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/5415/comments"},"review_comment":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/5415/commits"},"statuses":{"href":"https://api.github.com/repos/matplotlib/matplotlib/statuses/5bb8754fe832adf8835b1b34f07d3c7024e30dc2"}}}}