Forum Moderators: open
I'm tearing my hair out trying to write this little script.
Basically What I want to do is display an image with a maxium width of say 80 pixels but keep the ratio of the height.
Is it at all possible?
the thing is I can do it with one file in javascript but I'm putting this in a loop in asp!
intWidth = yourCurrentImageWidth
intHeight = yourCurrentImageHeight
if intWidth > intHeight then
intRatio = (yourMaxWidth / intWidth)
else
intRatio = (yourMaxHeight / intHeight)
end if
newWidth = intWidth * intRatio
newHeight = intHeight * intRatio