Posted on 2011-02-28
I want to create a script that looks to see if the image that's getting ready to be displayed in my loop exceeds a 3:4 ratio.
Right now, I've got the width of my photos being displayed as 100. If they're close to 75 px high, the page looks great. But when I get into those dynamics where a picture is resized to 100 px wide and the hieght is 125, things start to look goofy.
I found getimagesize, but I've yet to be able to get my arms around how I grab the width, so I can compare it to the height and determine if it matches that ratio that looks the best with my page.
How do you grab the width and height using getimagesize?