If you want to read the image from standard in, you need to use a hyphen. You should be able to do something along the lines of
identify -format "%x %y" gif:- $stringContentOfImage
You may be able to specify just the "-" without the whole "gif:-", but I don't know that for sure.
You can find more info about "standard in" at
http://www.imagemagick.org/script/comma ... .php#input
identify, input string
On second thought, standard in works more like
I just tried
cat a.gif | identify -format "%x,%y" -
and it worked great.
Code: Select all
$cmd = 'echo ' . $img . ' | /usr/local/bin/identify -format "%x,%y" -';
cat a.gif | identify -format "%x,%y" -
and it worked great.