Hi all,
I'm trying to run a script that evaluates an image's resolution, and rejects or accepts the image based on the result. I'm using the ImageMagick command "identify" in the following fashion:
identify -format "%x" file.jpg
this works fine from the command line, returning the correct dpi of 144. But when used in my php script:
<?
print "The file resolution was ";
$exec_string="identify -format \"%x\" file.jpg";
passthru($exec_string,$resolution);
print $resolution;
print " dpi";
?>
the result is always 127, regardless of which "format" parameter I choose, including non-numerical parameters. i'm pretty sure the problem is in my $exec_string, but I can't see it. Any advice?
Thanks,
Ben