View Source Image.QRcode (image v0.16.0)
Detects and decodes QRcodes.
Note that the implementation, which is based upon eVision requires that the image be a 3-channel image in order to support detection.
Images that are in different formats must be converted first.
Link to this section Summary
Link to this section Functions
Detects and decodes a QR code in an image.
arguments
Arguments
image
is anyVix.Vips.Image.t/0
that has three bands (for example, a typical srgb image).
returns
Returns
{:ok, string}
or{:error, reason}
note
Note
Only images with three bands (channels) are supported. This restriction may be lifted in a future release.
Encodes a string as a QRCode.
arguments
Arguments
string
is any string to be encoded,options
is a keyword list of options. The default issize: :auto
.
options
Options
:size
is the size in pixels of the QRcode dimensions. The default is:auto
in which the generated QRcode will be the minimum dimensions necessary to encode thestring
.
returns
Returns
{:ok, image}
or{:error, reason}