-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
How to zoom Camera? #3
Comments
This issue is unrelated to the sample, for issues related to the library please use StackOverflow using the To answer your question, take a look at https://developer.android.com/reference/androidx/camera/core/Preview.html#zoom(android.graphics.Rect). The Rect passed as a parameter should correspond to what you would set for Camera2's crop region parameter. |
Please see the CameraControl class which will implement methods for zoom |
@owahltinez the Preview#zoom documentation does not answer either of the two questions, which would be quite common. The Android issue tracker is for logging bugs, not for asking questions. It would be good for the official sample project to demonstrate what is quite common functionality, which is not otherwise sufficiently covered in the documentation. |
Zoom API is now available from CameraX Team. Thanks to CameraX Team. |
I have tried to zoom camera with below code. Please check and correct me where I am wrong.
First I get a Preview from CameraX and tried to perform zoom using Preview like below.
After preview.zoom() I just bind again with CameraX and get some error and it's not working.
When the above code was not working, I also tried with CameraX.unbindAll() first and then I call CameraX.bindToLifecycle(). But face some error again and not get succeed.
Please provide an answer on below question or add some description in Wiki or Readme file related to the below question.
And also if possible please provide how to manage flash with CameraX?
Thank you!
The text was updated successfully, but these errors were encountered: