<% ' Create instance of AspJpeg Set Jpeg = Server.CreateObject("Persits.Jpeg") ' Compute path to source image Path = Server.MapPath("../images/apple.jpg")
' Open source image Jpeg.Open Path
' Decrease image size by 50% Jpeg.Width = Jpeg.OriginalWidth / 2 Jpeg.Height = Jpeg.OriginalHeight / 2
' create thumbnail and save it to disk Jpeg.Save Server.MapPath("apple_small.jpg")
%>
|