mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 12:09:57 +00:00
QRCodeImageProvider: fix 0/1 black/white mixup
This commit is contained in:
parent
26abdee5c4
commit
fdd6ad4d24
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ QImage QRCodeImageProvider::requestImage(const QString &id, QSize *size, const Q
|
||||||
QImage img = QImage(qrcode.size, qrcode.size, QImage::Format_Mono);
|
QImage img = QImage(qrcode.size, qrcode.size, QImage::Format_Mono);
|
||||||
for (int y = 0; y < qrcode.size; ++y)
|
for (int y = 0; y < qrcode.size; ++y)
|
||||||
for (int x = 0; x < qrcode.size; ++x)
|
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)
|
if (size)
|
||||||
*size = QSize(qrcode.size, qrcode.size);
|
*size = QSize(qrcode.size, qrcode.size);
|
||||||
return img;
|
return img;
|
||||||
|
|
Loading…
Reference in a new issue