PHP | Imagick getImageLength() Function
The Imagick::getImageLength() function is an inbuilt function in PHP which is used to get the length of an image object in bytes.
Syntax:
bool Imagick::getImageLength( void)
Parameters: This function does not accept any parameter.
Return Value: This function returns the image length in bytes.
Below programs illustrate the Imagick::getImageLength() function in PHP:
Program 1:
Original Image:

<?php $imagick = new Imagick( // Getting Length of image // using getimagerelength function $res = $imagick->getImageLength(); // Display Result echo "Length of Image = " . $res; ?> |
Output:
Length of Image = 45435
Program 2:
Original Image:

<?php $imagick = new Imagick( // Getting Length of image // using getimagerelength function $res = $imagick->getImageLength(); // Display Result echo "Length of Image = ". $res; ?> |
Output:
Length of Image = 25694
Reference: http://php.net/manual/en/imagick.getimagelength.php
Recommended Posts:
- PHP | Imagick setRegistry() Function
- PHP | Imagick labelImage() Function
- PHP | Imagick listRegistry() Function
- PHP | Imagick morphology() Function
- PHP | Imagick paintOpaqueImage() Function
- PHP | Imagick edgeImage() Function
- PHP | Imagick clampImage() Function
- PHP | Imagick embossImage() Function
- PHP | Imagick getImageWhitePoint() Function
- PHP | Imagick colorMatrixImage() Function
- PHP | Imagick haldClutImage() Function
- PHP | Imagick hasPreviousImage() Function
- PHP | Imagick compositeImage() Function
- PHP | Imagick readImageBlob() Function
- PHP | Imagick resampleImage() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



