modifié: superTornado.py

This commit is contained in:
sidya82 2014-02-28 01:44:22 +01:00
parent 17eee21632
commit 9185db9ac2

View File

@ -50,14 +50,8 @@ class VideoHandler(BaseHandler):
name = tornado.escape.xhtml_escape(self.current_user)
with open("image/temp.jpg", 'rb') as f:
data = f.read()
qr.add_data(data)
qr.make(fit=True)
img = qr.make_image()
self.set_header('Content-type', 'image/png')
img_buff = StringIO()
img.save(img_buff)
img_buff.seek(0)
self.write(img_buff.read())
self.set_header('Content-type', 'image/jpg')
self.write(data)
self.finish()
class UnauthorizedHandler(BaseHandler):