dx-oss-poster

1.0.1 • Public • Published

安装

$ npm install dx-oss-poster

使用

const op = require('dx-oss-poster')
const oss={
    accessKeyId: 'xxx',
    accessKeySecret: 'xxx',
    region: 'oss-cn-shenzhen',
    bucket: 'bucket name'
}
 
const poster = new poster(oss, savePath: 'poster' });
 
const config = {
    background: "https://www.abc.com/background.jpg",
    element: [{
        type: "img",
        url: "https://www.abc.com/headimg.JPG",
        width: 100,
        height: 100,
        mode: 'fill',
        roundedCorners: 50,
        rotate: 0,
        x: 0,
        y: 0,
        position: "nw",
        voffset: 0
    }, {
        type: "text",
        fill: "ffffff",
        font: '文泉驿正黑',
        fontSize: 50,
        textShadow: 0,
        textRotate: 0,
        text: "这是一行文字",
        x: 0,
        y: 0,
        position: 'center',
        voffset: 500,
 
    }]
    
(async function(){
    let url=await op.makePoster(config)
})()

Readme

Keywords

Package Sidebar

Install

npm i dx-oss-poster

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

9.5 kB

Total Files

4

Last publish

Collaborators

  • daixin87