
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
@hc-master/white-ink
Advanced tools
根据svg和png图片,生成对应白墨颜色的数据;
npm i @hc-master/white-ink
import { whiteInkForSvg, whiteInkForPng } from '@hc-master/white-ink';
// 模块默认导出两个方法,分别处理svg与png的白墨生成
function App() {
const handleInk = async function(type:'svg'|'png') {
switch (type) {
case 'svg':
// whiteInkForSvg生成的数据为svg内容的字符串
const svgStr = await whiteInkForSvg(demoSvg)
break;
case 'png':
// whiteInkForPng生成的数据为图片base64的字符串
const base64 = await whiteInkForPng(demPng, {
// 输出格式(默认png)
suffix: 'png',
// 填充像素值时的执行回调,须返回一个rgba对象值
// @param v - 当前像素的rgb对象值
change(v) {
return { r:0,g:0,b:0,a:1 }
}
})
break;
}
}
return (
<>
<div className="card">
<button onClick={() => handleInk('svg')}>生产svg白墨</button>
<button onClick={() => handleInk('png')}>生产png白墨</button>
</div>
</>
)
}
FAQs
A processor that generates printed white ink for png and svg files
We found that @hc-master/white-ink 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
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.