title: Bitmap.createBitmap has all pixels set to 0
body: <p>I am trying to create a bitmap from an int array, but the resulting bitmap is all 0.</p>
  
  <p><strong>Scenario</strong>
  I have an app which takes a raw image and then does some post processing on the raw image. After this processing, I am trying to save the resulting byte array as a JPEG image and here is where I am converting the array to a bitmap so that it can be saved as a JPG.</p>
  
  <pre><code>int [] rgbArray = getColor( returnValue ); // converts the image to an int array
  Bitmap image = Bitmap.createBitmap( rgbArray, 1008, 758, Bitmap.Config.ARGB_8888 );
  </code></pre>
  
  <p>But the <code>image</code> has every pixel set to 0 and the resulting Jpeg is all black. 
  I wonder if you can give any pointers as to why this should be the case?</p>
  
  <p>I tried printing out the various get functions from the Bitmap to see if it gives any clue.</p>
  
  <pre><code>Bitmap getHeight() 758
  Bitmap getWidth() 1008
  Bitmap describeContents() 0
  Bitmap getByteCount() 3056256
  Bitmap getConfig() ARGB_8888
  Bitmap isRecycled() false
  Bitmap isPremultiplied() true
  Bitmap hasAlpha() true
  Bitmap getColorSpace() sRGB IEC61966-2.1 (id=0, model=RGB)
  </code></pre>
  
  <p>I am new to android programming, so any pointers would be extremely helpful. Thanks in advance.</p>
  
  <p><strong>Update</strong>
  If I <code>setPremultiplied( false );</code> for the Bitmap, it works fine. I guess my immediate problem is solved if i set Premultiplied to false.</p>