centos 上 GraphicsMagic安裝筆記

來源:互聯網
上載者:User

標籤:lockbur

1 下載安裝包
   wget http://jaist.dl.sourceforge.net/project/graphicsmagick/graphicsmagick/1.3.23/GraphicsMagick-1.3.23.tar.gz
2 安裝graphicsmagick所需要的相依元件,需要說明的是這些組件不是必須的,但你功能會受限制.
[[email protected] GraphicsMagick-1.3.23]#yum install libpng* libjpeg* 
[[email protected] GraphicsMagick-1.3.23]#yum install freetype-devel glib2-devel cairo-devel -y

3 編譯安裝
[[email protected] bin]# ./configure --prefix=/usr/local/GraphicsMagick-1.3.23
[[email protected] bin]# make && make install
4 驗證截取縮圖
切換到安裝目錄下
[[email protected] bin]# pwd
/usr/local/GraphicsMagick-1.3.23/bin
[[email protected] bin]# ./gm convert eznwC1Ykcx-AAyZHAAMZ0OUvnls798.jpg  -resize 300x200 out.jpg

匯入環境變數:
[[email protected] bin]# vi /etc/profile

GMAGICK_HOME=/usr/local/GraphicsMagick-1.3.23
export GMAGICK_HOME
export PATH=${PATH}:${GMAGICK_HOME}/bin


5 常見的錯誤處理
gm convert: No decode delegate for this image format

一般是你沒安裝相應的格式編碼導致,比如你jpg你需要安裝libjpeg庫檔案,如果是png檔案出錯 需要安裝pnglib庫檔案



        可以看我網站GraphicsMagick產生縮圖效果: http://lockbur.com

本文出自 “一名清官 www.lockbur.com” 部落格,請務必保留此出處http://lockbur.blog.51cto.com/10014969/1719478

centos 上 GraphicsMagic安裝筆記

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.