getimagesize()
getimagesize - Get the size of an image
Syntax
array getimagesize (
string $filename,
array &$imageinfo)
Arguments
- filename - This parameter specifies the file you wish to retrieve information about. It can reference a local file or (configuration permitting) a remote file using one of the supported streams.
- imageinfo - This optional parameter allows you to extract some extended information from the image file. Currently, this will return the different JPGAPP markers as an associative array. Some programs use these APP markers to embed text information in images. A very common one is to embed » IPTCinformation in the APP13 marker. You can use the iptcparse() function to parse the binary APP13 marker into something readable.
Description
The getimagesize() function will determine the size of any given image file and return the dimensions along with the file type and a height/widthtext string to be used inside a normal HTML IMGtag and the correspondant HTTPcontent type.
Version
PHP 4, 5
Return value
Returns an array with 7 elements.