Thank you, you are totally right for hsl :). I didn't saw that...
I found how to do what I need for other cases:

typedef pixel<typename channel_type< Pixel >::type, rgb_layout_t > rgb_pixel_t;

2009/12/15 Christian Henning <chhenning@gmail.com>
Hi Eloi,

for homogeneous pixel types ( like rgb8_pixel_t ) or packed_pixel
types there is no bits member. Can you describe what you want in more
detail? Also hsl pixel is only defined for 32f ( hsl32f_pixel_t ).

Regards,
Christian

On Tue, Dec 15, 2009 at 11:01 AM, Eloi Du Bois <eloi.du.bois@gmail.com> wrote:
> Hi all,
>
> I would like to know how to change the layout of a given pixel type.
> For example, I would like to do something like:
>
> // Pixel = rgb16_pixel_t for example.
> template<class Pixel>
> void foo(Pixel & A) {
>     typedef typename pixel<hsl_t, Pixel::bits>::type hsl_pixel_t;
>     hsl_pixel_t a;
>     color_convert(A, a);
> }
>
>
> Thank you by advance,
> 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