-1
我試着在下面的代碼中用像素(2448 * 3264)裁剪大圖像。但是,這個過程不能正常工作。請更正下面的代碼或給我另一個解決方案來實現這個圖像裁剪過程。向所有人表示感謝。用2448×3264分辨率裁剪大圖像
private void performCrop(){
try {
Intent cropIntent = new Intent("com.android.camera.action.CROP");
cropIntent.setDataAndType(UrlGambar, "image/*");
cropIntent.putExtra("crop", "true");
cropIntent.putExtra("aspectX", 2);
cropIntent.putExtra("aspectY", 3);
//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();
}
}
}