Closed 7449 closed 6 years ago
pickFromCamera 改成这样
int version = android.os.Build.VERSION.SDK_INT; if (version < 24) { cropperHandler.getActivity().startActivityForResult(new Intent(MediaStore.ACTION_IMAGE_CAPTURE). putExtra(MediaStore.EXTRA_OUTPUT, cameraCacheUri), CropperParams.REQUEST_PICK_CAMERA); } else { ContentValues contentValues = new ContentValues(1); contentValues.put(MediaStore.Images.Media.DATA, cameraCacheUri.getPath()); contentValues.put(MediaStore.Images.Media.MIME_TYPE, "image/jpeg"); Uri uri = cropperHandler.getActivity().getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, contentValues); cropperHandler.getActivity().startActivityForResult(new Intent(MediaStore.ACTION_IMAGE_CAPTURE). putExtra(MediaStore.EXTRA_OUTPUT, uri), CropperParams.REQUEST_PICK_CAMERA); }
好的 感谢您的建议
如果不想配置裁剪比列 怎么办?
@494928699 更新下代码,使用
@Override public CropperParams getParams() { //不约束裁切比例都传入0 return new CropperParams(0, 0); }
裁剪速度很慢怎么办,cpu使用率只有14-15%
Album,用这个吧,用的Ucrop,自己可以设置options
pickFromCamera 改成这样