protected override void ShiftS(int delta, ColorConvert cc)
        {
            int width  = cc.rgbImage.Width;
            int height = cc.rgbImage.Height;

            for (int i = (int)(0.5 * width); i < width; ++i)
            {
                for (int j = 0; j < height; ++j)
                {
                    //int tmpV = cc.hsvImage[i, j].s + delta;
                    cc.hsvImage[i, j].sRreal = cc.hsvImage[i, j].sRreal + delta;

                    if (cc.hsvImage[i, j].sRreal < 0)
                    {
                        cc.hsvImage[i, j].s = 0;
                    }
                    else if (cc.hsvImage[i, j].sRreal >= 100)
                    {
                        cc.hsvImage[i, j].s = 100;
                    }
                    else
                    {
                        cc.hsvImage[i, j].s = (byte)(cc.hsvImage[i, j].sRreal);
                    }
                }
            }
            cc.ConvertHSVimagetoRGB();
        }
        protected override void ShiftH(int delta, ColorConvert cc)
        {
            //cc.ConvertRGBimagetoHSV();
            int width  = cc.rgbImage.Width;
            int height = cc.rgbImage.Height;

            for (int i = (int)(0.5 * width); i < width; ++i)
            {
                for (int j = 0; j < height; ++j)
                {
                    int tmpH = cc.hsvImage[i, j].h + delta;
                    if (tmpH < 0)
                    {
                        cc.hsvImage[i, j].h = (ushort)(tmpH + 360);
                    }
                    else if (tmpH >= 360)
                    {
                        cc.hsvImage[i, j].h = (ushort)(tmpH - 360);
                    }
                    else
                    {
                        cc.hsvImage[i, j].h = (ushort)(tmpH);
                    }
                }
            }
            cc.ConvertHSVimagetoRGB();
        }
        protected virtual void ShiftB(int delta, ColorConvert cc)
        {
            int width  = cc.rgbImage.Width;
            int height = cc.rgbImage.Height;

            for (int i = 0; i < width; ++i)
            {
                for (int j = 0; j < height; ++j)
                {
                    //int tmpV = cc.hsvImage[i, j].v + delta;
                    cc.hsvImage[i, j].vRreal = cc.hsvImage[i, j].vRreal + delta;

                    if (cc.hsvImage[i, j].vRreal < 0)
                    {
                        cc.hsvImage[i, j].v = 0;
                    }
                    else if (cc.hsvImage[i, j].vRreal >= 100)
                    {
                        cc.hsvImage[i, j].v = 100;
                    }
                    else
                    {
                        cc.hsvImage[i, j].v = (byte)(cc.hsvImage[i, j].vRreal);
                    }
                }
            }
            cc.ConvertHSVimagetoRGB();
        }
 public void Undo(ColorConvert cc)
 {
     ShiftH(-deltaH, cc);
 }
 public void Apply(ColorConvert cc)
 {
     ShiftH(deltaH, cc);
 }
 public void Undo(ColorConvert cc)
 {
     ShiftS(-deltaS, cc);
 }
 public void Apply(ColorConvert cc)
 {
     ShiftS(deltaS, cc);
 }
 public void Undo(ColorConvert cc)
 {
     ShiftB(-deltaB, cc);
 }
 public void Apply(ColorConvert cc)
 {
     ShiftB(deltaB, cc);
 }