Home > Mobile >  Android can cut the cutting system frame into a round
Android can cut the cutting system frame into a round

Time:10-16

Intent Intent=new Intent (com. Android. Camera. The action. "CROP");
Intent. SetDataAndType (uri, "image/*");
If (Build) VERSION) SDK_INT & gt;=Build. VERSION_CODES. N) {
Intent. AddFlags (intent. FLAG_GRANT_READ_URI_PERMISSION);
}
Intent. PutExtra (" crop ", "true");
//cut out of the box ratio 4:3
Intent. PutExtra (" aspectX ", 4);
Intent. PutExtra (" aspectY ", 3);
//after cutting the size of the output image
Intent. PutExtra (" outputX ", 800);
Intent. PutExtra (" outputY ", 600);

Intent. PutExtra (" outputFormat ", Bitmap.Com pressFormat. PNG. The toString ());
Intent. PutExtra (" noFaceDetection ", true);
Intent. PutExtra (" return - data ", false);
Intent. PutExtra (MediaStore. EXTRA_OUTPUT cropImageUri);
//open with a return value of the Activity, the request code for PHOTO_REQUEST_CUT
StartActivityForResult (intent, PHOTO_REQUEST_CUT);

CodePudding user response:

Like a CircleImageView controls, try under reference
  • Related