pgmagick

pgmagick image object to blob

狂风中的少年 提交于 2019-12-24 21:37:48
问题 Is there a way I can convert the Image() object to blob? If I want to serve an image which is created by pgmagick to a HTTP request without writing it on the disk, I see converting the image object to blob and then streaming back to the request is the only option. Let me know if there are any alternatives to achieve this. Below is the code sample which creates an image. from flask import Flask from pgmagick import Image, Geometry, Color, \ DrawableText app = Flask(__name__) @app.route("/")