Skip to content

A Photoshop PSD file parser for NodeJS and browsers

Notifications You must be signed in to change notification settings

BellyABC123/psd.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PSD.js

Build Status

A general purpose PSD parser written in Coffeescript. Based off of PSD.rb.

Runs in both NodeJS and the browser (using browserify).

Basic Usage

PSD.js works almost exactly the same in the browser and NodeJS.

NodeJS

var PSD = require('psd');
var psd = PSD.fromFile("path/to/file.psd");
psd.parse();

console.log(psd.header.export());

Browser

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());
  }); 
}

About

A Photoshop PSD file parser for NodeJS and browsers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published