const image = require('../lib/image.js')()
const fs = require('fs')

image.addWatermark(fs.readFileSync('/Users/luoshi/test/1-1.jpg'), '/Users/luoshi/test/1-2.jpg', {
    "objectiveScore": "48",
    "subjectiveScore": "31",
    "campusCode": "26",
    "objectiveScoreDetail": [
        {
            "mainNumber": 1,
            "subNumber": 1,
            "score": 2,
            "answer": "D"
        },
        {
            "mainNumber": 1,
            "subNumber": 2,
            "score": 2,
            "answer": "C"
        },
        {
            "mainNumber": 1,
            "subNumber": 3,
            "score": 2,
            "answer": "C"
        },
        {
            "mainNumber": 1,
            "subNumber": 4,
            "score": 2,
            "answer": "A"
        },
        {
            "mainNumber": 1,
            "subNumber": 5,
            "score": 2,
            "answer": "C"
        },
        {
            "mainNumber": 1,
            "subNumber": 6,
            "score": 2,
            "answer": "A"
        },
        {
            "mainNumber": 1,
            "subNumber": 7,
            "score": 0,
            "answer": "A"
        },
        {
            "mainNumber": 1,
            "subNumber": 8,
            "score": 2,
            "answer": "C"
        },
        {
            "mainNumber": 1,
            "subNumber": 9,
            "score": 2,
            "answer": "A"
        },
        {
            "mainNumber": 1,
            "subNumber": 10,
            "score": 2,
            "answer": "C"
        },
        {
            "mainNumber": 1,
            "subNumber": 11,
            "score": 2,
            "answer": "A"
        },
        {
            "mainNumber": 1,
            "subNumber": 12,
            "score": 2,
            "answer": "C"
        },
        {
            "mainNumber": 1,
            "subNumber": 13,
            "score": 2,
            "answer": "B"
        },
        {
            "mainNumber": 1,
            "subNumber": 14,
            "score": 2,
            "answer": "D"
        },
        {
            "mainNumber": 1,
            "subNumber": 15,
            "score": 2,
            "answer": "A"
        },
        {
            "mainNumber": 1,
            "subNumber": 16,
            "score": 2,
            "answer": "D"
        },
        {
            "mainNumber": 1,
            "subNumber": 17,
            "score": 2,
            "answer": "C"
        },
        {
            "mainNumber": 1,
            "subNumber": 18,
            "score": 2,
            "answer": "B"
        },
        {
            "mainNumber": 1,
            "subNumber": 19,
            "score": 2,
            "answer": "B"
        },
        {
            "mainNumber": 1,
            "subNumber": 20,
            "score": 2,
            "answer": "A"
        },
        {
            "mainNumber": 2,
            "subNumber": 1,
            "score": 2,
            "answer": "ABC"
        },
        {
            "mainNumber": 2,
            "subNumber": 2,
            "score": 2,
            "answer": "CD"
        },
        {
            "mainNumber": 2,
            "subNumber": 3,
            "score": 2,
            "answer": "BD"
        },
        {
            "mainNumber": 2,
            "subNumber": 4,
            "score": 2,
            "answer": "BD"
        },
        {
            "mainNumber": 2,
            "subNumber": 5,
            "score": 2,
            "answer": "BD"
        }
    ],
    "subjectiveScoreDetail": [
        {
            "mainNumber": 3,
            "subNumber": 1,
            "score": 0
        },
        {
            "mainNumber": 3,
            "subNumber": 2,
            "score": 5
        },
        {
            "mainNumber": 3,
            "subNumber": 3,
            "score": 5
        },
        {
            "mainNumber": 3,
            "subNumber": 4,
            "score": 5
        },
        {
            "mainNumber": 3,
            "subNumber": 5,
            "score": 5
        },
        {
            "mainNumber": 3,
            "subNumber": 6,
            "score": 5
        },
        {
            "mainNumber": 4,
            "subNumber": 1,
            "score": 4
        },
        {
            "mainNumber": 4,
            "subNumber": 2,
            "score": 2
        }
    ]
}).then(console.log('success')).catch(error => {
    console.log(error)
})