| Welcome to WebmasterWorld Guest from 220.127.116.11 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|Capturing Image Properties|
| 8:48 pm on Aug 25, 2006 (gmt 0)|
Could someone please tell me how I can capture the height and width of an image and insert the values into variables?
| 8:58 pm on Aug 25, 2006 (gmt 0)|
$image = "image.jpg";
$info = [url=http://us3.php.net/manual/en/function.getimagesize.php]getimageinfo[/url]($image);
$width = $info;
$height = $info;
You can also use other methods. Good luck!
| 9:07 pm on Aug 25, 2006 (gmt 0)|
| 3:52 am on Aug 26, 2006 (gmt 0)|
If you have the image loaded in memory, you can use imageSX($img) and imageSY($img).
| 6:50 am on Aug 26, 2006 (gmt 0)|
And just so there is no confusion:
$info = getimageinfo($image);
$info = getimagesize($image);
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved