2013/1/29 Christian Henning <chhenning@gmail.com>
By tag is useful when dealing with swapped channels, like rgb and bgr.
For instance when reading a bmp file I read it as bgr but the end user
most likely wants the rgb format.
I'm not sure I follow your arguments. Why would you care for the tag?
Just take the number of channels and enumerate over them. Is that not
general enough for you?
But maybe you wanna specialize your algorithm by the pixel layout
type, e.g. rgb_layout_t.
Can it handle swapped channels? Like:
>
>>
>> >
>> > And if possible, I hope GIL would just make pixel a Fusion sequence.
>> >
>>
>> I'm very interested in ideas to improve gil! Since I'm not familiar
>> with a fusion sequence could you elaborate a little further.
>
>
> I imagine it to be an Associative Sequence in Fusion (naturally or adapted).
> So I can just use the algorithms provided by Fusion, which seem to overwhelm
> the static_xxxs in GIL.
rgb8_pixel_t a( 10, 20, 30 );
bgr8_pixel_t b( 30, 20, 10 );
assert( get_color( a, red_t() ) == get_color( b, red_t() ) );