SimpleMobileTools / Simple-Gallery

A premium app for managing and editing your photos, videos, GIFs without ads
https://www.simplemobiletools.com
GNU General Public License v3.0
3.6k stars 758 forks source link

The "outputX" and "outputY" parameter will be ignored when croping image #2193

Open cheetah747 opened 3 years ago

cheetah747 commented 3 years ago

I use my app to take a photo by camera ,and then jump to Simple-Gallery to crop it. I have set "outputX" and "outputY" to 200, the original image width is 3000, after croping, the result image's width is also 3000 not 200.

Then I have tried the operation by the gallery app which in the crDroid system,all things work well, the image's width after croping is 200.

So I think this is Simple-Gallery's issue.

cheetah747 commented 3 years ago

This is my code:

private void startActionCrop(Uri input, Uri output) { Intent intentCamera = new Intent("com.android.camera.action.CROP"); intentCamera.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); output = createRImgUri(true); intentCamera.putExtra("crop", "true"); intentCamera.putExtra("return-data", false); intentCamera.setDataAndType(input, "image/*"); intentCamera.putExtra("aspectX", 1); intentCamera.putExtra("aspectY", 1); intentCamera.putExtra("outputX", 200);//don't work intentCamera.putExtra("outputY", 200);//don't work intentCamera.putExtra(MediaStore.EXTRA_OUTPUT, output); ((Activity)context).startActivityForResult(intentCamera, REQUEST_IMAGE_AFTER_CROP); }

tibbi commented 3 years ago

what gallery app version are you using?

cheetah747 commented 3 years ago

what gallery app version are you using?

Simple-Gallery Pro 6.20.3 crDroid 7.7 - com.android.gallery3d 1.1.40030