首页 > 解决方案 > 将 django python 中的二维码保存为 to_artistic 方法的 base64

问题描述

我想从 to_artistic 方法中保存我的二维码。

对于我一直在做的其他二维码:

buffer = io.BytesIO()
qr_img.save(buffer, format="PNG")
qr_code = "data:image/png;base64,"+base64.b64encode(buffer.getvalue()).decode("utf-8")
                

我怎样才能为 qr.to_artistic 做到这一点?文档:https ://segno.readthedocs.io/en/latest/web-development.html

谢谢!

标签: pythondjangoqr-code

解决方案



推荐阅读