How to implement maximum image size in php POST?

Hi TOASTER,and its users!) Need help!)
There is a script,it download the image (or Rather ava to user)
Loaded it via the POST method.
Need to do the maximum and minimum size of the pictures.
After loading,it is loaded to my desired size,but if the photo is smaller,alas....
How to implement in advance a big fat respect!)
July 9th 19 at 10:46
1 answer
July 9th 19 at 10:48
So you can get the size (maybe easier)
switch( pathinfo( $filename, PATHINFO_EXTENSION ) ) {
case 'jpeg':
case 'jpg': $image = imagecreatefromjpeg($filename); break;
case 'png': $image = imagecreatefrompng($filename); break;
default: break;
}
$width = imagesx($image);
$height = imagesy($image);

Find more questions by tags PHPWeb Development