code: public final void setColors(Color[] colors) {
          int[] pixels = ((DataBufferInt)img.getRaster().getDataBuffer()).getData();
          for (int y = 0; y < height; ++y) {
              for (int x = 0; x < width; ++x) {
                  int idx = x + y * width;
                  if (colors.length <= idx) break;
                  int red   = (int)(colors[idx].getRed()   * 255.0);
                  int green = (int)(colors[idx].getGreen() * 255.0);
                  int blue  = (int)(colors[idx].getBlue()  * 255.0);
                  int alpha = (int)(colors[idx].getAlpha() * 255.0);
                  pixels[idx] = alpha << 24 |
                                red   << 16 |
                                green << 8  |
                                blue;
              }
          }
      }
docs: Sets the color values to this Image.
  
  @param colors
  <<<<<<< HEAD
  The array of Color which size is width * height of this Image.
  =======
  The array of Color which size is width * height of this Image.
  >>>>>>> 16121fd9fe4eeaef3cb56619769a3119a9e6531a