Change language

PHP Imagick pingImageFile () function

Syntex:
bool Imagick::pingImageFile ($filehandle, $fileName)
Parameters:This function takes two parameters as above and described below:
  • $filehandle:This is a required parameter. It opens a file descriptor to the image.
  • $fileName:This is an optional parameter. It contains the filename for this image.
Return Value:Returns True on success.The program below illustrates the Imagick::pingImageFile function() in PHP:Program :  
// Use the fopen() function to open the file $fp = fopen ( " https://media.engineerforengineer.org/wp-content/uploads/20190707132104/Capture40.jpg " , " rb " );  
// Create a new imagick object $im = new Imagick();  
// Pass the imagick descriptor
// without loading memory $im -> pingImageFile ( $fp );  
// Get the image height echo "The Height of the image is:" . $im -> getImageHeight(). "pixel
"
;  
// Get the width of the image echo "The Width of the image is:" . $im -> getImageWidth(). "pixel" ;  
?>
Output:
The Height of the image is: 215 pixel The Width of the image is: 604 pixel
Link: https://php.net/manual/en/imagick.pingimagefile.php

Shop

Learn programming in R: courses

$

Best Python online courses for 2022

$

Best laptop for Fortnite

$

Best laptop for Excel

$

Best laptop for Solidworks

$

Best laptop for Roblox

$

Best computer for crypto mining

$

Best laptop for Sims 4

$

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers


Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method