Asp Jpeg is a server component that will help your ASP or ASP.NET applications with all their image management needs. With Asp Jpeg, you can create high-quality thumbnails, logo-stamp photographs, extract metadata information from images, crop, enhance, rotate, convert, and much more. Of course, resizing images in webpages will not give you problems calculating the height based on the width since you can just input the width and the height will automatically be calculated.
However, if you wish to have high quality resized images, Asp Jpeg is a good component for that purpose. It is not free though, so you will have to purchase it. If you have one, read on. Using the component is pretty simple. Check out the code below in VBScript.
Response.Expires = 0
' create instance of Asp Jpeg
Set Jpeg = Server.CreateObject("Persits.Jpeg")
Jpeg.RegKey = "YOUR_REGISTRATION_KEY"
' Open source file
Path = Server.MapPath(request("path"))
' Set new height and width
Jpeg.Width = Request("Width")
Jpeg.Height = Jpeg.OriginalHeight * Jpeg.Width / Jpeg.OriginalWidth
' Perform resizing and send resultant image to client browser