Ive been trying to work out how to merge to bitmaps with added fade. If i want an even fade between the two pictures the process is quite simple, I can go though the pictures pixel by pixel ,Split the matching pixels into RGB values, add them together
Red =(RedA + RedB) / 2
Green = (GreenA + GreenB) / 2
Blue = (BlueA + BlueB) / 2
This is the average color of the 2 combined.
Now i want to be able to set the level of fade on one PicB as its merged onto pic A (which has no fade).
I tried the same calculation as before but halved (50%) of the color channels for picB
Red = (RedA + (50% of RedB)) / 2
Green = (GreenA + (50% of GreenB)) / 2
Blue = (BlueA + (50% of BlueB)) / 2
but instead of getting a weaker image of picB on top of PicA i just get a darker one.
Does anyone know how i can merge the two pics correctly?
thanks.


