Questions tagged [android-crop]

How to crop an image interactively (manually) on Android

Questions about using of com.android.camera.action.CROP intent, or alternatives.

This intent belongs to AOSP Camera app and is listed at http://www.openintents.org/action/com-android-camera-action-crop, but please read https://commonsware.com/blog/2013/01/23/no-android-does-not-have-crop-intent.html before you decide to use it.

38 questions
39
votes
5 answers

Crop image in android

I want to do cropping of image i found some pretty useful ones but somehow is like lacking of the darken the unselected areas so I wondering do anyone know how? or lead me to the right direction? The online tutorial i found shows that is will darken…
I Yeu C
  • 636
  • 2
  • 7
  • 13
6
votes
1 answer

Cropping Image in Android (Crop Intent)

I used this code to use android's built in image crop tools. My code is the following public void takePicture(){ Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if…
Apostolos
  • 7,763
  • 17
  • 80
  • 150
3
votes
2 answers

Why doesn't Android crop intent return ActivityResult?

I'm trying to crop an image from the media gallery. I'm able to access the image, start the default crop tool and even save the cropped image result. However, the intent I'm using just will not return any results if the cropping was successful. My…
3
votes
2 answers

How to get bitmap of a view?

Ok, so I'll try my best to explain my problem. I have used this code to get a "screenshot" of my FrameLayout /** * Function that takes a screenshot of the view passed and returns a bitmap for it. * * @param view {@link View} * @return screenshot…
2
votes
0 answers

Photos taken on Samsung Android phones appear rotated

We're developing an app which allows the user to take a photo or pick one from the gallery. We're using the Android Crop library for this. When testing on Android devices which aren't from Samsung the photo appears okay. However, all photos taken on…
Felipe Ferri
  • 3,488
  • 2
  • 33
  • 48
2
votes
1 answer

Android crop action getData null with some device

I have a problem when cropping image with activity result. I have set permission on device >6. But when show crop and crop is successful, the result data is null. (imageReturnedIntent.getData() us null and intent data is also null). It is code crop…
QuestionAndroid
  • 881
  • 1
  • 8
  • 25
2
votes
3 answers

Android get URI of cropped image from Intent

I'm trying to capture an image from the Android Camera/ Pick an image from the gallery and then crop it before performing other operations on it. I'm having trouble with getting back the URI of the cropped image. Any help on how to get back the URI…
2
votes
1 answer

Cannot use Android Crop image crop library in Android

I am developing an Android project. In my project, I want to add crop image feature. So I used this library, https://github.com/jdamcd/android-crop. But when I use it. It is giving me error. This is how I installed: I put this in grandle, compile…
Wai Yan Hein
  • 13,651
  • 35
  • 180
  • 372
2
votes
0 answers

can i use android default cropping functionality to crop my bitmap in imageview

I want to use the android default cropping functionality to crop the bitmap present in imageview and then set that cropped bitmap to current imageview.This is my code but it does not work.Need help ... ImageView iv; final int CROP_PIC_REQUEST_CODE =…
2
votes
0 answers

Crop intent issue with Android M

This is my existing code for the crop intent. This works fine on all devices private void choosePhotoFromCamera() { System.out.println("choosePhotoFromCamera"); Intent i = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if…
2
votes
1 answer

How to get coordinates from a image using android CROP function?

In my application the user can upload an image, then he can select a part of it using the android CROP Function (see example image 1). I want to get the coordinates of the selected area (see example image 2) by the user using the CROP Function or…
1
vote
0 answers

Crash on Google Photo App after taking and croping image on Android 10 (Q)

I am getting an unexpected crash on Google Photos App for Cropping Image Here is the full crash log: 2020-12-10 21:16:56.954 26763-27559/? E/DatabaseUtils: Writing exception to parcel java.lang.IllegalArgumentException: MIME type…
Abu Yousuf
  • 5,729
  • 3
  • 31
  • 50
1
vote
0 answers

New Image File From URI Does Not Exist

So I'm using the Android Crop library (https://github.com/jdamcd/android-crop) to allow a user to take a picture and then crop it. I need to create two files: one that contains the original image from the camera and one that contains the cropped…
Przemek Lach
  • 1,348
  • 2
  • 19
  • 42
1
vote
2 answers

Crop Intent using google photos not working

I am trying to make an app to select an image from the gallery or google photos and then crop it to make it my app background. The problem I am facing is that When I try to crop the picture using google photos then it gets saved but the app…
1
vote
0 answers

Android-crop always returning null as outputUri

The output URI from crop() is always null. It's worth noting the result code is RESULT_CANCELLED for requestCode == Crop.REQUEST_CROP. onActivityResult function: @Override protected void onActivityResult(int requestCode, int resultCode, Intent…
Saumya
  • 83
  • 11
1
2 3