get image width and height
Moderator: General Moderators
-
psychotomus
- Forum Contributor
- Posts: 487
- Joined: Fri Jul 11, 2003 1:59 am
get image width and height
how can i get a images width and height?
-
method_man
- Forum Contributor
- Posts: 257
- Joined: Sat Mar 19, 2005 1:38 am
Code: Select all
<html>
<body>
<p>
<img src="e;blah.gif"e;
width="e;20"e; height="e;20"e;>
</p>
<p>
<img src="e;blah.gif"e;
width="e;45"e; height="e;45"e;>
</p>
<p>
<img src="e;blah.gif"e;
width="e;70"e; height="e;70"e;>
</p>
//You can make a picture larger or smaller changing the values in the "e;height"e; and "e;width"e; attributes of the
img tag.//
</body>
</html>matt
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
I think he needs
http://ca3.php.net/manual/en/function.getimagesize.php
http://ca3.php.net/manual/en/function.getimagesize.php
Code: Select all
$info = getimagesize($image);
//info now contains the dimenisions of the image
echo '<pre>'.print_r($info).'</pre>';