How to crop camera images. Now it displays the image for cropping and after selecting the cropping section when you click the " Save " button. Its display is " save image ". After that, nothing happens. Here is my code.
Button:
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT, MediaStore.Images.Media.EXTERNAL_CONTENT_URI.toString()); intent.putExtra("crop", "true"); intent.putExtra("aspectX", 0); intent.putExtra("aspectY", 0); intent.putExtra("outputX", 200); intent.putExtra("outputY", 150); intent.putExtra("return-data", true); startActivityForResult(intent, CAMERA_PIC_REQUEST);
onActivityResult:
Bundle extras = data.getExtras(); Bitmap bitmap = (Bitmap) extras.get("data"); if (bitmap != null) { Img_View.setImageBitmap(bitmap); }
android image android-camera crop
user4066103
source share