Comments (11)
Version 2.0.0 fixed the issue for me. Camera -> crop now works
from android-image-cropper.
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.
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.
@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.
@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.
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 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.
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.
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.
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.
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)
- e HOT 1
- Build failing since version 4.3.3 HOT 1
- Managing cache file HOT 4
- Is this repo still being supported or not? HOT 1
- CropImageView fails to respect the match_parent size upon resizing the window HOT 1
- ActivityResultContract for custom activity
- Can I Customize Crip Edit Screen In Android Compose? HOT 1
- URI validation security issue
- Crashing on calling the copping activity...
- Multiple call of cropImage in loop when we can pick more then one image from gallery
- Getting crash while selection of camera cropping only in Android 10
- Question : Is it possible move and scale the picture itself instead of the crop overlay? HOT 3
- v
- Can crop by path or region? HOT 1
- Prevent CropRect Translation in Image Cropper
- Tool bar and its buttons(back, crop etc) is not shown. just white space HOT 2
- [Feature Request] Support for Rounded Rectangle Crop Shape HOT 4
- Integrate the Photo picker tool HOT 1
- Opening camera doesn't allow exiting the activity HOT 1
- How to customize the AlertDialog in Jetpack Compose? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-image-cropper.