Results 1 to 1 of 1
Dec 8, 2011, 05:27 #1
- Join Date
- Feb 2006
- Chepstow, South Wales
- 0 Post(s)
- 0 Thread(s)
Checking height and width of image and controlling it
I am doing a small website for a antique clocks dealer, and have a page where the image is shown and then text to the right which isn't a problem.
The client uploads a large image to the database because there a pop up option to see the image in full view, and then this is where I need to find out the size of the image for the thumbnail pic.
Some of the image are of long clocks so thats fine as I can just set the height to say 650px and leave it at that, and then its its nicely on the page as the width doesnt get to big in relation.
But some of the clocks are short but wide, so what I wanted to do was have a script where if the height of the image was more than 650px, it didnt allow it to go over that, but if the image is say wider than 300px, then it stopped it there and the height adjusted accordingly.
Does that make sense?