{"action":"created","issue":{"url":"https://api.github.com/repos/jcupitt/libvips/issues/290","labels_url":"https://api.github.com/repos/jcupitt/libvips/issues/290/labels{/name}","comments_url":"https://api.github.com/repos/jcupitt/libvips/issues/290/comments","events_url":"https://api.github.com/repos/jcupitt/libvips/issues/290/events","html_url":"https://github.com/jcupitt/libvips/issues/290","id":73071804,"number":290,"title":"VImage::write_to_buffer(suffix,buf, sizeoptions) work inproperly","user":{"login":"huskier","id":5828575,"avatar_url":"https://avatars.githubusercontent.com/u/5828575?v=3","gravatar_id":"","url":"https://api.github.com/users/huskier","html_url":"https://github.com/huskier","followers_url":"https://api.github.com/users/huskier/followers","following_url":"https://api.github.com/users/huskier/following{/other_user}","gists_url":"https://api.github.com/users/huskier/gists{/gist_id}","starred_url":"https://api.github.com/users/huskier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huskier/subscriptions","organizations_url":"https://api.github.com/users/huskier/orgs","repos_url":"https://api.github.com/users/huskier/repos","events_url":"https://api.github.com/users/huskier/events{/privacy}","received_events_url":"https://api.github.com/users/huskier/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jcupitt/libvips/labels/bug","name":"bug","color":"e10c02"},{"url":"https://api.github.com/repos/jcupitt/libvips/labels/question","name":"question","color":"02e10c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-04T17:02:25Z","updated_at":"2015-05-05T11:33:58Z","closed_at":"2015-05-05T11:33:58Z","body":"Dear Cupitt,\r\n\r\nI cannot make the following code work properly.\r\n        size_t size;\r\n        void *buf;\r\n        out_img.write_to_buffer(\"PNG\",&buf,&size);\r\nI am quite sure that out_img(VImage type) is valid. I don't know what kind of \"strings\" for suffix parameter, and I've already tried out \".png\", \"PNG\" etc.\r\n\r\nBTW, I like the new C++ interface of VIPS8, however, there is no clear docs for the new interface by my best knowledge, and I have to guess the APIs, such as in_img.colourspace(), in_img.resize(), in_img.cast etc. Dear Cupitt, where can I find the new C++ APIs?\r\n\r\nThanks for your effort for providing such handy image library and tool, and they are served my every day use.\r\n\r\nSimon\r\n"},"comment":{"url":"https://api.github.com/repos/jcupitt/libvips/issues/comments/99046798","html_url":"https://github.com/jcupitt/libvips/issues/290#issuecomment-99046798","issue_url":"https://api.github.com/repos/jcupitt/libvips/issues/290","id":99046798,"user":{"login":"jcupitt","id":580843,"avatar_url":"https://avatars.githubusercontent.com/u/580843?v=3","gravatar_id":"","url":"https://api.github.com/users/jcupitt","html_url":"https://github.com/jcupitt","followers_url":"https://api.github.com/users/jcupitt/followers","following_url":"https://api.github.com/users/jcupitt/following{/other_user}","gists_url":"https://api.github.com/users/jcupitt/gists{/gist_id}","starred_url":"https://api.github.com/users/jcupitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcupitt/subscriptions","organizations_url":"https://api.github.com/users/jcupitt/orgs","repos_url":"https://api.github.com/users/jcupitt/repos","events_url":"https://api.github.com/users/jcupitt/events{/privacy}","received_events_url":"https://api.github.com/users/jcupitt/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T11:33:58Z","updated_at":"2015-05-05T11:33:58Z","body":"I added a program to test the C++ API:\r\n\r\nhttps://github.com/jcupitt/libvips/blob/master/cplusplus/examples/test.cpp\r\n\r\nHopefully this is fixed properly now. Please reopen if not. "}}