lincolnloop/python-qrcode — pull request #18 by mozillazg (2013-01-18 09:51:12+00:00)
Title: Now, an instance of PilImage class have methods and attributes include all like an instance of PIL Image class.

Now, an instance of PilImage class have methods and attributes include all like an instance of PIL Image class.

Sorry, I don't know how to clear describe my idea by english.

After:

>>> import qrcode
>>> qr = qrcode.QRCode()
>>> qr.add_data('hello')
>>> im = qr.make_image()
>>> im.size
(290, 290)
>>> im.mode
'1'
>>> im.getbbox()
(0, 0, 290, 290)
>>> im.getdata()

>>> im2 = im.resize((200, 200))
>>> im2.size
(200, 200)
>>> im.size
(290, 290)
>>> im.thumbnail((250, 250))
>>> im.size
(250, 250)
>>> im.show()
>>>