<script>ec(2);</script> call water_jpeg(filenameB) '调用aspjpeg组件生成缩略图 Sub small_Jpeg(filenameB,filenameS) Set Jpeg = Server.CreateObject("Persits.Jpeg") '调用组件 Path = Server.MapPath(filenameB) '待处理图片路径 Jpeg.Open Path '打开图片 '高与宽为原图片的1/3 Jpeg.Width = Jpeg.OriginalWidth / 4 Jpeg.Height = Jpeg.OriginalHeight / 4 '如果原来的1/4小于120px或大于150px,就等比例生成一张宽为150px的 小图 if Jpeg.Width < 120 or Jpeg.Width > 200 then Jpeg.Width = 150 Jpeg.Height = Jpeg.OriginalHeight * 150 / Jpeg.OriginalWidth end if Jpeg.Save Server.MapPath(filenameS) Set Jpeg = Nothing end Sub 本站原创www.111cn.net
|