|
Resize image
In this example we will resize an image using the AspJpeg component
. You can get a trial copy of this by
clicking here
<%
'create an instance of our object
Set thumbs = CreateObject("Persits.Jpeg")
'this is the path to your image or directory of images e.g
'ImagePath = Server.MapPath("/images") & "anim0122.jpg"
ImagePath = Server.MapPath("anim0122.jpg")
'open the image
thumbs.Open ImagePath
' resize the image
thumbs.Width = thumbs.OriginalWidth / 3
thumbs.Height = thumbs.OriginalHeight / 3
'save the thumbnail version
thumbs.Save Server.MapPath("thumbnail.jpg")
%>
<!--display thumbnail image-->
<p><img src = "thumbnail.jpg"> </p>
|