arcticfox1919 / flutter-scankit

Flutter QR code scanning
MIT License
142 stars 46 forks source link

When selecting a QR code from the gallery for recognition, if the background is colored, it will not be recognized. If the background is white, it will be ok. #67

Closed Jingzhenzxz closed 7 months ago

Jingzhenzxz commented 7 months ago

recurrent:

  1. Open your QR code business card in "Personal Information" on WeChat, first select a white background and click "Save", then select a color background and click "Save".
  2. Run the sample app on an Android phone (mine is a Xiaomi phone, Android 13), select "Default Mode", select "scan code", select "Select a picture from the gallery", and select the 2D image with a white background just saved. The code can be successfully recognized, but if you select the QR code with a color background that you just saved, the recognition fails.

中文版 复现:

  1. 在微信的“个人信息”中打开自己的二维码名片,先选择白色背景,点击”保存“,再选择一个彩色背景,点击“保存”。
  2. 在安卓手机(我的是小米手机,Android 13)上运行示例app,选择“Default Mode”,选择“scan code”,选择“从图库中选择图片”,选择刚才保存的白色背景的二维码,可以成功识别,但如果选择刚才保存的彩色背景的二维码,则识别失败。
arcticfox1919 commented 7 months ago

@Jingzhenzxz The ability to scan is provided by Huawei's SDK, and it seems that the SDK does not support colored backgrounds.