blending images?

Blitz3D Forums/Blitz3D Programming/blending images?

blade007(Posted 2007) [#1]
is it possable to blend an image into another one?
like u gather and save a screen hot of game then average it in with another
would look kinda like this?
graphics 800,600,32,1
setbuffer backbuffer()
car=loadimage("car.bmp")
dude_thats_behind_window_in_car=loadimage("dude.bmp")
while not keydown(1)
    drawimage dude_thats_behind_window_in_car,x,y
        blendimagestobackground(car)
  flip
  cls
wend

function blendimagestobackground(car)
  ;stuff goes in here
end function

any ideas how to do this?


Stevie G(Posted 2007) [#2]
This should work .... As you can see ... it's dog slow. The percent param should be between 0 and 1.0.

Stevie




jfk EO-11110(Posted 2007) [#3]
I would rather use a pixelperfect sprite of the image, then use EntityAlpha. That's fast enough to blend multiple images simultanously. There may be some ready to use solutions in the archives.


blade007(Posted 2007) [#4]
it isn't that slow.(only if ur using normal sized images instead of screenshots) anyway thanks stevie. ps how do u make the window inside of the fourms?


Stevie G(Posted 2007) [#5]
{codebox}
YOUR CODE
{/codebox}

But change the {} to []