def flip_image(self, imagein):
outstr = ""
outfile = StringIO.StringIO(outstr)
img = Image.open(StringIO.StringIO(imagein))
out = img.transpose(Image.ROTATE_180)
out.save(outfile, img.format)
return outfile.getvalue()
文章目录