[ANDROID] byte array rotate


[ANDROID] byte array rotate

앱을 landscape로 실행시켰더니 카메라도 같이 돌아가버렸다... camera.setDisplayOrientation(90); 위와 같이 설정을 해도 보이는 화면만 돌아가있지 막상 bitmap을 찍어서 보면 적용이 안되어있어서 골머리를 썩히다가 방법을 찾았다 ! 카메라 onPreviewFrame에서 들어오는 byte array 데이터를 돌리면 된다 ! public static byte[] rotateNV21(byte[] input, int width, int height, int rotation) { byte[] output = new byte[input.length]; try { if (rotation == 0) { System.arraycopy(input, 0, output, 0, input.le..


원문링크 : [ANDROID] byte array rotate