Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
image-permutation
Advanced tools
一个图片排列工具
npm i --save image-permutation
<script src="https://unpkg.com/image-permutation/dist/image-permutation.umd.js"></script>
<script>
var source = new Image()
source.crossOrigin = 'anonymous';
source.onload = function() {
const config = {
width: 100,
rotate: 0,
cross: true,
mirror: {
x: false,
y: false
},
random: {
width: 0,
rotate: 0
},
gutter: {
horizontal: 20,
vertical: 20,
}
}
new ImagePermutation(1000, 1000, '#ff0000', [source], config).draw().then(data => {
var result = document.getElementById("result")
result.src = data
})
}
source.src = "./item.png"
</script>
new ImagePermutation(width, height, backgroundColor, source, config)
属性 | 说明 | 数据类型 | 默认值 |
---|---|---|---|
width | canvas内部的宽度 | number | - |
height | canvas内部的高度 | number | - |
backgroundColor | canvas背景颜色 | string | #fff |
source | 插入的image对象数组 | Array | [] |
config | 配置文件 | Json | {} |
{
width: 100, // 插入image宽度
rotate: 0, // image旋转角度
cross: true, // 是否穿插渲染
mirror: { // 镜像渲染
x: false, // x轴镜像
y: false // y轴镜像
},
random: { // 随机渲染
width: 0, // 宽度随机增量
rotate: 0 // 角度随机增量
},
gutter: { // 间隔
horizontal: 20, // 水平间隔
vertical: 20, // 垂直间隔
}
}
FAQs
We found that image-permutation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.