{"action":"opened","issue":{"url":"https://api.github.com/repos/bioidiap/bob.io.image/issues/14","repository_url":"https://api.github.com/repos/bioidiap/bob.io.image","labels_url":"https://api.github.com/repos/bioidiap/bob.io.image/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/bioidiap/bob.io.image/issues/14/comments","events_url":"https://api.github.com/repos/bioidiap/bob.io.image/issues/14/events","html_url":"https://github.com/bioidiap/bob.io.image/issues/14","id":159208034,"number":14,"title":"Saving images requires C-contiguous data, but this is not checked","user":{"login":"siebenkopf","id":1398459,"avatar_url":"https://avatars.githubusercontent.com/u/1398459?v=3","gravatar_id":"","url":"https://api.github.com/users/siebenkopf","html_url":"https://github.com/siebenkopf","followers_url":"https://api.github.com/users/siebenkopf/followers","following_url":"https://api.github.com/users/siebenkopf/following{/other_user}","gists_url":"https://api.github.com/users/siebenkopf/gists{/gist_id}","starred_url":"https://api.github.com/users/siebenkopf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siebenkopf/subscriptions","organizations_url":"https://api.github.com/users/siebenkopf/orgs","repos_url":"https://api.github.com/users/siebenkopf/repos","events_url":"https://api.github.com/users/siebenkopf/events{/privacy}","received_events_url":"https://api.github.com/users/siebenkopf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-08T16:16:12Z","updated_at":"2016-06-08T16:16:12Z","closed_at":null,"body":"When writing (color) images that are not C-contiguous, the written images are garbage (mis-aligned), while C-contiguous data works fine:\r\n\r\n```\r\nimport bob.io.base\r\nimport bob.io.image\r\nimport numpy\r\nimage = bob.io.base.load(\"image-name.png\")\r\nbob.io.base.save(image[:, 10:50, 10:50], \"garbage.png\")\r\nbob.io.base.save(numpy.array(image[:, 10:50, 10:50]), \"good.png\")\r\n```\r\n\r\nI think, we need at least to check for C-contiguity before writing images."}}
{"actor":{"display_login":"siebenkopf"}}