Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
A general purpose PSD parser written in Coffeescript. Based off of PSD.rb.
Runs in both NodeJS and the browser (using browserify). There are still some pieces missing that are present in PSD.rb, such as layer comp filtering, layer image exporting, a built-in renderer, and many layer info blocks. The eventual goal is full feature parity with PSD.rb.
PSD.js has no native dependencies. Simply add psd
to your package.json or run npm install psd
.
PSD.js works almost exactly the same in the browser and NodeJS.
var PSD = require('psd');
var psd = PSD.fromFile("path/to/file.psd");
psd.parse();
console.log(psd.tree().export());
console.log(psd.tree().childrenAtPath('A/B/C')[0].export());
// You can also use promises syntax for opening and parsing
PSD.open("path/to/file.psd").then(function (psd) {
return psd.image.saveAsPng('./output.png');
}).then(function () {
console.log("Finished!");
});
var PSD = require('psd');
// Load from URL
PSD.fromURL("/path/to/file.psd").then(function(psd) {
document.getElementById('ImageContainer').appendChild(psd.image.toPng());
});
// Load from event, e.g. drag & drop
function onDrop(evt) {
PSD.fromEvent(evt).then(function (psd) {
console.log(psd.tree().export());
});
}
FAQs
A general purpose Photoshop file parser.
The npm package psd receives a total of 885 weekly downloads. As such, psd popularity was classified as not popular.
We found that psd demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.