AspJpeg主要功能:生成缩略图片、生成水印图片、图片合并、图片切割、数据库支持、安全码技术
具体代码如下:
Function AspJpeg_Small(FileName)
Dim Jpeg,PicWidth,PicHeight
PicWidth=160'目标图片宽度
PicHeight=0
Set Jpeg = Server.CreateObject("Persits.Jpeg") ' 建立对象
Jpeg.Open Server.mappath(FileName)' 图片所在位置
if Jpeg.OriginalWidth > PicWidth then
Jpeg.Width = PicWidth
if PicHeight=0 then
Jpeg.Height = PicWidth/Jpeg.OriginalWidth * Jpeg.OriginalHeight
else
Jpeg.Height = PicHeight
end if
Jpeg.Save Server.mappath(FileName)' 保存文件
end if
Set Jpeg = Nothing
end function
留言区(共0条)