[Bug] fail to transform image in electron 22
subframe7536 opened this issue · comments
subframe7536 commented
Search before asking
- I searched in the issues and found nothing similar.
Image version
1.5.0
System version
windows 11
Node.js version
16.15.0
Minimal reproduce step
app.whenReady().then(() => {
const win = new BrowserWindow()
win.show()
const data = readFileSync('test.png')
new Transformer(data)
.fastResize({ width: 400, filter: 3 })
.jpeg(70)
.then((buffer) => {
writeFileSync(`111.jpg`, buffer)
}).catch(e => {
console.error(e)
})
})
What did you expect to see?
get image file
What did you see instead?
the only error info: Error {code: 'Unknown', stack: 'Error', message: ''}
Anything else?
maybe see lovell/sharp#3384
Are you willing to submit a PR?
- I'm willing to submit a PR!