如何切割图像矩形600x200?

时间:2017-03-31 18:04:26

标签: image android-studio android-camera graphic

如何根据我的需要修改切割矩形的大小? 我想得到矩形600x200 用户可以调整大小但仅按比例

我使用这样的代码:

private void performCrop() {
Intent cropIntent = new Intent("com.android.camera.action.CROP");
cropIntent.setDataAndType(pickedImage, "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", 600);
cropIntent.putExtra("outputY", 200);
//retrieve data on return
cropIntent.putExtra("return-data", true);
//start the activity - we handle returning in onActivityResult
startActivityForResult(cropIntent, PIC_CROP);}

I do not like square form like here

I like like this :

任何想法?

0 个答案:

没有答案