No...I just get a "Memory Block out of range error" when I try to run your code.
Are you sure that should be "640*480*4" ?
It works when I reduce it to *2, but then I get horrible currupted image
((
(the exact same result I get on my code)
--
Incidently, I have just realised this formular dosnt produce the effect I want.
(a+b)/2
Can actualy produce a darker image if "b" is lower then "a"
The effect in Paint Shop Pro (www.jasc.com, I dont use photoshop...overpriced), is quite different...it can only make the image lighter.
Obviously, if using this for explosions or fake lighting, Id only want the image to be lighter :p
I guese the formular is more like:
r=(255-a)
(a+(r/255)*b)
or something.
(ie, it adds the B image, scaleing it to fit in the "gap" between the a value and the max of 255).
---
Regardless, Id be happy if I just got any result at the moment..then I can play with the formular later
"The man who says it cannot be done is generally interrupted by someone doing it." ~ Elbert Hubbard