From 9185db9ac247905d4d8650653ce3cc26843c85c1 Mon Sep 17 00:00:00 2001 From: sidya82 Date: Fri, 28 Feb 2014 01:44:22 +0100 Subject: [PATCH] =?UTF-8?q?=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20supe?= =?UTF-8?q?rTornado.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- superTornado.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/superTornado.py b/superTornado.py index 0b23ccd..e3438d1 100644 --- a/superTornado.py +++ b/superTornado.py @@ -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):