Hi all,
I am trying to use GIL and face a problem. Here is the code :
namespace boost
{
namespace gil
{
/// Extension a GIL pour gerer les pixels "double" ...
typedef pixel< double, boost::gil::gray_layout_t > gray64_pixel_t;
typedef image< gray64_pixel_t, false > gray64_image_t;
typedef image< gray64_pixel_t, true > gray64_planar_image_t;
//typedef image_view< gray64_pixel_t > gray64_view_t;
}
}
int main ( int argc , char **argv)
{
typedef boost::mpl::vector<
boost::gil::gray8_image_t,
boost::gil::gray16_image_t,
boost::gil::gray32_image_t,
//boost::gil::gray64_image_t,
boost::gil::rgb8_image_t,
boost::gil::rgb16_image_t,
boost::gil::rgb32_image_t > my_img_types;
typedef boost::mpl::vector<
boost::gil::gray8_view_t,
boost::gil::gray16_view_t,
boost::gil::gray32_view_t,
//boost::gil::gray64_view_t,
boost::gil::rgb8_view_t,
boost::gil::rgb16_view_t,
boost::gil::rgb32_view_t > my_view_types;
if ( argc < 4 )
{
usage();
return 1;
}
std::string input_filename( argv[1] );
std::string output_filename( argv[3] );
int channel_index;
try
{
channel_index = boost::lexical_cast<int>( argv[2] );
}
catch( boost::bad_lexical_cast &e)
{
std::cout << "bad_lexical_cast exception : " << e.what() <<
std::endl;
return 1;
}
boost::gil::any_image