[ASP][Object][AspJpeg]Creating Thumbnails

利用AspJpeg元件,建立縮圖

等比例建立縮圖

' Create instance of AspJpeg
Set Jpeg = Server.CreateObject("Persits.Jpeg")
' Open source image
Jpeg.Open "c:\path\myimage.jpg"

' New width
L = 100

' Resize, preserve aspect ratio
Jpeg.Width = L
Jpeg.Height = Jpeg.OriginalHeight * L / Jpeg.OriginalWidth

' create thumbnail and save it to disk
Jpeg.Save "c:\path\thumbnail.jpg"

參考網址http://www.aspjpeg.com/manual_02.html#2_2