How to use the ag-psd.writePsdBuffer 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 / exporters / psd.js View on Github external
psd.width = meta.canvas.width > psd.width ? meta.canvas.width : psd.width
    psd.height = meta.canvas.height > psd.height ? meta.canvas.height : psd.height

    id++
  }

  // generate a canvas for the Background layer
  let canvas = document.createElement('canvas')
  canvas.width = psd.width
  canvas.height = psd.height
  var context = canvas.getContext('2d')
  context.fillStyle = 'white'
  context.fillRect(0, 0, canvas.width, canvas.height)
  psd.children[0].canvas = canvas

  return writePsdBuffer(psd)
}

ag-psd

Library for reading and writing PSD files

MIT
Latest version published 10 days ago

Package Health Score

68 / 100
Full package analysis