title: Issue in base64 encoding and decoding of high resolution image in Android
body: <p>I am using Base64 for converting image to string and i do this using below code</p>
  
  <pre><code> Bitmap bitmap = BitmapFactory.decodeResource(getResources(),R.drawable.facebook);  
           ByteArrayOutputStream stream = new ByteArrayOutputStream();
              bitmap.compress(Bitmap.CompressFormat.PNG,100 , stream);
              byte [] byte_arr = stream.toByteArray();
              String image_str = Base64.encodeToString(byte_arr, Base64.NO_WRAP);
  </code></pre>
  
  <p>by using name value pair i will send this image to server and in another activity i need to fetch this image and i use following code to decode the image</p>
  
  <pre><code>byte[] decodedString = Base64.decode(imageStr, Base64.NO_WRAP);
                  Bitmap decodedByte = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);
  
  
                  System.out.println("bitmap "+decodedByte);
                  imageViewProfile.setImageBitmap(decodedByte);   
  </code></pre>
  
  <p>wheni print this decodedByte it will give null.. </p>
  
  <p>and if the image is of small resolution it will work perfectly,, thanks for any help</p>