public static ExifInterface getExif(@NonNull final Uri imageUri) {
        try (InputStream imageStream = openImageStreamIfLocal(imageUri)) {
            if (imageStream != null) {
                return new ExifInterface(imageStream);
            }
        } catch (final IOException e) {
            Log.e("ImageUtils.getImageOrientation(ExifIf)", e);
        }
        return null;
    }
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