dsp1836 2015-03-01 18:33
浏览 548

Imagick给我致命错误:未捕获异常'ImagickException',消息'无法打开图像

I'm pretty sure I've installed my imagick correctly. enter image description here

When I try and run something as simple as displaying an image with no changes to it like so:

header('Content-type: image/jpeg');

$image = new Imagick('image.jpg');

echo $image;

It displays a broken image.

When I attempt to display it without the header it gives me an error

Fatal error: Uncaught exception 'ImagickException' with message 'unable to open image `image.jpg': No such file or directory @ error/blob.c/OpenBlob/2642' in [my-php-file-uri]:4 Stack trace: #0 [my-php-file-uri](4): Imagick->__construct('image.jpg') #1 {main} thrown in [my-php-file-uri] on line 4
  • 写回答

1条回答 默认 最新

  • duanliang4009 2015-03-01 19:16
    关注

    The reason was because I had to include the full file-path URI

    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器