
I tried to do a fill_pixels, but the thing is I get an error (because I am doing special things) on something like this: typedef pixel<bits32f, devicen_layout_t< num_channels<View>::value >
comp_pixel_t; typedef image<comp_pixel_t, false, std::allocator<unsigned char> > comp_image_t; typedef typename view_type_from_pixel<comp_pixel_t>::type comp_view_t; typedef typename comp_view_t::x_iterator tmp_iterator;
comp_image_t itmp( dst.dimensions( ) ); comp_view_t tmpv( view( itmp ) ); fill_pixels(tmpv, 0); But this is not working... Anyway, thank you Eloi. 2010/1/13 Christian Henning <chhenning@gmail.com>
Hi Eloi, for performance reasons gil is not initializing the array with a default value. Also, I wouldn't trust the compiler to do anything special since it might be different from platform to platform. Just call fill_pixels which in your case ( rgb32f_image_t ) should be reduced to a memset call.
Regards, Christian
On Wed, Jan 13, 2010 at 7:37 AM, Eloi Du Bois <eloi.du.bois@gmail.com> wrote:
Hi all !
I would like to know, when creating an image like that: rgb32f_image_t img(w, h);
is the image filled with 0 by default or should I call fill_pixels ?
Thank you ! Eloi.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users