Getimagesize -

Getimagesize function will determine the size of any given image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML IMG tag and the correspondant HTTP content type.
<?php
list($width, $height) = getimagesize('myimage.png');
echo "Image Width = " . $width . " / Image Height = " . $height;
if ($width > 990 || $height > 990) {
echo "
Maximum width and height exceeded. Please upload images below 990 x 990 px size"; exit(); } ?>