1.0.13 • Published 6 months ago

@ww1818/imgwithwatermark v1.0.13

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

快速给图片左下角加水印

使用说明

安装

npm install @ww1818/imgwithwatermark --save

引入

//ems 引入
import Imgwithwatermark from "@ww1818/imgwithwatermark";

使用

//实例化
let imgWithWaterMark = new Imgwithwatermark({
  fillStyle,
  text,
  quality,
});
参数类型是否必填含义
fillStylestring水印样式默认'#fff'
textstring水印文案
qualitynumer压缩质量 0-1
//返回 base64

let url = await imgWithWaterMark.setWaterMark({ img, text });
参数类型是否必填含义
imgobject图片必传 file 类型
textstring水印
//销毁canvsa
imgWithWaterMark.destoryCanvas();
1.0.13

6 months ago

1.0.12

6 months ago

1.0.11

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago