Cropped image blurry in android

I am trying to crop an image selected from a gallery in android, as shown below.

Intent intent = new Intent("com.android.camera.action.CROP"); intent.setDataAndType(photoUri, "image/*"); intent.putExtra("outputX", 400); intent.putExtra("outputY", 300); intent.putExtra("aspectX", 4); intent.putExtra("aspectY", 3); intent.putExtra("scale", true); intent.putExtra("return-data", true); startActivityForResult(intent, RESULT_CROP); 

When I try to set outputX and outputY to 800, 600, this will not work. The above code works fine, but the cropped image looks blurry. Can anyone suggest how to crop an image without making it too blurry. Thanks.

+7
java android image crop
source share
1 answer

Instead, you should use one of the available libraries. For example: https://github.com/jdamcd/android-crop

0
source share

All Articles