These are my image manipulate functions:
function getcolor(mem,x,y)
pixel=((y-1)*memblock dword(mem,4))+(x-1)
color=memblock dword(mem,(pixel*4)+12)
endfunction color
function setcolor(mem,x,y,color)
pixel=((y-1)*memblock dword(mem,4))+(x-1)
write memblock dword mem,(pixel*4)+12,color
endfunction
function setRGB(mem,x,y,r,g,b)
pixel=((y-1)*memblock dword(mem,4))+(x-1)
write memblock byte mem,(pixel*4)+12,b
write memblock byte mem,(pixel*4)+13,g
write memblock byte mem,(pixel*4)+14,r
endfunction
function setA(mem,x,y,a)
pixel=((y-1)*memblock dword(mem,4))+(x-1)
write memblock byte mem,(pixel*4)+15,a
endfunction
function getR(mem,x,y)
pixel=((y-1)*memblock dword(mem,4))+(x-1)
r=memblock byte(mem,(pixel*4)+14)
endfunction r
function getG(mem,x,y)
pixel=((y-1)*memblock dword(mem,4))+(x-1)
g=memblock byte(mem,(pixel*4)+13)
endfunction g
function getB(mem,x,y)
pixel=((y-1)*memblock dword(mem,4))+(x-1)
b=memblock byte(mem,(pixel*4)+12)
endfunction b
function getA(mem,x,y)
pixel=((y-1)*memblock dword(mem,4))+(x-1)
a=memblock byte(mem,(pixel*4)+15)
endfunction a
So if you have an image, you should do:
make memblock from image 1,image
Where image is the number of your image.
Then you can change the alpha for a pixel using:
Where alpha can reach from 0(totally transparent) to 255(solid).
After you're finished with changing the alpha values you do this:
make image from memblock image,1
Then you've done it.
But I don't know how you were planning to know which alpha value each pixel needs, unless you make some sort of opacity AVI, or you do it by color intensity.
Kevil