I'm having some problems with an updated ImageMagick installation where `readImageFile` produces a fatal error exception using the PHP API.
I've already had this working while running PHP 5.6 and the associated version of ImageMagick but recently updated to PHP 7.2 and updated the ImageMagick version as well.
I'm fetching an image stream from Amazon S3 with fopen and then reading the image file into ImageMagick using readImageFile:
Code: Select all
$blob = fopen('s3://' . $bucket . '/' . $prePath . urldecode($name), 'r');
$img = new Imagick();
$img->readImageFile($blob);
Code: Select all
PHP Fatal error: Uncaught ImagickException: improper image header `/var/tmp/magick-193308zvjjkKvCrJv' @ error/png.c/ReadPNGImage/4229
Code: Select all
PHP Fatal error: Uncaught ImagickException: insufficient image data in file `/var/tmp/magick-19454t7LA2q6pVdqv' @ error/jpeg.c/ReadJPEGImage/1106
- Mac OS X 10.12.6
- PHP Version 7.2.0RC2
- Compiled: ImageMagick 7.0.7-15 Q16 x86_64 2017-12-17
- Running: ImageMagick 7.0.7-18 Q16 x86_64 2017-12-29
- Module version: 3.4.3