Zxing本身默认的扫图区域最大只有 360*480    需要拉开很远的距离才能将整个二维码扫描到
因此需要我们自己调整取图大小
在CameraManager.java这个类中进行调整
默认的大小是 以下这4个参数 
//  private static final int MIN_FRAME_WIDTH = 240;
//  private static final int MIN_FRAME_HEIGHT = 240;
//  private static final int MAX_FRAME_WIDTH = 480;
//  private static final int MAX_FRAME_HEIGHT = 360;
  private static final int MIN_FRAME_WIDTH = 480;
  private static final int MIN_FRAME_HEIGHT = 480;
  private static final int MAX_FRAME_WIDTH = 960;
  private static final int MAX_FRAME_HEIGHT = 720;
按照上述修改,可以增加扫描区域大小,同时也提高了扫描速度
GitHub 加速计划 / zx / zxing
32.53 K
9.31 K
下载
ZXing ("Zebra Crossing") barcode scanning library for Java, Android
最近提交(Master分支:2 个月前 )
8944e607 3 个月前
6ea3726b Bumps `spring.version` from 6.1.5 to 6.1.8. Updates `org.springframework:spring-test` from 6.1.5 to 6.1.8 - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.5...v6.1.8) Updates `org.springframework:spring-web` from 6.1.5 to 6.1.8 - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.5...v6.1.8) --- updated-dependencies: - dependency-name: org.springframework:spring-test dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: org.springframework:spring-web dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sean Owen <srowen@gmail.com> 3 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐