Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
![]() |
•
•
Join Date: Jul 2008
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
hi i'm creating a program with the same effect as the green screen used in the movies and i'm having problem in getting the right value of green colors, but when i uses black or white as a color to be mask it works but not with the green, can anyone give me an advise for this.
thanks
here is my codes
thanks
here is my codes
For k = 0 To pic1.ScaleHeight
clr = GetPixel(pic1.hdc, i, k)
If clr = vbGreen Then
SetPixel pic3.hdc, i, k, vbWhite
Else
SetPixel pic3.hdc, i, k, vbBlack Last edited by Tekmaven : Jul 21st, 2008 at 3:22 pm. Reason: Code tags
•
•
Join Date: Feb 2008
Location: Sivakasi, Tamilnadu, India
Posts: 478
Reputation:
Rep Power: 1
Solved Threads: 83
Hi,
GetPixel() returns the combination of Red, Green and Blue. So the Color you are checking
This will check only Red is 0, Blue is 0 and Green is 255.
But you may need to separate the Color values.
Also u can use Point(X as Single, y as Single) to get the (x,y) Pixel Value instead of GetPixel().
GetPixel() returns the combination of Red, Green and Blue. So the Color you are checking
clr = GetPixel(pic1.hdc, i, k) If clr = vbGreen Then
This will check only Red is 0, Blue is 0 and Green is 255.
But you may need to separate the Color values.
Also u can use Point(X as Single, y as Single) to get the (x,y) Pixel Value instead of GetPixel().
Last edited by selvaganapathy : Jul 21st, 2008 at 11:46 am.
KSG
![]() |
Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Green Screen on laptop (Web Browsers)
- Tecra A1 LCD screen half-missing (Monitors, Displays and Video Cards)
- LCD Monitor - Vertical lines with certain grays (Monitors, Displays and Video Cards)
- lg T710BH problem (Monitors, Displays and Video Cards)
- My monitor is green now???? (Monitors, Displays and Video Cards)
- Windows Media Player crashing or puts a green screen instead of video... (Windows Software)
- green screen (Monitors, Displays and Video Cards)
- Bright green display problem (Windows NT / 2000 / XP / 2003)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: How Can Listbox item displayed like "a,b,c,d"
- Next Thread: challange
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode