This project is read-only.

Colorize an image

Jul 22, 2014 at 5:34 PM
I just want to colorize an image (get it all greenish or whatever color is set). I use code like this:
                wb.ForEach((x, y, color) =>
                    HSVColor hsv = ColorHelper.RGBtoHSV(color);
                    hsv.H = baseColorHSV.H;
                    hsv.S = baseColorHSV.S;
                    return ColorHelper.HSVtoRGB(hsv);
But that's very slowwwww. Any faster way to do this?
Jul 22, 2014 at 7:20 PM
Check out the code of the ForEach and just implement it with your code but without the extra method call of the delegate. Also try to inline your RGB to HSV conversion and avoid the color struct transformation.