title: encode and decode bitmap to byte array without compress
body: <p>i'm trying to encode and decode bitmap to byte array without using bitmap.compress but when i decode the array, BitmapFactory.decodeByteArray Always returns NULL</p>
  
  <p>The encode method is below:</p>
  
  <pre><code>public byte[] ToArray(Bitmap b)
  {
      int bytes = b.getByteCount();
  
      ByteBuffer buffer = ByteBuffer.allocate(bytes); //Create a new buffer
      b.copyPixelsToBuffer(buffer); //Move the byte data to the buffer
  
      // DECODE
      String imgString = Base64.encodeToString(buffer.array(), Base64.NO_WRAP);
      byte[] ret = Base64.decode(imgString, Base64.DEFAULT);
      imgString = null;
  
      return ret;
  }
  </code></pre>
  
  <p>Any help?</p>