zxingReadBarcodesImagePath function
Reads barcodes from XFile image path
Implementation
Future<Codes> zxingReadBarcodesImagePath(
XFile path, DecodeParams params) async {
final Uint8List imageBytes = await path.readAsBytes();
imglib.Image? image = imglib.decodeImage(imageBytes);
if (image == null) {
return Codes();
}
image = resizeToMaxSize(image, params.maxSize);
params.width = image.width;
params.height = image.height;
return zxingReadBarcodes(rgbBytes(image), params);
}