{"action":"created","issue":{"url":"https://api.github.com/repos/lovell/sharp/issues/1219","repository_url":"https://api.github.com/repos/lovell/sharp","labels_url":"https://api.github.com/repos/lovell/sharp/issues/1219/labels{/name}","comments_url":"https://api.github.com/repos/lovell/sharp/issues/1219/comments","events_url":"https://api.github.com/repos/lovell/sharp/issues/1219/events","html_url":"https://github.com/lovell/sharp/issues/1219","id":319543563,"number":1219,"title":"Wrong buffer","user":{"login":"hellraisercenobit","id":7711207,"avatar_url":"https://avatars1.githubusercontent.com/u/7711207?v=4","gravatar_id":"","url":"https://api.github.com/users/hellraisercenobit","html_url":"https://github.com/hellraisercenobit","followers_url":"https://api.github.com/users/hellraisercenobit/followers","following_url":"https://api.github.com/users/hellraisercenobit/following{/other_user}","gists_url":"https://api.github.com/users/hellraisercenobit/gists{/gist_id}","starred_url":"https://api.github.com/users/hellraisercenobit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hellraisercenobit/subscriptions","organizations_url":"https://api.github.com/users/hellraisercenobit/orgs","repos_url":"https://api.github.com/users/hellraisercenobit/repos","events_url":"https://api.github.com/users/hellraisercenobit/events{/privacy}","received_events_url":"https://api.github.com/users/hellraisercenobit/received_events","type":"User","site_admin":false},"labels":[{"id":52750126,"url":"https://api.github.com/repos/lovell/sharp/labels/question","name":"question","color":"fef2c0","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-05-02T13:03:39Z","updated_at":"2018-05-27T07:43:26Z","closed_at":"2018-05-03T13:25:00Z","author_association":"NONE","body":"ToBuffer method returns a wrong buffer randomly\r\n\r\nexample:\r\n\r\n```\r\nsharp(imageFile)\r\n          .resize(myWidth, myHeight)\r\n          .background({r: 0, g: 0, b: 0, alpha: 0})\r\n          .embed()\r\n          .toFormat(sharp.format.jpeg)\r\n          .toBuffer()\r\n          .then(output) => {\r\n// Sometimes buffer cannot be used as uint8Array, it's seems corrupted\r\nconsole.log(output.buffer);\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/lovell/sharp/issues/comments/392311602","html_url":"https://github.com/lovell/sharp/issues/1219#issuecomment-392311602","issue_url":"https://api.github.com/repos/lovell/sharp/issues/1219","id":392311602,"user":{"login":"lovell","id":210965,"avatar_url":"https://avatars3.githubusercontent.com/u/210965?v=4","gravatar_id":"","url":"https://api.github.com/users/lovell","html_url":"https://github.com/lovell","followers_url":"https://api.github.com/users/lovell/followers","following_url":"https://api.github.com/users/lovell/following{/other_user}","gists_url":"https://api.github.com/users/lovell/gists{/gist_id}","starred_url":"https://api.github.com/users/lovell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lovell/subscriptions","organizations_url":"https://api.github.com/users/lovell/orgs","repos_url":"https://api.github.com/users/lovell/repos","events_url":"https://api.github.com/users/lovell/events{/privacy}","received_events_url":"https://api.github.com/users/lovell/received_events","type":"User","site_admin":false},"created_at":"2018-05-27T07:43:26Z","updated_at":"2018-05-27T07:43:26Z","author_association":"OWNER","body":"@josephfrazier You shouldn't need to do this as sharp always responds with a `Buffer` assigned via [Nan::NewBuffer](https://github.com/nodejs/nan/blob/master/doc/buffers.md#nannewbuffer). Perhaps another dependency is re-defining or monkey-patching the global `Buffer` class? Please open a new issue with a code sample if you're able to isolate this behaviour to sharp."}}
{"actor":{"display_login":"lovell"}}