CLEAR ALL
BITMAP 1 LOAD "6Z4.gif"
BITMAP 2 COPY BITMAP 1
SPRITE 1 BIND BITMAP 2 SHOW FILL
GETKEY a$
TARGET BITMAP 2
PIXEL OPERATOR PXO_SUB
PIXEL MASK $00FFFFFF ' ABGR hex; don't write to the alpha channel
FOR i=0 TO 63
    ' take the red-green-blue channels down by 4 to 0
    ' done 64 times this effectively fades the bitmap down to black
    FILL RGB(4,4,4)
    PAUSE
NEXT i
GETKEY a$
BITMAP 2 COPY BITMAP 1
GETKEY a$
PIXEL OPERATOR PXO_ADD
PIXEL MASK $00FFFFFF ' ABGR hex; don't write to the alpha channel
FOR i=0 TO 63
    ' take the red-green-blue channels up by 4 to 256
    ' done 64 times this effectively fades the bitmap up to white
    FILL RGB(4,4,4)
    PAUSE
NEXT i
GETKEY a$
