⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 picsmall.aspx

📁 不错的ASP整站源代码。在IIS环境下运行都没有问题
💻 ASPX
字号:
<script language="VB" runat="server">
Sub Page_Load(sender As Object, e As EventArgs)

Dim image,aNewImage,aNewImage2 As System.Drawing.Image
dim width,height,newwidth,newheight,newwidth2,newheight2 as integer
Dim callb As System.Drawing.Image.GetThumbnailImageAbort

'生成缩略图
image=System.Drawing.Image.FromFile(Server.MapPath("/Up_files/product")&"/"&Request.QueryString("fname"))
width=image.Width
height=image.height
if width>height then
newwidth2=200
newheight2=image.height/image.Width*newwidth2
newwidth=120
newheight=image.height/image.Width*newwidth
else
newheight2=200
newwidth2=image.Width/image.height*newheight2
newheight=120
newwidth=image.Width/image.height*newheight
end if

aNewImage2=image.GetThumbnailImage(newwidth2,newheight2,callb,new System.IntPtr())
aNewImage2.Save(Server.MapPath("/Up_files/product/200/"+(Request.QueryString("fname"))))

aNewImage=image.GetThumbnailImage(newwidth,newheight,callb,new System.IntPtr())
aNewImage.Save(Server.MapPath("/Up_files/product/120/"+(Request.QueryString("fname"))))
image.Dispose()

End Sub
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -