Page 1 of 2
Webcam Light
Posted: Fri Jun 30, 2017 12:42 pm
by chris319
This silly little program opens a resizeable window on your screen.
The light emitted from the window can be used to illuminate a subject in front of a screen which may be appearing on a webcam.
You can easily control the color of the light emitted by the window. The default orange color adds some red to the image, definitely improving the appearance of the image.
To be really ambitious you could run this program on a separate screen or device and use the screen or device as a webcam light. You could also fuss with the brightness/contrast to control the intensity of the light.
Code: Select all
OpenWindow(1,0,0,640,360,"Webcam Light",#PB_Window_SizeGadget|#PB_Window_SystemMenu)
SetWindowColor(1,RGB(255,128,0))
Repeat
event = WaitWindowEvent()
Select event
Case #PB_Event_CloseWindow
CloseWindow(1)
End
EndSelect
ForEver
Re: Webcam Light
Posted: Fri Jun 30, 2017 2:24 pm
by walbus
Code a little optimized
Code: Select all
OpenWindow( 1, 0, 0, 640, 360, "Webcam Light", #PB_Window_SizeGadget | #PB_Window_SystemMenu )
SetWindowColor( 1, $FFFFFF )
While WaitWindowEvent() <> #PB_Event_CloseWindow : Wend
Re: Webcam Light
Posted: Fri Jun 30, 2017 6:47 pm
by luis
Poor Tricks'n'Tips section.
Now I've seen it all

Re: Webcam Light
Posted: Fri Jun 30, 2017 7:37 pm
by walbus
@luis
My answer above was a Joke LOL
I think we want very urgent a forum for beginners for this things

We have not, so , the only right place for this post is the Trashcan...
It's a little sadly for the guy, not good
Re: Webcam Light
Posted: Fri Jun 30, 2017 8:51 pm
by chris319
the only right place for this post is the Trashcan...
Then why did you bother to "optimize" and post the code?
Basically all you did was to change the color.
Re: Webcam Light
Posted: Fri Jun 30, 2017 8:59 pm
by walbus
It's now much brighter Chris, you can even get a sunburn of it

Sorry, but, how can you post such a crap here ?
Re: Webcam Light
Posted: Fri Jun 30, 2017 9:11 pm
by chris319
It's now much brighter Chris, you can even get a sunburn of it

Sorry, but, wow can you post such a crap ?
You're devoting a little too much attention to a "crap" program.
Pay attention before you trash other people's programs:
The default orange color adds some red to the image, definitely improving the appearance.
Re: Webcam Light
Posted: Fri Jun 30, 2017 9:17 pm
by walbus
Sorry chris, but I will not discuss with you
Everything has its limits !
Re: Webcam Light
Posted: Sat Jul 01, 2017 12:01 am
by Sicro
I think his idea is not so bad.
Probably his idea is not yet understood correctly.
Its code creates a window with a monochrome background. This window causes the PC monitor to radiate this color to the PC user or to a object. The PC monitor is thus used as a replacement for a lamp for the webcam.
Re: Webcam Light
Posted: Sat Jul 01, 2017 5:13 am
by chris319
Its code creates a window with a monochrome background. This window causes the PC monitor to radiate this color to the PC user or to a object. The PC monitor is thus used as a replacement for a lamp for the webcam.
Precisely
You're a smart guy.
It illuminates the user's face at approximately eye level if he's looking at the monitor.
Re: Webcam Light
Posted: Sat Jul 01, 2017 8:05 am
by Karellen
I remember a video chat I once had. My image looked awful. Because it was about job offer I felt very mad about this.
I'll keep your simple but clever idea in mind, thanks!

Re: Webcam Light
Posted: Sat Jul 01, 2017 8:43 am
by walbus
@Sicro, Karellen
You can simple open a window on your desktop
Or you can enhance the desktop brightness and color
You can also turn on the light in the room (cool)
Most do not sit in the dark in front of the webcam
Most do not sit with red light in front of the webcam
A code that only opens a window does not belong here, this is programming for preschool children !
Sorry, but, i self think, this is the stup...st thread this year

Re: Webcam Light
Posted: Sat Jul 01, 2017 8:46 am
by Mijikai
Adjust brightness with mousewheel
Code: Select all
If OpenWindow(1,0,0,640,360,"Webcam Light",#PB_Window_SizeGadget|#PB_Window_SystemMenu|#PB_Window_MaximizeGadget)
Repeat: Select WaitWindowEvent()
Case #PB_Event_CloseWindow: Break
Case #WM_MOUSEWHEEL: If C > 255: C = 0: EndIf: SetWindowColor(1,RGB(C,C,C)): C + 42
EndSelect: ForEver
EndIf
Re: Webcam Light
Posted: Sat Jul 01, 2017 9:33 am
by walbus
Incredible new code LOL
Re: Webcam Light
Posted: Sat Jul 01, 2017 10:29 am
by Mijikai
walbus wrote:Incredible new code LOL
Basically i just reposted an improved version of ur "joke"...
If it failed im not the one to blame - obviously.