title: Robot.createScreenCapture is changing the colors
body: <p>Here's the class I wrote to take screenshots:</p>
  
  <pre><code>public class imagemanipulation {
  
      Dimension screenResolution;
      Rectangle screenRectangle;
      Robot robot;
  
      imagemanipulation() {
          try {
              screenResolution = Toolkit.getDefaultToolkit().getScreenSize();
              screenRectangle = new Rectangle(screenResolution);
              robot = new Robot();
          } catch (AWTException ex) {
              Logger.getLogger(imagemanipulation.class.getName()).log(Level.SEVERE, null, ex);
          }
      }
  
      public BufferedImage newScreenshot() {
          BufferedImage image = robot.createScreenCapture(screenRectangle);
          return image;
      }
  
  }
  </code></pre>
  
  <p>What I am doing is using <code>BufferedImagewhatever.getRGB(x,y)</code> on both a screenshot of the screen taken from the above, and coordinates of it to part of another image, then returning the x and y position where a match is found. This works great for black and white images but not colored. The problem I'm having is that <code>createScreenCapture</code> is changing the RGB colors of the screenshot from what they were originally, so when I compare an image taken with <code>createScreenCapture</code> to another image it never works. </p>
  
  <p>I think <code>createScreenCapture</code> must be reducing the amount of colors in the screenshots it takes as to be more efficient, but is there any way I can stop it from doing that?</p>