Click to See Complete Forum and Search --> : get image size
kproc
02-08-2007, 08:49 PM
users can upload images to a folder, which are displayed on a web page. I set the image size. I want to some how get the image size so that I can set a min and max based size display. most likely the images will be at various sizes and I want to use the actual size when setting the display size
pcthug
02-08-2007, 10:04 PM
To get dimensions of an image use the getimagesize function;
$size = getimagesize('img.jpg');
$size[0]; // width
$size[1]; // height
kproc
02-09-2007, 07:03 PM
is there a way to get the file size
NightShift58
02-09-2007, 07:11 PM
filesize() (http://www.php.net/manual/en/function.filesize.php)