title: Converting bitmap to byteArray android
body: <p>I have a bitmap that I want to send to the server by encoding it to base64 but I do not want to compress the image in either png or jpeg.</p>
  
  <p>Now what I was previously doing was.</p>
  
  <pre><code>ByteArrayOutputStream byteArrayBitmapStream = new ByteArrayOutputStream();
  bitmapPicture.compress(Bitmap.CompressFormat.PNG, COMPRESSION_QUALITY, byteArrayBitmapStream);
  byte[] b = byteArrayBitmapStream.toByteArray();
  //then simple encoding to base64 and off to server
  encodedImage = Base64.encodeToString(b, Base64.NO_WRAP);
  </code></pre>
  
  <p>Now I just dont want to use any compression nor any format plain simple byte[] from bitmap that I can encode and send to the server.</p>
  
  <p>Any pointers?</p>