public void RemoveGreen_3(BufferedWrapper before, float Ratio)
  {
    BufferedWrapper bw = new BufferedWrapper();
    bw.img = BufferedWrapper.CloneImg(before.img);

    Filters.GaussianBlurStatic(bw);
    Filters.MeanBlurStatic(bw);
    Filters.GaussianBlurStatic(bw);
    Filters.GaussianBlurStatic(bw);

    Color c;
    int r, g, b;
    float ratio = Ratio;
    Color a = new Color(4);

    for (int i = 0; i < bw.img.getWidth(); i++)
    {
      for (int j = 0; j < bw.img.getHeight(); j++)
      {
        c = new Color(bw.img.getRGB(i, j));
        r = c.getRed();
        b = c.getBlue();
        g = c.getGreen();

        g = (int) (g * ratio);
        g += 1;//:Lenient
        if (g >= r && g >= b)
        {
          if (g > 100)//:dont remove black
          {
            bw.img.setRGB(i, j, Color.GREEN.getRGB());
          }
        }
      }
    }

    BufferedImage output = new BufferedImage(bw.img.getWidth(),
            bw.img.getHeight(),
            BufferedImage.TYPE_INT_ARGB);

    Graphics G = output.createGraphics();
    G.setColor(new Color(0, 0, 0, 0));
    G.fillRect(0, 0, output.getWidth(), output.getHeight());

    for (int i = 0; i < before.img.getWidth(); i++)
    {
      for (int j = 0; j < before.img.getHeight(); j++)
      {
        if (before.img.getRGB(i, j) == 0)
        {
          continue;
        }

        c = new Color(bw.img.getRGB(i, j));

        if (c.getRGB() != Color.GREEN.getRGB())
        {
          //before.img.setRGB(i, j, TRANSPARENT.getRGB()); 
          G.setColor(new Color(before.img.getRGB(i, j)));
          G.fillRect(i, j, 1, 1);
        }
      }
    }
    
    before.img = BufferedWrapper.CloneImg(output);
  }