Boost logo

Boost Users :

Subject: Re: [Boost-users] [GIL] Black filled or not ?
From: Eloi Du Bois (eloi.du.bois_at_[hidden])
Date: 2010-01-14 08:41:20


That is a very good idea :)

Thank you very much !

Eloi.

2010/1/14 Lubomir Bourdev <lbourdev_at_[hidden]>

> GIL core provides channel-level equivalents for some STL algorithms,
> including std::fill. These have the “static_” prefix since they are
> compile-time recursive:
>
> rgb8_pixel_t p;
> static_fill(p, 10);
> assert(p == rgb8_pixel_t(10,10,10));
>
> http://stlab.adobe.com/gil/html/group___color_base_algorithm_fill.html
>
> Lubomir
>
>
>
> On 1/13/10 11:24 PM, "Nicolas Lelong" <rotoglup_at_[hidden]> wrote:
>
> 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_at_[hidden]>
> 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);
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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