I'm trying to create a program in C# that reproduces the functionality of the Nvidia Control Panel, particularly one that adjusts brightness, contrast and gamma per RGB channel for the whole desktop (not just a single image) but without relying on the actual Nvidia control panel itself.
I've managed to do implement the first two using Windows' Magnification API, considering that brightness and contrast are linear transformations of the RGBA color space, just applying a color matrix filter appears to yield similar results. I'm stuck on the implementation of per-channel gamma adjustment, which I know is a non-linear operation, and I'm not quite sure if the aforementioned API allows anything else above simply applying color matrices (unless I'm missing something).
Is there any way that I can apply that per-channel gamma adjustment to the desktop using the Magnification API filter?