Samples
QCodeDecoder keeps everything simple, trying to do well only a few things.
There are mainly three things to do with the library: decode a qr-code directly from camera (i.e, the phone's front/back camera, your webcam or whatever), from a video or from an image.
In the following samples the QRCodes contains a local IP Addres.
Image
The simplest case is decoding from an image. It only requires passing to the decodeFromImage
method the image's source or an image element that has a src
attribute set.
Video
Just like decoding from camera, a video can also contain a QRCode in it. Although not the common case, it is also exposed as it is a part of the Camera code.
Camera
Decoding from camera requires, firstly, access to the user's camera. For getting this, QCodeDecoder will ask the user about it (this process is required so that browsers are able to keep it secure) and, if conceived, start searching for a valid QRCode to decode.