Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Color Mask?
#1
So how do we make color masks with the "newer" commands?   The old put and get method makes sense but I am clueless as to how to get it to work with _putimage. 

Alpha blending????  How's the color not overwrite the black pixels? Help!

Code: (Select All)
'How to mask?
a$ = Space$(4 + 100)
b$ = Space$(4 + 100)
i& = _NewImage(10, 10, 256)
i2& = _NewImage(10, 10, 256)

Screen 13
Locate 1, 1: Print "Base image"
Line (40, 40)-(49, 49), 15, B
Get (40, 40)-(49, 49), a$
_PutImage (0, 0)-(9, 9), 0, i&, (40, 40)-(49, 49)
Sleep
Locate 1, 1: Print "Color Mask"
Line (40, 40)-(49, 49), 12, BF
Get (40, 40)-(49, 49), b$
_PutImage (0, 0)-(9, 9), 0, i2&, (40, 40)-(49, 49)
Sleep
Cls
_PrintString (10, 10), "Put & And "
Put (200, 10), a$, PSet
Put (200, 10), b$, And
_PrintString (10, 50), "_Putimage & And "

_PutImage (200, 50), i&
Put (200, 50), b$, And

_PrintString (10, 100), "_Putimage & _Putimage "
_PutImage (200, 100), i&
_PutImage (200, 100), i2&
_PrintString (10, 150), "So how do you do a color mask"
_PrintString (10, 159), " with _putimage?"
Reply




Users browsing this thread: 1 Guest(s)