Android开发教程:实现图片的修剪功能
Intent i = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI); i.putExtra("crop", "true"); i.putExtra("outputX", 90); i.putExtra("outputY", 90); i.putExtra("aspectX", 1); i.putExtra("aspectY", 1); i.putExtra("scale", true); startActivityForResult(i, 1);
Intent intent = new Intent("com.android.camera.action.CROP"); intent.setClassName("com.android.camera", "com.android.camera.CropImage"); intent.setData(Uri.fromFile(new File("/sdcard/b.jpg"))); intent.putExtra("outputX", 96); intent.putExtra("outputY", 96); intent.putExtra("aspectX", 1); intent.putExtra("aspectY", 1); intent.putExtra("scale", true); intent.putExtra("return-data", true); startActivityForResult(intent, 3);