javascript - JsQRCode reader not working properly -
i using jsqrcode js library decode qr codes. found works fine if take pictures of qr code close.
if take picture bit farther not able decode code.
note: code-decoding library used within sencha touch 2 app. picture taken using ext.device.camera api gives access phone camera.
has had similar problems? possible solution or alternative way reach goal (taking picture + qr decoding)?
any suggestion/comment appreciated! thank much!
here code i'm running:
ext.device.camera.capture({ success: function(fileuri) { // reassigning test purposes //fileuri = './resources/images/qrtemp.png'; console.log('camera success'); var imageview = ext.getcmp('cameraimg'); imageview.setsrc(fileuri); qrcode.decode(fileuri); }, failure: function() { console.log('camera failure'); }, quality: 100, source: 'camera' }, /*scope*/ this, /*destination*/ 'file', /*encoding*/ 'png'); ... qrcode.callback = function(data){ window.alert('qrcode callback: '+ data); };
update: found out problem camera api sencha touch returning small image (although supposed return bigger one), code reader lib not able decode! has faced sencha touch problem?
Comments
Post a Comment