{"action":"created","issue":{"url":"https://api.github.com/repos/vujadin/BabylonHx/issues/68","labels_url":"https://api.github.com/repos/vujadin/BabylonHx/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/vujadin/BabylonHx/issues/68/comments","events_url":"https://api.github.com/repos/vujadin/BabylonHx/issues/68/events","html_url":"https://github.com/vujadin/BabylonHx/issues/68","id":112593499,"number":68,"title":"Create texture directly from bitmapdata","user":{"login":"ramsestom","id":636758,"avatar_url":"https://avatars.githubusercontent.com/u/636758?v=3","gravatar_id":"","url":"https://api.github.com/users/ramsestom","html_url":"https://github.com/ramsestom","followers_url":"https://api.github.com/users/ramsestom/followers","following_url":"https://api.github.com/users/ramsestom/following{/other_user}","gists_url":"https://api.github.com/users/ramsestom/gists{/gist_id}","starred_url":"https://api.github.com/users/ramsestom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramsestom/subscriptions","organizations_url":"https://api.github.com/users/ramsestom/orgs","repos_url":"https://api.github.com/users/ramsestom/repos","events_url":"https://api.github.com/users/ramsestom/events{/privacy}","received_events_url":"https://api.github.com/users/ramsestom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-21T13:53:24Z","updated_at":"2015-10-21T16:10:59Z","closed_at":null,"body":"Is there a way to create a texture directly from a bitmapdata? Decause currently, I only see a way to create a texture with an url parametter (so the texture as to be embeded as an asset) but I would like to create textures and bumpmaps from a custom generated 2D image (but I won't go with GL procedural textures that won't fit my need here)...\r\n"},"comment":{"url":"https://api.github.com/repos/vujadin/BabylonHx/issues/comments/149947935","html_url":"https://github.com/vujadin/BabylonHx/issues/68#issuecomment-149947935","issue_url":"https://api.github.com/repos/vujadin/BabylonHx/issues/68","id":149947935,"user":{"login":"vujadin","id":4639385,"avatar_url":"https://avatars.githubusercontent.com/u/4639385?v=3","gravatar_id":"","url":"https://api.github.com/users/vujadin","html_url":"https://github.com/vujadin","followers_url":"https://api.github.com/users/vujadin/followers","following_url":"https://api.github.com/users/vujadin/following{/other_user}","gists_url":"https://api.github.com/users/vujadin/gists{/gist_id}","starred_url":"https://api.github.com/users/vujadin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vujadin/subscriptions","organizations_url":"https://api.github.com/users/vujadin/orgs","repos_url":"https://api.github.com/users/vujadin/repos","events_url":"https://api.github.com/users/vujadin/events{/privacy}","received_events_url":"https://api.github.com/users/vujadin/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T16:10:59Z","updated_at":"2015-10-21T16:10:59Z","body":"You should be able to create RawTexture directly from bitmapData with something like this:\r\n```\r\nvar bmp = Assets.getBitmapData(url); \r\nvar img = new Image(new UInt8Array(nme.display.BitmapData.getRGBAPixels(img)), img.width, img.height);\r\nvar tex = RawTexture.CreateRGBATexture(img, img.width, img.height, scene);\r\n```\r\n"}}