ExifInterface
JPEG_ORIENTATION
JPEG_GPS_LOCATION
Camera.Parameters
CaptureRequest.Builder.set()
content://
InputStream
Uri uri; // the URI you've received from the other app InputStream in; try { in = getContentResolver().openInputStream(uri); ExifInterface exifInterface = new ExifInterface(in); // Now you can extract any Exif tag you want // Assuming the image is a JPEG or supported raw format } catch (IOException e) { // Handle any errors } finally { if (in != null) { try { in.close(); } catch (IOException ignored) {} } }
HttpURLConnection
file://
getAttributeInt()
getAttributeDouble()
getAttribute()
TAG_ORIENTATION
ORIENTATION_
int rotation = 0; int orientation = exifInterface.getAttributeInt( ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL); switch (orientation) { case ExifInterface.ORIENTATION_ROTATE_90: rotation = 90; break; case ExifInterface.ORIENTATION_ROTATE_180: rotation = 180; break; case ExifInterface.ORIENTATION_ROTATE_270: rotation = 270; break; }
getLatLong()
getAltitude()
hasThumbnail()
getThumbnail()
byte[]
BitmapFactory.decodeByteArray()
compile "com.android.support:exifinterface:25.1.0"