1. 图片生成
imgrender 开放 API
  • 接入必读
  • 状态码与错误码
  • 图片生成
    • 同步生成图片-v1
      POST
    • 同步生成图片-v2
      POST
  • 数据模型
    • 图片生成
      • 蓝图
      • 组件-文本
      • 组件-图片
      • 组件-直线
      • 组件-矩形
      • 组件-二维码
      • 通用属性-边框
      • 通用属性-边框圆角
    • 通用 Response
    • 通用错误码
  1. 图片生成

蓝图

{
    "width": 1,
    "height": 1,
    "backgroundColor": "string",
    "texts": [
        {
            "x": 0,
            "y": 0,
            "text": "string",
            "width": 0,
            "font": "SourceHanSansSC-Normal",
            "fontSize": 0,
            "lineHeight": 0,
            "lineSpacing": 1,
            "color": "#000000",
            "textAlign": "left",
            "zIndex": 0
        }
    ],
    "images": [
        {
            "x": 0,
            "y": 0,
            "width": 0,
            "height": 0,
            "url": "string",
            "borderColor": "#000000",
            "borderWidth": 0,
            "borderRadius": 0,
            "borderTopLeftRadius": 0,
            "borderTopRightRadius": 0,
            "borderBottomLeftRadius": 0,
            "borderBottomRightRadius": 0,
            "zIndex": 0
        }
    ],
    "lines": [
        {
            "startX": 0,
            "startY": 0,
            "endX": 0,
            "endY": 0,
            "width": 0,
            "color": "#000000",
            "zIndex": 0
        }
    ],
    "qrcodes": [
        {
            "x": 0,
            "y": 0,
            "size": 0,
            "content": "string",
            "foregroundColor": "string",
            "backgroundColor": "#ffffff",
            "zIndex": 0
        }
    ],
    "blocks": [
        {
            "x": 0,
            "y": 0,
            "width": 0,
            "height": 0,
            "backgroundColor": "#000000",
            "borderColor": "#000000",
            "borderWidth": 0,
            "borderRadius": 0,
            "borderTopLeftRadius": 0,
            "borderTopRightRadius": 0,
            "borderBottomLeftRadius": 0,
            "borderBottomRightRadius": 0,
            "zIndex": 0
        }
    ],
    "borderColor": "#000000",
    "borderWidth": 0,
    "borderRadius": 0,
    "borderTopLeftRadius": 0,
    "borderTopRightRadius": 0,
    "borderBottomLeftRadius": 0,
    "borderBottomRightRadius": 0
}
Built with