Issue with ImageMagick and PHP -
im struggling simple reading image in imagemagick , not sure why
the website hosted under linux php version 5.4
after uploading image in order print it.
$image = $_files['file']['name']; $imagen = new imagick($image); $imagen->thumbnailimage(100, 0); echo $image;
(pub1.gif) it's name of original image uploaded
but i'm getting following error , no idea how handle it.
fatal error: uncaught exception 'imagickexception' message 'unable open image `pub1.gif': no such file or directory @ blob.c/openblob/2480' in /home/content/38/10882038/html/carsventa/accountpass/post/publish-advertisement.php:74stack trace:#0 /home/content/38/10882038/html/carsventa/accountpass/post/publish-advertisement.php(74): imagick->__construct('pub1.gif')#1 {main} thrown in /home/content/38/10882038/html/carsventa/accountpass/post/publish-advertisement.php on line 74
you should using:
$image = $_files['file']['tmp_name'];
instead of:
$image = $_files['file']['name'];
you're trying use client file, not located in server, therefore library cannot access properly.
Comments
Post a Comment