Esempio n. 1
0
        private Color ProcessColor(Color inputColor)
        {
            if (EnableGamma)
            {
                var gammaCorrector = new GammaCorrector();

                return(gammaCorrector.Encode(inputColor));
            }

            return(inputColor);
        }
Esempio n. 2
0
 //-----------------------------------------------------------------------------------------------------
 //Гамма-коррекция матриц
 public static RealMatrix[] GetGammaCorrectedMatrices(
     double[] coefficients, double[] powers, params RealMatrix[] matrices
     )
 {
     RealMatrix[] newMatrices = new RealMatrix[matrices.Length];
     for (int index = 0; index < matrices.Length; index++)
     {
         RealMatrix matrix    = matrices[index];
         RealMatrix newMatrix = GammaCorrector.GetGammaCorrectedMatrix(matrix, coefficients, powers);
         newMatrices[index] = newMatrix;
     }
     return(newMatrices);
 }