Image Magick issues getting colorprofile
Im trying to get the colorprofile of any image and i cant seem to do it with imageMagick. I can get the profile from some images with exif_read_data
but I need the profile from all images. i found the function getImageProfile()
but it does not seem to do anything. When i use image magick i always run commands with exec()
do I hav开发者_如何学Ce to install something else to run normal functions like the following?
here is my code that does work:
$newfile="tmp_image/someimage.jpg";
$comment=GetImageProfile($newfile,"comment");
print "-".$comment."-";
When i run that code, i dont even see the dashes, so the function is crashing php
Are you using linux? I did this for centos..
yum install php-devel
pecl install imagick
service httpd restart
Also try ..
1) Turning on error reporting in the file
ini_set(‘display_errors’,1);
error_reporting(E_ALL|E_STRICT);
2) Try using another ImageMagick function to see if it is an extension issue or if it's something else.
精彩评论