I am developing app where i want to crop image taken from camera and upload to sftp server. I am using following code to crop image:
BitmapFactory.Options opts = new BitmapFactory.Options();
opts.inSampleSize = 1;
Bitmap bm = BitmapFactory.decodeFile(imagePath, opts);
Intent intent = new Intent("com.android.camera.action.CROP");
intent .setDataAndType(outputFileUri, "image/*");
intent.putExtra("outputX",bm.getWidth());
intent.putExtra("outputY", bm.getHeight());
intent.putExtra("aspectX", 1);
intent.putExtra("aspectY", 1);
intent.putExtra("scale", true);
intent.putExtra("return-data", false);
startActivityForResult(intent, 2);
With this I am getting a resizable rectangle. But while resizing cropped area width and height are changing proprtionally like this .
I want to change width and height of cropped area independently like in PhotoCrop app
I hope you have understand my problem.
EDIT: ****Also image cropping is not working on Samsung galaxy S3 and another thing is that when i resize cropping area, it is zooming the image too much and image is getting blur..****