//相册 Intent intent = new Intent(Intent.ACTION_PICK); intent.setType("image/*"); startActivityForResult(intent, REQUEST_PICK); //相机 Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(path))); startActivityForResult(intent, REQUEST_CAMEAR); //获取相机拍摄图片 裁剪 if (requestCode == REQUEST_CAMEAR && resultCode == RESULT_OK) { //打开裁剪 Intent intent = new Intent("com.android.camera.action.CROP"); //将图片设置给裁剪 intent.setDataAndType(Uri.fromFile(new File(path)), "image/*"); //设置是否支持裁剪 intent.putExtra("CROP", true); //设置宽高比 intent.putExtra("aspectX", 1); intent.putExtra("aspectY", 1); //设置输出后图片大小 intent.putExt