0

I have installed

  • PHP 5.5.15
  • Apache 2.4.10
  • ImageMagick-6.7.7-5-Q16-windows-dll
  • php_imagick-3.2.0RC1-5.5-ts-vc11-x86

Imagick extension has installed correctly. but when i run the following code

$handle = fopen($url,"rb");

$img = new Imagick(); $img->readImageFile($handle);

Fatal error: Uncaught exception 'ImagickException' with message 'Unable to read image from the filehandle'

Thanks in advance

Mujtaba M
  • 5
  • 2
  • check whether you are able to read file, might be permission issue. try $handle = fopen($url,"rb") or die('could not read file'); – undefined_variable Nov 05 '15 at 12:43
  • Reading files from a URL is just not good. Use a library that is designed to do that properly (e.g. Curl) to download the file, and then open it in Imagick as just a normal file. – Danack Nov 05 '15 at 15:33

0 Answers0