{"action":"closed","issue":{"url":"https://api.github.com/repos/nothings/stb/issues/372","repository_url":"https://api.github.com/repos/nothings/stb","labels_url":"https://api.github.com/repos/nothings/stb/issues/372/labels{/name}","comments_url":"https://api.github.com/repos/nothings/stb/issues/372/comments","events_url":"https://api.github.com/repos/nothings/stb/issues/372/events","html_url":"https://github.com/nothings/stb/issues/372","id":192177835,"number":372,"title":"STB_Image - decoding image into preallocated memory","user":{"login":"Kerndog73","id":10371177,"avatar_url":"https://avatars.githubusercontent.com/u/10371177?v=3","gravatar_id":"","url":"https://api.github.com/users/Kerndog73","html_url":"https://github.com/Kerndog73","followers_url":"https://api.github.com/users/Kerndog73/followers","following_url":"https://api.github.com/users/Kerndog73/following{/other_user}","gists_url":"https://api.github.com/users/Kerndog73/gists{/gist_id}","starred_url":"https://api.github.com/users/Kerndog73/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kerndog73/subscriptions","organizations_url":"https://api.github.com/users/Kerndog73/orgs","repos_url":"https://api.github.com/users/Kerndog73/repos","events_url":"https://api.github.com/users/Kerndog73/events{/privacy}","received_events_url":"https://api.github.com/users/Kerndog73/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-29T03:18:24Z","updated_at":"2016-11-29T10:55:33Z","closed_at":"2016-11-29T10:55:33Z","body":"Is there a way to use the library to decode an image into some memory already allocated by the user. the STBI_ALLOC macro does help in this situation because I would have to store the allocation size of the image in global state and have the macro call a function that checks the allocation size against the image size so we know its the image thats being allocated. Then hand in the memory we've allocated.\r\n\r\nI was thinking there might be a way to produce a stbi__context with pointer in it to trick the library into thinking that its already allocated the memory when in fact it is the user that did it. But I couldn't figure which member to put the pointer in.\r\n\r\nIs there a function that does this or some trick somewhere?\r\n\r\nThanks"}}
{"actor":{"display_login":"nothings"}}