I want to crop image using built in crop action. My code is...
Intent intent = new Intent(
"com.android.camera.action.CROP");
intent.setDataAndType(
Uri.fromFile(new File(mQueue.sdcardPath)),
"image/*");
// set crop properties
intent.putExtra("crop", "true");
// indicate aspect of desired crop
intent.putExtra("aspectX", WallpaperManager
.getInstance(getActivity())
.getDesiredMinimumWidth());
intent.putExtra("aspectY", WallpaperManager
.getInstance(getActivity())
.getDesiredMinimumHeight());
// indicate output X and Y
intent.putExtra("outputX", WallpaperManager
.getInstance(getActivity())
.getDesiredMinimumWidth());
intent.putExtra("outputY", WallpaperManager
.getInstance(getActivity())
.getDesiredMinimumHeight());
intent.putExtra("return-data", true);
intent.putExtra("scale", true);
intent.putExtra("scaleUpIfNeeded", true);
File file = new File(mQueue.sdcardPath);
intent.putExtra(MediaStore.EXTRA_OUTPUT,
Uri.fromFile(file));
startActivityForResult(intent, CROP_ACTION);
It open crop intent but highlight view does not maintain size according to image size. Ex : my iamge is 720x1280 and I crop in galaxy s3(720x1280) then highlight view should be full as gallery application does. but I can not.
If my image is 1500x1200 then highlight view should be fit in height but it remains small.and i need to stretch by touching it.
Should be like this
Am I missing any params to get above result??