예제 #1
0
        public static void SetGammaBlue(int gamma)
        {
            if (gamma <= 256 && gamma >= 1)
            {
                RAMPBLUE ramp = new RAMPBLUE();

                ramp.Blue = new ushort[256];
                for (int i = 1; i < 256; i++)
                {
                    int iArrayValue = i * (gamma + 128);

                    if (iArrayValue > 65535)
                    {
                        iArrayValue = 65535;
                    }
                    ramp.Blue[i] = (ushort)iArrayValue;
                }
                SetDeviceGammaRampBLUE(GetDC(IntPtr.Zero), ref ramp);
            }
        }
예제 #2
0
 public static extern bool SetDeviceGammaRampBLUE(IntPtr hDC, ref RAMPBLUE lpRamp);