2013-04-28 43 views
2

我試圖通過使用存在於boost 1.53中的boost::gil從內存中讀取圖像。我已經採取以下行從互聯網截取的示例:使用boost :: gil從內存中讀取JPEG圖像

#include <boost/gil/gil_all.hpp> 
boost::gil::rgb8_image_t img; 
boost::gil::image_read_settings<jpeg_tag> readSettings; 
boost::gil::read_image(mystream, img, readSettings); 

除第一行中,在剩餘的線不能在boost::gil命名空間中找到的類型和功能,因此,如果上述的線做我無法測試我想要的是。你有什麼想法在哪裏獲得所需的類型和功能?

回答

3

見吉爾的新版本在這裏:gil stable version

它工作得很好,它是穩定的。

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

你的代碼似乎是正確的。

相關問題