2


我正在尝试将图像从 std::istream 加载到 Boost.GIL 图像上。我在网上搜索过,但还没有找到好的解决方案。
任何帮助将不胜感激。
非常感谢

4

1 回答 1

4

从这里查看新版本的 gil io:http ://code.google.com/p/gil-contributions/source/browse/trunk/gil_2.zip这还不是 boost 的正式部分,但它可以工作很好,很稳定,它支持你需要的东西。你没有说你要阅读什么格式,但要阅读 jpeg,你会有这样的代码:

using namespace boost::gil;
image_read_settings<jpeg_tag> readSettings;
rgb8_image_t newImage;
read_image(stream, newImage, readSettings);

还支持读取 png、bmp、raw、targa 和 tiff。

于 2012-09-27T16:07:58.370 回答