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

从相册选择图片解析二维码耗时长 #248

Closed
yingka opened this issue May 23, 2024 · 4 comments
Closed

从相册选择图片解析二维码耗时长 #248

yingka opened this issue May 23, 2024 · 4 comments

Comments

@yingka
Copy link

yingka commented May 23, 2024

zxing-lite:3.1.1版本,demo里使用CodeUtils.parseCode(bitmap);从相册选择图片解析二维码,耗时大概1秒,集成到项目里,同样的代码,解析耗时8秒+,几款机型都试了,不知道哪里的问题?

@yingka
Copy link
Author

yingka commented May 23, 2024

还有个相关的问题,同一个二维码,从相册选择识别结果为null,扫描能识别出结果,怎么解决呢

@jenly1314
Copy link
Owner

zxing-lite:3.1.1版本,demo里使用CodeUtils.parseCode(bitmap);从相册选择图片解析二维码,耗时大概1秒,集成到项目里,同样的代码,解析耗时8秒+,几款机型都试了,不知道哪里的问题?

zxing-lite:3.1.1版本,demo里使用CodeUtils.parseCode(bitmap);从相册选择图片解析二维码,耗时大概1秒,集成到项目里,同样的代码,解析耗时8秒+,几款机型都试了,不知道哪里的问题?

CodeUtils.parseCode(bitmap); 本身就是耗时操作,不要直接在主线程执行。demo应该有代码示例的。

@jenly1314
Copy link
Owner

还有个相关的问题,同一个二维码,从相册选择识别结果为null,扫描能识别出结果,怎么解决呢

#197

@yingka
Copy link
Author

yingka commented May 24, 2024

zxing-lite:3.1.1版本,demo里使用CodeUtils.parseCode(bitmap);从相册选择图片解析二维码,耗时大概1秒,集成到项目里,同样的代码,解析耗时8秒+,几款机型都试了,不知道哪里的问题?

zxing-lite:3.1.1版本,demo里使用CodeUtils.parseCode(bitmap);从相册选择图片解析二维码,耗时大概1秒,集成到项目里,同样的代码,解析耗时8秒+,几款机型都试了,不知道哪里的问题?

CodeUtils.parseCode(bitmap); 本身就是耗时操作,不要直接在主线程执行。demo应该有代码示例的。

是在子线程执行的。而且缩小解析编码类型也试了,快1-2秒,但是整体解析时间还是很长,必现的问题
image

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

No branches or pull requests

2 participants