马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
强大的可扩展性。ASP具有强大的扩展性,可以实现与多种网络、硬件设备的连接:通过专用的通讯线路远程接入企业;通过远程拨号服务器为远程拨号客户提供服务;通过WAP为移动电话互联网客户服务。无组件|无组件<%
ClassImgWHInfo猎取图片宽度和高度的类,撑持JPG,GIF,PNG,BMP
DimASO
PrivateSubClass_Initialize
SetASO=Server.CreateObject("ADODB.Stream")
ASO.Mode=3
ASO.Type=1
ASO.Open
EndSub
PrivateSubClass_Terminate
Err.Clear
SetASO=Nothing
EndSub
PrivateFunctionBin2Str(Bin)
DimI,Str
ForI=1ToLenB(Bin)
clow=MidB(Bin,I,1)
IfASCB(clow)<128Then
Str=Str&Chr(ASCB(clow))
Else
I=I+1
IfI<=LenB(Bin)ThenStr=Str&Chr(ASCW(MidB(Bin,I,1)&clow))
EndIf
Next
Bin2Str=Str
EndFunction
PrivateFunctionNum2Str(Num,Base,Lens)
DimRet
Ret=""
While(Num>=Base)
Ret=(NumModBase)&Ret
Num=(Num-NumModBase)/Base
Wend
Num2Str=Right(String(Lens,"0")&Num&Ret,Lens)
EndFunction
PrivateFunctionStr2Num(Str,Base)
DimRet,I
Ret=0
ForI=1ToLen(Str)
Ret=Ret*base+Cint(Mid(Str,I,1))
Next
Str2Num=Ret
EndFunction
PrivateFunctionBinVal(Bin)
DimRet,I
Ret=0
ForI=LenB(Bin)To1Step-1
Ret=Ret*256+AscB(MidB(Bin,I,1))
Next
BinVal=Ret
EndFunction
PrivateFunctionBinVal2(Bin)
DimRet,I
Ret=0
ForI=1ToLenB(Bin)
Ret=Ret*256+AscB(MidB(Bin,I,1))
Next
BinVal2=Ret
EndFunction
PrivateFunctionGetImageSize(filespec)
DimbFlag
DimRet(3)
ASO.LoadFromFile(filespec)
bFlag=ASO.Read(3)
SelectCaseHex(binVal(bFlag))
Case"4E5089":
ASO.Read(15)
ret(0)="PNG"
ret(1)=BinVal2(ASO.Read(2))
ASO.Read(2)
ret(2)=BinVal2(ASO.Read(2))
Case"464947":
ASO.read(3)
ret(0)="gif"
ret(1)=BinVal(ASO.Read(2))
ret(2)=BinVal(ASO.Read(2))
Case"535746":
ASO.read(5)
binData=ASO.Read(1)
sConv=Num2Str(ascb(binData),2,8)
nBits=Str2Num(left(sConv,5),2)
sConv=mid(sConv,6)
While(len(sConv)<nBits*4)
binData=ASO.Read(1)
sConv=sConv&Num2Str(AscB(binData),2,8)
Wend
ret(0)="SWF"
ret(1)=Int(Abs(Str2Num(Mid(sConv,1*nBits+1,nBits),2)-Str2Num(Mid(sConv,0*nBits+1,nBits),2))/20)
ret(2)=Int(Abs(Str2Num(Mid(sConv,3*nBits+1,nBits),2)-Str2Num(Mid(sConv,2*nBits+1,nBits),2))/20)
Case"FFD8FF":
Do
Do:p1=binVal(ASO.Read(1)):LoopWhilep1=255AndNotASO.EOS
Ifp1>191Andp1<196ThenExitDoElseASO.read(binval2(ASO.Read(2))-2)
Do:p1=binVal(ASO.Read(1)):LoopWhilep1<255AndNotASO.EOS
LoopWhileTrue
ASO.Read(3)
ret(0)="JPG"
ret(2)=binval2(ASO.Read(2))
ret(1)=binval2(ASO.Read(2))
CaseElse:
Ifleft(Bin2Str(bFlag),2)="BM"Then
ASO.Read(15)
ret(0)="BMP"
ret(1)=binval(ASO.Read(4))
ret(2)=binval(ASO.Read(4))
Else
ret(0)=""
EndIf
EndSelect
ret(3)="width="""&ret(1)&"""height="""&ret(2)&""""
getimagesize=ret
EndFunction
PublicFunctionimgW(IMGPath)
DimFSO,IMGFile,FileExt,Arr
SetFSO=Server.CreateObject("Scripting.FileSystemObject")
If(FSO.FileExists(IMGPath))Then
SetIMGFile=FSO.GetFile(IMGPath)</p>写软件都是想的时间比写的时间要长的.如果反过来了就得看看是什么原因了.另外大家可以回去问问公司里的小MM.(一般企业里,跟你们交付软件接触得最多的是她们) |