2

目标:将多个图像的大小调整为 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。然后我尝试用

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

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

有任何想法吗?替代品,imagemagick?

4

0 回答 0