{"action":"created","issue":{"url":"https://api.github.com/repos/twolfson/gif-encoder/issues/5","repository_url":"https://api.github.com/repos/twolfson/gif-encoder","labels_url":"https://api.github.com/repos/twolfson/gif-encoder/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/twolfson/gif-encoder/issues/5/comments","events_url":"https://api.github.com/repos/twolfson/gif-encoder/issues/5/events","html_url":"https://github.com/twolfson/gif-encoder/issues/5","id":123053952,"number":5,"title":"Bugfix for broken transparency","user":{"login":"vegeta897","id":1789096,"avatar_url":"https://avatars.githubusercontent.com/u/1789096?v=3","gravatar_id":"","url":"https://api.github.com/users/vegeta897","html_url":"https://github.com/vegeta897","followers_url":"https://api.github.com/users/vegeta897/followers","following_url":"https://api.github.com/users/vegeta897/following{/other_user}","gists_url":"https://api.github.com/users/vegeta897/gists{/gist_id}","starred_url":"https://api.github.com/users/vegeta897/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vegeta897/subscriptions","organizations_url":"https://api.github.com/users/vegeta897/orgs","repos_url":"https://api.github.com/users/vegeta897/repos","events_url":"https://api.github.com/users/vegeta897/events{/privacy}","received_events_url":"https://api.github.com/users/vegeta897/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2015-12-19T01:52:27Z","updated_at":"2016-10-24T07:03:46Z","closed_at":null,"body":"I've discovered what I believe to be a bug with the transparency. Specifically, in the function that finds the nearest color in the palette. Right now transparency simply does not work at all because this function doesn't work.\r\n\r\nThis function will fail to find any color because it's checking that `this.usedEntry` has a true value at the index `i / 3`. But `i` is never a factor of 3 and so it's checking float index values.\r\n\r\nThe fix is changing line `302` to this:\r\n```js\r\nvar db = b - (this.colorTab[i++] & 0xff);\r\n```\r\nThe previous 2 lines have the `++`, and this line needs it as well so that `i` is incremented 3 times before being divided so an integer results. For some reason, the increment is at the end of the loop, so line `309` needs to be removed.\r\n\r\nAfter making these changes, transparency works again."},"comment":{"url":"https://api.github.com/repos/twolfson/gif-encoder/issues/comments/255663067","html_url":"https://github.com/twolfson/gif-encoder/issues/5#issuecomment-255663067","issue_url":"https://api.github.com/repos/twolfson/gif-encoder/issues/5","id":255663067,"user":{"login":"twolfson","id":902488,"avatar_url":"https://avatars.githubusercontent.com/u/902488?v=3","gravatar_id":"","url":"https://api.github.com/users/twolfson","html_url":"https://github.com/twolfson","followers_url":"https://api.github.com/users/twolfson/followers","following_url":"https://api.github.com/users/twolfson/following{/other_user}","gists_url":"https://api.github.com/users/twolfson/gists{/gist_id}","starred_url":"https://api.github.com/users/twolfson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twolfson/subscriptions","organizations_url":"https://api.github.com/users/twolfson/orgs","repos_url":"https://api.github.com/users/twolfson/repos","events_url":"https://api.github.com/users/twolfson/events{/privacy}","received_events_url":"https://api.github.com/users/twolfson/received_events","type":"User","site_admin":false},"created_at":"2016-10-24T07:03:46Z","updated_at":"2016-10-24T07:03:46Z","body":"We don't have `this.image` so we can't directly using their fix. I'm trying to understand what's going on now so I can see if we can still reuse it"}}
{"actor":{"display_login":"twolfson"}}