title: Explanation of the method getPixels for a Bitmap in Android
body: <p>How do I interpret the returned array from build-in method getPixels for a Bitmap?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>public void foo() {
      int[] pixels;
      Bitmap bitmapFoo = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.test2);             
      int height = bitmapFoo.getHeight();
      int width = bitmapFoo.getWidth();
  
      pixels = new int[height * width];
  
      bitmapFoo.getPixels(pixels, 0, width, 1, 1, width - 1, height - 1);     
  }
  </code></pre>
  
  <p>The array "pixels" gets returned with values from -988,602,635 to 1,242,635,509 and that was just from a few colors on a simple PNG file I made.  How can I interpret the numbers that get returned from this method?</p>
  
  <p>Edit:  I realize this single integer represents a color.  I just don't understand how to interpret this single integer into the RBG and alpha values that make up the color.</p>
  
  <p>Thanks.</p>
  
  <p>PS.  If your asking yourself, "what is he trying to do?"  I am trying to figure out a way to dynamically modify the color of a bitmap.</p>