afriscic / BarcodeScanning.Native.Maui

Barcode scanning library for .NET MAUI
https://www.nuget.org/packages/BarcodeScanning.Native.Maui
MIT License
162 stars 31 forks source link

Load Image Support #66

Closed clEclE36 closed 3 months ago

clEclE36 commented 3 months ago

Great job on this library !

It works without problems with different versions of Android and iOS, whereas I've had a few problems with other libraries !

Is it possible to load an image that contains a barcode and pass it to an analysis function to detect the barcode ?

ZXing offers this functionality via BarcodeReader classes.

Is it possible to do this with BarcodeScanning as it is, or should we suggest it :D.

Good luck !

afriscic commented 3 months ago

Hello.

You can use MAUI built in File picker and just pass FileResult to ScanFromImageAsync method.

clEclE36 commented 3 months ago

Thank you for your reply ! I'd overlooked it while browsing the code :)

I used MediaPicker, for iOS compatibility, because FilePicker doesn't give access to the Gallery.

Thanks for your work