이제는 ExifInterface를 구현했지만 카메라 의도로 찍은 이미지를 회전시키지 않았습니다. 이미지가 세로 대신 가로 방향으로 표시됩니다. 여기 ExifInterface가 이미지를 회전시키지 않습니다.
내 코드입니다 :Intent imageIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
File imagesFolder = new File(Environment.getExternalStorageDirectory(), "My Fodler");
imagesFolder.mkdirs();
File image = new File(imagesFolder, "My_" + timeStamp + ".jpg");
fileUri = Uri.fromFile(image);
ExifInterface exif = null;
try {
exif = new ExifInterface(image.getAbsolutePath());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
int orientation = exif.getAttributeInt(
ExifInterface.TAG_ORIENTATION,
ExifInterface.ORIENTATION_NORMAL);
switch (orientation) {
case ExifInterface.ORIENTATION_ROTATE_270:
rotate = 270;
break;
case ExifInterface.ORIENTATION_ROTATE_180:
rotate = 180;
break;
case ExifInterface.ORIENTATION_ROTATE_90:
rotate = 90;
break;
}
imageIntent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);
startActivityForResult(imageIntent, TAKE_PICTURE);
}
은 내가 잘못 여기서 뭐하는 거지? 도와주세요.
이번이 오리엔테이션에 대해 두 번째 묻는 질문은 두 번째입니까? – jenuine
http://stackoverflow.com/questions/27542693/how-to-change-the-orientation-of-image-taken-by-camera-intent/27542902#27542902 – jenuine