We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我选择的是node for gm库来处理图片上传后的压缩
node for gm
首先下载GraphicsMagick,建议把ImageMagick也下载了
注意如果要勾选Install legacy utilities(e.g. convert)选项,不然会出现Error: Could not execute GraphicsMagick/ImageMagick: gm “identify” “-ping” “-format” “%[EXIF:Orientation
Install legacy utilities(e.g. convert)
Error: Could not execute GraphicsMagick/ImageMagick: gm “identify” “-ping” “-format” “%[EXIF:Orientation
当然安装完后可以在cmd输入gm来测试是否成功
这里注意的是win系统在装完要重启一次电脑,不然有可能出现convert跟系统命令冲突的错误
convert
再安装node的gm库
npm install gm
GraphicsMagick是从ImageMagick中分离出来的 加载GraphicsMagick(大小4.26 MB)
GraphicsMagick
ImageMagick
var gm = require('gm')
加载ImageMagick(大小26.2 MB),推荐ImageMagick
var gm = require('gm').subClass({imageMagick: true})// 注意使用的区别
除了加载有区别,其他使用方式完全一样
The text was updated successfully, but these errors were encountered:
No branches or pull requests
安装
我选择的是
node for gm
库来处理图片上传后的压缩首先下载GraphicsMagick,建议把ImageMagick也下载了
GraphicsMagick
ImageMagick
注意如果要勾选
Install legacy utilities(e.g. convert)
选项,不然会出现Error: Could not execute GraphicsMagick/ImageMagick: gm “identify” “-ping” “-format” “%[EXIF:Orientation
当然安装完后可以在cmd输入gm来测试是否成功
这里注意的是win系统在装完要重启一次电脑,不然有可能出现
convert
跟系统命令冲突的错误再安装node的gm库
使用
GraphicsMagick
是从ImageMagick
中分离出来的加载GraphicsMagick(大小4.26 MB)
加载
ImageMagick
(大小26.2 MB),推荐ImageMagick
除了加载有区别,其他使用方式完全一样
The text was updated successfully, but these errors were encountered: