The use of GM in Linux

Source: Internet
Author: User
Tags bz2

I have a Nodejs program that used GM (FILE_PATH). Size () to get picture size has been unsuccessful, tossing all day, because the document is less, and are not very correct, finally to the research out;

In Linux, GM can easily get pictures such as the size of the picture operation, but the use of GM need to install GraphicsMagick or ImageMagick, the following is my test GraphicsMagick installation method

1. Installation GraphicsMagick

CD/ALIDATA/SRC
wget http://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/1.3.18/ Graphicsmagick-1.3.18.tar.bz2/download
tar jxvf graphicsmagick-1.3.18.tar.bz2
CD GraphicsMagick-1.3.18
./configure–prefix=/usr/local/graphicsmagick-1.3.18 make make
install

2. Modify Environment variables:

Vim/etc/profile

Add the following string

gm_home=/usr/local/graphicsmagick-1.3.18;
Path= $GM _home/bin: $PATH;
Export PATH
Export Gm_home


Execute command source/etc/profile to take effect

3, testing

GM version can output success on behalf of GM normal

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.