Question

Does anyone know how to apply effects to the entire screen, in c# or any programming language. I'm mostly interested in making the screen monochrome (specifically green-white instead of black white).

I know a cross-graphic card solution is possible because I found a program that can do it: http://www.freedomscientific.com/products/lv/magic-bl-product-page.asp

Anyone knows how to accomplish something this or where to look?

Thanks !!

Was it helpful?

Solution

There is no easy Windows API to modify the entire screen contents. But this could be done at the device driver level.

Otherwise you have to resort to some Windows API tricks: place a "fake" window over the entire desktop, in a loop: grab the entire screen contents without grabbing fake window contents, do your processing to get the monochrome effect, then display that on the fake window. Yes, it's hacky and slow, but possible. Even more hacky, when you get mouse clicks to "go through" the fake window (lots of SetWindowsRgn calls).

So cross-platform here means using GDI, though some older DirectDraw APIs might work, in that case, you have a much easier time with hardware overlays (and better performance). Though I'm not sure how many cards actually support hardware overlays, and if newer versions of windows support the older DirectDraw APIs.

One more possibility is if the video card has a C# or C++ or C API, then you can do whatever you want with the card without writing device driver code.

Then there's CUDA, but I haven't yet tried that out. I know it's for stream processing on nVidia boards, but I wonder if it could get you an easy backdoor into the video display stuff.

OTHER TIPS

To help people in the future who are interested in this:

This is possible with the Magnification API's color effect method. This allows one to use a matrix that can be applied to the whole screen.

NegativeScreen is an open source project that implements the feature you are describing in C#.

Unfortunately, this only works with affine transformations, as the API takes only an augmented matrices rather than a delegate or something.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top