Depending on if you can rely on a boost gil extension, numeric/pixel_numeric_operations.hpp has a zero_channels function.

This would give (untested) :

comp_pixel_t black;
zero_channels( black );
fill_pixels( tmpv, black );

Cheers,
Nicolas

On Wed, Jan 13, 2010 at 9:45 PM, Eloi Du Bois <eloi.du.bois@gmail.com> wrote:
Okay, I see.
But the problem is that I don't know the pixel number of channel. It have to be full generic.
That's why I am trying this (unsuccessfully):
    comp_pixel_t black;
    color_convert( bgil::gray8_pixel_t( 0 ), black );
    fill_pixels( tmpv, black);