{"action":"created","comment":{"url":"https://api.github.com/repos/amethyst/amethyst/pulls/comments/94275871","pull_request_review_id":14806165,"id":94275871,"diff_hunk":"@@ -280,6 +320,101 @@ impl AssetStore for DirectoryStore {\n     }\n }\n \n+impl AssetLoaderRaw for imagefmt::Image<u8> {\n+    fn from_raw(_: &Assets, data: &[u8]) -> Option<imagefmt::Image<u8>> {\n+        imagefmt::read_from(&mut Cursor::new(data), imagefmt::ColFmt::RGBA).ok()\n+    }\n+}\n+\n+impl AssetLoader<Texture> for imagefmt::Image<u8> {\n+    fn from_data(assets: &mut Assets, image: imagefmt::Image<u8>) -> Option<Texture> {\n+        let pixels = image.buf.chunks(4).map(|p| [p[0], p[1], p[2], p[3]]).collect::<Vec<_>>();\n+        let chunked = pixels.as_slice().chunks(image.w).collect::<Vec<_>>();","path":"src/asset_manager/asset_manager.rs","position":104,"original_position":104,"commit_id":"a71781b389f643cd66b5c0c759d0ece34bb441f8","original_commit_id":"a71781b389f643cd66b5c0c759d0ece34bb441f8","user":{"login":"msiglreith","id":7253845,"avatar_url":"https://avatars.githubusercontent.com/u/7253845?v=3","gravatar_id":"","url":"https://api.github.com/users/msiglreith","html_url":"https://github.com/msiglreith","followers_url":"https://api.github.com/users/msiglreith/followers","following_url":"https://api.github.com/users/msiglreith/following{/other_user}","gists_url":"https://api.github.com/users/msiglreith/gists{/gist_id}","starred_url":"https://api.github.com/users/msiglreith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msiglreith/subscriptions","organizations_url":"https://api.github.com/users/msiglreith/orgs","repos_url":"https://api.github.com/users/msiglreith/repos","events_url":"https://api.github.com/users/msiglreith/events{/privacy}","received_events_url":"https://api.github.com/users/msiglreith/received_events","type":"User","site_admin":false},"body":"`raw` in `TextureLoadData` are slices on images/textures. This is not a 2d array of image data!\r\nFor data loaded from an image this means a single slice of pixel data.\r\n\r\nThis should also fix the mipmap issue:\r\n```Rust\r\nlet pixels = image.buf.chunks(4).map(|p| [p[0], p[1], p[2], p[3]]).collect::<Vec<_>>();\r\nAssetLoader::from_data(assets, TextureLoadData {\r\n            kind: Kind::D2(image.w as u16, image.h as u16, AaMode::Single),\r\n            raw: &[pixels.as_slice()],\r\n       })","created_at":"2016-12-31T17:22:33Z","updated_at":"2016-12-31T17:22:33Z","html_url":"https://github.com/amethyst/amethyst/pull/149#discussion_r94275871","pull_request_url":"https://api.github.com/repos/amethyst/amethyst/pulls/149","_links":{"self":{"href":"https://api.github.com/repos/amethyst/amethyst/pulls/comments/94275871"},"html":{"href":"https://github.com/amethyst/amethyst/pull/149#discussion_r94275871"},"pull_request":{"href":"https://api.github.com/repos/amethyst/amethyst/pulls/149"}}},"pull_request":{"url":"https://api.github.com/repos/amethyst/amethyst/pulls/149","id":99343842,"html_url":"https://github.com/amethyst/amethyst/pull/149","diff_url":"https://github.com/amethyst/amethyst/pull/149.diff","patch_url":"https://github.com/amethyst/amethyst/pull/149.patch","issue_url":"https://api.github.com/repos/amethyst/amethyst/issues/149","number":149,"state":"open","locked":false,"title":"Making AssetManager more \"batteries-included\" by default","user":{"login":"mechaxl","id":765788,"avatar_url":"https://avatars.githubusercontent.com/u/765788?v=3","gravatar_id":"","url":"https://api.github.com/users/mechaxl","html_url":"https://github.com/mechaxl","followers_url":"https://api.github.com/users/mechaxl/followers","following_url":"https://api.github.com/users/mechaxl/following{/other_user}","gists_url":"https://api.github.com/users/mechaxl/gists{/gist_id}","starred_url":"https://api.github.com/users/mechaxl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mechaxl/subscriptions","organizations_url":"https://api.github.com/users/mechaxl/orgs","repos_url":"https://api.github.com/users/mechaxl/repos","events_url":"https://api.github.com/users/mechaxl/events{/privacy}","received_events_url":"https://api.github.com/users/mechaxl/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-26T06:34:09Z","updated_at":"2016-12-31T17:22:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"53588ff348eb045c3f4d8e689436ff460be09a2e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/amethyst/amethyst/pulls/149/commits","review_comments_url":"https://api.github.com/repos/amethyst/amethyst/pulls/149/comments","review_comment_url":"https://api.github.com/repos/amethyst/amethyst/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amethyst/amethyst/issues/149/comments","statuses_url":"https://api.github.com/repos/amethyst/amethyst/statuses/a71781b389f643cd66b5c0c759d0ece34bb441f8","head":{"label":"mechaxl:image-loading","ref":"image-loading","sha":"a71781b389f643cd66b5c0c759d0ece34bb441f8","user":{"login":"mechaxl","id":765788,"avatar_url":"https://avatars.githubusercontent.com/u/765788?v=3","gravatar_id":"","url":"https://api.github.com/users/mechaxl","html_url":"https://github.com/mechaxl","followers_url":"https://api.github.com/users/mechaxl/followers","following_url":"https://api.github.com/users/mechaxl/following{/other_user}","gists_url":"https://api.github.com/users/mechaxl/gists{/gist_id}","starred_url":"https://api.github.com/users/mechaxl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mechaxl/subscriptions","organizations_url":"https://api.github.com/users/mechaxl/orgs","repos_url":"https://api.github.com/users/mechaxl/repos","events_url":"https://api.github.com/users/mechaxl/events{/privacy}","received_events_url":"https://api.github.com/users/mechaxl/received_events","type":"User","site_admin":false},"repo":{"id":76624472,"name":"amethyst","full_name":"mechaxl/amethyst","owner":{"login":"mechaxl","id":765788,"avatar_url":"https://avatars.githubusercontent.com/u/765788?v=3","gravatar_id":"","url":"https://api.github.com/users/mechaxl","html_url":"https://github.com/mechaxl","followers_url":"https://api.github.com/users/mechaxl/followers","following_url":"https://api.github.com/users/mechaxl/following{/other_user}","gists_url":"https://api.github.com/users/mechaxl/gists{/gist_id}","starred_url":"https://api.github.com/users/mechaxl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mechaxl/subscriptions","organizations_url":"https://api.github.com/users/mechaxl/orgs","repos_url":"https://api.github.com/users/mechaxl/repos","events_url":"https://api.github.com/users/mechaxl/events{/privacy}","received_events_url":"https://api.github.com/users/mechaxl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mechaxl/amethyst","description":"Data-oriented game engine written in Rust","fork":true,"url":"https://api.github.com/repos/mechaxl/amethyst","forks_url":"https://api.github.com/repos/mechaxl/amethyst/forks","keys_url":"https://api.github.com/repos/mechaxl/amethyst/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mechaxl/amethyst/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mechaxl/amethyst/teams","hooks_url":"https://api.github.com/repos/mechaxl/amethyst/hooks","issue_events_url":"https://api.github.com/repos/mechaxl/amethyst/issues/events{/number}","events_url":"https://api.github.com/repos/mechaxl/amethyst/events","assignees_url":"https://api.github.com/repos/mechaxl/amethyst/assignees{/user}","branches_url":"https://api.github.com/repos/mechaxl/amethyst/branches{/branch}","tags_url":"https://api.github.com/repos/mechaxl/amethyst/tags","blobs_url":"https://api.github.com/repos/mechaxl/amethyst/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mechaxl/amethyst/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mechaxl/amethyst/git/refs{/sha}","trees_url":"https://api.github.com/repos/mechaxl/amethyst/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mechaxl/amethyst/statuses/{sha}","languages_url":"https://api.github.com/repos/mechaxl/amethyst/languages","stargazers_url":"https://api.github.com/repos/mechaxl/amethyst/stargazers","contributors_url":"https://api.github.com/repos/mechaxl/amethyst/contributors","subscribers_url":"https://api.github.com/repos/mechaxl/amethyst/subscribers","subscription_url":"https://api.github.com/repos/mechaxl/amethyst/subscription","commits_url":"https://api.github.com/repos/mechaxl/amethyst/commits{/sha}","git_commits_url":"https://api.github.com/repos/mechaxl/amethyst/git/commits{/sha}","comments_url":"https://api.github.com/repos/mechaxl/amethyst/comments{/number}","issue_comment_url":"https://api.github.com/repos/mechaxl/amethyst/issues/comments{/number}","contents_url":"https://api.github.com/repos/mechaxl/amethyst/contents/{+path}","compare_url":"https://api.github.com/repos/mechaxl/amethyst/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mechaxl/amethyst/merges","archive_url":"https://api.github.com/repos/mechaxl/amethyst/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mechaxl/amethyst/downloads","issues_url":"https://api.github.com/repos/mechaxl/amethyst/issues{/number}","pulls_url":"https://api.github.com/repos/mechaxl/amethyst/pulls{/number}","milestones_url":"https://api.github.com/repos/mechaxl/amethyst/milestones{/number}","notifications_url":"https://api.github.com/repos/mechaxl/amethyst/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mechaxl/amethyst/labels{/name}","releases_url":"https://api.github.com/repos/mechaxl/amethyst/releases{/id}","deployments_url":"https://api.github.com/repos/mechaxl/amethyst/deployments","created_at":"2016-12-16T05:31:17Z","updated_at":"2016-12-16T05:31:18Z","pushed_at":"2016-12-31T16:28:09Z","git_url":"git://github.com/mechaxl/amethyst.git","ssh_url":"git@github.com:mechaxl/amethyst.git","clone_url":"https://github.com/mechaxl/amethyst.git","svn_url":"https://github.com/mechaxl/amethyst","homepage":"","size":16552,"stargazers_count":0,"watchers_count":0,"language":"Rust","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":"develop"}},"base":{"label":"amethyst:develop","ref":"develop","sha":"7e503c403e6e3daf837ed38ffb8cd316b1a91d9f","user":{"login":"amethyst","id":17814736,"avatar_url":"https://avatars.githubusercontent.com/u/17814736?v=3","gravatar_id":"","url":"https://api.github.com/users/amethyst","html_url":"https://github.com/amethyst","followers_url":"https://api.github.com/users/amethyst/followers","following_url":"https://api.github.com/users/amethyst/following{/other_user}","gists_url":"https://api.github.com/users/amethyst/gists{/gist_id}","starred_url":"https://api.github.com/users/amethyst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amethyst/subscriptions","organizations_url":"https://api.github.com/users/amethyst/orgs","repos_url":"https://api.github.com/users/amethyst/repos","events_url":"https://api.github.com/users/amethyst/events{/privacy}","received_events_url":"https://api.github.com/users/amethyst/received_events","type":"Organization","site_admin":false},"repo":{"id":48364554,"name":"amethyst","full_name":"amethyst/amethyst","owner":{"login":"amethyst","id":17814736,"avatar_url":"https://avatars.githubusercontent.com/u/17814736?v=3","gravatar_id":"","url":"https://api.github.com/users/amethyst","html_url":"https://github.com/amethyst","followers_url":"https://api.github.com/users/amethyst/followers","following_url":"https://api.github.com/users/amethyst/following{/other_user}","gists_url":"https://api.github.com/users/amethyst/gists{/gist_id}","starred_url":"https://api.github.com/users/amethyst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amethyst/subscriptions","organizations_url":"https://api.github.com/users/amethyst/orgs","repos_url":"https://api.github.com/users/amethyst/repos","events_url":"https://api.github.com/users/amethyst/events{/privacy}","received_events_url":"https://api.github.com/users/amethyst/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amethyst/amethyst","description":"Data-oriented game engine written in Rust","fork":false,"url":"https://api.github.com/repos/amethyst/amethyst","forks_url":"https://api.github.com/repos/amethyst/amethyst/forks","keys_url":"https://api.github.com/repos/amethyst/amethyst/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amethyst/amethyst/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amethyst/amethyst/teams","hooks_url":"https://api.github.com/repos/amethyst/amethyst/hooks","issue_events_url":"https://api.github.com/repos/amethyst/amethyst/issues/events{/number}","events_url":"https://api.github.com/repos/amethyst/amethyst/events","assignees_url":"https://api.github.com/repos/amethyst/amethyst/assignees{/user}","branches_url":"https://api.github.com/repos/amethyst/amethyst/branches{/branch}","tags_url":"https://api.github.com/repos/amethyst/amethyst/tags","blobs_url":"https://api.github.com/repos/amethyst/amethyst/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amethyst/amethyst/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amethyst/amethyst/git/refs{/sha}","trees_url":"https://api.github.com/repos/amethyst/amethyst/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amethyst/amethyst/statuses/{sha}","languages_url":"https://api.github.com/repos/amethyst/amethyst/languages","stargazers_url":"https://api.github.com/repos/amethyst/amethyst/stargazers","contributors_url":"https://api.github.com/repos/amethyst/amethyst/contributors","subscribers_url":"https://api.github.com/repos/amethyst/amethyst/subscribers","subscription_url":"https://api.github.com/repos/amethyst/amethyst/subscription","commits_url":"https://api.github.com/repos/amethyst/amethyst/commits{/sha}","git_commits_url":"https://api.github.com/repos/amethyst/amethyst/git/commits{/sha}","comments_url":"https://api.github.com/repos/amethyst/amethyst/comments{/number}","issue_comment_url":"https://api.github.com/repos/amethyst/amethyst/issues/comments{/number}","contents_url":"https://api.github.com/repos/amethyst/amethyst/contents/{+path}","compare_url":"https://api.github.com/repos/amethyst/amethyst/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amethyst/amethyst/merges","archive_url":"https://api.github.com/repos/amethyst/amethyst/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amethyst/amethyst/downloads","issues_url":"https://api.github.com/repos/amethyst/amethyst/issues{/number}","pulls_url":"https://api.github.com/repos/amethyst/amethyst/pulls{/number}","milestones_url":"https://api.github.com/repos/amethyst/amethyst/milestones{/number}","notifications_url":"https://api.github.com/repos/amethyst/amethyst/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amethyst/amethyst/labels{/name}","releases_url":"https://api.github.com/repos/amethyst/amethyst/releases{/id}","deployments_url":"https://api.github.com/repos/amethyst/amethyst/deployments","created_at":"2015-12-21T09:59:29Z","updated_at":"2016-12-31T08:39:17Z","pushed_at":"2016-12-31T16:28:11Z","git_url":"git://github.com/amethyst/amethyst.git","ssh_url":"git@github.com:amethyst/amethyst.git","clone_url":"https://github.com/amethyst/amethyst.git","svn_url":"https://github.com/amethyst/amethyst","homepage":"","size":16500,"stargazers_count":416,"watchers_count":416,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":37,"forks":37,"open_issues":37,"watchers":416,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/amethyst/amethyst/pulls/149"},"html":{"href":"https://github.com/amethyst/amethyst/pull/149"},"issue":{"href":"https://api.github.com/repos/amethyst/amethyst/issues/149"},"comments":{"href":"https://api.github.com/repos/amethyst/amethyst/issues/149/comments"},"review_comments":{"href":"https://api.github.com/repos/amethyst/amethyst/pulls/149/comments"},"review_comment":{"href":"https://api.github.com/repos/amethyst/amethyst/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amethyst/amethyst/pulls/149/commits"},"statuses":{"href":"https://api.github.com/repos/amethyst/amethyst/statuses/a71781b389f643cd66b5c0c759d0ece34bb441f8"}}}}
{"actor":{"display_login":"msiglreith"}}