Sorry Olivier, I tried some stuff but haven't made much progress. It
still is riddle to me why the code compiles. Should it compile? I
don't know. Hopefully Lubomir can fill in some time.
Regards,
Christian
On Thu, Jan 29, 2009 at 12:44 PM, Olivier Tournaire
Christian,
Thank you for this code. However, I would like the extracted channel to be the same pixel type as the original runtime image. I guess it is possible since if I write the extracted channel view without storing it in a variable (see my first post), it works fine. Here it is:
boost::gil::jpeg_read_image( input_filename , runtime_image ); boost::gil::jpeg_write_view( output_filename , boost::gil::nth_channel_view( view(runtime_image) , channel_index ) );
I just want to be as generic as possible and avoid "if ... else if ..." to get the right pixel type at runtime and thus perform the right dynamic_cast. Is it possible ?
Regards,
Olivier
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users