Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cropping Shape of Square Image Android In App

I want to create an application which allows the user to resize an image in shape of square (length = width).

I know that it is possible to use the gallery to make that in this way:

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 which allows to make that directly in the application?

Thank you in advance !!

like image 806
lopez.mikhael Avatar asked May 16 '13 16:05

lopez.mikhael


1 Answers

I found my solution here but I accept other answers!!

Cropper

like image 50
lopez.mikhael Avatar answered Nov 08 '22 01:11

lopez.mikhael