Search code examples
phpimagemagickimagick

Imagick knowing the image size? (file size)


 $im = new Imagick($path);
 $im->resizeImage();

 echo $im->calc_image_size(); ? //> 121312 Bytes

Is there a calc_image_size or I have to write in a file and check the dimension? (fail)


Solution

  • getImageSize throws a Deprecated.

    Imagick::getImageSize is deprecated. Imagick::getImageLength should be used instead
    

    http://php.net/manual/en/function.imagick-getimagelength.php