Boost logo

Boost :

Subject: Re: [boost] [GIL] Pixel Layout Padding?
From: Nathan Crookston (nathan.crookston_at_[hidden])
Date: 2013-12-30 14:55:05


Christian Henning wrote:
> TONGARI J wrote:
>
>> I thought I could plug my custom pixel into GIL elegantly, but I was wrong
>> :(
>> Is GIL not for extending!? The design somewhat prevents the user from
>> customizing their pixels.
>>
> You might be right about adding new pixel types. But adding new color
> spaces is quite easy, as the toolbox extension proves.

FYI, I found it reasonably straightforward to add my own pixel types.
For example, I've adapted std::complex<T> to serve as a pixel type for
data in that colorspace, allowing me to create views and images of it,
and to iterate over channels.

I did have to overload at_c in the gil namespace, which I agree is a
bad idea, and specializing, at_c_impl would be preferable.

Thanks,
Nate


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk