{"action":"created","issue":{"url":"https://api.github.com/repos/oliver-moran/jimp/issues/22","repository_url":"https://api.github.com/repos/oliver-moran/jimp","labels_url":"https://api.github.com/repos/oliver-moran/jimp/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/oliver-moran/jimp/issues/22/comments","events_url":"https://api.github.com/repos/oliver-moran/jimp/issues/22/events","html_url":"https://github.com/oliver-moran/jimp/issues/22","id":90963373,"number":22,"title":"get origin file size","user":{"login":"Yimiprod","id":2227867,"avatar_url":"https://avatars2.githubusercontent.com/u/2227867?v=4","gravatar_id":"","url":"https://api.github.com/users/Yimiprod","html_url":"https://github.com/Yimiprod","followers_url":"https://api.github.com/users/Yimiprod/followers","following_url":"https://api.github.com/users/Yimiprod/following{/other_user}","gists_url":"https://api.github.com/users/Yimiprod/gists{/gist_id}","starred_url":"https://api.github.com/users/Yimiprod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yimiprod/subscriptions","organizations_url":"https://api.github.com/users/Yimiprod/orgs","repos_url":"https://api.github.com/users/Yimiprod/repos","events_url":"https://api.github.com/users/Yimiprod/events{/privacy}","received_events_url":"https://api.github.com/users/Yimiprod/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2015-06-25T13:22:16Z","updated_at":"2018-04-09T15:52:49Z","closed_at":"2015-06-25T16:43:43Z","author_association":"NONE","body":"Hi\n\nIs there a way to know the image size in entry?\nI need it to do a resize without scale lose.\n"},"comment":{"url":"https://api.github.com/repos/oliver-moran/jimp/issues/comments/379800772","html_url":"https://github.com/oliver-moran/jimp/issues/22#issuecomment-379800772","issue_url":"https://api.github.com/repos/oliver-moran/jimp/issues/22","id":379800772,"user":{"login":"czycha","id":4816472,"avatar_url":"https://avatars2.githubusercontent.com/u/4816472?v=4","gravatar_id":"","url":"https://api.github.com/users/czycha","html_url":"https://github.com/czycha","followers_url":"https://api.github.com/users/czycha/followers","following_url":"https://api.github.com/users/czycha/following{/other_user}","gists_url":"https://api.github.com/users/czycha/gists{/gist_id}","starred_url":"https://api.github.com/users/czycha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czycha/subscriptions","organizations_url":"https://api.github.com/users/czycha/orgs","repos_url":"https://api.github.com/users/czycha/repos","events_url":"https://api.github.com/users/czycha/events{/privacy}","received_events_url":"https://api.github.com/users/czycha/received_events","type":"User","site_admin":false},"created_at":"2018-04-09T15:52:49Z","updated_at":"2018-04-09T15:52:49Z","author_association":"NONE","body":"@eservicesprovider Jimp does not store the original filename so that needs to be provided by some other means. The following code may be something like what you are asking for:\r\n\r\n```js\r\nconst Jimp = require(\"jimp\");\r\n\r\nconst imagePaths = [  // Here is an array of image paths to work on\r\n\t'http://www.mysite.com/imgs/bugsbunny.png',\r\n\t'http://www.mysite.com/imgs/daffyduck.png'\r\n];\r\n// Map imagePaths to Jimp.read Promises that return { url: path } after operating on image\r\n// Promise.all executes all the Promise functions synchronously and returns an array of final results once all Promises are resolved\r\nPromise.all(imagePaths.map(path => (\r\n\tJimp.read(path).then(img => {\r\n\t\t// Do something to img\r\n\t\treturn { url: path };\r\n\t});\r\n))).then(urls => {\r\n\t// You now have an array of urls:\r\n\t// urls = [{url: 'http://www.mysite.com/imgs/bugsbunny.png'}, {url: 'http://www.mysite.com/imgs/daffyduck.png'}]\r\n});\r\n```"}}
{"actor":{"display_login":"czycha"}}