mirror of
				https://github.com/SimpleMobileTools/Simple-Camera.git
				synced 2025-06-27 09:02:59 +02:00 
			
		
		
		
	store exif orientation in a variable
This commit is contained in:
		| @@ -114,13 +114,14 @@ public class Preview extends ViewGroup implements SurfaceHolder.Callback { | ||||
|  | ||||
|     private Bitmap setBitmapRotation(Bitmap bitmap, String path) throws IOException { | ||||
|         final ExifInterface exif = new ExifInterface(path); | ||||
|         if (exif.getAttribute(ExifInterface.TAG_ORIENTATION).equalsIgnoreCase("6")) { | ||||
|         final String orientation = exif.getAttribute(ExifInterface.TAG_ORIENTATION); | ||||
|         if (orientation.equalsIgnoreCase("6")) { | ||||
|             bitmap = rotateImage(bitmap, 90); | ||||
|         } else if (exif.getAttribute(ExifInterface.TAG_ORIENTATION).equalsIgnoreCase("8")) { | ||||
|         } else if (orientation.equalsIgnoreCase("8")) { | ||||
|             bitmap = rotateImage(bitmap, 270); | ||||
|         } else if (exif.getAttribute(ExifInterface.TAG_ORIENTATION).equalsIgnoreCase("3")) { | ||||
|         } else if (orientation.equalsIgnoreCase("3")) { | ||||
|             bitmap = rotateImage(bitmap, 180); | ||||
|         } else if (exif.getAttribute(ExifInterface.TAG_ORIENTATION).equalsIgnoreCase("0")) { | ||||
|         } else if (orientation.equalsIgnoreCase("0")) { | ||||
|             bitmap = rotateImage(bitmap, 90); | ||||
|         } | ||||
|         return bitmap; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user