的boost :: GIL如何图像保存为JPEG或PNG成char *? [英] Boost::GIL How to save image as JPEG or PNG into char*?

查看:204
本文介绍了的boost :: GIL如何图像保存为JPEG或PNG成char *?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我看样品各地上保存到文件中。但我不知道它是否可以保存成char *或字符串,而不是文件 - 这么说来保持它在内存

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?

推荐答案

有似乎没有什么可促进这一升压本身。所有I / O似乎是基于提供的文件名。

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

然而,似乎在这里延伸 的名为 io_new 基于具有流I / O。

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").

这篇关于的boost :: GIL如何图像保存为JPEG或PNG成char *?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆