-
July 26th, 2009, 05:18 PM
#1
Pixel Image Recolouring
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...
-
July 27th, 2009, 12:28 AM
#2
Re: Pixel Image Recolouring
Here what are the object types of Output and ColourChange ? Are they type of Colour class ?
-
July 27th, 2009, 02:17 AM
#3
Re: Pixel Image Recolouring
Yep, although it comes out as an int i convert it into a colour then recolour and pass it back in.
Im thinking that maybe the problem is that im not storing the original image, just a static image that contains the changes, so after a while it will get washed out as it will lose 1/2 its colour every change. So i may need to update that, but im still not sure off top of my head if my method is correct...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|