zbar v0.2.1 Zbar
Scan all barcodes in a JPEG image using the zbar library.
Link to this section Summary
Functions
Scan all barcode data in a JPEG-encoded image.
Link to this section Functions
Link to this function
scan(jpeg_data, timeout \\ 5000)
scan(binary(), pos_integer()) :: {:ok, [Zbar.Symbol.t()]} | {:error, :timeout} | {:error, binary()}
Scan all barcode data in a JPEG-encoded image.
jpeg_datashould be a binary containing JPEG-encoded image data.timeoutis the time in milliseconds to allow for the processing of the image (default 5000 milliseconds).
Returns:
{:ok, [%Zbar.Symbol{}]}on success{:error, :timeout}if the zbar process hung for some reason{:error, binary()}if there was an error in the scanning process