asp生成缩略图_asp生成缩略图代码

更新时间:2015-01-14    来源:代码生成    手机版     字体:

【www.bbyears.com--代码生成】

 asp生成缩略图   asp 自动生成缩略图   asp.net 生成缩略图   asp代码生成器 
 aspjpeg是免费的,下一个就能用,现在一般的空间都支持这个组件


  无组件的原理和在图片上写width=100 height=100 一样的,只是宽高等比了,体积还是没有压缩,估计无组件做不了这个吧

   call compressphoto(photopath,120,90)        "原图路径 缩略图宽 缩略图高

   function compressphoto(photopath,widthx,heighty)

   set jpeg1=server.createobject("persits.jpeg")
   jpeg1.open server.mappath(photopath)

   jpeg1.width=widthx
   jpeg1.height=heighty

   jpeg1.save server.mappath("111cn/" & photopath) "保存缩略图

   End function       



   "判断服务器是否支持aspjpeg

    on error resume next
    set jpeg1=server.createobject("persits.jpeg")
    if err.number<>0 then
     Response.write "服务器不支持ASPJPEG组件!"
    else
     Response.write "服务器支持ASPJPEG组件!"
    End if

本文来源:http://www.bbyears.com/wangyetexiao/12198.html

猜你感兴趣

热门标签

更多>>

本类排行