tigrou1976
12-11-2005, 05:23 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.
My javascript idea is 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.
Or, is there some ilayer, object or div technique I should use that is 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.
My javascript idea is 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.
Or, is there some ilayer, object or div technique I should use that is simpler?
Thanks!