qr-scanner-cli / Exports
Ƭ Flags: Object
Name | Type |
---|---|
clear? |
boolean |
clipboard? |
boolean |
open? |
boolean |
▸ Const
scanFromBitmap(bitmap
, flags?
): Promise
<string>
You can pass a jimp Bitmap, this functions reads it's content and tries to find a QR Code, returning it's result
import Jimp from 'jimp'
const bitmap = Jimp.read('./image.jpg')
const value = await scanFromBitmap(bitmap)
Name | Type | Description |
---|---|---|
bitmap |
Bitmap | A Bitmap object |
flags? |
Flags |
Promise
<string>
Value read from the QR Code inside the image
src/pipelines/scanFromBitmap.ts:20
▸ Const
scanFromFile(filePath
, flags?
): Promise
<string>
This function reads a file, get it's bitmap, searches and read a qrcode from it.
const value = await scanFromFile('./image.jpg')
Name | Type | Description |
---|---|---|
filePath |
string |
A file path for an image file containing a QR Code |
flags? |
Flags |
Promise
<string>
Value read from the QR Code inside the image