How to use the ag-psd.writePsd function in ag-psd

To help you get started, we’ve selected a few ag-psd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wonderunit / storyboarder / src / js / files / file-helper.js View on Github external
var whiteBGContext = whiteBG.getContext('2d')
        whiteBGContext.fillStyle = 'white'
        whiteBGContext.fillRect(0, 0, whiteBG.width, whiteBG.height)
        children = [{
          "id": 1,
          "name": "Background",
          "canvas": whiteBG
        }].concat(children)
        let psd = {
          width: psdWidth,
          height: psdHeight,
          imageResources: {layerSelectionIds: [3] },
          children: children
        };

        const buffer = writePsd(psd)
        fs.writeFileSync(psdPath, buffer)
        fulfill()
      })
      .catch(error => {

ag-psd

Library for reading and writing PSD files

MIT
Latest version published 29 days ago

Package Health Score

68 / 100
Full package analysis