The example in this article describes how getimagesize gets the size of a picture. Share to everyone for your reference. Specifically as follows:
PHP has ready-made functions getimagesize to get the size of the image, code example:
The code is as follows: <?php
/* 1.jpg for you want to get the picture of its size * *
$arr = getimagesize ("1.jpg");
* Here $arr is an array type
* $arr  is the width of the image
* $arr  is the height of the image
* $arr  is the format of the image, including JPG, GIF and PNG, etc.
* $arr  for the width and height of the image, the content is width= "xxx" height= "yyy"
/* The following two lines of code output are the same * *
echo "echo "?>
I hope this article will help you with your PHP program design.