Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. public void onPictureTaken(byte[] data, final Camera camera) {
  2. Bitmap bitmap;
  3. Matrix matrix = new Matrix();
  4.  
  5. if (currentCameraId == Camera.CameraInfo.CAMERA_FACING_BACK) {
  6. matrix.postRotate(90);
  7.  
  8. } else {
  9.  
  10. Matrix matrixMirrory = new Matrix();
  11. float[] mirrory = {-1, 0, 0, 0, 1, 0, 0, 0, 1};
  12. matrixMirrory.setValues(mirrory);
  13. matrix.postConcat(matrixMirrory);
  14. matrix.postRotate(90);
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement