Grofit
July 26th, 2009, 05:18 PM
Hey,
Im just trying to do a simple recolour on an image. Basically i have an image and a custom control that has R/G/B sliders, i want to recolour the image pixel by pixel, pretty much like doing a colour overlay on it.
I did something like this in C++ years ago but i cant remember how i did it, i tried doing:
Output.R = Output.R * 0.5f + ColourChange.R * 0.5f;
Output.G = Output.G * 0.5f + ColourChange.G * 0.5f;
Output.B = Output.B * 0.5f + ColourChange.B * 0.5f;
But it just ends up washing it out completely...
Im just trying to do a simple recolour on an image. Basically i have an image and a custom control that has R/G/B sliders, i want to recolour the image pixel by pixel, pretty much like doing a colour overlay on it.
I did something like this in C++ years ago but i cant remember how i did it, i tried doing:
Output.R = Output.R * 0.5f + ColourChange.R * 0.5f;
Output.G = Output.G * 0.5f + ColourChange.G * 0.5f;
Output.B = Output.B * 0.5f + ColourChange.B * 0.5f;
But it just ends up washing it out completely...