//@Override
 public Image process(Image imageIn)
 {
     imageIn = noisefx.process(imageIn);
     imageIn = gradientFx.process(imageIn);
     imageIn = vignetteFx.process(imageIn);
     return imageIn;
 }
        public Image process(Image imageIn)
        {
            int tr = (255 << 24) + (Colors.Red.R << 16) + (Colors.Red.G << 8) + Colors.Red.B;
            int tg = (255 << 24) + (Colors.Green.R << 16) + (Colors.Green.G << 8) + Colors.Green.B;
            int tb = (255 << 24) + (Colors.Blue.R << 16) + (Colors.Blue.G << 8) + Colors.Blue.B;
            int r, g, b;
            for (int x = 0; x < imageIn.getWidth(); x++)
            {
                for (int y = 0; y < imageIn.getHeight(); y++)
                {
                    r = (255 - imageIn.getRComponent(x, y));
                    g = (255 - imageIn.getGComponent(x, y));
                    b = (255 - imageIn.getBComponent(x, y));

                    // Convert to gray with constant factors 0.2126, 0.7152, 0.0722
                    int gray = (r * 6966 + g * 23436 + b * 2366) >> 15;

                    // Apply Tint color
                    r = (byte)((gray * tr) >> 8);
                    g = (byte)((gray * tg) >> 8);
                    b = (byte)((gray * tb) >> 8);

                    imageIn.setPixelColor(x, y, r, g, b);
                }
            }
            return imageIn;
        }
        //@Override
        public Image process(Image imageIn)
        {
            clone = imageIn.clone();
              int width = imageIn.getWidth();
              int height = imageIn.getHeight();
              for(int x = 0 ; x < width; x++){
                  for(int y = 0 ; y < height ; y++){
                        double   un_x = 0, un_y = 0 ;
                        double[] result = calc_undistorted_coord (x, y, un_x, un_y) ;
                        un_x = result[0];un_y = result[1];
                        int crNull = 0xFFFFFF;//WHITE
                        int cr  = crNull ;
                        if ( (un_x > -1) && (un_x < width) && (un_y > -1) && (un_y < height) )
                        {
                            // only this range is valid
                            int nSrcX = ((un_x < 0) ? -1 : (int)un_x);
                            int nSrcY = ((un_y < 0) ? -1 : (int)un_y);
                            int nSrcX_1 = nSrcX + 1;
                            int nSrcY_1 = nSrcY + 1;

                            int[] color = new int[4];
                            color[0] = IsInside(width, height, nSrcX, nSrcY) ? clone.getPixelColor(nSrcX,nSrcY) : crNull;
                            color[1] = IsInside(width, height, nSrcX_1, nSrcY) ? clone.getPixelColor(nSrcX_1,nSrcY) : crNull;
                            color[2] = IsInside(width, height, nSrcX, nSrcY_1) ? clone.getPixelColor(nSrcX,nSrcY_1) : crNull;
                            color[3] = IsInside(width, height, nSrcX_1, nSrcY_1) ? clone.getPixelColor(nSrcX_1,nSrcY_1) : crNull;
                            cr = GetBilinear(un_x-nSrcX, un_y-nSrcY, color);
                        }
                        imageIn.setPixelColor(x, y, cr);
                  }
              }
            return imageIn;
        }
        //@Override
        public override Image process(Image imageIn)
        {
            int width = imageIn.getWidth();
            int height = imageIn.getHeight();
            int r = 0, g = 0, b = 0;

            Image clone = imageIn.clone();
            clone.clearImage((255 << 24) + (Colors.LightGray.R << 16) + (Colors.LightGray.G << 8) + Colors.LightGray.B);
            Point[] point = new Point[BannerNum];
            if (this.IsHorizontal)
            {//ˮƽ����
                int dh = height / BannerNum;
                int dw = width;
                for (int i = 0; i < BannerNum; i++)
                {
                    point[i] = new Point(0, i * dh);
                }
                for (int x = 0; x < dh; x++)
                {
                    for (int y = 0; y < BannerNum; y++)
                    {
                        for (int k = 0; k < dw; k++)
                        {
                            int xx = (int)point[y].X + k;
                            int yy = (int)point[y].Y + (int)(x / 1.1);
                            r = imageIn.getRComponent(xx, yy);
                            g = imageIn.getGComponent(xx, yy);
                            b = imageIn.getBComponent(xx, yy);
                            clone.setPixelColor(xx, yy, r, g, b);
                        }
                    }
                }
                //��ͼ�����ಿ�������
                for (int xx = 0; xx < width; xx++)
                {
                    for (int yy = (int)point[BannerNum - 1].Y + dh; yy < height; yy++)
                    {
                        r = imageIn.getRComponent(xx, yy);
                        g = imageIn.getGComponent(xx, yy);
                        b = imageIn.getBComponent(xx, yy);
                        clone.setPixelColor(xx, yy, r, g, b);
                    }
                }
            }
            else
            {//��ֱ����
                int dw = width / BannerNum;
                int dh = height;
                for (int i = 0; i < BannerNum; i++)
                {
                    point[i] = new Point(i * dw, 0);
                }
                for (int x = 0; x < dw; x++)
                {
                    for (int y = 0; y < BannerNum; y++)
                    {
                        for (int k = 0; k < dh; k++)
                        {
                            int xx = (int)point[y].X + (int)(x / 1.1);
                            int yy = (int)point[y].Y + k;
                            r = imageIn.getRComponent(xx, yy);
                            g = imageIn.getGComponent(xx, yy);
                            b = imageIn.getBComponent(xx, yy);
                            clone.setPixelColor(xx, yy, r, g, b);
                        }
                    }
                }
                //��ͼ�����ಿ�������
                for (int yy = 0; yy < height; yy++)
                {
                    for (int xx = (int)point[BannerNum - 1].X + dw; xx < width; xx++)
                    {
                        r = imageIn.getRComponent(xx, yy);
                        g = imageIn.getGComponent(xx, yy);
                        b = imageIn.getBComponent(xx, yy);
                        clone.setPixelColor(xx, yy, r, g, b);
                    }
                }
            }
            return clone;
        }
 //@Override
 public Image process(Image imageIn)
 {
     Image clone = gradientFx.process(imageIn.clone());
     return blender.Blend(imageIn, clone);
 }
 //@Override
 public Image process(Image imageIn)
 {
     imageIn = this.gradientMapFx.process(imageIn);
     imageIn = this.blender.Blend(imageIn, imageIn);
     return imageIn;
 }