|
![](/i/fill.gif) |
Chris Huff wrote:
>
>
> I have been wondering about making these conversion functions for a long
> time, the only thing stopping me is a complete lack of knowledge of
> these color spaces and converting between them. I have also been
> thinking a post_process filter which does this would be useful.
>
I didn't knew about them either, but with help of CG Bible (by Damn,
Fool et al;-) and colorspace FAQ from POV-Ray CD it appeared to be not
too hard to implement.
> > If this is good idea, then how should it be implemented? As functions?
> > Which form would be preferable:
> > rgb2hsv(COLOUR) or
> > COLOUR rgb2hsv(COLOUR)?
>
> I would definitely choose the second syntax, the first would only cause
> trouble. The function should take and return a color.(I used a vector
> function for eval_pigment(), so it doesn't return an actual color. That
> means it loses filter and transmit, but I didn't know how to add a new
> class of functions which returns a color.)
For color space conversion filter and transmit have no value, so
probably those functions could use vector type as well. This means, that
conversion vector<=>colour should be available (is it?).
> The post_process versions wouldn't require any parameters.
I'm not sure I that understand this, (I haven't observed post-processing
evolvement very closely), care to explain?
Post a reply to this message
|
![](/i/fill.gif) |