disable crop frame to resizable in android
I am using below code to crop an image from an intent and the output image size should be 640px. Here my problem is that I have to restrict or disable the crop frame to 640 and it shouldn't be resizable. Intent intent = new Intent("com.android.camera.action.CROP"); intent.setType("image/*");
intent.setData(mImageCaptureUri); intent.putExtra("outputX", 640); intent.putExtra("outputY", 640); intent.putExtra("aspectX", 640); intent.putExtra("aspectY", 640); intent.putExtra("scale", true); intent.putExtra("return-data", true);
I searched on this but had no luck. Thanks for your help in advance.
public void imageGalleryCapture(){
Intent intent = new Intent();
// call android default gallery
intent.setType("image/*");
intent.setAction(Intent.ACTION_PICK);
// code for crop image
intent.putExtra("crop", "true");
intent.putExtra("aspectX", 0);
intent.putExtra("aspectY", 0);
intent.putExtra("outputX", 640);
intent.putExtra("outputY", 640);
try {
intent.putExtra("return-data", true);
startActivityForResult(Intent.createChooser(intent,
"Complete action using"), PICK_FROM_GALLERY);
} catch (ActivityNotFoundException e) {
// Do nothing for now
}
}
链接地址: http://www.djcxy.com/p/36752.html
下一篇: 禁用裁剪框架以在android中调整大小