Decodes supported barcodes from image binaries and files.
Use decode/2 for every result, decode_one/2 for the first result, and
decode_file/2 to read and decode a file. Use formats/0 to inspect the
barcode formats guaranteed by this package.
Summary
Functions
Decodes every supported barcode in an image binary.
Decodes every supported barcode in an image file.
Decodes the first supported barcode in an image binary.
Returns the barcode formats guaranteed by this package.
Types
@type format() :: :qr_code | :data_matrix | :code_128 | :ean_13
A barcode format guaranteed by rxing.
@type reason() :: :invalid_image | {:unsupported_format, term()} | {:invalid_option, atom()} | {:limit_exceeded, :max_input_bytes | :max_width | :max_height | :max_pixels | :max_alloc_bytes} | {:file, File.posix()} | :internal_error
A stable error returned by a decoding operation.
Functions
@spec decode( binary(), keyword() ) :: {:ok, [Rxing.Result.t()]} | {:error, reason()}
Decodes every supported barcode in an image binary.
@spec decode_file( Path.t(), keyword() ) :: {:ok, [Rxing.Result.t()]} | {:error, reason()}
Decodes every supported barcode in an image file.
@spec decode_one( binary(), keyword() ) :: {:ok, Rxing.Result.t()} | {:error, :not_found | reason()}
Decodes the first supported barcode in an image binary.
@spec formats() :: [format()]
Returns the barcode formats guaranteed by this package.