juliansteenbakker / mobile_scanner

A universal scanner for Flutter based on MLKit. Uses CameraX on Android and AVFoundation on iOS.
BSD 3-Clause "New" or "Revised" License
911 stars 524 forks source link

iOS analyzeImage from gallery not working #967

Open Awais-ishaq opened 9 months ago

Awais-ishaq commented 9 months ago

iOS analyzeImage from gallery not working, always returns false

navaronbracke commented 9 months ago

Could you provide the version of mobile_scanner that you use, and a minimal reproducible sample? Please also include the file from the gallery that you are trying to analyze.

bh1270 commented 8 months ago

3.5.7 Android and iOS analyzeImage from gallery not working

Could you provide the version of mobile_scanner that you use, and a minimal reproducible sample? Please also include the file from the gallery that you are trying to analyze.

navaronbracke commented 8 months ago

Could you also provide a sample file that isn't working with analyzeImage() ?

navaronbracke commented 8 months ago

With a "sample file", I meant an image that has some kind of barcode in it that was not detected. The above images definitely do not have a barcode at all, so the result is working as intended for those.

bh1270 commented 8 months ago

I ran example, but did not recognize my QR code

图片 图片 图片

Cheng455153666 commented 8 months ago

The same issue.

when I use qr_flutter, and generate a qr image.

QrImageView(
  data: '[1234567890](https://github.com/juliansteenbakker/mobile_scanner/issues/967)',
  version: QrVersions.auto,
  gapless: false, // important
  size: 200.0,
),

use RepaintBoundary to get snapshot. analyzeImage

@navaronbracke Thanks

ahmedosman2001 commented 6 months ago

I'm experiencing the same issue. When I generate a QR code using pretty_qr_code.dartor other libraries on the same phone, the analyzeImage() function fails to recognize it (e.g "No barcode found!" ). However, QR code images I download from the internet work perfectly. I thought the package im using to generate the QR code generation was the problem, but I've tried multiple generators with the same result. I even set a white background to rule out issues with transparent QR images, but that didn't make a difference either. Are there any other potential solutions to this problem?

By the way im using https://github.com/juliansteenbakker/mobile_scanner/blob/c0ac2453e303c9374228076810bb52732e928a11/example/lib/scanner_button_widgets.dart#L5:L49

debdeep0206 commented 6 months ago

I am experiencing the same issue on iOS, it works perfectly on Android. The QR code has been generated using the QR Flutter package.

The analyzeImage() API does not return any QR code when the file is read from the gallery.

Is there any solution to this ?

isamitchell commented 4 months ago

Could you provide the version of mobile_scanner that you use, and a minimal reproducible sample? Please also include the file from the gallery that you are trying to analyze.

Hello, I am having this same error, the reader stopped reading the images from the gallery, the path that I am passing as an argument is /private/var/mobile/Containers/Data/Application/2A5D7976-D4C1-4576-9CB2-63FA19794306/ tmp/image_picker_BC16B31F-1CDF-47B4-9C25-317BA992F31F-1678-000000DAD48F28FE.png obtained with the ImagePicker package.

I am using version ^4.0.0