You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, I have updated the code into the CameraFragment class in order to use the new AspectRatio enum.
So now, the camera preview config looks like :
val viewFinderConfig =PreviewConfig.Builder().apply {
setLensFacing(lensFacing)
// We request aspect ratio but no resolution to let CameraX optimize our use cases
setTargetAspectRatio(AspectRatio.RATIO_16_9)
// Set initial target rotation, we will have to call this again if rotation changes// during the lifecycle of this use case
setTargetRotation(viewFinder.display.rotation)
}.build()
Unfortunately, the result looks like a 1:1 ratio and not a 16:9 one :
if I use AspectRatio.RATIO_4_3 value instead of the AspectRatio.RATIO_16_9 the result looks good :
Is it an issue with the library or an issue with my implementation using the AspectRatio.RATIO_16_9 value ?
Hi @ludovicroland thanks for reporting this. Unfortunately, we can't really help with issues related to the library here -- this repo is dedicated exclusively to the sample. I would recommend filing an issue in the AOSP issue tracker or starting a thread in the developer forums
I am currently playing with new cameraX library from Android Jetpack. I use the latest available version : 1.0.0-alpha06
In the CameraXBasic sample (https://github.com/android/camera-samples/tree/master/CameraXBasic), after updated the cameraX library version from 1.0.0-alpha05 to 1.0.0-alpha06, I am trying to display a 16:9 ratio preview instead of the fullscreen one.
In order to do that, I have updated the
fragment_camera.xml
layout in order to "force" the ratio aspect of theTextureView
:The preview looks good :
Now, I have updated the code into the
CameraFragment
class in order to use the newAspectRatio
enum.So now, the camera preview config looks like :
Unfortunately, the result looks like a 1:1 ratio and not a 16:9 one :
if I use
AspectRatio.RATIO_4_3
value instead of theAspectRatio.RATIO_16_9
the result looks good :Is it an issue with the library or an issue with my implementation using the
AspectRatio.RATIO_16_9
value ?I can reproduce the issue at least on a:
Probably links with the issue #87 .
Thank you in advance for your help!
The text was updated successfully, but these errors were encountered: