{"action":"created","issue":{"url":"https://api.github.com/repos/Kozea/cairocffi/issues/13","repository_url":"https://api.github.com/repos/Kozea/cairocffi","labels_url":"https://api.github.com/repos/Kozea/cairocffi/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/Kozea/cairocffi/issues/13/comments","events_url":"https://api.github.com/repos/Kozea/cairocffi/issues/13/events","html_url":"https://github.com/Kozea/cairocffi/issues/13","id":15457066,"number":13,"title":"create_for_rectangle returns  CAIRO_STATUS_INVALID_FORMAT: invalid value for an input cairo_format_t","user":{"login":"stuaxo","id":179677,"avatar_url":"https://avatars.githubusercontent.com/u/179677?v=3","gravatar_id":"","url":"https://api.github.com/users/stuaxo","html_url":"https://github.com/stuaxo","followers_url":"https://api.github.com/users/stuaxo/followers","following_url":"https://api.github.com/users/stuaxo/following{/other_user}","gists_url":"https://api.github.com/users/stuaxo/gists{/gist_id}","starred_url":"https://api.github.com/users/stuaxo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuaxo/subscriptions","organizations_url":"https://api.github.com/users/stuaxo/orgs","repos_url":"https://api.github.com/users/stuaxo/repos","events_url":"https://api.github.com/users/stuaxo/events{/privacy}","received_events_url":"https://api.github.com/users/stuaxo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2013-06-12T15:34:12Z","updated_at":"2016-08-27T11:48:53Z","closed_at":null,"body":"I was trying to crop an input image (640x480) by using create_for_rectangle\r\n\r\n\r\n```python\r\n        with open(input_image) as f:\r\n            data = f.read()\r\n            source_image, format = pixbuf.decode_to_image_surface( data )\r\n\r\n            print source_image.get_width()\r\n            print source_image.get_height()\r\n            bottom_layer = source_image.create_for_rectangle(0, 65, 640, 350)\r\n            #bottom_layer = source_image\r\n```\r\nOutput:\r\n\r\n640\r\n480\r\nCairoError: cairo returned CAIRO_STATUS_INVALID_FORMAT: invalid value for an input cairo_format_t\r\n"},"comment":{"url":"https://api.github.com/repos/Kozea/cairocffi/issues/comments/242912731","html_url":"https://github.com/Kozea/cairocffi/issues/13#issuecomment-242912731","issue_url":"https://api.github.com/repos/Kozea/cairocffi/issues/13","id":242912731,"user":{"login":"liZe","id":952243,"avatar_url":"https://avatars.githubusercontent.com/u/952243?v=3","gravatar_id":"","url":"https://api.github.com/users/liZe","html_url":"https://github.com/liZe","followers_url":"https://api.github.com/users/liZe/followers","following_url":"https://api.github.com/users/liZe/following{/other_user}","gists_url":"https://api.github.com/users/liZe/gists{/gist_id}","starred_url":"https://api.github.com/users/liZe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liZe/subscriptions","organizations_url":"https://api.github.com/users/liZe/orgs","repos_url":"https://api.github.com/users/liZe/repos","events_url":"https://api.github.com/users/liZe/events{/privacy}","received_events_url":"https://api.github.com/users/liZe/received_events","type":"User","site_admin":false},"created_at":"2016-08-27T11:48:53Z","updated_at":"2016-08-27T11:48:53Z","body":"@stuaxo I've tried your original example and it works for me (the surface is created, `get_format()` gives me `1`). Is it solved for you too?"}}
{"actor":{"display_login":"liZe"}}