`
- 浏览:
6868375 次
- 性别:
- 来自:
上海
-
-
-
<html><head>
-
<TITLE>dbtable.asp</TITLE>
-
</head>
-
<bodybgcolor="#FFFFFF">
-
<%
-
graphic="images/learnaspiconmain.gif"
-
HW=ReadImg(graphic)
-
Response.Writegraphic&"Dimensions:"&HW(0)&"x"&HW(1)&"<br>"
-
response.write"<imgsrc=""/"&graphic&""""
-
response.writeheight="""&HW(0)&"""
-
response.writewidth="""&HW(0)&"">"
-
%>
-
</body></html>
- Thelibrarythatisincludedis:
-
<%
- DimHW
- FunctionAscAt(s,n)
-
AscAscAt=Asc(Mid(s,n,1))
- EndFunction
- FunctionHexAt(s,n)
-
HexHexAt=Hex(AscAt(s,n))
- EndFunction
- FunctionisJPG(fichero)
-
IfinStr(uCase(fichero),".JPG")<>0Then
-
isJPG=true
- Else
-
isJPG=false
- EndIf
- EndFunction
- FunctionisPNG(fichero)
-
IfinStr(uCase(fichero),".PNG")<>0Then
-
isPNG=true
- Else
-
isPNG=false
- EndIf
- EndFunction
- FunctionisGIF(fichero)
-
IfinStr(uCase(fichero),".GIF")<>0Then
-
isGIF=true
- Else
-
isGIF=false
- EndIf
- EndFunction
- FunctionisBMP(fichero)
-
IfinStr(uCase(fichero),".BMP")<>0Then
-
isBMP=true
- Else
-
isBMP=false
- EndIf
- EndFunction
- FunctionisWMF(fichero)
-
IfinStr(uCase(fichero),".WMF")<>0Then
-
isWMF=true
- Else
-
isWMF=false
- EndIf
- EndFunction
- FunctionisWebImg(f)
- IfisGIF(f)orisJPG(f)orisPNG(f)orisBMP(f)orisWMF(f)Then
-
isWebImg=true
- Else
-
isWebImg=true
- EndIf
- EndFunction
- FunctionReadImg(fichero)
- IfisGIF(fichero)Then
-
ReadImg=ReadGIF(fichero)
- Else
- IfisJPG(fichero)Then
-
ReadImg=ReadJPG(fichero)
- Else
- IfisPNG(fichero)Then
-
ReadImg=ReadPNG(fichero)
- Else
- IfisBMP(fichero)Then
-
ReadImg=ReadPNG(fichero)
- Else
- IfisWMF(fichero)Then
-
ReadImg=ReadWMF(fichero)
- Else
-
ReadImg=Array(0,0)
- EndIf
- EndIf
- EndIf
- EndIf
- EndIf
- EndFunction
- FunctionReadJPG(fichero)
- Dimfso,ts,s,HW,nbytes
-
HW=Array("","")
-
Setfso=CreateObject("Scripting.FileSystemObject")
-
Setts=fso.OpenTextFile(Server.MapPath("/"&fichero),1)
-
s=Right(ts.Read(167),4)
- HW(0)=HexToDec(HexAt(s,3)&HexAt(s,4))
- HW(1)=HexToDec(HexAt(s,1)&HexAt(s,2))
- ts.Close
-
ReadJPG=HW
- EndFunction
- FunctionReadPNG(fichero)
- Dimfso,ts,s,HW,nbytes
-
HW=Array("","")
-
Setfso=CreateObject("Scripting.FileSystemObject")
-
Setts=fso.OpenTextFile(Server.MapPath("/"&fichero),1)
-
s=Right(ts.Read(24),8)
- HW(0)=HexToDec(HexAt(s,3)&HexAt(s,4))
- HW(1)=HexToDec(HexAt(s,7)&HexAt(s,8))
- ts.Close
-
ReadPNG=HW
- EndFunction
- FunctionReadGIF(fichero)
- Dimfso,ts,s,HW,nbytes
-
HW=Array("","")
-
Setfso=CreateObject("Scripting.FileSystemObject")
-
Setts=fso.OpenTextFile(Server.MapPath("/"&fichero),1)
-
s=Right(ts.Read(10),4)
- HW(0)=HexToDec(HexAt(s,2)&HexAt(s,1))
- HW(1)=HexToDec(HexAt(s,4)&HexAt(s,3))
- ts.Close
-
ReadGIF=HW
- EndFunction
- FunctionReadWMF(fichero)
- Dimfso,ts,s,HW,nbytes
-
HW=Array("","")
-
Setfso=CreateObject("Scripting.FileSystemObject")
-
Setts=fso.OpenTextFile(Server.MapPath("/"&fichero),1)
-
s=Right(ts.Read(14),4)
- HW(0)=HexToDec(HexAt(s,2)&HexAt(s,1))
- HW(1)=HexToDec(HexAt(s,4)&HexAt(s,3))
- ts.Close
-
ReadWMF=HW
- EndFunction
- FunctionReadBMP(fichero)
- Dimfso,ts,s,HW,nbytes
-
HW=Array("","")
-
Setfso=CreateObject("Scripting.FileSystemObject")
-
Setts=fso.OpenTextFile(Server.MapPath("/"&fichero),1)
-
s=Right(ts.Read(24),8)
- HW(0)=HexToDec(HexAt(s,4)&HexAt(s,3))
- HW(1)=HexToDec(HexAt(s,8)&HexAt(s,7))
- ts.Close
-
ReadBMP=HW
- EndFunction
- FunctionisDigit(c)
-
IfinStr("0123456789",c)<>0Then
-
isDigit=true
- Else
-
isDigit=false
- EndIf
- EndFunction
- FunctionisHex(c)
-
IfinStr("0123456789ABCDEFabcdef",c)<>0Then
-
isHex=true
- Else
-
ishex=false
- EndIf
- EndFunction
- FunctionHexToDec(cadhex)
- Dimn,i,ch,decimal
-
decimal=0
-
n=Len(cadhex)
-
Fori=1Ton
-
ch=Mid(cadhex,i,1)
- IfisHex(ch)Then
-
decimaldecimal=decimal*16
- IfisDigit(c)Then
-
decimaldecimal=decimal+ch
- Else
-
decimaldecimal=decimal+Asc(uCase(ch))-Asc("A")
- EndIf
- Else
-
HexToDec=-1
- EndIf
- Next
-
HexToDec=decimal
- EndFunction
-
%>
分享到:
Global site tag (gtag.js) - Google Analytics
相关推荐
Asp.Net(C#)利用XPath解析XML文档示例 XSL .Net框架下的XSLT转换技术简介 一个XSLT的简单例子 XSLXSLT板主题整理 xsl入门的好文章 新手学习XSL的好东西 XSL语法介绍 XSL学习心得 - 调用属性值 XSLT与XML转换的详细...
第2篇主要介绍了在C/S架构的移动应用程序中,如何利用.NET Compact Framework进行GUI设计和客户端应用的编程。第3篇主要介绍了.NET全新的数据访问模型ADO.NET和XML处理技术。第4篇主要介绍了移动Web应用程序的开发...
第2篇主要介绍了在C/S架构的移动应用程序中,如何利用.NET Compact Framework进行GUI设计和客户端应用的编程。第3篇主要介绍了.NET全新的数据访问模型ADO.NET和XML处理技术。第4篇主要介绍了移动Web应用程序的开发...
系统硬件信息、存储设备管理、鼠标及键盘、声音和视频、图形和图像、网络、数据库) 《远程控制编程技术》源代码 内含(重启、图片操作、ip操作、键盘与鼠标、客户端以及服务端、文件传输等实例源码) 多个VC++...
像坐标控制、旋转矩阵、定时器、生成图像、数据初始化、矩阵乘法、坐标旋转、判断是否是顺时针方向排列、鼠标按下、放开时的动作等,都可在本源码中得以体现。 Java编写的显示器显示模式检测程序 2个目标文件 内容...
像坐标控制、旋转矩阵、定时器、生成图像、数据初始化、矩阵乘法、坐标旋转、判断是否是顺时针方向排列、鼠标按下、放开时的动作等,都可在本源码中得以体现。 Java编写的显示器显示模式检测程序 2个目标文件 内容...
下列命令示例向指定设备写入一个新的主引导记录: fixmbr DeviceHardDisk0 注意 如果不指定 device_name,新的主引导记录将被写入引导设备,即装载主系统的驱动器。 如果系统检测到无效或非标准分区表标记...
//各种尺寸 s += " 网页可见区域宽:"+ document.body.clientWidth; s += " 网页可见区域高:"+ document.body.clientHeight; s += " 网页可见区域高:"+ document.body.offsetWeight +" (包括边线的宽)"; s += ...