zhangyuanwei / node-images

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

Electron最新版(1.7.9)自带的node.js(7.x)不能使用images模块 #126

Closed KanaHayama closed 5 years ago

KanaHayama commented 7 years ago

Error: imagesdoes not yet support your current environment: Windows 64-bit with Unsupported runtime (54) 7.x不是LTS,但Electron(electron.atom.io)又在用。用不了很让人头疼……

oxUnd commented 7 years ago

自己编译一下?

chenxiaochun commented 7 years ago

搜索了一大圈儿,确实是没招儿了。

painty commented 6 years ago

能提供下Windows下的编译方法吗?

chenxiaochun commented 6 years ago

@painty ,我是在网上看到过几种方法,使用npm rebuild或者node-gyp。可是在我的项目里没有尝试成功,你可以试试。

lihang1870719 commented 6 years ago

mac上成功了,window一直报错啊

lihang1870719 commented 6 years ago

@xiangshouding 你好,我按照说明重新编译windows的版本,提示下面的错误,如果可以,麻烦给点提示

Image.obj : error LNK2001: 无法解析的外部符号 "enum ImageState __cdecl rotate(st
ruct Pix
elArray *,struct PixelArray *,unsigned __int64)" (?rotate@@YA?AW4ImageState@@PE
AUPixelArray@@0_K@Z) [D:\work\demo\electron-quick-start\node_modules\node-image
s\build\binding.vcxproj]
giflib.lib(dgif_lib.obj) : error LNK2001: 无法解析的外部符号 reallocarray [D:\wo
rk\demo\
electron-quick-start\node_modules\node-images\build\binding.vcxproj]
D:\work\demo\electron-quick-start\node_modules\node-images\build\Release\bindin
g.node : fatal error LNK1120: 2 个无法解析的外部命令 [D:\work\demo\electron-quic
k-start\n
ode_modules\node-images\build\binding.vcxproj]
liupishui commented 6 years ago

https://github.com/electron/electron/blob/v0.37.2/docs/tutorial/using-native-node-modules.md#using-native-node-modules .\node_modules\.bin\electron-rebuild.cmd 编译失败同求解决办法

lihang1870719 commented 6 years ago

@liupishui 你可以试试node-canvas, 我用了这个库