zhangyuanwei / node-images

Cross-platform image decoder(png/jpeg/gif) and encoder(png/jpeg) for Nodejs
https://npmjs.org/package/images
MIT License
1.55k stars 205 forks source link

Error: ../src/Image.cc:768 Unsupported type. #213

Open frenchbread opened 4 years ago

frenchbread commented 4 years ago

Hi! Getting "unsupported type" error (tested png and jpeg):

const images = require('images')

const ref = images('<path>' || buffer)

ref.size(400).save('...', {})

Any thoughts? Thanks in advance!

❯ node -v
v14.2.0

❯ npm -v
6.14.4

I am actually using this package within electron application in main process. Tested independently, and it works, but not when integrating with electron app.

oxUnd commented 4 years ago

Electron contain Node is special, Need rebuild it on Electron runtime.