GithubHelp home page GithubHelp logo

Comments (11)

rexyrex avatar rexyrex commented on May 22, 2024 2

Version 2.0.0 fixed the issue for me. Camera -> crop now works

from android-image-cropper.

bohemima avatar bohemima commented on May 22, 2024

Error seems to be "Failed to load sampled bitmap: content://package.cropper.fileprovider/my_images/Pictures/pickImageResult8398353326702376456.jpeg"

Is there missing steps in the documentation for FileProvider or permissions perhaps?

from android-image-cropper.

VEIKKO99 avatar VEIKKO99 commented on May 22, 2024

I'm experiencing exactly the same bug. Code seems to fail here:
BitmapFactory.Options decodeImageForOption(ContentResolver resolver, Uri uri)

==> This check fails in BitmapSampled decodeSampledBitmap(Context context, Uri uri, int reqWidth, int reqHeight) method:
if (options.outWidth == -1 && options.outHeight == -1) throw new RuntimeException("File is not a picture");

Bug is reproducible only when using the camera. Choosing a image from gallery works fine.

from android-image-cropper.

Canato avatar Canato commented on May 22, 2024

@rexyrex I have another bug, but similar. When I try to run Quick Sample the camera option is not available, even if the permission is granted.
Will look in to this bug later, in the main time I tag as help wanted and good first issue if someone else jump to help us.

@bohemima your problem seen unrelated, but another one, please check this PR #10 where we did the FileProvider work. Should be fine, but maybe we hit another issue, let me know please

@VEIKKO99 could you get the same issue running the code Quick Sample build?

from android-image-cropper.

bohemima avatar bohemima commented on May 22, 2024

@rexyrex I have another bug, but similar. When I try to run Quick Sample the camera option is not available, even if the permission is granted.

Only did a quick look around but it seems it is missing queries decleration for IMAGE_CAPTURE in the manifest,

    <queries>
        <intent>
            <action android:name="android.media.action.IMAGE_CAPTURE" />
        </intent>
    </queries>

@bohemima your problem seen unrelated, but another one, please check this PR #10 where we did the FileProvider work. Should be fine, but maybe we hit another issue, let me know please

I'm pretty sure it's the same issue, the crop screen is shown briefly before closing and the above error is sent.

from android-image-cropper.

Canato avatar Canato commented on May 22, 2024

Great! =D
@bohemima any chance you can help here? Try to reproduce on the sample apps and propose a fix(PR)?

from android-image-cropper.

VEIKKO99 avatar VEIKKO99 commented on May 22, 2024

@VEIKKO99 could you get the same issue running the code Quick Sample build?

I'm not sure what you mean by Quick Sample build, but the error also occurs on the sample app.

from android-image-cropper.

Sophie713 avatar Sophie713 commented on May 22, 2024
SVID_20210108_153601_1.mp4

We are having the same issue. After you take the picture instead of offering to crop it it returns back to my activity.
Seems to be an issue on all Android 10 devices we have tried.

from android-image-cropper.

jmcrox avatar jmcrox commented on May 22, 2024

I think this bug may be the same as #21 because when the CropImageActivity returns from camera (onActivityResult) the cropImageUri is initialized through CropImage.getPickImageResultUri(this, data) which results in CropImage.getCaptureImageOutputUri(context). Then the cropImageUri points to empty file (#27 ).

from android-image-cropper.

SaltyBoi31 avatar SaltyBoi31 commented on May 22, 2024

Version 2.0.0 fixed the issue for me. Camera -> crop now works

I have the same issue, but on Android 11. What change did Version 2.0.0 bring to fix the issue? (android noobie here)

from android-image-cropper.

Canato avatar Canato commented on May 22, 2024

Hey @SaltyBoi31 try to use the latest library version and open a new issue (following the template) so I can help better ^^

from android-image-cropper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.