18 Star 59 Fork 19

MichaelSun / watermark-js-plus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 2.80 KB
一键复制 编辑 原始数据 按行查看 历史
MichaelSun 提交于 2023-11-11 11:16 . release: v1.3.19

watermark logo

npm package GitHub Workflow Status npm bundle size npm download week GitHub Join the chat at https://gitter.im/china-hy/watermark-js-plus

Watermark

This is a canvas-based watermark for browser.

  • 🛠️ Rich Features
  • 🔑 Fully Typed APIs
  • 📦️ Extremely light

Watermark works with both Vue 2 , Vue 3 And React.

Translations

Installing

# or pnpm or yarn
npm install watermark-js-plus

Usage

Watermark

import { Watermark } from 'watermark-js-plus'

const watermark = new Watermark({
  content: 'hello my watermark',
  width: 200,
  height: 200,
  onSuccess: () => {
    // success callback
  }
})

watermark.create()

Blind Watermark

import { BlindWatermark } from 'watermark-js-plus'

const watermark = new BlindWatermark({
  content: 'hello my watermark',
  width: 200,
  height: 200,
  onSuccess: () => {
    // success callback
  }
})

watermark.create()

Decode Blind Watermark

import { BlindWatermark } from 'watermark-js-plus'

BlindWatermark.decode({
  url: uploadFile.url, // image url
  onSuccess: (imageBase64) => {
    // success callback
  }
})

Documentation

To learn more, check its documentation.

Maintainers

@zhensherlock.

Contributing

Feel free to dive in! Open an issue or submit PRs.

Standard Readme follows the Contributor Covenant Code of Conduct.

Contributors

This project exists thanks to all the people who contribute.

License

MIT © MichaelSun

TypeScript
1
https://gitee.com/cs_huayi_zhensherlock/watermark-js-plus.git
git@gitee.com:cs_huayi_zhensherlock/watermark-js-plus.git
cs_huayi_zhensherlock
watermark-js-plus
watermark-js-plus
main

搜索帮助