Open arsenii-repository opened 5 years ago
I want to take a photo from camera and show it in ImageView.
Fotoapparat .with(this) .into(cameraView) .previewScaleType(ScaleType.CenterCrop) .lensPosition(back()) .logger(loggers( logcat() )) .cameraErrorCallback(e -> { Log.e(TAG, e.toString()); }) .build();
In whenDone callback bitmap is null.
PhotoResult photoResult = fotoapparat.takePicture(); photoResult .toBitmap(scaled(0.25f)) .whenDone(bitmapPhoto -> { if (bitmapPhoto == null) { Log.e(TAG, "Couldn't capture photo. Bitmap is null."); } });
Bitmap isn't null.
How can I solve this?
Thanks in advance.
What are you trying to achieve or the steps to reproduce?
I want to take a photo from camera and show it in ImageView.
How did you initialize FA?
What was the result you received?
In whenDone callback bitmap is null.
What did you expect?
Bitmap isn't null.
Context:
How can I solve this?
Thanks in advance.