您好,欢迎访问一九零五行业门户网

图片扩展库(Imagick)小问题

环境如下:
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 代码如下:
thumbnailimage(100,0);  
echo $image;
exit;
报如下错误:
图像“http://www.testf.com/test.php”因存在错误而无法显示。
demo2 代码如下
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 没有这样的文件或目录
那你觉得这样如何呢。
readimage('http://images.csdn.net/20160518/380-253.jpg');$imagick->writeimages('converted.jpg', false); exit;
错误提示:
fatal error: uncaught exception 'imagickexception' with message 'failed to read the file' in i:\wamp\apache24\htdocs\test\test.php:3 stack trace: #0 i:\wamp\apache24\htdocs\test\test.php(3): imagick->readimage('http://images.c...') #1 {main} thrown in i:\wamp\apache24\htdocs\test\test.php on line 3
failed to read the file 读取文件失败
怎么是我觉得如何呢?
他已经清清楚楚的告诉了你问题的原因!
好吧。算我没问。
其它类似信息

推荐信息