I have a matrix of data. I use
Colorize[Image[Rescale[data]],ColorFunction->"Rainbow"]
to create an image from the data where the value of each pixel is used to pick a specific colour in the gradient colour scheme "Rainbow".
Now I want, to create an image where the value of each pixel is used as the opacity for a fixed gradient colour scheme from left to right. So, for instance, I want the left of the image to be blue and the right of the image to be red (in a continuous fashion). Then, when the a particular value of the matrix is high, the colour should be bright and when the value is low it should be dark.
Thanks!