public static void storeBitmap(final Bitmap bitmap, final Bitmap.CompressFormat format, final int quality, final Uri targetUri) {
        final BufferedOutputStream bos = null;
        try {
            bitmap.compress(format, quality, CgeoApplication.getInstance().getApplicationContext().getContentResolver().openOutputStream(targetUri));
        } catch (final IOException e) {
            Log.e("ImageHelper.storeBitmap", e);
        } finally {
            IOUtils.closeQuietly(bos);
        }
    }
Store a bitmap to uri.

@param bitmap    The bitmap to store
@param format    The image format
@param quality   The image quality
@param targetUri Path to store to
main/src/main/java/cgeo/geocaching/utils/ImageUtils.java