Skip to content
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

feat(barcode-scanning): add option for image resolution (#220) #221

Merged

Conversation

jkorrek
Copy link
Contributor

@jkorrek jkorrek commented Jan 8, 2025

Pull request checklist

Please check if your PR fulfills the following requirements:

  • The changes have been tested successfully.
  • A changeset has been created (npm run changeset).
  • I have read and followed the pull request guidelines.

This pr adds a new option to the barcode scanning plugin that allows to specify an image resolution, as discussed in #220.

Note that this implementation will change the android behavior:
Previously, without specifying a targetResolution for the ImageAnalysis builder, a resolution of 640x480 was used - now the default would be 1280x780 (same as iOS). Let me know if this is ok or should be changed to keep the previous default.

CLose #220

@jkorrek jkorrek force-pushed the feat/scanning-image-resolution branch from 7209369 to 6ddea21 Compare January 8, 2025 10:35
@robingenz
Copy link
Member

Note that this implementation will change the android behavior:
Previously, without specifying a targetResolution for the ImageAnalysis builder, a resolution of 640x480 was used - now the default would be 1280x780 (same as iOS). Let me know if this is ok or should be changed to keep the previous default.

@jkorrek This is okay but please add this information to the BREAKING.md file since this could be a breaking change on Android.

Copy link
Member

@robingenz robingenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Please do not forget to resolve the merge conflicts.

.changeset/ten-games-shake.md Outdated Show resolved Hide resolved
packages/barcode-scanning/src/definitions.ts Outdated Show resolved Hide resolved
packages/barcode-scanning/src/definitions.ts Outdated Show resolved Hide resolved
@jkorrek jkorrek force-pushed the feat/scanning-image-resolution branch from 6ddea21 to 0e19eb1 Compare January 8, 2025 10:47
@jkorrek
Copy link
Contributor Author

jkorrek commented Jan 8, 2025

Should be updated now (added breaking changes, new major version and resolved conflicts)

Copy link
Member

@robingenz robingenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link

pkg-pr-new bot commented Jan 8, 2025

Open in Stackblitz

@capacitor-mlkit/barcode-scanning

npm i https://pkg.pr.new/capawesome-team/capacitor-mlkit/@capacitor-mlkit/barcode-scanning@221

@capacitor-mlkit/face-detection

npm i https://pkg.pr.new/capawesome-team/capacitor-mlkit/@capacitor-mlkit/face-detection@221

@capacitor-mlkit/face-mesh-detection

npm i https://pkg.pr.new/capawesome-team/capacitor-mlkit/@capacitor-mlkit/face-mesh-detection@221

@capacitor-mlkit/selfie-segmentation

npm i https://pkg.pr.new/capawesome-team/capacitor-mlkit/@capacitor-mlkit/selfie-segmentation@221

@capacitor-mlkit/translation

npm i https://pkg.pr.new/capawesome-team/capacitor-mlkit/@capacitor-mlkit/translation@221

commit: 0e19eb1

@robingenz robingenz merged commit e392fb7 into capawesome-team:next Jan 8, 2025
4 checks passed
This was referenced Jan 24, 2025
robingenz added a commit that referenced this pull request Jan 27, 2025
* chore(changeset): enter prerelease mode

* chore: changeset pre exit

* chore: enter prerelease mode

* ci: run on `next` branch

* docs: add changeset

* docs: remove changeset

* fix!: update `GoogleMLKit` pods to version `6.0.0` on iOS (#179)

* fix: update `GoogleMLKit` pods to version `6.0.0` on iOS

* revert

* chore(ios): set minimum deployment target to 16

* chiore(translation): increase deployment target

* chore(translation): set minimum deployment target to 15.5

* docs

* docs: update changeset

* docs: mention `next` tag

* chore(release): publish (next) (#196)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: update `GoogleMLKit` pods to version `7.0.0` (#202)

* fix: increase deployment target to `15.5`

* docs

* fix(ios): update `GoogleMLKit` pods to version `7.0.0`

* chore: update `package-lock.json`

* chore(release): publish (next) (#203)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat(barcode-scanning): support all barcode types (#206)

* feat(barcode-scanning): extend definitions.ts with new properties

* Update packages/barcode-scanning/src/definitions.ts

* Update .changeset/mighty-comics-whisper.md

* feat(barcode-scanning): suggested changes

* feat(barcode-scanning): support all barcode types on android

* chore(): remove additional null checks

* feat(barcode-scanning): ios implementation

* chore(barcode-scanning): use if let to avoid the force unwrap

* chore(barcode-scanning): fix force unwrap

---------

Co-authored-by: Robin Genz <[email protected]>

* refactor(barcode-scanning): prefix interfaces with `Barcode`

* fix(barcode-scanning): convert `end` and `start` to ISO 8601 string

* chore(barcode-scanning): remove deprecated warnings for torch methods (#209)

* fix(barcode-scanning): remove deprecated warnings for torch methods

Close robingenz/capacitor-mlkit-plugin-demo#27

* Delete .changeset/stupid-trains-change.md

* docs: run `docgen`

* feat(barcode-scanning): add compatibility for the Torch plugin (#210)

* feat(barcode-scanning): add compatibility for the Torch plugin

* Revert "chore(barcode-scanning): remove deprecated warnings for torch methods (#209)"

This reverts commit 3492c0e.

* chore(release): publish (next) (#207)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore(deps): update `@capacitor/docgen`

* feat(barcode-scanning): add option for image resolution (#220) (#221)

* docs(barcode-scanning): update `BREAKING.md`

* chore(barcode-scanning): update `definitions.ts`

* ci: add step to install CocoaPods dependencies

* chore: add missing `ios:pod:install` script

* fix(barcode-scanning): resize the barcode scanner view when the device orientation changes (#224)

* chore(release): publish (next) (#222)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat(barcode-scanning): support cornerPoints in readBarcodesFromImage (#225)

Include raw cornerPoints for all methods except startScan.

* fix(barcode-scanning): use queue for synchronizing the session configuration and start operations of the `scan(...)` method

* fix: DispatchQueue for synchronizing the session configuration and start operations

* fix: npm run changeset

* fix: remove duplicated empty line

* Update .changeset/forty-avocados-allow.md

Co-authored-by: Robin Genz <[email protected]>

* fix: resolve conflicts against next

* fix: init captureSession before captureSessionQueue.sync

* Update .changeset/forty-avocados-allow.md

* fix: init sessionPreset, captureDevice

---------

Co-authored-by: Robin Genz <[email protected]>

* fix(barcode-scanning): destroy the preview view when the scan stops (#227)

* fix(barcode-scanning): destroy the preview view when the scan stops

* test

* style: format

* wip

* wip

* wip

* wip

* docs(barcode-scanning): update `README.md`

* refactor!: remove deprecated code (#229)

* docs: update `README.md`

* chore: update native dependencies (#230)

* chore: update native dependencies

Increment all dependencies to the latest available version.

* chore: update native dependencies

Run fmt script.

* chore: update native dependencies

Generate changeset.

* chore: update native dependencies

Fix version of mlkitBarcodeScanningVersion.

* chore: update native dependencies

Fix typos and requested changes.

* feat!: update to Capacitor 7 (#232)

* feat!: update to Capacitor 7

* ci

* chore: update `package-lock.json`

* wip: prettier

* chore: add gradle wrapper

* chore(deps): update `androidxEspressoCoreVersion` version

* chore(changeset): exit pre release

* revert: chore(changeset): exit pre release

This reverts commit 23707a0.

* chore(release): publish (next) (#226)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore(changeset): exit pre release

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Mert Yıldırır <[email protected]>
Co-authored-by: Johannes Korrek <[email protected]>
Co-authored-by: Ehsan Barooni <[email protected]>
Co-authored-by: Jaime Caso <[email protected]>
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.

2 participants