Boost logo

Boost Users :

Subject: [Boost-users] [boost::gil] Type conversion in Generic Image Library
From: Nestor Morales Hernández (nestor_at_[hidden])
Date: 2013-07-29 05:19:32


Hello,

I'm a newbie in this library and I feel a little bit lost. I have the
following problem:

I currently have an image of the type ` boost::gil::rgb8c_view_t`. I need
to pass it to a function (from a code I don't mantain) with this prototype:

void function(const boost::gil::rgb8c_view_t& input, const int index, const
boost::gil::rgb8c_view_t::view_t &output)

I have created an output image by using the following syntax:

boost::gil::rgb8c_view_t::view_t
output(input._dynamic_cast<boost::gil::rgb8c_view_t::view_t>());

At this point, the compiler accepts the image output as input for the
function. However, I need the image back to the `boost::gil::rgb8c_view_t`
type. The question is:

- Is it a correct way to allocate the image output?
- How do I transform it back to the type boost::gil::rgb8c_view_t?

Thank you in advance,
Néstor



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net