/**
*
* Galley 에서 작업 하는 것 기기 내에 있는 crop 사용
*
* @param picUri
*/
private
void
performCrop(Uri picUri) {
try
{
Intent cropIntent =
new
Intent(
"com.android.camera.action.CROP"
);
cropIntent.setDataAndType(picUri,
"image/*"
);
cropIntent.putExtra(
"crop"
,
"true"
);
cropIntent.putExtra(
"aspectX"
,
1
);
cropIntent.putExtra(
"aspectY"
,
1
);
cropIntent.putExtra(
"outputX"
,
256
);
cropIntent.putExtra(
"outputY"
,
256
);
cropIntent.putExtra(
"return-data"
,
true
);
startActivityForResult(cropIntent, PIC_CROP);
}
catch
(ActivityNotFoundException anfe) {
String errorMessage =
"Whoops - your device doesn't support the crop action!"
;
Toast toast = Toast.makeText(
this
, errorMessage, Toast.LENGTH_SHORT);
toast.show();
}
}