Name

getimagesize

Synopsis

$file_info_array = getimagesize($filename);

Returns an array of information about the image in the file filename. The first element of the array is the width of the image, the second is the height, and the third is the type of the image. GIF, JPG, and PNG images are currently recognized. The fourth element is a string of the format “width=xxx height=yyy” which can be used directly in an HTML <IMG> tag.

Get MySQL and mSQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.