payload: {"action":"created","issue":{"url":"https://api.github.com/repos/python-openxml/python-docx/issues/712","repository_url":"https://api.github.com/repos/python-openxml/python-docx","labels_url":"https://api.github.com/repos/python-openxml/python-docx/issues/712/labels{/name}","comments_url":"https://api.github.com/repos/python-openxml/python-docx/issues/712/comments","events_url":"https://api.github.com/repos/python-openxml/python-docx/issues/712/events","html_url":"https://github.com/python-openxml/python-docx/issues/712","id":484052042,"node_id":"MDU6SXNzdWU0ODQwNTIwNDI=","number":712,"title":"How do I add an image that is stored as binary in a BLOB column?","user":{"login":"ArneAnka","id":5988810,"node_id":"MDQ6VXNlcjU5ODg4MTA=","avatar_url":"https://avatars0.githubusercontent.com/u/5988810?v=4","gravatar_id":"","url":"https://api.github.com/users/ArneAnka","html_url":"https://github.com/ArneAnka","followers_url":"https://api.github.com/users/ArneAnka/followers","following_url":"https://api.github.com/users/ArneAnka/following{/other_user}","gists_url":"https://api.github.com/users/ArneAnka/gists{/gist_id}","starred_url":"https://api.github.com/users/ArneAnka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArneAnka/subscriptions","organizations_url":"https://api.github.com/users/ArneAnka/orgs","repos_url":"https://api.github.com/users/ArneAnka/repos","events_url":"https://api.github.com/users/ArneAnka/events{/privacy}","received_events_url":"https://api.github.com/users/ArneAnka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-08-22T15:08:52Z","updated_at":"2019-08-22T19:01:21Z","closed_at":null,"author_association":"NONE","body":"Hi!\r\n\r\nTrying to add a picture to a document that is stored as binary straight into the DB. Bot PNG and GIF files. How do I approach this problem?\r\n\r\n```python\r\ndocument.add_picture(bin(item['data']))\r\n```\r\n\r\n`item['data']` is the column that has the binary for the image."},"comment":{"url":"https://api.github.com/repos/python-openxml/python-docx/issues/comments/524034430","html_url":"https://github.com/python-openxml/python-docx/issues/712#issuecomment-524034430","issue_url":"https://api.github.com/repos/python-openxml/python-docx/issues/712","id":524034430,"node_id":"MDEyOklzc3VlQ29tbWVudDUyNDAzNDQzMA==","user":{"login":"scanny","id":2062718,"node_id":"MDQ6VXNlcjIwNjI3MTg=","avatar_url":"https://avatars3.githubusercontent.com/u/2062718?v=4","gravatar_id":"","url":"https://api.github.com/users/scanny","html_url":"https://github.com/scanny","followers_url":"https://api.github.com/users/scanny/followers","following_url":"https://api.github.com/users/scanny/following{/other_user}","gists_url":"https://api.github.com/users/scanny/gists{/gist_id}","starred_url":"https://api.github.com/users/scanny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scanny/subscriptions","organizations_url":"https://api.github.com/users/scanny/orgs","repos_url":"https://api.github.com/users/scanny/repos","events_url":"https://api.github.com/users/scanny/events{/privacy}","received_events_url":"https://api.github.com/users/scanny/received_events","type":"User","site_admin":false},"created_at":"2019-08-22T19:01:21Z","updated_at":"2019-08-22T19:01:21Z","author_association":"CONTRIBUTOR","body":"I have no way of knowing what `item[\"data\"]` is, but it appears it is not the bytes of a common image type. The `bin()` wrapper is almost certainly not appropriate since it returns a string representation. Maybe you can try saving `item[\"data\"]` to a file and see if it displays an image in your OS."}}
other: {"actor":{"display_login":"scanny"}}