Click to See Complete Forum and Search --> : image width and height


eraguet
06-10-2003, 08:52 AM
hi
i am looking for function or a way to know the width and the height of a image

so that it could be automatiquely filled out
ex:
<img src='$img' width='img_w($img)' height='img_h($img)'/>

thanks
ed

pyro
06-10-2003, 10:38 AM
This will get the size of the image:

<?PHP

$pic = "yourimg.gif";

$wh = getimagesize($pic);
$width = $wh[0];
$height = $wh[1];

echo $width."x".$height;

?>