Private Sub Command1_Click()
Dim Alpha
Dim a_RGB
Dim b_RGB
Dim a_RGBr, a_RGBg, a_RGBb
Dim b_RGBr, b_RGBg, b_RGBb
Dim c_RGBr, c_RGBg, c_RGBb
Picture1.ScaleMode = 3
Picture2.ScaleMode = 3
Alpha = 0.5
For y = 0 To 50
For x = 0 To 400
a_RGB = Picture1.Point(x, y )
b_RGB = Picture2.Point(x, y)
a_RGBr = (a_RGB And &HFF0000) / 65536
a_RGBg = (a_RGB And 65280) / 256
a_RGBb = a_RGB And &HFF
'
b_RGBr = (b_RGB And &HFF0000) / 65536
b_RGBg = (b_RGB And 65280) / 256
b_RGBb = b_RGB And &HFF
c_RGBr = Alpha * a_RGBr + (1 - Alpha) * b_RGBr
c_RGBg = Alpha * a_RGBg + (1 - Alpha) * b_RGBg
c_RGBb = Alpha * a_RGBb + (1 - Alpha) * b_RGBb
Picture1.PSet (x, y ), RGB(c_RGBr, c_RGBg, c_RGBb)
Next
Next
End Sub
