PHP GD无法安装JPEG

时间:2013-08-04 21:24:30

标签: php image resize jpeg gd

目标:将多个图像调整为150x150像素

试图安装GD

php -v: PHP 5.4.16 (cli) (built: Jun 10 2013 23:07:03)

安装后gd_info()显示

Array
(
    [GD Version] => bundled (2.1.0 compatible)
    [FreeType Support] => 
    [T1Lib Support] => 
    [GIF Read Support] => 1
    [GIF Create Support] => 1
    [JPEG Support] => 
    [PNG Support] => 1
    [WBMP Support] => 1
    [XPM Support] => 
    [XBM Support] => 1
    [JIS-mapped Japanese Font Support] => 
)

您可以看到JPEG支持为FALSE。然后我尝试用

编译php
--with-gd \
--with-jpeg \
--with-jpeg-dir=/usr/lib/ \
--enable-shared

仍然没有.. PHP错误:Call to undefined function imagecreatefromjpg()

有什么想法吗?替代品,imagemagick?

0 个答案:

没有答案