
Please use:
fill_pixels( tmpv, comp_pixel_t( 0.f, 0.f, 0.f ));
This call wont be a memset unfortunately. But you could always just
get the char* and memset yourself.
Regards,
Christian
On Wed, Jan 13, 2010 at 11:40 AM, Eloi Du Bois
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
comp_pixel_t; typedef image
comp_image_t; typedef typename view_type_from_pixel ::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
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
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
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users