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
865 stars 508 forks source link

Issue when try to analyze PNG image #665

Open myoganugraha opened 1 year ago

myoganugraha commented 1 year ago

Hi, has anyone experienced an issue with PNG image that taken from iphone ?

We tried to read QR information from gallery, using .PNG image, but analyzeImage return false. Then when i tried to convert the image to jpeg, the image are able to read.

Some images are in PNG format, as it usually was directly taken by the user using screenshot.

Using mobile_scanner 3.2.0

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.5, on macOS 13.4 22F66 darwin-arm, locale en-ID)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[!] Android Studio (version 2022.1)
    ✗ Unable to find bundled Java version.
[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.1)
[✓] VS Code (version 1.78.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability
ammelto commented 1 year ago

I'm experiencing this same issue. We might have to convert the image first as a workaround for now.

myoganugraha commented 1 year ago

I'm experiencing this same issue. We might have to convert the image first as a workaround for now.

ah yeah, we do it for temporary solution for now 🤞🏻

hopefully there's an fix that we could do