tigrou1976
12-10-2005, 06:34 PM
Hello and thanks in advance,
Here is the problem: I have a dynamic page that shows thumbnails. you can see an example at: http://joselino.com/gallery_pics.cfm?groupID=4
As you can see the images are set to: <img src="mydynamic.jpg" width="150"> If I set the height too I will get a distorted image if the image is another orientation than the set value, like horizontal.
What I need is to have all the photos the same size whether they are vertical OR horizontal.
I have a javascript idea like this: Make a script that loads in the header that preloads all the images, determines thier orientation.
ie: if image1.height > image1.width set image.orientation vertical
Then in the body put a conditional write script saying:
if image1.orientation = vertical write <img src="image1.jpg" height="150">
if image1.orientation = horizontal write <img src="image1.jpg" width="150">
If the basic code exists I can populate the code dynamically.
Maybe sombody has a different idea that is much simpler. Thanks!
Here is the problem: I have a dynamic page that shows thumbnails. you can see an example at: http://joselino.com/gallery_pics.cfm?groupID=4
As you can see the images are set to: <img src="mydynamic.jpg" width="150"> If I set the height too I will get a distorted image if the image is another orientation than the set value, like horizontal.
What I need is to have all the photos the same size whether they are vertical OR horizontal.
I have a javascript idea like this: Make a script that loads in the header that preloads all the images, determines thier orientation.
ie: if image1.height > image1.width set image.orientation vertical
Then in the body put a conditional write script saying:
if image1.orientation = vertical write <img src="image1.jpg" height="150">
if image1.orientation = horizontal write <img src="image1.jpg" width="150">
If the basic code exists I can populate the code dynamically.
Maybe sombody has a different idea that is much simpler. Thanks!