Boost::GIL How to save image as JPEG or PNG into char*?

旧街凉风 提交于 2019-12-10 16:32:01

问题


So I see samples all around on saving into file. But I wonder if it is possible to save into char* or string instead of file - so to say keep it in memory?


回答1:


There doesn't seem to be anything to facilitate this in boost itself. All I/O seems to be based on supplying filenames.

However, there seems to be an extension here called io_new that has streams based I/O.

See documentation here for an example (search for "Reading And Writing In-Memory Buffers").



来源:https://stackoverflow.com/questions/8039199/boostgil-how-to-save-image-as-jpeg-or-png-into-char

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!