{"action":"created","issue":{"url":"https://api.github.com/repos/adonespitogo/angular-base64-upload/issues/84","repository_url":"https://api.github.com/repos/adonespitogo/angular-base64-upload","labels_url":"https://api.github.com/repos/adonespitogo/angular-base64-upload/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/adonespitogo/angular-base64-upload/issues/84/comments","events_url":"https://api.github.com/repos/adonespitogo/angular-base64-upload/issues/84/events","html_url":"https://github.com/adonespitogo/angular-base64-upload/issues/84","id":173638164,"number":84,"title":"How Can i get the image width and height ?","user":{"login":"TAMMENY","id":5690568,"avatar_url":"https://avatars.githubusercontent.com/u/5690568?v=3","gravatar_id":"","url":"https://api.github.com/users/TAMMENY","html_url":"https://github.com/TAMMENY","followers_url":"https://api.github.com/users/TAMMENY/followers","following_url":"https://api.github.com/users/TAMMENY/following{/other_user}","gists_url":"https://api.github.com/users/TAMMENY/gists{/gist_id}","starred_url":"https://api.github.com/users/TAMMENY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TAMMENY/subscriptions","organizations_url":"https://api.github.com/users/TAMMENY/orgs","repos_url":"https://api.github.com/users/TAMMENY/repos","events_url":"https://api.github.com/users/TAMMENY/events{/privacy}","received_events_url":"https://api.github.com/users/TAMMENY/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-28T09:38:23Z","updated_at":"2016-09-05T07:41:44Z","closed_at":null,"body":"How Can i get the image width and height ?"},"comment":{"url":"https://api.github.com/repos/adonespitogo/angular-base64-upload/issues/comments/244678847","html_url":"https://github.com/adonespitogo/angular-base64-upload/issues/84#issuecomment-244678847","issue_url":"https://api.github.com/repos/adonespitogo/angular-base64-upload/issues/84","id":244678847,"user":{"login":"TAMMENY","id":5690568,"avatar_url":"https://avatars.githubusercontent.com/u/5690568?v=3","gravatar_id":"","url":"https://api.github.com/users/TAMMENY","html_url":"https://github.com/TAMMENY","followers_url":"https://api.github.com/users/TAMMENY/followers","following_url":"https://api.github.com/users/TAMMENY/following{/other_user}","gists_url":"https://api.github.com/users/TAMMENY/gists{/gist_id}","starred_url":"https://api.github.com/users/TAMMENY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TAMMENY/subscriptions","organizations_url":"https://api.github.com/users/TAMMENY/orgs","repos_url":"https://api.github.com/users/TAMMENY/repos","events_url":"https://api.github.com/users/TAMMENY/events{/privacy}","received_events_url":"https://api.github.com/users/TAMMENY/received_events","type":"User","site_admin":false},"created_at":"2016-09-05T07:41:44Z","updated_at":"2016-09-05T07:41:44Z","body":"@aashirjaved \r\n**html：**\r\n`<input type=\"file\" name=\"headimage\" ng-model=\"headimage\" base-sixty-four-input accept=\"image/*\" parser=\"getImageInfo\">`\r\n\r\n**controller：**\r\n```\r\n$scope.getImageInfo = function(file, base64) {\r\n        var deferred = $q.defer();\r\n\r\n        var type = base64.filetype;\r\n        var code = base64.base64;\r\n        var size = base64.filesize;\r\n        var name = base64.filename;\r\n        var src = \"data:\" + type + \";base64,\" + code;\r\n\r\n        var img = new Image();\r\n        img.src = src;\r\n\r\n        img.onload = function() {\r\n            var imageInfo = {\r\n                dimension: {\r\n                    width: img.width,\r\n                    height: img.height\r\n                },\r\n                base64: code,\r\n                base64Str: src,\r\n                filetype: type,\r\n                filesize: size,\r\n                filename: name\r\n            }\r\n            deferred.resolve(imageInfo);\r\n        }\r\n        return deferred.promise;\r\n    };\r\n```"}}
{"actor":{"display_login":"TAMMENY"}}