title: Image Uri to File
body: <p>I've got an Image Uri, retrieved using the following:</p>
  
  <pre><code>public Uri getImageUri(Context inContext, Bitmap inImage) {
    ByteArrayOutputStream bytes = new ByteArrayOutputStream();
    inImage.compress(Bitmap.CompressFormat.JPEG, 100, bytes);
    String path = Images.Media.insertImage(inContext.getContentResolver(), inImage, "Title", null);
    return Uri.parse(path);
  }
  </code></pre>
  
  <p>This works just amazing for Intents that require an Image URI, etc (so I know for sure the URI is valid).</p>
  
  <p>But now I want to save this Image URI to a file on the SDCARD. This is more difficult because the URI does not really point at a file on the SDCARD or the app.</p>
  
  <p>Will I have to create a bitmap from the URI first, and then save the Bitmap on the SDCARD or is there a quicker way (preferable one that does not require the conversion to a bitmap first).</p>
  
  <p>(I've had a look at this answer, but it returns file not found - <a href="https://stackoverflow.com/a/13133974/1683141">https://stackoverflow.com/a/13133974/1683141</a>)</p>