react-native-vision-camera icon indicating copy to clipboard operation
react-native-vision-camera copied to clipboard

❓ How to set the zoom without any gesture?

Open lukeDev19 opened this issue 2 years ago • 3 comments

Question

How to set the zoom without any gesture?

What I tried

I checked the example of vision camera, but it doesn't demonstrate the way to use zoom API, instead it uses gesture to zoom in & out, I just wanted to know how to zoom in & out whenever the user clicks the zoom options. Please check the attachment. As you can see, there are 3 options - 0.5x, 1x, 3x.

So there are 2 questions here:

  • Is there any method to zoom in & out without using gesture? If so, what's the method? and pls provide me the example.
  • Is it possible to zoom out as 0.5x? if so, how to do? Screenshot 2022-08-22 at 14 19 20

VisionCamera Version

^2.14.1

Additional information

lukeDev19 avatar Aug 22 '22 18:08 lukeDev19

Did you try to play with zoom field? Try to change that number (honestly didn't try it before, but I guess it should work)

adembacajmemmo avatar Aug 29 '22 21:08 adembacajmemmo

@adembacajmemmo I don't see any zoom field on doc.

lukeDev19 avatar Aug 30 '22 13:08 lukeDev19

Screenshot 2022-08-30 at 3 54 00 PM

There is zoom, you can also find documentation for it here: https://mrousavy.com/react-native-vision-camera/docs/guides/zooming

Except animation zoom, you can change that field by yourself

adembacajmemmo avatar Aug 30 '22 13:08 adembacajmemmo

Closing as this is a stale issue - this might have been fixed with the full rewrite in VisionCamera V3 (🥳) - if not, please create a new issue.

If your issue has been fixed, consider sponsoring me on GitHub to say thanks 💖

mrousavy avatar Sep 30 '23 09:09 mrousavy