title: Uploading image taken from gallery app (Quality issue)
body: <p>Using Android's gallery app to select a photo to upload with httppost later. The photo gets uploaded but it's <strong>very low quality and size</strong>. I have been reading about setting the <code>Bitmap.CompressFormat.PNG</code> will make it lossless but it's taking the photo from <code>2000x1500</code> to <code>250x187</code>.</p>
  
  <p>Is it possible that I'm getting the thumbnail and not the actual image? I'm using Photos from Google.</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>@Override
  public void onActivityResult( int requestCode, int resultCode, Intent data ) {
      super.onActivityResult( requestCode, resultCode, data );
  
      if ( resultCode == getActivity().RESULT_OK ) {
          selectedImage = Uri.parse( data.getDataString() );
  
          try {   
              final Bitmap v = DecodeUriImage.Decode( selectedImage, getActivity() );
              ByteArrayOutputStream bao = new ByteArrayOutputStream();
              v.compress( Bitmap.CompressFormat.PNG, 100, bao );
              byte[] byte_arr = bao.toByteArray();
  
              // Add image to array
              images.set( selectedImageIndex, Base64.encodeToString( byte_arr, Base64.DEFAULT ) );
  
              } catch ( FileNotFoundException e ) {
                  e.printStackTrace();
              } catch ( Exception e ) {
                  e.printStackTrace();
              }
          }
      }
  }
  </code></pre>
  
  <p><strong>Result</strong></p>
  
  <p><img src="https://i.stack.imgur.com/YYH91.jpg" alt="Image"></p>