On linux console, if you need to get an image size, and imagemagick is not installed, you can use the following script (save it as "getimgsize.php", chmod +x, then run it with your image file":
#!/usr/bin/php -f
<?php
if ($argc<2){
die("Usage: getimagesize IMAGEFILE\n");
}
list($width, $height, $type, $attr) = getimagesize($argv[1]);
echo "Size is $width x $height\n";
identify
ReplyDeleteIn many systems, "identify" is not installed. So the method in the post provides the alternative way.
ReplyDelete