您的位置:首页 > 运维架构 > Linux

linux下安装GraphicsMagick

2017-06-25 23:15 423 查看
系统为CentOS

1. 下载GraphicsMagick的文件GraphicsMagick-1.3.22.tar.gz

2. 将文件复制到/usr/local目录下

3. 解压GraphicsMagick-1.3.22.tar.gz文件,tar –zxvf GraphicsMagick-1.3.22.tar.gz

4. 在GraphicsMagick-1.3.22的目录里面配置,

./configure --prefix=/usr/local/GraphicsMagick-1.3.12

5. 安装,执行make 和 make all

6. 在/etc/profile中添加配置

export GMAGICK_HOME="/usr/local/GraphicsMagick-1.3.22"

export PATH="$GMAGICK_HOME/bin:$PATH"

LD_LIBARY_PATH=$GMAGICK_HOME/lib:$LD_LIBARY_PATH

export LD_LIBARY_PATH

然后保存配置:source /etc/profile

7. 测试是否安装成功

gm convert –list formats 若出现下面的:

Format L Mode Description

--------------------------------------------------------------------------------

3FR S r-- Hasselblad Photo RAW

8BIM P rw- Photoshop resource format

8BIMTEXT P rw- Photoshop resource text format

8BIMWTEXT P rw- Photoshop resource wide text format

………………

VICAR S rw- VICAR rasterfile format

VID S rw+ Visual Image Directory

VIFF S rw+ Khoros Visualization image

VST S rw+ Truevision Targa image

WBMP S rw- Wireless Bitmap (level 0) image

WPG S r-- Word Perfect Graphics

X3F S r-- Foveon X3 (Sigma/Polaroid) RAW

XBM S rw- X Windows system bitmap (black/white)

XC P r-- Constant image uniform color

XCF S r-- GIMP image

XMP P rw- Adobe XML metadata

XPM S rw- X Windows system pixmap (color)

XV S rw+ Khoros Visualization image

Y S rw+ Raw yellow samples

YUV S rw- CCIR 601 4:1:1 or 4:2:2 (8-bit only)

则安装成功。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息