Skip to content

feat: Improvements about zoom scale value and ultra-wide camera #592

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

Merged

Conversation

ryuta46
Copy link
Contributor

@ryuta46 ryuta46 commented Apr 12, 2023

This PR is for improvements zoom scale feature, especially for avoiding to select ultra wide camera unintentionally. Please review and merge if looks good.

New features

  • added zoomScale value notifier in MobileScannerController for the application to know the zoom scale value set actually.
    The value is notified from the native SDK(CameraX/AVFoundation).

  • added resetZoomScale() in MobileScannerController to reset zoom ratio with 1x.
    Both Android and iOS, if the device have ultra-wide camera, calling setZoomScale with small value causes to use ultra-wide camera and may be diffcult to detect barcodes.
    resetZoomScale() is useful to use standard camera with zoom 1x.
    setZoomScale() with the specific value can realize same effect, but added resetZoomScale for avoiding floating point errors.
    The application can know what zoom scale value is selected actually by subscribing zoomScale above after calling resetZoomScale.

Changed behaviors

@ryuta46 ryuta46 changed the title Improvements about zoom scale value and ultra-wide camera feat: Improvements about zoom scale value and ultra-wide camera Apr 12, 2023
@juliansteenbakker
Copy link
Owner

Thanks! LGTM!

@juliansteenbakker juliansteenbakker merged commit b3fd0a1 into juliansteenbakker:master Apr 20, 2023
@kgaulin
Copy link

kgaulin commented May 5, 2023

hi, the title check is red. When this PR will be in a new version ? thank you

joaopedro735 pushed a commit to joaopedro735/mobile_scanner that referenced this pull request Aug 22, 2024
…improvements

feat: Improvements about zoom scale value and ultra-wide camera
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants