0

I have used Zxing QR code library for scanning images through taken photos. Now my problem is I've to scan the images from the SD card and I found Zxing doesn't provide the feature. I've searched Google for the solution but all in vain. Can anybody suggest me the proper library or modified Zxing library which has the feature API to scan QR code from images on SD card. Is it possible or does it exists.

Mostafa Imran
  • 659
  • 2
  • 9
  • 28

1 Answers1

1

You can use the method

decode(BinaryBitmap)

of the class

com.google.zxing.MultiFormatReader.MultiFormatReader

To get the BinaryBitmap do something like this:

new BinaryBitmap(new HybridBinarizer(new RGBLuminanceSource(bitmap)))

There are several ways to get a bitmap from an image file. For example: https://stackoverflow.com/a/6228188/2048263

Community
  • 1
  • 1
Jorge Cevallos
  • 3,667
  • 3
  • 25
  • 37