Page 1 of 1

image height and width

Posted: Wed May 12, 2004 7:51 pm
by loongest
can anyone guide me some direction for the image file dimension ?

thanks : )

Posted: Wed May 12, 2004 8:02 pm
by launchcode

Code: Select all

//	Get the dimensions of the image
	$size = getimagesize($file_tmp_name);
	$image_width = $size[0];
	$image_height = $size[1];
where $file_tmp_name is the FULL PATH and NAME of the image you want to inspect.

Posted: Wed May 12, 2004 8:05 pm
by tim
for a lil bit better example and further explanation, always go to the manual

http://us3.php.net/manual/en/function.getimagesize.php

:wink: :wink: