
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
avatar-splitting
Advanced tools
A portrait extraction method based on a mask layer of a portrait area, which separates the person from the background
Javascript
introduction<script src="https://cdn.jsdelivr.net/npm/avatar-splitting@2.0.4/dist/avatar-splitting.min.js"></script>
npm
npm install --save-dev avatar-splitting
import avatar from 'avatar-splitting'
avatar({
image:'http://mtapplet.meitudata.com/5d3594af6d16f939d0.jpg', //Required, original image or original image, mask composite image, can pass url / base64, support relative path;
exportType: 'base64', // Optional, export image mode, you can pass base64 / canvas
success(res) {
console.log(res);// Res may be base64 or canvas node
},
error(req) {
// Req back error reason {code:0,msg:''}
console.log(req);
},
});
avatar({
image:'https://oss.mtlab.meitu.com/mtopen/2QSdx418G5QLTEqCVAtbKrMGTWPcP8tY/MTU2Mzg3MjQwMA==/6fa1e1c5-27cc-4bc4-97de-64edf40a3996.jpg?1563875002917', //Required, original image or original image, mask composite image, can pass url / base64, support relative path;
maskImage: 'https://oss.mtlab.meitu.com/mtopen/2QSdx418G5QLTEqCVAtbKrMGTWPcP8tY/MTU2Mzg3MjQwMA==/c8c87d26-8d61-420c-aad0-31356af49aa1.jpg?1563875002794', // Optional, mask map, can pass url / base64, support relative path;
exportType: 'canvas',
success(res) {
console.log(res);// Res may be base64 or canvas node
},
error(req) {
// Req back error reason {code:0,msg:''}
console.log(req);
},
});
2.0.3 -- Modify README.md
2.0.1 -- Support dual image mode (the original image is separated from the mask)
2.0.0 -- Official release
1.0.0 -- Beta release
FAQs
the eliminate-mask function
The npm package avatar-splitting receives a total of 4 weekly downloads. As such, avatar-splitting popularity was classified as not popular.
We found that avatar-splitting 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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.