-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic switch based on white detection #25
Comments
I experimented with something like this in the past. It worked, but was very CPU hungry and had several shortcomings, so I decided not to release it. Maybe I should give it another try... |
Very funny, I did try indeed today after my post and went to the exact same result 😁, It is behaving exactly as I want, but takes about 100ms at least to analyze, and cpu loaded at 25%. I trigger the scan every 500ms. I was able to make it all in a distinct C# file so I think I will post my source here in comments soon. I already have several ideas to reduce the load:
|
Hello, I attach my source file here. It is only good for testing purpose, not fully integrated (no menu etc..) To activate it, just call the function "BrightnessDetection.Start();" in the Main() program. If you like this function maybe I will spend some time to improve it, and can propose a pull request maybe (but would prefer if someone else take care of it to make a cleaner work). |
Also see my old branch brightness_detection. |
@Comawhite54 such thing exists in https://github.com/Fushko/gammy @mlaily I hugely support such functionality, I suffer from bright flashes which occur across OS and applications (example here https://github.com/Fushko/gammy/issues/130 ). Simple solution for this is to turn pure white color into black or gray but I don't think NegativeScreen can do that using color matrices. Smarter solution is to limit pixel brightness rise speed. Even smarter solution is to analyze screen smart way and apply this limitation only to big white areas. There is no problem with white, there is problem with it appearing too fast (or being too bright especially on new HDR extra bright monitors). I don't care about cpu usage - health is more important. UPD: just tried filter which overwrites white with black - very bad, unreadable. So limiting speed of reaching white is the only way. |
@Devocub an automatic switch in NegativeScreen (or any other program that detects lightness thresholds with screenshots) will never be instant: there is always some lag between the moment the screen turns black or white and the moment it's detected and the color inversion can occur. Until the automatic inversion kicks in, this detection lag translates into bright flashes of several dozens of milliseconds, which is exactly what we would like to avoid! I'm sorry but I don't see good solutions to this problem that could be implemented in NegativeScreen. |
@mlaily of course it should be blocking way. Actually it is quite possible to do.
I created shader for Reshade which does desired thing. Video, you can see dark things update instantly and bright ones slowly: 2023-03-27.06-06-38.mp4 |
I didn't know about ShaderGlass. That's impressive, and an interesting idea if it doesn't add too much lag. It would completely change the way NegativeScreen is working though. You might as well start from scratch! |
Hello, would there be a way to read the current display and analyze it this way:
If the center of the screen is white/bright, then switch ON, toggle /OFF/ON.
Or if more than 50% of the screen is bright colored.
(maybe not scan the whole screen but just a large square in the center would be more relevant I think).
This is because some apps are already in Dark mode.
The text was updated successfully, but these errors were encountered: