Boost logo

Boost :

Subject: Re: [boost] [gil][io_new] Problems with templates
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2010-10-24 19:37:42


On 24/10/10 20:06, Christian Henning wrote:
> Hi there, I don't see the woods because of all the trees. Could
> someone get the latest code from here:
>
> http://code.google.com/p/gil-contributions/source/browse/#svn/trunk
>
> and try to compile the following code:
>
> #include <boost/gil/extension/io_new/tiff_all.hpp>
>
> using namespace std;
> using namespace boost;
> using namespace gil;
>
> int main()
> {
> typedef mpl::vector< gray8_image_t
> , gray16_image_t
> , rgb8_image_t
> , gil::detail::gray1_image_t
> > my_img_types;
>
>
> any_image< my_img_types > runtime_image;
>
> read_image( "C:/gil_contributions/test_images/tiff/test.tif"
> , runtime_image
> , tiff_tag()
> );
>
> return 0;
> }
>
> Why do I have this static assertion in read.hpp[662]? I don't
> understand why the two buffer types are different.
>
> Any help is very welcome,

Christian,

I'm not sure myself, but quick look suggests me there are some related
or different problems too:

In gil/extension/io_new/formats/tiff/is_allowed.hpp,
missing template keyword around line 65

p->template read_data< row_buffer_helper_view< View > >( plane, K );

and missing qualifier around line 800 in:

            parent_t::init_image( images
                       , this->_info
                       );

In gil/extension/io_new/formats/tiff/is_allowed.hpp, around line 126

compare_channel_sizes_fn fn( &channel_sizes.front() );

does not seem to match any ctor of compare_channel_sizes_fn.

There is also mismatch of unsigned short* vs unsigned int*.

I will try to continue checking tomorrow.

Best regards,

-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk