From fdd6ad4d249ae7644aa04f175b1a668c16769c47 Mon Sep 17 00:00:00 2001 From: "moneromooo.monero" Date: Thu, 24 Nov 2016 23:31:44 +0000 Subject: [PATCH] QRCodeImageProvider: fix 0/1 black/white mixup --- src/libwalletqt/QRCodeImageProvider.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libwalletqt/QRCodeImageProvider.cpp b/src/libwalletqt/QRCodeImageProvider.cpp index 217d3d7d..ad07897f 100644 --- a/src/libwalletqt/QRCodeImageProvider.cpp +++ b/src/libwalletqt/QRCodeImageProvider.cpp @@ -10,7 +10,7 @@ QImage QRCodeImageProvider::requestImage(const QString &id, QSize *size, const Q QImage img = QImage(qrcode.size, qrcode.size, QImage::Format_Mono); for (int y = 0; y < qrcode.size; ++y) for (int x = 0; x < qrcode.size; ++x) - img.setPixel(x, y, qrcode.getModule(x, y)); + img.setPixel(x, y, !qrcode.getModule(x, y)); // 1 is black, not "255/white" if (size) *size = QSize(qrcode.size, qrcode.size); return img;