简体   繁体   中英

Crop Image Chosed from Gallery for Android API 21 and above

My application sends an intent for getting an image from the gallery and then I want to crop the image as per the needs. Now, I know there are lots of questions already asked on this topic, but they are old and they all refer to the historical solution of this question, and that is to use com.android.camera.action.CROP . Now, on using com.android.camera.action.CROP as the Intent many devices says that there are no applications on the device to handle such intent. So, I noticed that there is a crop application that comes by default with the gallery app of the android API 21 and above. So, my question is what intent should I use to use that crop application for cropping the chosen image? You are welcome to suggest any other way around for cropping the chosen image from the gallery.

So, I noticed that there is a crop application that comes by default with the gallery app of the android API 21 and above

There are hundreds of millions of Android devices, across hundreds of device models, running Android 5.0+. Those devices will ship with dozens of different gallery-style apps. There is no single "default" "gallery app" for all those devices. And none of those dozens of gallery-style apps have to offer any cropping APIs to third-party apps.

You are welcome to suggest any other way around for cropping the chosen image from the gallery.

Use one of the many image cropping libraries available for Android .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM