ImageMagick  问题
1 linux下怎么安装呀?
2 是用命令行来生成图还是用php写方法来调用呀? thanks

解决方案 »

  1.   

    参考下面的安装说明:
    http://www.imagemagick.org/script/install-source.php?ImageMagick=4p4h31042srtrg68r9v8ojrrg5#unix
      

  2.   

    linux下的ImageMagick安装方法。
    首先从网上下载 ImageMagick
    官方网址是: 
    www.imagemagick.org从官方不好下载,提供 sourceforge的下载地址: 
    imagemagick.sourceforge.net然后下载下来解压缩,
    ./configure –prefix=/usr/local/imagemagick –enable-lzw –with-modules && make && make install
    基本上这样就可以了。
    默认的就支持jpeg,png等图片
    你也可以加入–without-xxx来禁止一些选项,具体的就 ./configure –help | grep without吧。
    ok编译好了,需要的时间漫长的。
    然后就可以测试了。
    /usr/local/imagemagick/bin/convert -quality 90 -resize 100×100 /tmp/origine_image.jpg /tmp/small_100_100.jpg
    就是说将/tmp目录下的origine_image.jpg图片重新缩放成100×100的大小保存在/tmp目录下文件名为small_100_100.jpg,图片质量为90。
    具体更多的,用的时候就知道了,还可以用php把imagemagick编辑成为php的模块
    根据自己的情设置环境变量:
    修改/etc/profile
    LD_LIBRARY_PATH=/usr/local/lib:/usr/local/imagemagick
    export LD_LIBRARY_PATH
    修改/etc/ld.so.conf加入
      

  3.   

    问题二中
    如果php来调用 是不是要自己封装方法。。