Is there a way to check the height and width of a uploaded pictures or even if the picture is already on the server to check the height and width is?
ie I want to be able to reject pictures that don't meet a min, or max hieght and width.
phpScott
images
Moderator: General Moderators
Just out of curiosity how are you doing it?
I'm currently using..
I'm currently using..
Code: Select all
<?php
$image_info=getimagesize("path the to image");
$image_width=$image_info[0];
$image_height=$image_info[1];
?>that's it
That is exactly what I am using. I did a search on the php.net site and found a whole lot of image functions and stumbled across getimagesize().
I was just being a little lazy in posting the question instead of doing the research.
phpScott
I was just being a little lazy in posting the question instead of doing the research.
phpScott