LanceT Posted February 2, 2007 Share Posted February 2, 2007 I need to be able to store the width and height of an uploaded image as variables, so what is the way to do this? Also include some code on how to just upload the file, although I know there's plenty of code like this out there, I just want to see how you would IMPLEMENT this with your code. Thanks. Link to comment https://forums.phpfreaks.com/topic/36738-finding-width-and-height-of-uploaded-images/ Share on other sites More sharing options...
The Little Guy Posted February 2, 2007 Share Posted February 2, 2007 $img = "http://site.com/image.jpg"; echo imagesx($img).'<br>'; echo imagesy($img); Link to comment https://forums.phpfreaks.com/topic/36738-finding-width-and-height-of-uploaded-images/#findComment-175221 Share on other sites More sharing options...
LanceT Posted February 2, 2007 Author Share Posted February 2, 2007 Thanks a bunch! Link to comment https://forums.phpfreaks.com/topic/36738-finding-width-and-height-of-uploaded-images/#findComment-175224 Share on other sites More sharing options...
The Little Guy Posted February 2, 2007 Share Posted February 2, 2007 no problem Link to comment https://forums.phpfreaks.com/topic/36738-finding-width-and-height-of-uploaded-images/#findComment-175226 Share on other sites More sharing options...
JasonLewis Posted February 2, 2007 Share Posted February 2, 2007 to find the the width/height is easy. use the list() and getimagesize() function. here is a link to the php manual which has an example: http://au3.php.net/getimagesize Link to comment https://forums.phpfreaks.com/topic/36738-finding-width-and-height-of-uploaded-images/#findComment-175227 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.