I am using following code to crop an image taken from the camera:
Intent intent = new Intent("com.android.camera.action.CROP");
intent .setDataAndType(outputFileUri, "image/*");
intent.putExtra("outputX",600);
intent.putExtra("outputY", 600);
intent.putExtra("aspectX", 1);
intent.putExtra("aspectY", 1);
intent.putExtra("scale", true);
intent.putExtra("return-data", false);
startActivityForResult(intent, 2);
My problems are:
-
Image cropping is working good on some devices and on some devices app is crashing.So how to handle this condition?
-
Another thing is that cropped image too much zoomed and getting blurre.
Too large photo causes crash, see this how to crop large photos.