title: Resize image from camera in Android
body: <p>I want to resize an image on the sd card and send it to a Web service, the call is asynchronous and <code>ParcelFileDescriptor</code> and <code>CountingInputStreamEntity</code> use to display progress bar. What should I do to resize and send in the same way ! This is my current code:</p>
  
  <pre><code>ParcelFileDescriptor fileDescriptor = context.getContentResolver().openFileDescriptor(uri, "r");
  InputStream in = context.getContentResolver().openInputStream(uri);
  CountingInputStreamEntity entity = new CountingInputStreamEntity(in, fileDescriptor.getStatSize());
  entity.setUploadListener(this);
  entity.setContentType("application/octet-stream");
  put.setEntity(entity);
  </code></pre>
  
  <p>Thanks in Advance.</p>