Boost logo

Boost Users :

Subject: Re: [Boost-users] [gil] raw image resizing problem
From: Christian Henning (chhenning_at_[hidden])
Date: 2009-05-04 10:26:28


Hi Stephan, please rename your interleaved view from "view" to
something else. That worked for me.

Regards,
Christian

On Mon, May 4, 2009 at 8:58 AM, Stephan Menzel <stephan.menzel_at_gmx.eu> wrote:
> Hi there,
>
> I'm trying to resize an image that comes as a raw RGB8 interleaved buffer into another buffer.
>
> According to the resize.cpp sample that comes with boost that should work like this:
>
> #include <boost/gil/image.hpp>
> #include <boost/gil/image_view_factory.hpp>
> #include <boost/gil/typedefs.hpp>
> #include <boost/gil/extension/numeric/sampler.hpp>
> #include <boost/gil/extension/numeric/resample.hpp>
>
> using namespace boost::gil;
>
> rgb8_view_t view = interleaved_view(orig_width, orig_height, reinterpret_cast<rgb8_ptr_t>(original_buffer), orig_width * 3);
> rgb8_image_t scaled(new_width, new_height);
> resize_view(view, view(scaled), bilinear_sampler());
>
> I'm getting an compile error in the resize_image line though and don't know what to make of it:
>
>  : error C2664: 'boost::gil::pixel<ChannelValue,Layout> &boost::gil::image_view<Loc>::operator ()(const boost::gil::point2<T> &) const' : cannot convert parameter 1 from 'boost::gil::rgb8_image_t' to 'const boost::gil::point2<T> &'
> 1>        with
> 1>        [
> 1>            ChannelValue=boost::gil::bits8,
> 1>            Layout=boost::gil::rgb_layout_t,
> 1>            Loc=boost::gil::rgb8_loc_t,
> 1>            T=ptrdiff_t
> 1>        ]
> 1>        and
> 1>        [
> 1>            T=ptrdiff_t
> 1>        ]
> 1>        Reason: cannot convert from 'boost::gil::rgb8_image_t' to 'const boost::gil::point2<T>'
> 1>        with
> 1>        [
> 1>            T=ptrdiff_t
> 1>        ]
> 1>        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
>
> Any ideas?
>
> Thanks...
>
> Stephan
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


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