case PICK_FROM_ALBUM:
{
cropFile = Environment.getExternalStorageDirectory() + "/temp.jpg";
mImageCaptureUri = imgData.getData();
}
case PICK_FROM_CAMERA:
{
photo = null;
try {
if(cameraSeCd == PICK_FROM_ALBUM){
cropFile = getRealPathFromURI(mImageCaptureUri);
} else {
cropFile = Environment.getExternalStorageDirectory() + "/temp.jpg";
}
// BitmapFactory.decodeFile(cropFile);
System.out.println("before cropFile : " + cropFile);
System.out.println("before mImageCaptureUri : " + mImageCaptureUri );
System.out.println("before bitmap : " + (Bitmap)Images.Media.getBitmap(getContentResolver(), mImageCaptureUri));
Intent intent = new Intent("com.android.camera.action.CROP");
intent.setDataAndType(mImageCaptureUri, "image/*");
if(profileSeCd == MAIN_PROFILE){
intent.putExtra("aspectX", 1);
intent.putExtra("aspectY", 1);
} else {
intent.putExtra("aspectX", 4);
intent.putExtra("aspectY", 3);
}
intent.putExtra(MediaStore.EXTRA_OUTPUT, getTempUri());// 임시파일 생성
intent.putExtra("outputFormat", Bitmap.CompressFormat.JPEG.toString());
intent.putExtra("return-data", false);
startActivityForResult(intent, CROP_FROM_CAMERA);
} catch (Exception e) {}
break;
}
1. 첫번째는 CROP으로 보내긴했는데 데이터가 URI 나 파일이 안받아와져서 사용 방법이 잘못되었나 확인해보았지만 도저히 찾지 못해 질문드립니다.
2. CROP 으로 갈때 다른 앱에서 CROP 하는 알림창이 안떳으면 좋겠는데 어떻게 해야하나요 .