Last active
July 24, 2020 14:48
-
-
Save doomSDey/53dd3c889395a40e6e3e4d906928ee7c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private int degreesToFirebaseRotation(int degrees) { | |
switch (degrees) { | |
case 0: | |
return FirebaseVisionImageMetadata.ROTATION_0; | |
case 90: | |
return FirebaseVisionImageMetadata.ROTATION_90; | |
case 180: | |
return FirebaseVisionImageMetadata.ROTATION_180; | |
case 270: | |
return FirebaseVisionImageMetadata.ROTATION_270; | |
default: | |
throw new IllegalArgumentException( | |
"Rotation must be 0, 90, 180, or 270."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment