Search code examples
windows-phone-8windows-phonezxingqr-codescanning

Scanning QR Image With Zxing from Windows Phone Image Library


We can scan images from camera with Zxing.Net but are there any solution to scanning existent images (like in library) ?


Solution

  • ZXing can read existent images, its Decode method takes WritableBitmap as a parameter. So you can get the image from user library with PhotoChooserTask, get WritableBitmap and read it.

    Using ZXing is demonstrated here: http://developer.nokia.com/community/wiki/Generating_and_scanning_barcodes_using_ZXing_on_Windows_Phone

    _barcodeReader.Decode(_previewBuffer); 
    

    _previewBuffer in this case is WritableBitmap