
회전된 bitmap 이미지를 crop 하려고 하는데 가지고 안들어가지네요.
소스에선 이미지 파일을 가지겨나는데 마지막인 비트맵을 어떻게 못가져가나요... 파일로 저장 안하구요.

private void performCrop(Uri picUri) {
try {
Intent cropIntent = new Intent("com.android.camera.action.CROP");
// indicate image type and Uri
cropIntent.setDataAndType(picUri, "image/*");
// set crop properties
cropIntent.putExtra("crop", "true");
// indicate aspect of desired crop
cropIntent.putExtra("aspectX", 1);
cropIntent.putExtra("aspectY", 1);
// indicate output X and Y
cropIntent.putExtra("outputX", 256);
cropIntent.putExtra("outputY", 256);
// retrieve data on return
cropIntent.putExtra("return-data", true);
// start the activity - we handle returning in onActivityResult
startActivityForResult(cropIntent, PIC_CROP);
}
// respond to users whose devices do not support the crop action
catch (ActivityNotFoundException anfe) {
// display an error message
String errorMessage = "Whoops - your device doesn't support the crop action!";
Toast toast = Toast.makeText(this, errorMessage, Toast.LENGTH_SHORT);
toast.show();
}
}
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == PIC_CROP) {
if(resultCode == RESULT_OK){
Log.e("data : " , data.toString());
if (data != null) {
// get the returned data
Bundle extras = data.getExtras();
// get the cropped bitmap
Bitmap selectedBitmap = extras.getParcelable("data");
selectedBitmap = selectedBitmap.createScaledBitmap(bitmap, 450, 200, true);
resultImage.clearFocus();
resultImage.setImageBitmap(selectedBitmap);
}
}else if(resultCode == RESULT_CANCELED){
// 취소 시
}else{
return ;
}
}
}