30 Dec
2013
30 Dec
'13
7:55 p.m.
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