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

不能识别白色的二维码图片 #30

Open
aqyana opened this issue Aug 25, 2023 · 6 comments
Open

不能识别白色的二维码图片 #30

aqyana opened this issue Aug 25, 2023 · 6 comments

Comments

@aqyana
Copy link

aqyana commented Aug 25, 2023

目前发现没办法识别白色的二维码,有什么办法可以实现嘛,是否可以支持一下

@aqyana
Copy link
Author

aqyana commented Aug 25, 2023

@amggg

@amggg
Copy link
Owner

amggg commented Aug 30, 2023

二维码图片发一下看看

@aqyana
Copy link
Author

aqyana commented Aug 31, 2023

image

@aqyana
Copy link
Author

aqyana commented Aug 31, 2023

应该是反转二维码,可以参考这个处理https://cloud.tencent.com/developer/article/1199973
我是在catch里面又把资源反转了一下处理的
BinaryBitmap binaryBitmap = new BinaryBitmap(new HybridBinarizer(source));
try {
result = formatReader.decode(binaryBitmap);
} catch (Exception e) {
try {
binaryBitmap = new BinaryBitmap(new HybridBinarizer(source.invert()));
result = formatReader.decode(binaryBitmap);
} catch (Exception e1) {
e1.printStackTrace();
}
e.printStackTrace();
}

@aqyana
Copy link
Author

aqyana commented Aug 31, 2023

另外还有个问题,AudioUtil中的activity有内存泄漏哦

@amggg
Copy link
Owner

amggg commented Sep 1, 2023 via email

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