List of utility methods to do Image Orientation Get
int | getOrientation(Context context, Uri imageUri) Gets the orientation. String[] filePathColumn = { MediaColumns.DATA }; Cursor cursor = context.getContentResolver().query(imageUri, filePathColumn, null, null, null); cursor.moveToFirst(); int columnIndex = cursor.getColumnIndex(filePathColumn[0]); String filePath = cursor.getString(columnIndex); cursor.close(); return getCameraPhotoOrientation(context, imageUri, filePath); ... |
String | getOriginalFilePath(Context context, Uri imageUri) Gets the original file path. if (imageUri.getScheme().equals("file")) { return imageUri.getPath(); String[] filePathColumn = { MediaColumns.DATA, MediaColumns.DATA }; Cursor cursor = context.getContentResolver().query(imageUri, filePathColumn, null, null, null); cursor.moveToFirst(); int columnIndex = cursor.getColumnIndex(filePathColumn[0]); ... |