How to decode QR code
Recently i published a tutorial on How to Generate QR Code in PHP and many readers send emails to decode QR code, so I am writing this article to decode you QR code you have to upload image of QR code and it will show you text inside that code image. This QR code decoder works on HTML 5 file API and canvas tag and used webqr library.
[wpdm_file id=36] |
Include js libraries in your page where you want to decode qr codes.
<script type="text/javascript" src="llqrcode.js"></script> <script type="text/javascript" src="webqr.js"></script>
HTML for page design
<html> <head> <!--C S S H E R E--> </head> <body onload="load(); setimg();"> <div id="main"> <div id="mainbody"> <div id="outdiv"> </div> <div id="result"></div> </div></div> <canvas id="qr-canvas" width="800" height="600"></canvas> <!--Canvas to draw image --> </body> </html>
CSS for styling
<style type="text/css"> body{ width:100%; text-align:center; } #qrfile{ width:320px; height:240px; } #qr-canvas{ display:none; } #outdiv { width:320px; height:240px; border: solid; border-width: 1px 1px 1px 1px; } #result{ border: solid; border-width: 1px 1px 1px 1px; padding:20px; width:37.3%; } #imghelp{ position:relative; left:0px; top:-160px; z-index:100; font:18px arial,sans-serif; background:#f0f0f0; margin-left:35px; margin-right:35px; padding-top:10px; padding-bottom:10px; border-radius:20px; } p.helptext{ margin-top:54px; font:18px arial,sans-serif; } p.helptext2{ margin-top:100px; font:18px arial,sans-serif; } </style>
Hope you like this tutorial feel free to comment.
Tutorial Categories:
Its awesome…..
thanks dude…
it will be in my next project
i m not allowed to download the files even after the subscription. its says you are not subscribed . i
same problem as om i m not allowed to download the files even after the subscription. its says you are not subscribed .
push: subscription – download – bug 😀
fantabulous code!
My question is how can I get the location, i.e. the xy
coordinates, of the QR section in an image. To be more precise, suppose there is
an A4 size image with a QR-code(4cm*4cm) on top left of it. What I need is the
exact coordinates (in pixel) of the QR-code in that image.
After subscription also , I am not able to download script….. 🙁
Cool tutorial 🙂
After subscription also , I am not able to download script….. 🙁
Me too, did you get it solved?
i m not allowed to download the files even after the subscription. its says you are not subscribed . i
Hi, is it possible to supply the image as string to a PHP based api that would then decode it?
after getting the scanned text from image. whether you are storing the text somewhere if yes then tell me how you did?
what to do if i need to select pdf file.??
Can you suggest any changes..?
So many error in your web bro.. you must fix it or your web can be hacked.. ^-^
Hi, QR code decoder is fantastic. I want to store the QR code output to a variable. I could not find it. Please help
Good
after decoding the qrcode I want to edit those text How to do it ?