image-transfer-util
v1.0.2
Published
> 图像处理 打码 > 支持es,umd,var ## 🔧 使用: esmodule与umd使用 ```js import { Masek } from "image-transfer-util" let canvas = document.querySelector(".canvas") let ctx = canvas.getContext("2d", {willReadFrequently: true}) let masek = new Masek({ctx, imgUrl: "/nba.jpeg
Downloads
2
Readme
🌈 简介:
图像处理 打码 支持es,umd,var
🔧 使用:
esmodule与umd使用
import { Masek } from "image-transfer-util"
let canvas = document.querySelector(".canvas")
let ctx = canvas.getContext("2d", {willReadFrequently: true})
let masek = new Masek({ctx, imgUrl: "/nba.jpeg", x:220, y: 50, height: 100, width: 350, fuzziness: 5})
masek.download('filename')
var 使用
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<canvas class="canvas"></canvas>
<script src="main.var.js"></script>
<script>
let masek = new imageTransferUtil.Masek({ctx, imgUrl: "/nba.jpeg", x:220, y: 50, height: 100, width: 350, fuzziness: 5})
masek.download('filename')
</script>
</body>
</html>