title: The method getRGB(int, int) in the type BufferedImage is not applicable for the arguments (..)
body: <p>I have a TIFF image with some "out of order" detectors (with <code>null</code> columns of pixels), and a previous created Array with index of column and nb of pixel <code>null</code>.
  I am trying to build a code that, scanning image, correct it applying a simple interpolation:</p>
  
  <pre><code>image.setRGB = ((row + numOfDetectors) + (row - 1)/ 2);
  </code></pre>
  
  <p>of neighboring pixels when find <code>null</code> pixel (reading the informations in Array list).</p>
  
  <p>But I'm having a bit of problems with the <code>image.setRGB</code> method.</p>
  
  <pre><code>import java.awt.image.BufferedImage;
  import java.awt.image.DataBufferByte;
  import java.io.File;
  import java.io.IOException;
  import javax.imageio.ImageIO;
  
  public class ArrayInterpolatorNew {
  
  
      // public static void main(String[] args) {
      private static void getPixelData(BufferedImage tif) {
          try { 
  
              String currentDir = new File(".").getAbsolutePath();
              System.out.println ("Current directory: " + currentDir);
  
              //read image file
              File file1 = new File("E:\\ByPass_PAN_C.tif");
              BufferedImage image1 = ImageIO.read(file1);
  
              // Firstly get a pixel
              int pixelValue = image1.getRGB(tif.getWidth(), tif.getHeight());
  
              // Developer may get all the pixels
              int width  = tif.getWidth(null);
              int height = tif.getHeight(null);
              int[] result = new int[height*width];
              int offset;
  
  
              image1.getRGB(0, 0, width, height, result, 0);
  
              //write file
              File file = new File("Resources/ByPass_PAN_C_interpol.tif"); // The file to save to.
              String format = "TIF"; // Example: "PNG" or "JPG"
              BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
  
  
              final byte[] pixels = ((DataBufferByte) image.getRaster().getDataBuffer()).getData();
              final int firstRow = 1;
              final int numOfDetectors = 1;
              int row = tif.getWidth();
              int col = tif.getHeight();
              //int[][] pixels = new int[w][h];
  
              for (int j = 0; j &lt; row; j++) 
  
                  for (int i = 0; i &lt; col; i++) 
                      //result[] = image.getRGB(row, col);
  
                      for(int J = 0; J &lt; firstRow; J++) 
                      {   
                          if (row != J){
                              // set a pixel
                              image.setRGB(row, col, pixelValue);
                              //pixels[row] = [row][col];
  
                          if (row == J){
                              System.out.println("x,y: " + row + ", " + col + "num of Detectors: " + numOfDetectors);
                              //image.setRGB = ((row + numOfDetectors) + (row - 1)/ 2);
                              //tif.setRGB(pixelNoInterpol | pixelInterpol);
  
                          if (row == J &amp;&amp; numOfDetectors &gt; 20){
                              System.out.println("x,y: " + row + ", " + col + "num of Detectors: " + numOfDetectors + "then &gt; 20");
                              image.setRGB(row, col, pixelValue);
                              }
                          }
                      }
                      try {
                          ImageIO.write(image, format, file);
                      } catch (IOException e) {
                          e.printStackTrace();
                      } finally { System.out.println("Images were written succesfully.");}  
                      System.out.println("rest of the code...");
                      }
              }  finally {
                  }     
              }
  }
  </code></pre>