Example #1
0
            public override ColorBgra Apply(ColorBgra color)
            {
                byte lumi = color.GetIntensityByte();
                int  diff = Curve[lumi] - lumi;

                return(ColorBgra.FromBgraClamped(
                           color.B + diff,
                           color.G + diff,
                           color.R + diff,
                           color.A));
            }
Example #2
0
            public override ColorBgra Apply(ColorBgra color)
            {
                byte lumi = color.GetIntensityByte();
                int diff = Curve[lumi] - lumi;

                return ColorBgra.FromBgraClamped(
                    color.B + diff,
                    color.G + diff,
                    color.R + diff,
                    color.A);
            }
Example #3
0
            public override ColorBgra Apply(ColorBgra color)
            {
                //adjust saturation
                byte intensity = color.GetIntensityByte();
                color.R = Utility.ClampToByte((intensity * 1024 + (color.R - intensity) * satFactor) >> 10);
                color.G = Utility.ClampToByte((intensity * 1024 + (color.G - intensity) * satFactor) >> 10);
                color.B = Utility.ClampToByte((intensity * 1024 + (color.B - intensity) * satFactor) >> 10);

                HsvColor hsvColor = HsvColor.FromColor(color.ToColor());
                int hue = hsvColor.Hue;

                hue += hueDelta;

                while (hue < 0)
                {
                    hue += 360;
                }

                while (hue > 360)
                {
                    hue -= 360;
                }

                hsvColor.Hue = hue;

                ColorBgra newColor = ColorBgra.FromColor(hsvColor.ToColor());
                newColor = blendOp.Apply(newColor);
                newColor.A = color.A;

                return newColor;
            }
Example #4
0
 public override ColorBgra Apply(ColorBgra color)
 {
     byte i = color.GetIntensityByte();
     return ColorBgra.FromBgra(i, i, i, color.A);
 }
            public override ColorBgra Apply(ColorBgra color)
            {
                byte i = color.GetIntensityByte();

                return(ColorBgra.FromBgra(i, i, i, color.A));
            }