- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
看起来我的主机支持 gd,但我仍然遇到错误(PHP 版本 5.3.28)
Fatal error: Call to undefined function imagecreatefromjpeg()
这是我的 phpinfo:
gd
GD Support enabled
GD Version bundled (2.1.0 compatible)
GIF Read Support enabled
GIF Create Support enabled
PNG Support enabled
libPNG Version 1.2.44
WBMP Support enabled
XBM Support enabled
Directive Local Value Master Value
gd.jpeg_ignore_warning 0 0
最佳答案
看起来虽然确实支持 GD,但它不是是用 libjpeg 编译的。 gd.jpeg_ignore_warning 不意味着您有 jpeg 支持。如果这是您自己的服务器,请确保使用 --with-jpeg-dir
运行配置。您可能需要搜索它。我使用命令 find/-name libjpeg*
得到了 CentOS5 的 /usr/lib
。如果这是共享主机,请让他们为您安装。
我完整的PHP编译如下:
wget http://us1.php.net/distributions/php-5.5.10.tar.gz -O php.tar.gz
tar -xvf php.tar.gz
cd php-5.5.10
yum -y install libxml2-devel libmcrypt-devel libpng-devel
./configure --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-apxs2 --with-mysql --with-mysqli --with-zlib --with-curl --with-libdir=lib --with-openssl --with-pdo-mysql --with-mcrypt --with-pcre-regex --enable-zip --with-gd --enable-mbstring --with-jpeg-dir=/usr/lib
make clean
make
make install
关于php - Gd 已安装,但 "Call to undefined function imagecreatefromjpeg()",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23988500/
在本地主机上,该库运行良好,当在生产环境中调用该函数时,php 会抛出一个 fatal error 。 我检查了那里的 phpinfo(),它已启用。 我想看看是否可以在 php.ini 上添加任何内
当我在“配置命令”中的 phpinfo() 输出显示时,如何启用(或者我可能需要安装)GD; --without-gd ? 我的 phpinfo() 输出“Core”中也没有任何内容,其中列出了“gd
当我在“配置命令”中的 phpinfo() 输出显示时,如何启用(或者我可能需要安装)GD; --without-gd ? 我的 phpinfo() 输出“Core”中也没有任何内容,其中列出了“gd
我正在尝试使用 GD 函数:imagettfbbox(),但它未定义。自从我在 Ubuntu 21.10 上以来,我已经编译了我自己的带有 argon2 支持的 PHP 版本。 我是这样配置的: ./
我正在尝试使用 GD 函数:imagettfbbox(),但它未定义。自从我在 Ubuntu 21.10 上以来,我已经编译了我自己的带有 argon2 支持的 PHP 版本。 我是这样配置的: ./
我已经通过一些在线资源自学了机器学习,但我有一个关于梯度下降的问题,但我无法弄清楚。 梯度下降的公式由以下逻辑回归给出: Repeat { θj = θj−α/m∑(hθ(x)−y)xj }
我在 centos 7 服务器和 nginx 网络服务器上使用 laravel 网络框架,我安装了 php71w-gd,但当我想上传文件时仍然出现此错误 Intervention \ Image \
我正在尝试安装 moodle,但它显示缺少/应该启用 php-gd 扩展。然而,gd 已经安装并且是最新的,当我命令 php -v 时,我收到以下错误,如下所示。 PHP Warning: PHP
编译最新的2.0.35版本,用默认的 ./configure编译 当make的时候,出现以下错误 configure.ac:64: error: possibly undefined macro
我有一个函数可以用来接受用户上传的图像,按比例将其缩放到最大宽度/高度为 4,000 像素,还可以生成 400 像素和 800 像素的缩略图。它需要能够处理透明的 PNG 并应用白色背景。 我当前的代
我试图弄清楚为什么我无法在我的 Debian 7 服务器上安装 GD perl 模块。这是我安装核心内容的方式: sudo apt-get install libgd-gd2-perl 然后运行
如何使用 PHP GD 库制作清晰度滤镜? 所以这... 转向这个... 如果用 PHP 做不到,还有什么其他语言可以做到? 最佳答案 我认为他想使用 PHP 的 GD 库。这很简单:function
我尝试使用 php gd 创建验证码图像: $im = imagecreatetruecolor(100, 25); $white = imagecolorallocate($im, 255, 255
我在网上找到了一些关于 PHP+GD 图像处理的内容,但似乎没有一个能给我我想要的东西。 我让人上传任意尺寸的图像,我编写的脚本将图像大小调整为不超过 200 像素宽 x 200 像素高,同时保持宽高
你好, 我试图围绕中心旋转一个圆形图像,然后切掉边。我看到了 imagerotate 函数,但它似乎没有围绕中心旋转。 有人有什么建议吗? 谢谢。 更新:由于它是一个圆,我想剪掉边缘并使我的圆保持相同
我正在尝试在特定图像上添加文本。它工作完美,但图像质量较低,尤其是 papyrus.ttf 字体。如何提高图像中文本的质量。但我需要高质量来打印输出。这是我的代码..它非常简单。 header("Co
我正在使用 jQuery 的 imgAreaSelect插件,以便裁剪图像并保存缩略图以在比例发生变化等情况下使用。不幸的是,结果与我的预期相去甚远,而且我无法做到正确。图像整体调整大小,而不是被裁剪
好吧,一个小背景故事。我正在重新设计我的一个旧网站,我想使用 Myriad Pro对于页面上的标题。这对于 PHP 等将是动态的。 起初我认为我应该只使用 CSS 样式并将 Myriad 定义为主要字
我想使用 GD 裁剪图像,但我希望它围绕特定形状裁剪,而不仅仅是一个正方形。 这可能吗? 最佳答案 一种方法是创建一个所需正方形大小的蒙版,其中包含一个透明的 alpha channel 。然后将其放
在 PHP GD 中,如何在不丢失任何的情况下将真彩色图像转换为调色板 颜色。用imagetruecolortopallete它不起作用。我有一个函数可以遍历所有颜色并过滤它们(例如灰度)。而且它不会
我是一名优秀的程序员,十分优秀!