News:

Function Finder  Find all the functions within source code files

Main Menu

Make Green Screen Version of Picture

Started by kevin, September 04, 2010, 11:07:29 PM

Previous topic - Next topic

kevin

 Make Green Screen Version of Picture

  This snippet converts a coloured image into a green screen representation.  To run it, you'll need to supply it with your own image.  


PlayBASIC Code: [Select]
     ; Load your image
img=loadnewfximage("ENTER_LOCATION_AND_NAME_OF_YOUR_PICTURE_HERE")

; scale it to the screen size
scaleimage img,GetScreenWidth(),GetScreenHeight(),1+2

; convert it to gray
grayscaleimage img

; mask off the unwanted channels (AR-B) leave the G channel
rgbmaskimage img,$0000ff00

; show the result
drawimage img,0,0,false

Sync
waitkey