cip-watermark
v1.0.0
Published
设置水印
Downloads
2
Readme
cip-watermark
水印
setup
npm install -S cip-watermark
yarn add cip-watermark
pnpm install cip-watermark
usage
import watermark from 'cip-watermark'
import dayjs from 'dayjs'
watermark.set(`文字信息\n${dayjs().format('YYYY-MM-DD')}`, { width: 500, height: 250, color: 'rgba(200, 200, 200, 0.50)', font: '20px Vedana' })
interface IWaterMarkOptions = {
width: string | number
height: string | number
color: string
font: string
}
watermark.set(text: string, options: Nullable<IWaterMarkOptions>)