<%
myF=500 'Full Image Size
myPath="D:\PathToMySitesImageFolder\images\"
'---------Upload Image-------------------------------------
Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.Save myPath
myImage=Upload.files.item("Image").filename
strFile = myPath&myImage
'----------------------------------------------------------
'---------------Image--------------------------------------
Set Image = Server.CreateObject("AspImage.Image")
Image.LoadImage(strFile)
WidthF = image.MaxX
HeightF = image.MaxY
if (WidthF<myF) and (HeightF<myF) then
else
if WidthF>HeightF then
intRatio=(myF/WidthF)
image.resizeR WidthF*intRatio, HeightF*intRatio
else
intRatio=(myF/HeightF)
image.resizeR WidthF*intRatio, HeightF*intRatio
end if
end if
Image.ImageFormat = 1 'format 1=jpg
Image.JPEGQuality = 85 'percent
Image.FileName = strFile
Image.SaveImage
Set Image = Nothing
'---------------------------------------------------------
Set Upload = Nothing
%>