Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client-side picture scanning and generate qr-code. #91

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

username1565
Copy link

test.html not working on client-side from zip.
So this page qr_picture_scanning.html - added.
There is available to scan qr-code on client-side from picture.
Supporting formats: png/gif/jpg and, maybe, etc...

  1. Load picture from URL, without need to enable allow-access-control-origin (CORS).
  2. Download this as file.
  3. Upload image from downloaded file.
  4. Get base64 without any problem with canvas.toDataURL()
  5. Capture QR-code from base64 encoded image
  6. Result is available then.

All actions are available on client-side and picture qith qr-code can be cached.


Demo: https://username1565.github.io/jsqrcode/src/qr_picture_scanning.html
Styles from here: https://zxing.org/w/decode.jspx
Generate qr-code on client-side you can here (See source code):
https://username1565.github.io/brainwallet.github.io/
QR-code generator added in last commit.

test.html not working on client-side from zip.
So this page qr_picture_scanning.html - added.
There is available to scan qr-code on client-side from picture.
Supporting formats: png/gif/jpg and, maybe, etc...
1. Load picture from URL, without need to enable allow-access-control-origin (CORS).
2. Download this as file.
3. Upload image from downloaded file.
4. Get base64 without any problem with canvas.toDataURL()
5. Capture QR-code from base64 encoded image
6. Result is available then.

All actions are available on client-side and picture qith qr-code can be cached.
Add client-side qr-code generator. You can see qr-code when on changing the value of result-textarea.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant