Fins image size with asp (vbscript) for crop script.

I writ a basic cropping script. In VBscript. As follows:\[code\]<%Set Jpeg = Server.CreateObject("Persits.Jpeg")getsec = DateDiff("s","01/01/04",now())filename = "screenshots/"&getsec&".png"imgfile = request("imgfile")Jpeg.Open Server.MapPath(imgfile)Jpeg.Crop 0, 38, 320, 460Jpeg.Canvas.DrawPNG 0, 0, Server.MapPath("watermark.png")Jpeg.PNGOutput = TrueJpeg.Save Server.MapPath(filename)%><%=filename%>\[/code\]However instead of hard coding these variables:\[code\]Jpeg.Crop 0, 38, 320, 460\[/code\]I would like someway of using vbscript to find out the image size before I crop it, so that if different image sizes are uploaded the script can be more flexible. Anyone know how to do this?
 
Back
Top