mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-13 11:56:32 +02:00
Merge pull request #203
fdd6ad4
QRCodeImageProvider: fix 0/1 black/white mixup (moneromooo.monero)
This commit is contained in:
commit
0bab9a0b04
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user