Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
}