I need to apply a blue to yellow gradient to a bitmap.
The factor here is the brightness.
The dark areas of the photo need to be blueish and the brightest area’s yellow.
So the brightness of every pixel needs to be taken as a factor.
Can someone help me how to accomplish this in c++ or java?
The input is an array of rgb integer values of the original photo.
If I understood you correctly, the following (applied to all pixels individually) should do what you want: