bpops Posted February 21, 2008 Share Posted February 21, 2008 I've been trying to answer question all day, so I'm going to ask one of my own: Is there any way to obtain the width and height of an image WITHOUT opening it up? The idea here is that I want to display a lot of images (all stored on my server), and I want to place them on the page depending on their size. I fear opening them each up will take too much time. Any answers or opinions appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/92340-obtain-image-widthheight-without-opening/ Share on other sites More sharing options...
Daniel0 Posted February 21, 2008 Share Posted February 21, 2008 Use getimagesize(). Note: It will open the image internally. It's impossible otherwise. I'm not sure what you mean by opening it. Quote Link to comment https://forums.phpfreaks.com/topic/92340-obtain-image-widthheight-without-opening/#findComment-473106 Share on other sites More sharing options...
bpops Posted February 21, 2008 Author Share Posted February 21, 2008 For some reason I was under the impression that function accepted an opened image as its argument. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/92340-obtain-image-widthheight-without-opening/#findComment-473114 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.