Gradient effects on an Image

Good Day, I was wondering if there is a way to put gradient effect on an image? not a rectangle, but an image. I was doing composite, but it just put the paint1 and paint2 on top of each other.

Here is my code:

local image\_name = "Assets/landscape1.png" local image\_outline = graphics.newOutline( 2, image\_name ) -- local newBG = display.newImageRect( image\_name, 640, 305 ) local newBG = display.newRect(0,0,640,305) newBG.x = \_W/2 newBG.y = \_H/2 local paint = { type = "composite", paint1 = { type = "image", filename = image\_name }, paint2 = { type = "gradient", color1 = { 1, 0, 0, 0 }, color2 = { 1, 0, 0, 1 }, effect = "generator.linearGradient"} } newBG.fill = paint newBG.fill.effect = "composite.average"

I also provided an Image. Thanks in advance