mobile_scanner icon indicating copy to clipboard operation
mobile_scanner copied to clipboard

ios analyzeImage method Cannot recognize this image QR code

Open assemblyios opened this issue 1 year ago • 7 comments

ios analyzeImage method Cannot recognize this image QR code

企业微信20231106-180927

assemblyios avatar Nov 06 '23 10:11 assemblyios

But a scan can identify it

assemblyios avatar Nov 06 '23 10:11 assemblyios

So analyzeImage() returns false, but controller.barcodes.listen() does provide the barcode?

navaronbracke avatar Nov 07 '23 07:11 navaronbracke

So analyzeImage() returns false, but controller.barcodes.listen() does provide the barcode?

controller.barcodes.listen() Do not provide any barcode

assemblyios avatar Nov 14 '23 09:11 assemblyios

If analyzeImage() returns false and controller.barcodes does not include it, this is working as intended.

As I said before, I hope to fix the signature of this API, because it is a bit confusing at the moment.

I'll try to test scanning with the given barcode, maybe it has to do with specific options for the scanner.

navaronbracke avatar Nov 14 '23 09:11 navaronbracke

If analyzeImage() returns false and controller.barcodes does not include it, this is working as intended.

As I said before, I hope to fix the signature of this API, because it is a bit confusing at the moment.

I'll try to test scanning with the given barcode, maybe it has to do with specific options for the scanner.

Thank you for your reply and have a nice day

assemblyios avatar Nov 21 '23 01:11 assemblyios

you have to convert the generated image, is the solution I found. The error occurs when the QR is generated from the same cell phone on iOS. It is an error specific to the package that generates the qr or ios. So, the solution is that, as soon as you have the path, you convert the image and save it in a temporary path and pass this new path to analyzeImage()

jgaviriadev avatar Nov 24 '23 21:11 jgaviriadev

you have to convert the generated image, is the solution I found. The error occurs when the QR is generated from the same cell phone on iOS. It is an error specific to the package that generates the qr or ios. So, the solution is that, as soon as you have the path, you convert the image and save it in a temporary path and pass this new path to analyzeImage()

You are correct. How to create a new file? I use the file copy and save the copied file to the cache, but it does not work. I change the crop a image, and then use the new file to analyze the image, and it succeeds.

dahvlhldle avatar Jan 09 '24 23:01 dahvlhldle