Dragen Posted April 18, 2007 Share Posted April 18, 2007 how can I use getimagesize(); to find the height and width of an image? I know it's a simple thing to do, but I don't quite understand the getimagesize and how to use it.. I've read the manual, but don't understand how to save the width and height as variables.. thanks Link to comment https://forums.phpfreaks.com/topic/47482-solved-getimagesize-finding-width-and-height/ Share on other sites More sharing options...
Dragen Posted April 18, 2007 Author Share Posted April 18, 2007 nevermind, I've figured it out.. pretty simple really.. Link to comment https://forums.phpfreaks.com/topic/47482-solved-getimagesize-finding-width-and-height/#findComment-231738 Share on other sites More sharing options...
JBS103 Posted April 18, 2007 Share Posted April 18, 2007 For reference: I believe this is how it outputs as per notes on PHP.net. I cannot check as my host does not allow use of that function. Array[0] = Width Array[1] = Height Array[2] = Image Type Flag Array[3] = width="xxx" height="xxx" Array[4] = channels (PHP >= 4.3.0) Array[5] = bits (PHP >= 4.3.0) Array[6] = mime (PHP >= 4.3.0) Link to comment https://forums.phpfreaks.com/topic/47482-solved-getimagesize-finding-width-and-height/#findComment-231741 Share on other sites More sharing options...
Dragen Posted April 18, 2007 Author Share Posted April 18, 2007 yeah, thats pretty much it. Link to comment https://forums.phpfreaks.com/topic/47482-solved-getimagesize-finding-width-and-height/#findComment-231742 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.