Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to load sampled bitmap / File is not a picture error #21

Closed
VEIKKO99 opened this issue Dec 23, 2020 · 5 comments · Fixed by #27
Closed

Failed to load sampled bitmap / File is not a picture error #21

VEIKKO99 opened this issue Dec 23, 2020 · 5 comments · Fixed by #27
Milestone

Comments

@VEIKKO99
Copy link

I'm using 1.1.1 version of the library.

I'm getting error:
java.lang.RuntimeException: Failed to load sampled bitmap: content://example.com.example.cropper.fileprovider/my_images/Pictures/pickImageResult2620448784152359897.jpeg
File is not a picture
when using CropImage activity.

Error occurs on Android 10 (Nokia 5.3 device) but I have also received error from our users that the same error occurs also on Android 11 devices.

I have previously used ArthurHub / Android-Image-Cropper version of the library and It didn't have this problem on Android 10. Only on Android 11.

Do you have any idea what I'm doing wrong or is there something on the library what should be fixed?

Thanks.

@Canato
Copy link
Member

Canato commented Dec 23, 2020

Hey @VEIKKO99
Just to be sure, versions 1.1.1 is not a real version of the library, was done in the #14 for testing. We will launch yet.

Try to use versions 1.1.0 or wait next release to see if the problem persist

@VEIKKO99
Copy link
Author

Ok,

I will do that, sorry for the hassle 👍

@medroa
Copy link

medroa commented Jan 7, 2021

I try to use versions 1.1.0
implementation 'com.github.CanHub:Android-Image-Cropper:1.1.0'

However, it doesn't build and I get the following error message:
Failed to resolve: com.github.CanHub:Android-Image-Cropper:1.1.0

@Canato
Copy link
Member

Canato commented Jan 7, 2021

I try to use versions 1.1.0
implementation 'com.github.CanHub:Android-Image-Cropper:1.1.0'

However, it doesn't build and I get the following error message:
Failed to resolve: com.github.CanHub:Android-Image-Cropper:1.1.0

@medroa please use the latest release 1.1.1 we change from GithubPackages to JItPack.
If you prefer to use 1.1.0 you need to import using GithubPackages.

For next time you can open a new issue or even an Discussion =D

@jmcrox
Copy link
Contributor

jmcrox commented Jan 11, 2021

I have the same problem on Android 10 and 11 when I choose capture image from camera.

I figured out the problem was on CropImage#getCaptureImageOurputUri(Context). This method was returned differents files uris in each call for these Android versions.

I have created a PR with my correction.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants