def post(self, request): text = request.args["text"][0].decode(encoding="utf-8") font = request.args["font"][0] if "font" in request.args else "5x8" img = util.render_text(text, font) sha = util.save_image(img) return sha
def post(self, request): str_image = util.extract_field(request, "file") # lets see if its a usable image img = Image.open(StringIO.StringIO(buf)) sha = util.save_image(img) return sha