note 21534 added to ref.image
| From: | troels at webcode dot dk | Date: | Thu, 16 May 2002 09:54:52 +0000 |
| Subject: | note 21534 added to ref.image | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-30709@lists.php.net to get a copy of this message | ||
if your reading this part of the manual you might actually be looking for some help on making
imagemagick work with php. i did anyway.
i had a really hard time figuring out why i couldnt get identify to work properly. it seemed that
when i call it (with exec) i got a very strange error - unless (and this is the really strange part)
i sat the switch -verbose.
eventually i figured out that identify for some reason makes a temp file in the executing dir, when
running (but NOT if its in verbose-mode ?!?) ... therefore you have to change to a dir where you
have writing access (like /var/tmp/)
the code below works :
$cmd = "cd /var/tmp; /usr/local/bin/identify -format "
$cmd .= " \"%m\" ".$file;
echo "<B>".$cmd."</B>\n";
$type = exec($cmd);
echo "image is of type=".$type;
--
http://www.php.net/manual/en/ref.image.php
http://master.php.net/manage/user-notes.php?action=edit+21534
http://master.php.net/manage/user-notes.php?action=delete+21534
http://master.php.net/manage/user-notes.php?action=reject+21534