一个工具,可更好地将徽标对齐到容器的中心。
pnpm add visual-center
const getVisualCenter = require('visual-center')
getVisualCenter(, function(err, result) {
/*
results in an object with the data as:
{
visualTop: <Visual center for Y axis, from 0 to 1>
visualLeft: <Visual center for X axis, from 0 to 1>
bgColor: <The background color that we detected>
width: <The width of the image>
height: <The height of the image>
}
*/
})
```## 许可证 BSD-3 条款许可证 由 [Javier Bórquez](https://javier.xyz) 创建。自 2016 年在线。暂无开放 Issues,或尚未同步最近议题。