I want to create an application that allows the user to resize the image in the form of a square (length = width).
I know that you can use the gallery to do this as follows:
private void crop(Uri photoUri) { Intent intent = new Intent("com.android.camera.action.CROP"); intent.setData(photoUri); intent.putExtra("outputX", 200); intent.putExtra("outputY", 200); intent.putExtra("aspectX", 1); intent.putExtra("aspectY", 1); intent.putExtra("scale", true); intent.putExtra("return-data", true); startActivityForResult(intent, RESULT_CROP); }
But I would like to know if there is a library that allows you to do this directly in the application?
Thanks in advance!
source share