-
Notifications
You must be signed in to change notification settings - Fork 585
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
No image dimensions provided from capture #641
Comments
Took a dive on the native code on the android side, since it might be related to your usecase. From the android native code: https:/teslamotors/react-native-camera-kit/blob/master/android/src/main/java/com/rncamerakit/CKCamera.kt ...
// ImageCapture
imageCapture = ImageCapture.Builder()
.setCaptureMode(ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY)
// We request aspect ratio but no resolution to match preview config, but letting
// CameraX optimize for whatever specific resolution best fits our use cases
.setTargetAspectRatio(screenAspectRatio)
// Set initial target rotation, we will have to call this again if rotation changes
// during the lifecycle of this use case
.setTargetRotation(rotation)
.build() Seems like a lack of support for this feature than a bug. The resolutions are automatically decided by native libraries, and there isnt any public methods that return the resolution (least I couldnt find any) You might have to do a workaround and get the resolutions from the captured temporary jpeg instead |
You right @alexstanbury. https:/teslamotors/react-native-camera-kit/blob/master/src/types.ts export type CaptureData = {
uri: string;
name: string;
// Android only
id?: string;
path?: string;
height?: number;
width?: number;
// iOS only
size?: number;
}; |
I pushed a PR to get that added 👍 |
Describe the bug
When capturing an image, I would expect there to be a height and width value returned, yet I only get the following:
To Reproduce
Steps to reproduce the behavior:
capture
width
orheight
passed back.Expected behavior
There should be
width
andheight
passed back, it's a fundamental part of a camera library, surely?Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: