环境如下:
apache/2.4.18 (win64) openssl/1.0.2e php/5.6.16
imagick module version 3.4.2
imagick classes imagick, imagickdraw, imagickpixel, imagickpixeliterator, imagickkernel
imagick compiled with imagemagick version imagemagick 6.9.3-7 q16 x64 2016-03-27 http://www.imagemagick.org
imagick using imagemagick library version imagemagick 6.9.3-7 q16 x64 2016-03-27 http://www.imagemagick.org
demo1 代码如下:
ini_set('display_errors',1);
header('content-type: image/jpeg');
$image = new imagick('1.jpg');
$image->thumbnailimage(100,0);
echo $image;
exit;
报如下错误:
图像“http://www.testf.com/test.php”因存在错误而无法显示。
demo2 代码如下
$thumb = new imagick();
$thumb->readimage('1.jpg');
$thumb->writeimage('test.gif');
$thumb->clear();
$thumb->destroy();
exit;
报如下错误:
fatal error: uncaught exception 'imagickexception' with message 'unabletoopenblob `1.jpg': no such file or directory @ error/blob.c/openblob/2702' in i:\wamp\apache24\htdocs\test\test.php:3 stack trace: #0 i:\wamp\apache24\htdocs\test\test.php(3): imagick->readimage('1.jpg') #1 {main} thrown in i:\wamp\apache24\htdocs\test\test.php on line 3
请指点一下,谢谢。
检查你的 1.jpg 是否存在,路径是否正确
图片,路径正确
别逗了, ..... `1.jpg': No such file or directory 没有这样的文件或目录
别逗了, ..... `1.jpg': No such file or directory 没有这样的文件或目录
<?php$imagick = new Imagick();$imagick->readImage('http://images.csdn.net/20160518/380-253.jpg');$imagick->writeImages('converted.jpg', false); exit; Failed to read the file 读取文件失败
怎么是我觉得如何呢?
他已经清清楚楚的告诉了你问题的原因!
好吧。算我没问。
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号