Here is an example of how you can do transparency, there are other ways I am sure, this one is something I just made. You are probably better of using some kind of array buffer or bank as pixel manipulation can be on the slow side.
Graphics 640,480,32,2
tmp1 = CreateImage(64,64)
tmp2 = CreateImage(64,64)
For y=0 To 63
For x=0 To 63
SetBuffer ImageBuffer(tmp1)
Color 255,0,0
Plot x,y
SetBuffer ImageBuffer(tmp2)
Color 0,255,0
Plot x,y
Next
Next
SetBuffer BackBuffer()
While Not KeyHit(1)
Cls
DrawImage tmp1,100,100
LockBuffer BackBuffer()
LockBuffer ImageBuffer(tmp2)
tx = Sin(angle)*32
For y=0 To 63
For x=0 To 63
color1 = ReadPixelFast(132+tx+x,132+y,BackBuffer())
color2 = ReadPixelFast(x,y,ImageBuffer(tmp2))
colorf = blendColors(color1,color2,0.25)
WritePixelFast(132+tx+x,132+y,colorf,BackBuffer())
Next
Next
UnlockBuffer ImageBuffer(tmp2)
UnlockBuffer BackBuffer()
angle = angle + 1
Flip
Wend
End
Function blendColors( rgb1, rgb2, alpha# )
alpha2# = 1.0 - alpha#
r1 = ((rgb1 Shr 16) And 255) * alpha2#
g1 = ((rgb1 Shr 8) And 255) * alpha2#
b1 = (rgb1 And 255) * alpha2#
r2 = ((rgb2 Shr 16) And 255) * alpha#
g2 = ((rgb2 Shr 8) And 255) * alpha#
b2 = (rgb2 And 255) * alpha#
cf = ( ((r1+r2) Shl 16) + ((g1+g2) Shl 8) + (b1+b2) )
Return cf
End Function
I seem to remember a post a while ago explaining how RGB colors works, just can't find it right now. But its here somewhere, and it might be worth a look.