Alfa9 Posted June 27, 2011 Share Posted June 27, 2011 Hey guys I want to know how can I get the image dimentions whene it's uploaded, J just don't want it to be bigger then 100px width and 100px height Please Help, or rather just put me in the right direction It will be much apreciated Quote Link to comment https://forums.phpfreaks.com/topic/240563-get-the-image-dimentions-on-uplaod/ Share on other sites More sharing options...
WebStyles Posted June 27, 2011 Share Posted June 27, 2011 list($width, $height, $type, $attr) = getimagesize("image_name.jpg"); took me 2 seconds to find that on google. Quote Link to comment https://forums.phpfreaks.com/topic/240563-get-the-image-dimentions-on-uplaod/#findComment-1235671 Share on other sites More sharing options...
jcbones Posted June 27, 2011 Share Posted June 27, 2011 getimagesize() list($width,$height,$type) = getimagesize('image.jpg'); echo 'Image of type: ' . $type . ' has a width of: ' . $width . ' and a height of: ' . $height; If you want to resize the image, do a google search for 'php simple image'. White-hat-webdesign has a great little class that is easy to implement. Ah, webstyles beat me. Quote Link to comment https://forums.phpfreaks.com/topic/240563-get-the-image-dimentions-on-uplaod/#findComment-1235674 Share on other sites More sharing options...
Alfa9 Posted June 27, 2011 Author Share Posted June 27, 2011 list($width, $height, $type, $attr) = getimagesize("image_name.jpg"); took me 2 seconds to find that on google. Well, I didn't ! Thank's alot dude, I apreciated Quote Link to comment https://forums.phpfreaks.com/topic/240563-get-the-image-dimentions-on-uplaod/#findComment-1235678 Share on other sites More sharing options...
Alfa9 Posted June 27, 2011 Author Share Posted June 27, 2011 Ah, webstyles beat me. That's okey, apreciate the help too Quote Link to comment https://forums.phpfreaks.com/topic/240563-get-the-image-dimentions-on-uplaod/#findComment-1235679 Share on other sites More sharing options...
WebStyles Posted June 27, 2011 Share Posted June 27, 2011 you're welcome. google it though, like jcbones said, so you can get an explanation on how it works. Quote Link to comment https://forums.phpfreaks.com/topic/240563-get-the-image-dimentions-on-uplaod/#findComment-1235680 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.