求推荐图片缩放模块,谢谢。
发布于 6个月前 作者 bijiabo 459 次浏览

试了一下sharp,总是安装失败,搜索解决办法无果,望推荐几个其他的图片缩放模块,谢谢。

10 回复

@nihgwu 刚才尝试了一下,提示'Can\'t load the addon. please try to run 'node install.js' command.' 按照提示运行了目录下的install.js,又错误了…

fs.js:443
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
             ^
Error: EACCES, permission denied './build/Release/binding.node'
at Error (native)
at Object.fs.openSync (fs.js:443:18)
at ClientRequest.<anonymous> (/home/boooo/git/Moreii-express/node_modules/images/install.js:143:30)
at ClientRequest.g (events.js:199:16)
at ClientRequest.EventEmitter.emit (events.js:107:17)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:414:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:111:23)
at TLSSocket.socketOnData (_http_client.js:305:20)
at TLSSocket.EventEmitter.emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:159:16)

@bijiabo 这个模块需要编译的,你看看 npm install 的时候编译通过了没

@nihgwu 汗,才发现,刚才没注意,编译没通过。换imagemagick了,目前能缩放图片了,谢谢^^!

imagemagick最好

var gm=require(“gm”) ,imageMagick=gm.subClass({imageMagick:true});

http://blog.csdn.net/kidx_/article/details/9709387

回到顶部