{"action":"created","issue":{"url":"https://api.github.com/repos/imageio/imageio/issues/331","repository_url":"https://api.github.com/repos/imageio/imageio","labels_url":"https://api.github.com/repos/imageio/imageio/issues/331/labels{/name}","comments_url":"https://api.github.com/repos/imageio/imageio/issues/331/comments","events_url":"https://api.github.com/repos/imageio/imageio/issues/331/events","html_url":"https://github.com/imageio/imageio/issues/331","id":312116120,"node_id":"MDU6SXNzdWUzMTIxMTYxMjA=","number":331,"title":"Understanding gif processing","user":{"login":"carlosdubus","id":713000,"node_id":"MDQ6VXNlcjcxMzAwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/713000?v=4","gravatar_id":"","url":"https://api.github.com/users/carlosdubus","html_url":"https://github.com/carlosdubus","followers_url":"https://api.github.com/users/carlosdubus/followers","following_url":"https://api.github.com/users/carlosdubus/following{/other_user}","gists_url":"https://api.github.com/users/carlosdubus/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosdubus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosdubus/subscriptions","organizations_url":"https://api.github.com/users/carlosdubus/orgs","repos_url":"https://api.github.com/users/carlosdubus/repos","events_url":"https://api.github.com/users/carlosdubus/events{/privacy}","received_events_url":"https://api.github.com/users/carlosdubus/received_events","type":"User","site_admin":false},"labels":[{"id":495624726,"node_id":"MDU6TGFiZWw0OTU2MjQ3MjY=","url":"https://api.github.com/repos/imageio/imageio/labels/plugin:%20pillow","name":"plugin: pillow","color":"c5def5","default":false},{"id":38460463,"node_id":"MDU6TGFiZWwzODQ2MDQ2Mw==","url":"https://api.github.com/repos/imageio/imageio/labels/type:%20question","name":"type: question","color":"cc317c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-06T20:59:08Z","updated_at":"2018-09-04T20:34:59Z","closed_at":null,"author_association":"NONE","body":"Hi, this is more a question than an issue.\r\n\r\nI thought if I did the following, I would get the same pixel data back. Instead I get single int values:\r\n\r\n```\r\nimport imageio\r\nimport numpy as np\r\n\r\n# write\r\ngif = imageio.get_writer(\"test.gif\")\r\npixel = np.array([0,0,0,255], dtype=np.uint8)\r\nprint(pixel)\r\ngif.append_data(np.array([[pixel]]))\r\npixel = np.array([140,212,245,255], dtype=np.uint8)\r\nprint(pixel)\r\ngif.append_data(np.array([[pixel]]))\r\ngif.close()\r\n\r\n# read\r\ngif = imageio.get_reader(\"test.gif\")\r\ndata = gif.get_next_data()\r\nprint(data[0][0])\r\ndata = gif.get_next_data()\r\nprint(data[0][0])\r\n```\r\n\r\nOutput:\r\n```\r\n[  0   0   0 255]\r\n[140 212 245 255]\r\n0\r\n194\r\n```\r\n\r\nWhy I don't get the same pixels back?\r\n\r\nThanks for your help."},"comment":{"url":"https://api.github.com/repos/imageio/imageio/issues/comments/418508791","html_url":"https://github.com/imageio/imageio/issues/331#issuecomment-418508791","issue_url":"https://api.github.com/repos/imageio/imageio/issues/331","id":418508791,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODUwODc5MQ==","user":{"login":"carlosdubus","id":713000,"node_id":"MDQ6VXNlcjcxMzAwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/713000?v=4","gravatar_id":"","url":"https://api.github.com/users/carlosdubus","html_url":"https://github.com/carlosdubus","followers_url":"https://api.github.com/users/carlosdubus/followers","following_url":"https://api.github.com/users/carlosdubus/following{/other_user}","gists_url":"https://api.github.com/users/carlosdubus/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosdubus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosdubus/subscriptions","organizations_url":"https://api.github.com/users/carlosdubus/orgs","repos_url":"https://api.github.com/users/carlosdubus/repos","events_url":"https://api.github.com/users/carlosdubus/events{/privacy}","received_events_url":"https://api.github.com/users/carlosdubus/received_events","type":"User","site_admin":false},"created_at":"2018-09-04T20:34:59Z","updated_at":"2018-09-04T20:34:59Z","author_association":"NONE","body":"@almarklein thanks for your help. The following answers the question so I'm no longer needing this. Thanks!\r\n\r\n> Note that you probably won't get your original colors back anyway. GIF can use just 8 bit per pixel, and tries to produce a colormap that most efficiently packs the most relevant colors."}}
{"actor":{"display_login":"carlosdubus"}}