Here you can find the source of cropImage(Context context, Uri imageuri, Uri tempUri)
public static Intent cropImage(Context context, Uri imageuri, Uri tempUri)
//package com.java2s; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.net.Uri; import android.provider.MediaStore; public class Main { public static Intent cropImage(Context context, Uri imageuri, Uri tempUri) {/*w w w . java2 s.com*/ try { Intent intent = new Intent("com.android.camera.action.CROP"); intent.setDataAndType(tempUri, "image/*"); intent.putExtra("crop", "true"); intent.putExtra("aspectX", 1); intent.putExtra("aspectY", 1); intent.putExtra("outputX", 100); intent.putExtra("outputY", 100); intent.putExtra("return-data", false); intent.putExtra("outputFormat", Bitmap.CompressFormat.JPEG.toString()); intent.putExtra(MediaStore.EXTRA_OUTPUT, imageuri); return intent; } catch (Exception e) { e.printStackTrace(); } return null; } }