<% '//////////// GPS:Get Picture Size ////////////// '//////////////利用ADODB.stream获取图片尺寸////////////// '/////////Cited By Leon(心晴) 2005年8月11日////////// Class GPS Dim aso Private Sub Class_Initialize Set aso=CreateObject("Adodb.Stream") aso.Mode=3 aso.Type=1 aso.Open End Sub Private Sub Class_Terminate set aso=nothing End Sub Private Function Bin2Str(Bin) Dim I, Str For I=1 to LenB(Bin) clow=MidB(Bin,I,1) if AscB(clow)<128 then Str = Str & Chr(ASCB(clow)) Else I=I+1 if I <= LenB(Bin) then Str = Str & Chr(ASCW(MidB(Bin,I,1)&clow)) end If Next Bin2Str = Str End Function Private Function Num2Str(num,base,lens) 'GPS (2005-8-11) dim ret ret = "" while(num>=base) ret = (num mod base) & ret num = (num - num mod base)/base wend Num2Str = right(string(lens,"0") & num & ret,lens) End Function Private Function Str2Num(str,base) 'GPS (2005-8-11) dim ret ret = 0 for i=1 to len(str) ret = ret *base + cint(mid(str,i,1)) next Str2Num=ret End Function Private Function BinVal(bin) 'GPS (2002-8-11) dim ret ret = 0 for i = lenb(bin) to 1 step -1