code: private void process(int x,int y)
      {
          int A = getSourcePixel(x-1,y-1);
          int B = getSourcePixel(x,y-1);
          int C = getSourcePixel(x+1,y-1);
          int D = getSourcePixel(x-1,y);
          int E = getSourcePixel(x,y);
          int F = getSourcePixel(x+1,y);
          int G = getSourcePixel(x-1,y+1);
          int H = getSourcePixel(x,y+1);
          int I = getSourcePixel(x+1,y+1);
          int E0 = E;
          int E1 = E;
          int E2 = E;
          int E3 = E;
          
          if (different(B,H) && different(D,F)) {
              E0 = !different(D,B) ? D : E;
              E1 = !different(B,F) ? F : E;
              E2 = !different(D,H) ? D : E;
              E3 = !different(H,F) ? F : E;
          }
          
          setDestPixel(x*2,y*2,E0);
          setDestPixel((x*2)+1,y*2,E1);
          setDestPixel((x*2),(y*2)+1,E2);
          setDestPixel((x*2)+1,(y*2)+1,E3);
      }
docs: Process a specific pixel. This will generate 4 pixels in the destination
  image based on the scale2x algorithm
  
  @param x The x location in the source image of the pixel to process
  @param y The y location in the source image of the pixel to process