CanvasDither:Canvas元素的黑白抖动算法

时间:2021-05-06 21:00:41
【文件属性】:
文件名称:CanvasDither:Canvas元素的黑白抖动算法
文件大小:27KB
文件格式:ZIP
更新时间:2021-05-06 21:00:41
JavaScript 帆布抖动 画布元素的黑白抖动 用法 首先,使用npm安装软件包: npm install canvas-dither --save 然后,要求该软件包并按如下方式使用它: let Dither = require('canvas-dither'); // Assume we have an existing canvas element with a 2D context // Retrieve the image data of the canvas let image = context.getImageData(0, 0, canvas.width, canvas.height); // Dither the data using the Atkinson algoritm image = Dither.atkinson(image); // Place the image da
【文件预览】:
CanvasDither-master
----.eslintrc.json(254B)
----.gitignore(24B)
----package.json(1KB)
----package-lock.json(79KB)
----src()
--------canvas-dither.js(4KB)
----LICENSE.md(1KB)
----dist()
--------canvas-dither.js(2KB)
----README.md(1KB)

网友评论