electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit c51efc0afea97b40f1570d0c9834a853be13f573
parent 8bf55ecaab632e7a04c7925a03bb7ed4bc76fcf5
Author: ThomasV <thomasv@gitorious>
Date:   Fri, 13 Sep 2013 21:41:50 +0200

fix save_qrcode

Diffstat:
Mlib/bmp.py | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/lib/bmp.py b/lib/bmp.py @@ -194,14 +194,13 @@ class BitMap(object): def save_qrcode(qr, filename): - bitmap = BitMap( 35*8, 35*8 ) - #print len(bitmap.bitarray) + k = qr.moduleCount + bitmap = BitMap( (k+2)*8, (k+2)*8 ) bitmap.bitarray = [] - k = 33 - for r in range(35): - tmparray = [ 0 ] * 35*8 + for r in range(k+2): + tmparray = [ 0 ] * (k+2)*8 - if 0 < r < 34: + if 0 < r < k+1: for c in range(k): if qr.isDark(r-1, c): tmparray[ (1+c)*8:(2+c)*8] = [1]*8