Remove duplicate function.

Fix reading QR codes with transparent backgrounds
This commit is contained in:
j433866 committed 2019-07-02 16:31:26 +01:00
1 parent be08a62f52
commit 1135ca5fb4
2 files changed
+2 -16

No files matched your search

+2
View File
@@ -33,6 +33,8 @@ export async function parseQrCode(input, normalise) {
image.background(0xFFFFFFFF);
image.normalize();
image.greyscale();
image = await image.getBufferAsync(jimp.MIME_JPEG);
image = await jimp.read(image);
}
} catch (err) {
throw new OperationError(`Error normalising iamge. (${err})`);