{"action":"closed","issue":{"url":"https://api.github.com/repos/marcusva/py-sdl2/issues/103","repository_url":"https://api.github.com/repos/marcusva/py-sdl2","labels_url":"https://api.github.com/repos/marcusva/py-sdl2/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/marcusva/py-sdl2/issues/103/comments","events_url":"https://api.github.com/repos/marcusva/py-sdl2/issues/103/events","html_url":"https://github.com/marcusva/py-sdl2/issues/103","id":250955743,"number":103,"title":"Wrong color format when using sdl2.ext.pixels2d","user":{"login":"marcusva","id":5445744,"avatar_url":"https://avatars3.githubusercontent.com/u/5445744?v=4","gravatar_id":"","url":"https://api.github.com/users/marcusva","html_url":"https://github.com/marcusva","followers_url":"https://api.github.com/users/marcusva/followers","following_url":"https://api.github.com/users/marcusva/following{/other_user}","gists_url":"https://api.github.com/users/marcusva/gists{/gist_id}","starred_url":"https://api.github.com/users/marcusva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcusva/subscriptions","organizations_url":"https://api.github.com/users/marcusva/orgs","repos_url":"https://api.github.com/users/marcusva/repos","events_url":"https://api.github.com/users/marcusva/events{/privacy}","received_events_url":"https://api.github.com/users/marcusva/received_events","type":"User","site_admin":false},"labels":[{"id":670818919,"url":"https://api.github.com/repos/marcusva/py-sdl2/labels/bug","name":"bug","color":"ee0701","default":true},{"id":670827083,"url":"https://api.github.com/repos/marcusva/py-sdl2/labels/minor","name":"minor","color":"f9d0c4","default":false},{"id":670828086,"url":"https://api.github.com/repos/marcusva/py-sdl2/labels/sdl2.ext","name":"sdl2.ext","color":"c5def5","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-24T23:04:21Z","updated_at":"2018-03-09T09:49:29Z","closed_at":"2018-03-09T09:49:29Z","author_association":"OWNER","body":"Originally reported by: **Arnaud Durand (Bitbucket: [DurandA](https://bitbucket.org/DurandA), GitHub: [DurandA](https://github.com/DurandA))**\n\n----------------------------------------\n\nWhen using `sdl2.ext.pixels2d` instead of `sdl2.ext.PixelView`, colors created using sdl2.ext.Color() have a wrong format.\n\nFrom my experiments, every color channel is shifted of one byte:\n\n| PixelView | pixels2d |\n|-----------|----------|\n| red       | ?        |\n| green     | red      |\n| blue      | green    |\n| alpha     | blue     |\n\nI created the surface and the pixels view using:\n```\n    surface_p = sdl2.SDL_CreateRGBSurface(0, X_RES, Y_RES, 32, 0, 0, 0, 0)\n    pixelview = sdl2.ext.pixels2d(surface_p.contents)\n```\n\n----------------------------------------\n- Bitbucket: https://bitbucket.org/marcusva/py-sdl2/issue/103\n"}}
{"actor":{"display_login":"marcusva"}}