Boost logo

Boost Users :

Subject: Re: [Boost-users] [GIL] How can I in-place convert some part of view to grayscale.
From: Christian Henning (chhenning_at_[hidden])
Date: 2009-04-10 11:51:49


Mhmm, that's weird. For a quick fix the following is working:

    typedef rgb8_image_t image_src_t;
    typedef gray8_image_t image_dst_t;

    image_src_t dst( 100, 100 );
    image_dst_t src( 100, 100 );

    copy_pixels( color_converted_view< image_dst_t::value_type >(
subimage_view( view( src )
                                                                , 0
                                                                , 0
                                                                , 100
                                                                , 100
                                                                ))
               , color_converted_view< image_dst_t::value_type >( view( dst ))
               );

I'll get back to you once I understand what's going on.

Regards,
Christian


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