title: Fast Pixel Search in Java
body: <p>i have a problem regarding a pixel search in java.
  At the moment my Class/Programm is searching pixel by pixel thats to slow for my purposes.
  I wan't Java to search the Pixels much faster so i came to the idea to ask you guys.
  I'm searching for the pixels by an RGB color. This is my Source code:</p>
  
  <pre><code>    final int rot = 0;
      final int gruen = 0;
      final int blau = 0;
      int toleranz = 1;
  
      Color pixelFarbe;
  
      Dimension bildschirm = Toolkit.getDefaultToolkit().getScreenSize();
  
  
      Robot roboter = null;
      try {
          roboter = new Robot();
      } catch (AWTException e) {
          e.printStackTrace();
          OrbitRaider.log("Robot is not working.");
      }
  
      for(int x = 0; x &lt;= bildschirm.getWidth(); x++)
      {
          for(int y = 0; y &lt;= bildschirm.getHeight(); y++)
          {
              // Pixelfarbe bekommen
              pixelFarbe = roboter.getPixelColor(x, y);
  
              // Wenn Pixelfarbe gleich unserer Farbe
              if( (pixelFarbe.getRed() &lt; (rot - toleranz)) || (pixelFarbe.getRed() &gt; (rot + toleranz))
                  &amp;&amp; (pixelFarbe.getGreen() &lt; (gruen - toleranz)) || (pixelFarbe.getGreen() &gt; (gruen + toleranz)) 
                  &amp;&amp; (pixelFarbe.getBlue() &lt; (blau - toleranz)) || (pixelFarbe.getBlue() &gt; (blau + toleranz)) ){("Could not find Pixel Color");
  
              }
  
              else{
                  System.out.println("Pixelcolor found at x: " + x + " y: " + y);
              }
          }
      }
  </code></pre>