create-osd

Use the interface to create a new watermark.

Request Mode

 POST http://ip/mwapi/create-osd
Parameter Description
fileName The file name
md5 The MD5 value of the file
sourceType The source type. 10: watermark
x srcWindow.x, 0~1000000
y srcWindow.y, 0~1000000
width srcWindow.width, 0~1000000
height srcWindow.height, 0~1000000
alpha The opacity value. Range: [0 - 1000000]
secondaryType The type of watermark.
4: picture
5: text
text The text content, which is the required parameter of text watermark.
textAlignment The text alignment, which is the required parameter of text watermark.
TEXT_ALIGNMENT_LEFT = 0,
TEXT_ALIGNMENT_CENTER = 1,
TEXT_ALIGNMENT_RIGHT = 2
textColor The text color, which is the required parameter of text watermark.
fontSize The font size, which is the required parameter of text watermark.
fontFamily The font family, which is the required parameter of text watermark.
glyph The text glyph, which is the required parameter of text watermark.
FONT_GLYPH_NONE = 0x0,
FONT_GLYPH_ITALICS = (0x1LL << 1),
FONT_GLYPH_UNDERLINE= (0x1LL << 2),
FONT_GLYPH_BOLD= (0x1LL << 3)
scaleX The scaling ratio of X-axis. Range: [0 - 1000000]
scaleY The scaling ratio of Y-axis. Range: [0 - 1000000]
{
    "fileName":"20220829142606.png",
    "md5":"d63dc1261702ab08ec15de54f86eabac",
    "sourceType":10,
    "x":371875,
    "y":459312,
    "scaleX":1000000,
    "scaleY":1000000,
    "width":261979,
    "height":77777,
    "alpha":1000000,
    "secondaryType":5,
    "text":"Input text here",
    "fontFamily":"sans-serif",
    "textColor":"0x000",
    "fontSize":"26",
    "glyph":0,
    "textAlignment":0
}

Response Body

JSON structure is as follows:

{
    "info":{
        "audioList":[
            {
                "layerId":0,
                "muted":0,
                "volume":1000000
            }
        ],
        "bgLayer":{
            "alpha":1000000,
            "cropWindow":{
                "height":1000000,
                "type":0,
                "width":1000000,
                "x":0,
                "y":0
            },
            "flip":0,
            "frame":{
                "color":0,
                "width":0
            },
            "givenBg":0,
            "mediaProgress":0,
            "pdfPosition":0,
            "pdfScaleMode":3,
            "pdfScaleValue":10000,
            "rotation":0,
            "sourceColor":255,
            "sourceDuration":0,
            "sourceHeight":0,
            "sourceId":0,
            "sourceThumbHeight":0,
            "sourceThumbWidth":0,
            "sourceTotalPageNumber":0,
            "sourceType":12,
            "sourceWidth":0,
            "srcWindow":{
                "height":1000000,
                "width":1000000,
                "x":0,
                "y":0
            },
            "videoPolicy":0,
            "webScaleValue":10000,
            "window":{
                "height":1000000,
                "width":1000000,
                "x":0,
                "y":0
            }
        },
        "dividerLine":{
            "color":0,
            "width":0,
            "x1":500000,
            "x2":500000,
            "y1":0,
            "y2":1000000
        },
        "id":103,
        "layerList":[
            {
                "alpha":1000000,
                "cropWindow":{
                    "height":1000000,
                    "type":1,
                    "width":1000000,
                    "x":0,
                    "y":0
                },
                "flip":0,
                "frame":{
                    "color":16777215,
                    "width":0
                },
                "givenBg":0,
                "mediaProgress":0,
                "pdfPosition":0,
                "pdfScaleMode":3,
                "pdfScaleValue":10000,
                "rotation":360,
                "sourceColor":255,
                "sourceDuration":0,
                "sourceHeight":85,
                "sourceId":2051,
                "sourceThumbHeight":41,
                "sourceThumbWidth":256,
                "sourceTotalPageNumber":0,
                "sourceType":10,
                "sourceWidth":527,
                "srcWindow":{
                    "height":1000000,
                    "width":1000000,
                    "x":0,
                    "y":0
                },
                "videoPolicy":0,
                "webScaleValue":10000,
                "window":{
                    "height":77777,
                    "width":261979,
                    "x":371875,
                    "y":459312
                }
            },
            {
                "alpha":1000000,
                "cropWindow":{
                    "height":1000000,
                    "type":0,
                    "width":1000000,
                    "x":0,
                    "y":0
                },
                "flip":0,
                "frame":{
                    "color":0,
                    "width":0
                },
                "givenBg":0,
                "mediaProgress":0,
                "pdfPosition":0,
                "pdfScaleMode":3,
                "pdfScaleValue":10000,
                "rotation":0,
                "sourceColor":255,
                "sourceDuration":0,
                "sourceHeight":0,
                "sourceId":0,
                "sourceThumbHeight":0,
                "sourceThumbWidth":0,
                "sourceTotalPageNumber":0,
                "sourceType":0,
                "sourceWidth":0,
                "srcWindow":{
                    "height":1000000,
                    "width":1000000,
                    "x":0,
                    "y":0
                },
                "videoPolicy":0,
                "webScaleValue":10000,
                "window":{
                    "height":0,
                    "width":0,
                    "x":0,
                    "y":0
                }
            }
        ],
        "name":"20220829142606",
        "template":2,
        "type":5
    },
    "message":"success",
    "status":0
}
1. Response Status
"status": 0
Name Description
status 0 indicates a successful data acquisition. Refer to API Status Codes to find specific description for other values.

results matching ""

    No results matching ""

    results matching ""

      No results matching ""