Akim Demaille wrote:
>>"Niels" == Niels van Vliet <van-vl_n(a)lrde.epita.fr> writes:
+FROM_X_TO_RGB(hsi);
+FROM_RGB_TO_X(hsi);
+FROM_X_TO_RGB(hsl);
+FROM_RGB_TO_X(hsl);
+FROM_X_TO_RGB(hsv);
+FROM_RGB_TO_X(hsv);
+FROM_X_TO_RGB(nrgb);
+FROM_RGB_TO_X(nrgb);
+FROM_X_TO_RGB(xyz);
+FROM_RGB_TO_X(xyz);
+FROM_X_TO_RGB(yiq);
+FROM_RGB_TO_X(yiq);
+FROM_X_TO_RGB(yuv);
+FROM_RGB_TO_X(yuv);
These pairs of guys should merged.
Next checkin.
Can't you find a means to store their names in a map and use that map
instead of the series of if? That would be more extensible.
The type of the image (oln::image2d<ntg::T##_8>) could be
generic using templates, but not the name of the function
which is a concatenation:
oln::convert::f_##T##_to_rgb<8, 8>()
Traits could be defined to return the type of the functor
given two colors, but I thought it was over kill. In
fact, I think it is a good idea but it not a priority.
And this traits is not 5 lines long (cf ex2 in gforge).
--
Niels