Giter Club home page Giter Club logo

watermark-js-plus's Introduction

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

watermark-js-plus's People

Contributors

gitter-badger avatar michael-chauvin avatar renovate[bot] avatar zhensherlock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

watermark-js-plus's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/algolia.yml
  • actions/checkout v4
.github/workflows/deploy.yml
  • actions/checkout v4
  • actions/setup-node v4
  • peaceiris/actions-gh-pages v3
.github/workflows/npm-publish.yml
  • actions/checkout v4
  • actions/setup-node v4
.github/workflows/sync-gitee.yml
npm
package.json
  • @babel/core ^7.24.3
  • @babel/eslint-parser ^7.24.1
  • @babel/plugin-transform-runtime ^7.24.3
  • @babel/preset-env ^7.24.3
  • @commitlint/cli ^19.2.1
  • @commitlint/config-conventional ^19.1.0
  • @element-plus/icons-vue ^2.3.1
  • @rollup/plugin-babel ^6.0.4
  • @rollup/plugin-commonjs ^25.0.7
  • @rollup/plugin-eslint ^9.0.5
  • @rollup/plugin-node-resolve ^15.2.3
  • @rollup/plugin-replace ^5.0.5
  • @rollup/plugin-strip ^3.0.4
  • @rollup/plugin-terser 0.4.4
  • @rollup/plugin-typescript ^11.1.6
  • @types/markdown-it ^13.0.7
  • @typescript-eslint/parser ^7.5.0
  • @vue/theme ^2.2.5
  • autoprefixer ^10.4.19
  • concurrently ^8.2.2
  • conventional-changelog-angular ^7.0.0
  • conventional-changelog-cli ^4.1.0
  • core-js ^3.36.1
  • cssnano ^6.1.2
  • element-plus ^2.6.3
  • eslint ^8.57.0
  • eslint-config-airbnb-base ^15.0.0
  • eslint-config-semistandard ^17.0.0
  • eslint-plugin-import ^2.29.1
  • husky ^9.0.11
  • lint-staged ^15.2.2
  • lodash ^4.17.21
  • markdown-it ^14.1.0
  • pinia ^2.1.7
  • rimraf ^5.0.5
  • rollup ^4.13.2
  • rollup-plugin-filesize ^10.0.0
  • rollup-plugin-postcss ^4.0.2
  • rollup-plugin-sass ^1.12.21
  • rollup-plugin-visualizer ^5.12.0
  • rollup-plugin-your-function ^0.5.3
  • terser ^5.30.2
  • typescript ^5.4.3
  • unplugin-element-plus ^0.8.0
  • vitepress ^1.0.2
  • vue ^3.4.21
  • node >=16.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

旋转水印幕布

你好, 我想问一下,如何旋转整个水印幕布至固定的角度,让水印看起来像是错开了一样,
旋转前
image
旋转后
企业微信截图_16841187015791

请问是否支持electron项目?

vue版本2.7.10、electron版本23.1.3中引入 会报错:‘VM1679 index.vue:55 Uncaught TypeError: watermark_js_plus__WEBPACK_IMPORTED_MODULE_4__.Watermark is not a constructor“

可在开发者工具中影藏水印

  • 打开页面
  • 打开开发者工具,打开Sources
  • 找到app.xxxxx.js,在第一行打个断点,刷新页面
  • 在Console中执行:
MutationObserver = {}
Object.defineProperty(window, 'MutationObserver', {
  writable: false,
  configurable: false
})
  • F8
  • 在Elements中删除水印元素

可在控制台隐藏水印

1、console中执行MutationObserver = null
2、在element中将水印容器div拖动到#app上方
3、重复步骤2
4、在#app上添加样式

    position: relative;
    z-index: 2147483647;
    background: #fff;

完成隐藏水印

过分易于隐藏

诸如:
1、header中添加<style>body > div:last-of-type {visibility: hidden!important;}</style>,
2、#app 上添加 z-index: 10001;background: #fff;
即可隐藏水印

能在 nodejs 中解水印吗

新功能

您建议的新功能或更新功能是什么?

希望能使用于 nodejs

为什么要包含此功能?

因为在前端加水印,在 nodejs 中解水印的需求还是挺普遍的

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.